summaryrefslogtreecommitdiffstats
path: root/gui/widgets/ServerStatus.h
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2014-05-15 22:32:54 +0200
committerPetr Mrázek <peterix@gmail.com>2014-05-15 23:20:38 +0200
commit927217c7f06017db23b232f055dd5343e39d871f (patch)
tree0b1ce7a96285ebcfaa36084b150393a1eae1f1bf /gui/widgets/ServerStatus.h
parenta6a5241e120ac0f5bc43e8460379091979af850c (diff)
downloadMultiMC-927217c7f06017db23b232f055dd5343e39d871f.tar
MultiMC-927217c7f06017db23b232f055dd5343e39d871f.tar.gz
MultiMC-927217c7f06017db23b232f055dd5343e39d871f.tar.lz
MultiMC-927217c7f06017db23b232f055dd5343e39d871f.tar.xz
MultiMC-927217c7f06017db23b232f055dd5343e39d871f.zip
Status pills. This doesn't build yet.
Diffstat (limited to 'gui/widgets/ServerStatus.h')
-rw-r--r--gui/widgets/ServerStatus.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/gui/widgets/ServerStatus.h b/gui/widgets/ServerStatus.h
new file mode 100644
index 00000000..a116d3d4
--- /dev/null
+++ b/gui/widgets/ServerStatus.h
@@ -0,0 +1,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;
+};