chatgui settings: add Database tab with integrity check (quick/full) and optimize
This commit is contained in:
1 parent
03310db2cd
commit
c4d1f984bd
8 files changed
+320
-12
No files matched your search
@@ -1,8 +1,10 @@
|
||||
// settingsdialog.cpp — Settings dialog with category list
|
||||
#include "settingsdialog.h"
|
||||
#include "networksettingspage.h"
|
||||
#include "databasesettingspage.h"
|
||||
#include "../transport/gui_bridge.h"
|
||||
#include "../../lib/mem.h"
|
||||
#include "../db/db_manager.h"
|
||||
extern "C" {
|
||||
#include "../transport/chat_core.h"
|
||||
}
|
||||
@@ -15,12 +17,12 @@ extern "C" {
|
||||
#include <QFile>
|
||||
#include <QTextStream>
|
||||
|
||||
SettingsDialog::SettingsDialog(const QString& configPath, QWidget* parent)
|
||||
SettingsDialog::SettingsDialog(const QString& configPath, DbManager* db, QWidget* parent)
|
||||
: QDialog(parent)
|
||||
, m_configPath(configPath)
|
||||
{
|
||||
setWindowTitle("Settings");
|
||||
setMinimumSize(560, 380);
|
||||
setMinimumSize(560, 460);
|
||||
setModal(true);
|
||||
|
||||
auto* mainLayout = new QHBoxLayout(this);
|
||||
@@ -37,6 +39,7 @@ SettingsDialog::SettingsDialog(const QString& configPath, QWidget* parent)
|
||||
"QListWidget::item:selected { background: #3390EC; color: white; }");
|
||||
m_categoryList->addItem("Profile");
|
||||
m_categoryList->addItem("Network");
|
||||
m_categoryList->addItem("Database");
|
||||
mainLayout->addWidget(m_categoryList);
|
||||
|
||||
// --- Right panel: stacked pages ---
|
||||
@@ -64,6 +67,10 @@ SettingsDialog::SettingsDialog(const QString& configPath, QWidget* parent)
|
||||
// Network page
|
||||
m_networkPage = new NetworkSettingsPage(m_pages);
|
||||
m_pages->addWidget(m_networkPage);
|
||||
|
||||
// Database page
|
||||
m_databasePage = new DatabaseSettingsPage(db, m_pages);
|
||||
m_pages->addWidget(m_databasePage);
|
||||
rightLayout->addWidget(m_pages, 1);
|
||||
|
||||
// --- Bottom buttons ---
|
||||
|
||||
Reference in new issue
Block a user