-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathtelegramapp.h
47 lines (36 loc) · 1.06 KB
/
telegramapp.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef TELEGRAMAPP_H
#define TELEGRAMAPP_H
#include <QObject>
#include "telegramqml_macros.h"
#include "telegramqml_global.h"
#include "tqbaseobject.h"
/*!
* Define and Keep a Telegram App details
* to use in the Telegram.Engine component.
*/
class TelegramAppPrivate;
class TELEGRAMQMLSHARED_EXPORT TelegramApp : public QObject, public TqBaseObject
{
Q_OBJECT
Q_PROPERTY(qint32 appId READ appId WRITE setAppId NOTIFY appIdChanged)
Q_PROPERTY(QString appHash READ appHash WRITE setAppHash NOTIFY appHashChanged)
Q_PROPERTY(bool isValid READ isValid NOTIFY isValidChanged)
public:
TelegramApp(QObject *parent = 0);
virtual ~TelegramApp();
void setAppId(const qint32 &appId);
qint32 appId() const;
void setAppHash(const QString &appHash);
QString appHash() const;
virtual bool isValid() const;
static QStringList requiredProperties();
Q_SIGNALS:
void appIdChanged();
void appHashChanged();
void isValidChanged();
protected:
void refreshValid();
private:
TelegramAppPrivate *p;
};
#endif // TELEGRAMAPP_H