-
Notifications
You must be signed in to change notification settings - Fork 0
/
Client.hh
43 lines (36 loc) · 865 Bytes
/
Client.hh
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
#ifndef CLIENT_HH
#define CLIENT_HH
#include "Cluster.hh"
#include <QMainWindow>
#include <QMetaType>
#include <QtWidgets>
class Client : public QMainWindow
{
Q_OBJECT
private:
uint64_t writeCount = 0;
Cluster cluster;
QTimer timedWrite;
QTimer timedRefresh;
QLabel *lab_leader;
QTextEdit *text_leader;
QLabel *lab_packageLoss;
QTextEdit *text_packageLoss;
QLabel *lab_wrtieCount;
QTextEdit *text_writeCount;
QLabel *lab_commitIndex;
QTextEdit *text_commitIndex;
QLabel *lab_autoWrite;
QCheckBox *check_autoWrite;
public:
explicit Client(QWidget *parent = nullptr);
~Client();
public slots:
void handleAutoWrite();
void autoWrite();
void write(const char *command);
void startDataRefresh(int msec);
void stopDataRefresh();
void dataRefresh();
};
#endif // CLIENT_HH