mchuca's picture
Server Monitor: six editions (C++/Qt, Python, web for Linux and Windows), requirements and developer kit
bad179a
Raw History Blame Contribute Delete
895 Bytes
// 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;
};