PCManFM-Qt
preferencesdialog.h
1 /*
2 
3  Copyright (C) 2013 Hong Jen Yee (PCMan) <pcman.tw@gmail.com>
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License along
16  with this program; if not, write to the Free Software Foundation, Inc.,
17  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19 
20 
21 #ifndef PCMANFM_PREFERENCESDIALOG_H
22 #define PCMANFM_PREFERENCESDIALOG_H
23 
24 #include <QDialog>
25 #include "ui_preferences.h"
26 #include <QString>
27 
28 namespace PCManFM
29 {
30 
31 class Settings;
32 
33 class PreferencesDialog : public QDialog {
34 Q_OBJECT
35 
36 public:
37  // activePage is the name of page to select (general, display, advanced...)
38  explicit PreferencesDialog(QString activePage = QString(), QWidget* parent = 0);
39  virtual ~PreferencesDialog();
40 
41  virtual void accept();
42 
43 private:
44  void initIconThemes(Settings& settings);
45  void initArchivers(Settings& settings);
46  void initDisplayPage(Settings& settings);
47  void initUiPage(Settings& settings);
48  void initBehaviorPage(Settings& settings);
49  void initThumbnailPage(Settings& settings);
50  void initVolumePage(Settings& settings);
51  void initAdvancedPage(Settings& settings);
52  void initTerminals(Settings& settings);
53 
54  void applyUiPage(Settings& settings);
55  void applyDisplayPage(Settings& settings);
56  void applyBehaviorPage(Settings& settings);
57  void applyThumbnailPage(Settings& settings);
58  void applyVolumePage(Settings& settings);
59  void applyAdvancedPage(Settings& settings);
60 
61  void initFromSettings();
62  void applySettings();
63 
64 private:
65  Ui::PreferencesDialog ui;
66 };
67 
68 }
69 
70 #endif // PCMANFM_PREFERENCESDIALOG_H
Definition: settings.h:41
Definition: preferencesdialog.h:33
Definition: application.h:39