XPlor/app/preferenceeditor.h
njohnson 2017abb175 Add reset settings option in preferences
- Reset All Settings button in General preferences
- Clears all settings and restores XPlor Dark theme
- Applies theme change immediately
- Confirmation dialog before reset

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 00:43:52 -05:00

76 lines
1.7 KiB
C++

#ifndef PREFERENCEEDITOR_H
#define PREFERENCEEDITOR_H
#include <QDialog>
#include <QListWidget>
#include <QStackedWidget>
#include <QCheckBox>
#include <QSpinBox>
#include <QComboBox>
#include <QLineEdit>
#include <QPushButton>
#include <QLabel>
class PreferenceEditor : public QDialog
{
Q_OBJECT
public:
explicit PreferenceEditor(QWidget *parent = nullptr);
~PreferenceEditor() = default;
private slots:
void onCategoryChanged();
void onApply();
void onAccept();
void onBrowseExportDir();
void onResetSettings();
private:
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;
};
#endif // PREFERENCEEDITOR_H