NDE-FileMAN
Loading...
Searching...
No Matches
desktoppreferencesdialog.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 NDEFILEMAN_DESKTOPPREFERENCESDIALOG_H
22#define NDEFILEMAN_DESKTOPPREFERENCESDIALOG_H
23
24#include <QDialog>
25#include "ui_desktop-preferences.h"
26
27#include "ui_desktop-folder.h"
28
29namespace NDEFileMAN {
30
31class DesktopPreferencesDialog : public QDialog {
32Q_OBJECT
33
34public:
35 explicit DesktopPreferencesDialog(QWidget* parent = 0, Qt::WindowFlags f = 0);
37
38 virtual void accept();
39
40 void selectPage(QString name);
41
42 // Should only be used one time.
43 void setEditDesktopFolder(const bool enabled);
44
45protected Q_SLOTS:
46 void onApplyClicked();
47 void onWallpaperModeChanged(int index);
48 void onBrowseClicked();
49 void onFolderBrowseClicked();
50 void onBrowseDesktopFolderClicked();
51 void lockMargins(bool lock);
52
53 void applySettings();
54
55private:
56 Ui::DesktopPreferencesDialog ui;
57 Ui::DesktopFolder uiDesktopFolder;
58
59 bool editDesktopFolderEnabled;
60 QWidget* desktopFolderWidget;
61 QString desktopFolder;
62
63 void setupDesktopFolderUi();
64};
65
66}
67
68#endif // NDEFILEMAN_DESKTOPPREFERENCESDIALOG_H
Definition desktoppreferencesdialog.h:31