2024-04-11 14:51:43 +08:00
|
|
|
#pragma once
|
2023-07-28 16:08:58 +08:00
|
|
|
|
|
|
|
#include <QQuickItem>
|
|
|
|
#include <QQuickPaintedItem>
|
|
|
|
#include <QPainter>
|
|
|
|
#include "stdafx.h"
|
|
|
|
|
2024-02-27 12:23:24 +08:00
|
|
|
/**
|
|
|
|
* @brief The FluWatermark class
|
|
|
|
*/
|
2024-04-11 14:51:43 +08:00
|
|
|
class FluWatermark : public QQuickPaintedItem {
|
|
|
|
Q_OBJECT
|
|
|
|
Q_PROPERTY_AUTO(QString, text)
|
|
|
|
Q_PROPERTY_AUTO(QPoint, gap)
|
|
|
|
Q_PROPERTY_AUTO(QPoint, offset);
|
|
|
|
Q_PROPERTY_AUTO(QColor, textColor);
|
|
|
|
Q_PROPERTY_AUTO(int, rotate);
|
|
|
|
Q_PROPERTY_AUTO(int, textSize);
|
2023-07-28 16:08:58 +08:00
|
|
|
QML_NAMED_ELEMENT(FluWatermark)
|
|
|
|
public:
|
|
|
|
explicit FluWatermark(QQuickItem *parent = nullptr);
|
|
|
|
|
2024-04-11 14:51:43 +08:00
|
|
|
void paint(QPainter *painter) override;
|
|
|
|
};
|