FluentUI/src/FluCaptcha.h

30 lines
542 B
C
Raw Normal View History

2024-04-11 14:51:43 +08:00
#pragma once
2023-08-18 11:46:02 +08:00
#include <QQuickItem>
#include <QQuickPaintedItem>
#include <QPainter>
#include "stdafx.h"
2024-02-27 12:23:24 +08:00
/**
* @brief The FluCaptcha class
*/
2024-04-11 14:51:43 +08:00
class FluCaptcha : public QQuickPaintedItem {
Q_OBJECT
Q_PROPERTY_AUTO(QFont, font);
Q_PROPERTY_AUTO(bool, ignoreCase);
2023-08-18 11:46:02 +08:00
QML_NAMED_ELEMENT(FluCaptcha)
2024-04-11 14:51:43 +08:00
2023-08-18 11:46:02 +08:00
public:
explicit FluCaptcha(QQuickItem *parent = nullptr);
2024-04-11 14:51:43 +08:00
void paint(QPainter *painter) override;
2023-08-18 11:46:02 +08:00
Q_INVOKABLE void refresh();
2024-04-11 14:51:43 +08:00
2024-04-11 19:18:37 +08:00
[[maybe_unused]] Q_INVOKABLE bool verify(const QString &code);
2024-04-11 14:51:43 +08:00
2023-09-13 15:11:22 +08:00
private:
QString _code;
2023-08-18 11:46:02 +08:00
};