-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathtopicwindow.h
44 lines (31 loc) · 898 Bytes
/
topicwindow.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
#ifndef TOPICWINDOW_H
#define TOPICWINDOW_H
#include <QWidget>
#include <QCloseEvent>
#include <string>
namespace Ui {
class TopicWindow;
}
class TopicWindow : public QWidget {
Q_OBJECT
public:
explicit TopicWindow(QWidget *parent = 0);
~TopicWindow();
void setTopic(QString topic);
private:
Ui::TopicWindow *ui;
std::string topic;
private slots:
void publishTopic();
void subscriptionStatus(bool status);
public slots:
void receiveMessage(std::string message);
signals:
void newMessage(std::string topic, std::string message, uint8_t qos, bool retain);
void addSubscription(std::string topic);
void removeSubscription(std::string topic);
void windowClosing(std::string topic);
protected:
void closeEvent(QCloseEvent *event);
};
#endif // TOPICWINDOW_H