Cockatrice 2026-10-19-Development-3.1.2-beta.2
A virtual tabletop for multiplayer card games
Loading...
Searching...
No Matches
tab_developer.h
Go to the documentation of this file.
1
6
7#ifndef TAB_DEVELOPER_H
8#define TAB_DEVELOPER_H
9
10#include "tab.h"
11
12#include <QString>
13#include <QtGlobal>
14#include <qtmetamacros.h>
15
16class AbstractClient;
17class QCheckBox;
18class QLabel;
19class QPushButton;
20class QSpinBox;
21class QTableWidget;
22class QTimer;
23class Response;
24class TabSupervisor;
25
26class TabDeveloper : public Tab
27{
28 Q_OBJECT
29private:
31 QTableWidget *statsTable;
32 QTableWidget *commandTable;
33 QPushButton *refreshButton;
34 QLabel *statusLabel;
38 bool requestPending = false;
39
40 void appendStatRow(const QString &name, const QString &value);
41 void appendSeparatorRow(const QString &sectionTitle);
42 static QString formatBytes(quint64 bytes);
43 static QString formatDurationMs(qint64 ms);
44
45private slots:
46 void refreshClicked();
47 void serverStatsResponse(const Response &resp);
48 void autoRefreshToggled(bool checked);
50
51public:
52 explicit TabDeveloper(TabSupervisor *_tabSupervisor, AbstractClient *_client);
53 void retranslateUi() override;
54 [[nodiscard]] QString getTabText() const override
55 {
56 return tr("Developer");
57 }
58};
59
60#endif
Definition abstract_client.h:73
void refreshClicked()
Definition tab_developer.cpp:166
QTableWidget * commandTable
Definition tab_developer.h:32
void refreshIntervalChanged()
Definition tab_developer.cpp:189
static QString formatDurationMs(qint64 ms)
Definition tab_developer.cpp:137
void appendStatRow(const QString &name, const QString &value)
Definition tab_developer.cpp:145
QTimer * autoRefreshTimer
Definition tab_developer.h:37
void appendSeparatorRow(const QString &sectionTitle)
Definition tab_developer.cpp:153
void autoRefreshToggled(bool checked)
Definition tab_developer.cpp:178
AbstractClient * client
Definition tab_developer.h:30
void serverStatsResponse(const Response &resp)
Definition tab_developer.cpp:196
void retranslateUi() override
Definition tab_developer.cpp:106
QSpinBox * refreshIntervalSpinBox
Definition tab_developer.h:36
bool requestPending
Definition tab_developer.h:38
QCheckBox * autoRefreshCheckBox
Definition tab_developer.h:35
TabDeveloper(TabSupervisor *_tabSupervisor, AbstractClient *_client)
Definition tab_developer.cpp:41
QLabel * statusLabel
Definition tab_developer.h:34
QTableWidget * statsTable
Definition tab_developer.h:31
static QString formatBytes(quint64 bytes)
Definition tab_developer.cpp:120
QPushButton * refreshButton
Definition tab_developer.h:33
QString getTabText() const override
Definition tab_developer.h:54
Definition tab_supervisor.h:92
Tab(TabSupervisor *_tabSupervisor)
Definition tab.cpp:16
Definition response.proto:11