-
Notifications
You must be signed in to change notification settings - Fork 2
/
drboardscontroller.h
42 lines (31 loc) · 1.14 KB
/
drboardscontroller.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
#ifndef DRBOARDSCONTROLLER_H
#define DRBOARDSCONTROLLER_H
#include <QObject>
#include <QStandardItemModel>
#include <QStandardItem>
#include "drconnectioncontroller.h"
#include "drconnection.h"
#include "drboarditem.h"
#include "drboardstreemodel.h";
class DRBoardsController : public DRConnectionController
{
Q_OBJECT
public:
DRBoardsTreeModel *boardsModel;
QStandardItemModel *threadsModel;
explicit DRBoardsController(DRServerConnection* connection);
void connectReceiver(QObject *object);
void disconnectReceiver(QObject *object);
void getBoards();
void getThreads(DRBoardItem *board);
public slots:
void connectionSucceeded(DRServerConnection *connection);
void connectionError(DRServerConnection *connection, DRError *error);
void connectionClosed(DRServerConnection *connection, DRError *error = NULL);
void receivedMessage(wi_p7_message_t *message, DRServerConnection *connection);
void receivedError(DRError *error, DRServerConnection *connection);
private:
void receivedBoard(wi_p7_message_t *message);
void receivedThread(wi_p7_message_t *message);
};
#endif // DRBOARDSCONTROLLER_H