blob: a116d3d498f112d5a32788b065c2227f34594052 (
plain)
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
|
#pragma once
#include <QWidget>
#include <memory>
class QToolButton;
class QHBoxLayout;
class ServerStatus: public QWidget
{
Q_OBJECT
public:
explicit ServerStatus(QWidget *parent = nullptr, Qt::WindowFlags f = 0);
virtual ~ServerStatus() {};
public slots:
void updateStatusUI();
void updateStatusFailedUI();
void reloadStatus();
void StatusChanged();
private: /* methods */
clear();
addLine();
addStatus(QString name, bool online);
private: /* data */
QHBoxLayout * layout = nullptr;
QToolButton *m_statusRefresh = nullptr;
QPixmap goodIcon;
QPixmap badIcon;
QTimer statusTimer;
};
|