-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathtelegramstatus.h
50 lines (38 loc) · 1.25 KB
/
telegramstatus.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
48
49
50
#ifndef TELEGRAMSTATUS_H
#define TELEGRAMSTATUS_H
#include "telegramengine.h"
#include "tqobject.h"
class SendMessageActionObject;
class InputPeerObject;
class TelegramStatusTyping;
class TelegramStatusPrivate;
class TELEGRAMQMLSHARED_EXPORT TelegramStatus : public TqObject
{
Q_OBJECT
Q_PROPERTY(TelegramEngine* engine READ engine WRITE setEngine NOTIFY engineChanged)
Q_PROPERTY(bool online READ online WRITE setOnline NOTIFY onlineChanged)
Q_PROPERTY(TelegramStatusTyping* typing READ typing WRITE setTyping NOTIFY typingChanged)
public:
TelegramStatus(QObject *parent = 0);
virtual ~TelegramStatus();
void setEngine(TelegramEngine *engine);
TelegramEngine *engine() const;
void setOnline(bool online);
bool online() const;
void setTyping(TelegramStatusTyping *typing);
TelegramStatusTyping *typing() const;
static QStringList requiredProperties();
Q_SIGNALS:
void engineChanged();
void onlineChanged();
void typingChanged();
public Q_SLOTS:
void requestStatus(bool online);
void requestTyping(InputPeerObject *peer, SendMessageActionObject *action);
protected:
void refresh();
void timerEvent(QTimerEvent *e);
private:
TelegramStatusPrivate *p;
};
#endif // TELEGRAMSTATUS_H