File size: 895 Bytes
bad179a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | // Detail-page tab interface and the main window (sidebar, dashboard, server page, events, tray).
#pragma once
#include "core/Session.h"
#include <QMainWindow>
struct Tab : QWidget { // one aspect of the bound server session
QPointer<ServerSession> s;
qint64 span = 15 * 60000; // live chart window
std::function<void(const ServerConfig &)> save; // persists config edits
virtual void bind(ServerSession *x) { s = x; }
virtual void refresh() {} // new sample (only while visible)
virtual void analysis() {} // analyzer ran
};
QVector<QPair<QString, Tab *>> makeTabs();
struct MainWindow : QMainWindow {
explicit MainWindow(ServerManager *mgr);
void saveSnapshots(const QString &dir); // developer aid: PNG of every page
void closeEvent(QCloseEvent *e) override;
struct Ui;
Ui *ui;
};
|