Debian Codegraph @

src/ReCaptcha.h

raw symbols SCIP
1 // SPDX-FileCopyrightText: Nheko Contributors
2 //
3 // SPDX-License-Identifier: GPL-3.0-or-later
4
5 #pragma once
6
7 #include <QQmlEngine>
8
9 class ReCaptcha : public QObject
10 {
11 Q_OBJECT
12 QML_ELEMENT
13 QML_UNCREATABLE("")
14
15 Q_PROPERTY(QString context MEMBER m_context CONSTANT)
16 Q_PROPERTY(QString session MEMBER m_session CONSTANT)
17
18 public:
19 ReCaptcha(const QString &session, const QString &context, QObject *parent = nullptr);
20
21 Q_INVOKABLE void openReCaptcha();
22 Q_INVOKABLE void confirm() { emit confirmation(); }
23 Q_INVOKABLE void cancel() { emit cancelled(); }
24
25 signals:
26 void confirmation();
27 void cancelled();
28
29 private:
30 QString m_session;
31 QString m_context;
32 };