2025-09-05 20:44:33 +00:00
|
|
|
#ifndef PREFERENCEEDITOR_H
|
|
|
|
|
#define PREFERENCEEDITOR_H
|
|
|
|
|
|
|
|
|
|
#include <QDialog>
|
2026-01-08 00:36:50 -05:00
|
|
|
#include <QListWidget>
|
|
|
|
|
#include <QStackedWidget>
|
|
|
|
|
#include <QCheckBox>
|
|
|
|
|
#include <QSpinBox>
|
|
|
|
|
#include <QComboBox>
|
|
|
|
|
#include <QLineEdit>
|
|
|
|
|
#include <QPushButton>
|
|
|
|
|
#include <QLabel>
|
2025-09-05 20:44:33 +00:00
|
|
|
|
|
|
|
|
class PreferenceEditor : public QDialog
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
explicit PreferenceEditor(QWidget *parent = nullptr);
|
2026-01-08 00:36:50 -05:00
|
|
|
~PreferenceEditor() = default;
|
2025-09-05 20:44:33 +00:00
|
|
|
|
2026-01-08 00:36:50 -05:00
|
|
|
private slots:
|
|
|
|
|
void onCategoryChanged();
|
|
|
|
|
void onApply();
|
|
|
|
|
void onAccept();
|
|
|
|
|
void onBrowseExportDir();
|
2025-12-19 23:06:03 -05:00
|
|
|
|
2025-09-05 20:44:33 +00:00
|
|
|
private:
|
2026-01-08 00:36:50 -05:00
|
|
|
void setupUi();
|
|
|
|
|
void createAppearancePage();
|
|
|
|
|
void createGeneralPage();
|
|
|
|
|
void createDebugPage();
|
|
|
|
|
void createTreePage();
|
|
|
|
|
void createPreviewPage();
|
|
|
|
|
void loadSettings();
|
|
|
|
|
void saveSettings();
|
|
|
|
|
void applyStylesheet();
|
|
|
|
|
void updateThemePreview();
|
|
|
|
|
|
|
|
|
|
// UI Components
|
|
|
|
|
QListWidget *m_categoryList;
|
|
|
|
|
QStackedWidget *m_pageStack;
|
|
|
|
|
|
|
|
|
|
// Appearance Page
|
|
|
|
|
QComboBox *m_themeCombo;
|
|
|
|
|
QLabel *m_themePreview;
|
|
|
|
|
|
|
|
|
|
// General Page
|
|
|
|
|
QLineEdit *m_exportDirEdit;
|
|
|
|
|
QCheckBox *m_autoExportCheck;
|
|
|
|
|
|
|
|
|
|
// Debug Page
|
|
|
|
|
QCheckBox *m_debugLoggingCheck;
|
|
|
|
|
QCheckBox *m_verboseParsingCheck;
|
|
|
|
|
QCheckBox *m_logToFileCheck;
|
|
|
|
|
|
|
|
|
|
// Tree Page
|
|
|
|
|
QCheckBox *m_showCountsCheck;
|
|
|
|
|
QCheckBox *m_collapseDefaultCheck;
|
|
|
|
|
QCheckBox *m_groupByExtCheck;
|
|
|
|
|
QCheckBox *m_naturalSortCheck;
|
|
|
|
|
|
|
|
|
|
// Preview Page
|
|
|
|
|
QCheckBox *m_audioAutoPlayCheck;
|
|
|
|
|
QCheckBox *m_imageShowGridCheck;
|
|
|
|
|
QCheckBox *m_imageAutoZoomCheck;
|
|
|
|
|
|
|
|
|
|
// View Page
|
|
|
|
|
QComboBox *m_fontFamilyCombo;
|
|
|
|
|
QSpinBox *m_fontSizeSpin;
|
|
|
|
|
QSpinBox *m_zoomSpin;
|
2025-09-05 20:44:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif // PREFERENCEEDITOR_H
|