From db877ba121ff87a4e029daf8555d85dfef45993a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Mon, 9 Feb 2015 01:51:14 +0100 Subject: NOISSUE move everything. --- application/widgets/ServerStatus.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 application/widgets/ServerStatus.h (limited to 'application/widgets/ServerStatus.h') diff --git a/application/widgets/ServerStatus.h b/application/widgets/ServerStatus.h new file mode 100644 index 00000000..fdd43677 --- /dev/null +++ b/application/widgets/ServerStatus.h @@ -0,0 +1,37 @@ +#pragma once +#include +#include +#include +#include +#include + +class IconLabel; +class QToolButton; +class QHBoxLayout; +class StatusChecker; + +class ServerStatus: public QWidget +{ + Q_OBJECT +public: + explicit ServerStatus(QWidget *parent = nullptr, Qt::WindowFlags f = 0); + virtual ~ServerStatus(); + ; +public slots: + void reloadStatus(); + void StatusChanged(const QMap statuses); + void StatusReloading(bool is_reloading); + +private: /* methods */ + void addLine(); + void addStatus(QString key, QString name); + void setStatus(QString key, int value); +private: /* data */ + QHBoxLayout * layout = nullptr; + QToolButton *m_statusRefresh = nullptr; + QMap serverLabels; + QIcon goodIcon; + QIcon yellowIcon; + QIcon badIcon; + std::shared_ptr m_statusChecker; +}; -- cgit v1.2.3