- NodesPage: show full 64-bit Node ID (hex16) instead of truncated 4 hex chars - NodesPage: show diagnostic when DB handle is NULL (was silent return) - DatabaseSettingsPage: show 'Database not connected' when DB handle is NULL - DatabaseSettingsPage: add refreshStatus() called on tab select - SettingsDialog: refresh Database tab on category change
36 lines
876 B
C++
36 lines
876 B
C++
// databasesettingspage.h — Database maintenance page in settings
|
|
#pragma once
|
|
|
|
#include <QWidget>
|
|
#include <QPushButton>
|
|
#include <QLabel>
|
|
#include <QPlainTextEdit>
|
|
|
|
class DbManager;
|
|
|
|
class DatabaseSettingsPage : public QWidget {
|
|
Q_OBJECT
|
|
public:
|
|
explicit DatabaseSettingsPage(DbManager* db, QWidget* parent = nullptr);
|
|
void refreshStatus();
|
|
|
|
private slots:
|
|
void onQuickCheck();
|
|
void onFullCheck();
|
|
void onOptimize();
|
|
|
|
private:
|
|
void showResult(const QString& checkName, const struct IntegrityResult& result);
|
|
void setBusy(bool busy);
|
|
|
|
DbManager* m_db;
|
|
QLabel* m_filePathLabel;
|
|
QLabel* m_fileSizeLabel;
|
|
QLabel* m_walSizeLabel;
|
|
QPushButton* m_quickBtn;
|
|
QPushButton* m_fullBtn;
|
|
QPushButton* m_optimizeBtn;
|
|
QLabel* m_statusLabel;
|
|
QPlainTextEdit* m_resultText;
|
|
};
|