You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
764 B
34 lines
764 B
// statuspage.h — Status page (NTP + connections + live clock) in settings |
|
#pragma once |
|
|
|
#include <QWidget> |
|
#include <QPlainTextEdit> |
|
#include <QPushButton> |
|
#include <QLabel> |
|
#include <QFrame> |
|
#include <QTimer> |
|
|
|
class UtunNode; |
|
|
|
class StatusPage : public QWidget { |
|
Q_OBJECT |
|
public: |
|
explicit StatusPage(UtunNode* node, QWidget* parent = nullptr); |
|
~StatusPage() override; |
|
void refreshStatus(); |
|
void setText(const QString& text) { m_textEdit->setPlainText(text); } |
|
|
|
private slots: |
|
void onRefreshClicked(); |
|
|
|
private: |
|
void updateClock(); |
|
|
|
QPlainTextEdit* m_textEdit; |
|
QPushButton* m_refreshBtn; |
|
QLabel* m_clockLabel; |
|
QFrame* m_clockFrame; |
|
QTimer* m_clockTimer; |
|
UtunNode* m_node; |
|
}; |
|
|
|
|