chatgui: add Status page in settings (NTP + connections status)
This commit is contained in:
1 parent
f0bb03c2cf
commit
960cde3eda
15 files changed
+651
-62
No files matched your search
@@ -2,6 +2,7 @@
|
||||
#include "settingsdialog.h"
|
||||
#include "networksettingspage.h"
|
||||
#include "databasesettingspage.h"
|
||||
#include "statuspage.h"
|
||||
#include "../transport/gui_bridge.h"
|
||||
#include "../../lib/mem.h"
|
||||
#include "../db/db_manager.h"
|
||||
@@ -40,6 +41,7 @@ SettingsDialog::SettingsDialog(const QString& configPath, DbManager* db, QWidget
|
||||
m_categoryList->addItem("Profile");
|
||||
m_categoryList->addItem("Network");
|
||||
m_categoryList->addItem("Database");
|
||||
m_categoryList->addItem("Status");
|
||||
mainLayout->addWidget(m_categoryList);
|
||||
|
||||
// --- Right panel: stacked pages ---
|
||||
@@ -71,6 +73,10 @@ SettingsDialog::SettingsDialog(const QString& configPath, DbManager* db, QWidget
|
||||
// Database page
|
||||
m_databasePage = new DatabaseSettingsPage(db, m_pages);
|
||||
m_pages->addWidget(m_databasePage);
|
||||
|
||||
// Status page
|
||||
m_statusPage = new StatusPage(m_pages);
|
||||
m_pages->addWidget(m_statusPage);
|
||||
rightLayout->addWidget(m_pages, 1);
|
||||
|
||||
// --- Bottom buttons ---
|
||||
@@ -127,6 +133,7 @@ void SettingsDialog::loadProfileFromConfig(const QString& path) {
|
||||
|
||||
void SettingsDialog::onCategoryChanged(int row) {
|
||||
m_pages->setCurrentIndex(row);
|
||||
if (row == 3) m_statusPage->refreshStatus();
|
||||
}
|
||||
|
||||
void SettingsDialog::onSave() {
|
||||
|
||||
Reference in new issue
Block a user