XPlor/app/preferenceeditor.h
njohnson e4c913bb06 Refactor main window and extend settings functionality
- Refactor MainWindow to use TreeBuilder for parsed data organization
- Integrate new ListPreviewWidget and TextViewerWidget
- Add Python path auto-detection and scripts directory settings
- Add log-to-file option and improve debug logging feedback
- Improve image format detection (PNG, JPEG, BMP, DDS, TGA, RCB)
- Update app.pro with new source files

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 12:09:31 -05:00

87 lines
2.0 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 onBrowseQuickBms();
void onResetSettings();
private:
void setupUi();
void createAppearancePage();
void createGeneralPage();
void createToolsPage();
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;
// Tools Page
QLineEdit *m_quickBmsEdit;
QLabel *m_quickBmsStatus;
// 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;
// File Type Associations
QLineEdit *m_textExtensionsEdit;
QLineEdit *m_imageExtensionsEdit;
QLineEdit *m_audioExtensionsEdit;
// View Page
QComboBox *m_fontFamilyCombo;
QSpinBox *m_fontSizeSpin;
QSpinBox *m_zoomSpin;
};
#endif // PREFERENCEEDITOR_H