2024-04-11 14:51:43 +08:00
|
|
|
#pragma once
|
2023-08-08 15:44:10 +08:00
|
|
|
|
|
|
|
#include <QQuickItem>
|
|
|
|
#include <QQuickPaintedItem>
|
|
|
|
#include <QPainter>
|
|
|
|
#include "stdafx.h"
|
|
|
|
|
2024-02-27 12:23:24 +08:00
|
|
|
/**
|
|
|
|
* @brief The FluQrCodeItem class
|
|
|
|
*/
|
2024-04-11 14:51:43 +08:00
|
|
|
class FluQrCodeItem : public QQuickPaintedItem {
|
2024-06-28 17:09:23 +08:00
|
|
|
Q_OBJECT
|
2024-04-11 14:51:43 +08:00
|
|
|
|
2024-06-28 17:09:23 +08:00
|
|
|
Q_PROPERTY_AUTO(QString, text)
|
|
|
|
Q_PROPERTY_AUTO(QColor, color)
|
|
|
|
Q_PROPERTY_AUTO(QColor, bgColor)
|
|
|
|
Q_PROPERTY_AUTO(int, size)
|
2024-02-27 12:23:24 +08:00
|
|
|
QML_NAMED_ELEMENT(FluQrCodeItem)
|
2023-08-08 15:44:10 +08:00
|
|
|
public:
|
2024-02-27 12:23:24 +08:00
|
|
|
explicit FluQrCodeItem(QQuickItem *parent = nullptr);
|
2023-08-08 15:44:10 +08:00
|
|
|
|
2024-04-11 14:51:43 +08:00
|
|
|
void paint(QPainter *painter) override;
|
2024-06-28 17:09:23 +08:00
|
|
|
};
|