forked from kutegram/client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.h
54 lines (43 loc) · 1.34 KB
/
mainwindow.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
51
52
53
54
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QtGui/QMainWindow>
#include <QModelIndex>
#include "flickcharm.h"
#include "library/telegramclient.h"
#include <QAction>
namespace Ui {
class MainWindow;
}
class DialogItemModel;
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
virtual ~MainWindow();
public slots:
void loginAction_triggered();
void logoutAction_triggered();
void exitAction_triggered();
void aboutAction_triggered();
void aboutQt_triggered();
void dialogView_activated(QModelIndex index);
void client_stateChanged(State state);
void client_gotLoginToken(qint64 mtm, qint32 expired, QString tokenUrl);
void client_gotSentCode(qint64 mtm, QString phone_code_hash);
void client_gotSocketError(QAbstractSocket::SocketError error);
void client_gotMTError(qint32 error_code);
void client_gotDHError(bool fail);
void client_gotMessageError(qint64 mtm, qint32 error_code);
void client_gotRPCError(qint64 mtm, qint32 error_code, QString error_message, bool handled);
void backAction_triggered();
private:
FlickCharm flickcharm;
TelegramClient *client;
Ui::MainWindow *ui;
QString phoneNumber;
DialogItemModel *dialogModel;
QAction backAction;
void showTypeDialog();
};
#endif // MAINWINDOW_H