Filer
PreferencesDialog.h
Go to the documentation of this file.
1 #ifndef PREFERENCESDIALOG_H
2 #define PREFERENCESDIALOG_H
3 
4 #include <QDialog>
5 #include <QComboBox>
6 #include <QGridLayout>
7 #include <QLabel>
8 #include <QSettings>
9 
17 class PreferencesDialog : public QDialog
18 {
19 Q_OBJECT
20 
21 public:
27  static PreferencesDialog *getInstance(QWidget *parent = nullptr);
28 
33 
34 signals:
38  void prefsChanged();
39 
40 private slots:
45  void updateSetting(int index);
46 
47 private:
52  PreferencesDialog(QWidget *parent = nullptr);
53 
54  QComboBox *gridSizeComboBox;
55  QLabel *imageLabel;
56  QGridLayout *layout;
57 
61  void loadSetting();
62 
63  bool eventFilter(QObject *obj, QEvent *event); // Event filter function
64 
65 private slots:
66  void loadDesktopPicture();
67 
68 
69 };
70 
71 #endif // PREFERENCESDIALOG_H
Definition: PreferencesDialog.h:18
~PreferencesDialog()
~PreferencesDialog Destructor.
Definition: PreferencesDialog.cpp:84
void prefsChanged()
prefsChanged Signal emitted when preferences are changed.
static PreferencesDialog * getInstance(QWidget *parent=nullptr)
getInstance Returns the singleton instance of PreferencesDialog.
Definition: PreferencesDialog.cpp:24