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 {
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
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;
|
|
|
|
};
|