1 // preferences.h - Preferences Dialog
2 // Copyright (C) 2007  Konrad Twardowski
3 //
4 // This program is free software; you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation; either version 2 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License along
15 // with this program; if not, write to the Free Software Foundation, Inc.,
16 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 
18 #ifndef KSHUTDOWN_PREFERENCES_H
19 #define KSHUTDOWN_PREFERENCES_H
20 
21 #include "udialog.h"
22 
23 #include <QCheckBox>
24 #include <QLineEdit>
25 #include <QTabWidget>
26 
27 class PasswordPreferences;
28 
29 class Preferences: public UDialog {
30 	Q_OBJECT
31 public:
32 	explicit Preferences(QWidget *parent);
33 	virtual ~Preferences() = default;
34 	void apply();
35 private:
36 	Q_DISABLE_COPY(Preferences)
37 	bool m_oldProgressBarVisible;
38 	PasswordPreferences *m_passwordPreferences;
39 	QCheckBox *m_bwTrayIcon;
40 	QCheckBox *m_cancelDefault;
41 	QCheckBox *m_confirmAction;
42 	QCheckBox *m_lockScreenBeforeHibernate;
43 	QCheckBox *m_noMinimizeToSystemTrayIcon;
44 	QCheckBox *m_oldActionNames;
45 	QCheckBox *m_progressBarEnabled;
46 	QCheckBox *m_systemTrayIconEnabled;
47 	#ifndef KS_KF5
48 	QCheckBox *m_useThemeIconInSystemTray;
49 	#endif // !KS_KF5
50 	#ifdef Q_OS_LINUX
51 	QLineEdit *m_lockCommand;
52 	#endif // Q_OS_LINUX
53 	QTabWidget *m_tabs;
54 	//QWidget *createActionsWidget();
55 	QWidget *createGeneralWidget();
56 	QWidget *createSystemTrayWidget();
57 	//QWidget *createTriggersWidget();
58 private slots:
59 	void onFinish(int result);
60 	void onProgressBarEnabled(bool enabled);
61 };
62 
63 #endif // KSHUTDOWN_PREFERENCES_H
64