1 #ifndef VIEWOPTIONSDIALOG_H
2 #define VIEWOPTIONSDIALOG_H
3 
4 #include <QDialog>
5 
6 class MainWindow;
7 class QSettings;
8 class QCheckBox;
9 class QComboBox;
10 class QPushButton;
11 class QColor;
12 class QLabel;
13 class QSpinBox;
14 
15 #ifdef HAVE_MENU
16 class QWidget;
17 class OptionsCategory;
18 class QListWidget;
19 class QStackedLayout;
20 #endif
21 
22 class ViewOptionsWidget : public QWidget
23 {
24    Q_OBJECT
25 public:
26    ViewOptionsWidget(MainWindow *mainwindow, QWidget *parent = 0);
27 public slots:
28    void onAccepted();
29    void onRejected();
30    void loadViewOptions();
31    void saveViewOptions();
32 private slots:
33    void onThemeComboBoxIndexChanged(int index);
34    void onHighlightColorChoose();
35 private:
36    void showOrHideHighlightColor();
37 
38    MainWindow *m_mainwindow;
39    QSettings *m_settings;
40    QCheckBox *m_saveGeometryCheckBox;
41    QCheckBox *m_saveDockPositionsCheckBox;
42    QCheckBox *m_saveLastTabCheckBox;
43    QCheckBox *m_showHiddenFilesCheckBox;
44    QComboBox *m_themeComboBox;
45    QSpinBox *m_thumbnailCacheSpinBox;
46    QSpinBox *m_thumbnailDropSizeSpinBox;
47    QComboBox *m_startupPlaylistComboBox;
48    QPushButton *m_highlightColorPushButton;
49    QColor m_highlightColor;
50    QLabel *m_highlightColorLabel;
51    QString m_customThemePath;
52    QCheckBox *m_suggestLoadedCoreFirstCheckBox;
53    QSpinBox *m_allPlaylistsListMaxCountSpinBox;
54    QSpinBox *m_allPlaylistsGridMaxCountSpinBox;
55 };
56 
57 class ViewOptionsDialog : public QDialog
58 {
59    Q_OBJECT
60 public:
61    ViewOptionsDialog(MainWindow *window, QWidget *parent = 0);
62 #ifdef HAVE_MENU
63    void repaintIcons();
64 #endif
65 public slots:
66    void showDialog();
67    void hideDialog();
68 private slots:
69    void onRejected();
70 private:
71 #ifdef HAVE_MENU
72    void addCategory(QWidget *widget, QString name, QString icon);
73    void addCategory(OptionsCategory *category);
74    QVector<OptionsCategory*> m_categoryList;
75    QListWidget *m_optionsList;
76    QStackedLayout *m_optionsStack;
77 #else
78    ViewOptionsWidget *m_viewOptionsWidget;
79 #endif
80 };
81 
82 #endif
83