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
886 B
34 lines
886 B
// connmonitorwindow.h — ETCP connection monitor (standalone, non-modal window) |
|
#pragma once |
|
|
|
#include <QDialog> |
|
#include <QListWidget> |
|
#include <QPlainTextEdit> |
|
#include <QTimer> |
|
#include <cstdint> |
|
|
|
class ConnMonitorWindow : public QDialog { |
|
Q_OBJECT |
|
public: |
|
explicit ConnMonitorWindow(QWidget* parent = nullptr); |
|
~ConnMonitorWindow() override; |
|
|
|
void onConnList(const uint8_t* data, int len); |
|
void onConnMetrics(const uint8_t* data, int len); |
|
|
|
protected: |
|
void showEvent(QShowEvent* event) override; |
|
void hideEvent(QHideEvent* event) override; |
|
|
|
private slots: |
|
void onTimerTick(); |
|
void onConnSelected(QListWidgetItem* current, QListWidgetItem* previous); |
|
|
|
private: |
|
void requestMetricsForSelected(); |
|
|
|
QListWidget* m_connList; |
|
QPlainTextEdit* m_details; |
|
QTimer* m_timer; |
|
uint64_t m_selectedNodeId = 0; |
|
};
|
|
|