source: smplayer/trunk/src/preferencesdialog.h@ 188

Last change on this file since 188 was 188, checked in by Silvan Scherrer, 8 years ago

SMPlayer: update trunk to version 17.1.0

  • Property svn:eol-style set to LF
File size: 3.2 KB
Line 
1/* smplayer, GUI front-end for mplayer.
2 Copyright (C) 2006-2017 Ricardo Villalba <rvm@users.sourceforge.net>
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
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17*/
18
19#ifndef PREFERENCESDIALOG_H
20#define PREFERENCESDIALOG_H
21
22#include "ui_preferencesdialog.h"
23
24/*
25#ifdef Q_OS_WIN
26#define USE_ASSOCIATIONS 1
27#endif
28*/
29
30class InfoWindow;
31class QPushButton;
32
33class PrefWidget;
34class PrefGeneral;
35class PrefDrives;
36class PrefPerformance;
37class PrefSubtitles;
38class PrefInterface;
39class PrefInput;
40class PrefAdvanced;
41class PrefPlaylist;
42class PrefTV;
43class PrefUpdates;
44class PrefNetwork;
45class PrefAssociations;
46
47class Preferences;
48
49
50class PreferencesDialog : public QDialog, public Ui::PreferencesDialog
51{
52 Q_OBJECT
53 Q_PROPERTY(bool iconMode READ isIconMode WRITE setIconMode)
54
55public:
56 enum Section { General=0, Drives=1, Performance=2,
57 Subtitles=3, Gui=4, Mouse=5, Advanced=6, Associations=7 };
58
59 PreferencesDialog( QWidget * parent = 0, Qt::WindowFlags f = 0 );
60 ~PreferencesDialog();
61
62 PrefGeneral * mod_general() { return page_general; };
63 PrefInterface * mod_interface() { return page_interface; };
64 PrefInput * mod_input() { return page_input; };
65 PrefAdvanced * mod_advanced() { return page_advanced; };
66 PrefPlaylist * mod_playlist() { return page_playlist; };
67 PrefUpdates * mod_updates() { return page_updates; };
68 PrefNetwork * mod_network() { return page_network; };
69
70 void addSection(PrefWidget *w);
71
72 // Pass data to the standard dialogs
73 void setData(Preferences * pref);
74
75 // Apply changes
76 void getData(Preferences * pref);
77
78 // Return true if the mplayer process should be restarted.
79 bool requiresRestart();
80
81 void setIconMode(bool);
82 bool isIconMode() { return icon_mode; };
83
84public slots:
85 void showSection(Section s);
86
87 virtual void accept(); // Reimplemented to send a signal
88 virtual void reject();
89
90signals:
91 void applied();
92
93protected:
94 virtual void retranslateStrings();
95 virtual void changeEvent ( QEvent * event ) ;
96
97protected slots:
98 void apply();
99 void showHelp();
100
101protected:
102 PrefGeneral * page_general;
103 PrefDrives * page_drives;
104 PrefPerformance * page_performance;
105 PrefSubtitles * page_subtitles;
106 PrefInterface * page_interface;
107 PrefInput * page_input;
108 PrefPlaylist * page_playlist;
109#ifdef TV_SUPPORT
110 PrefTV * page_tv;
111#endif
112 PrefUpdates * page_updates;
113 PrefNetwork * page_network;
114 PrefAdvanced * page_advanced;
115
116#if USE_ASSOCIATIONS
117 PrefAssociations* page_associations;
118#endif
119
120 InfoWindow * help_window;
121
122private:
123 QPushButton * okButton;
124 QPushButton * cancelButton;
125 QPushButton * applyButton;
126 QPushButton * helpButton;
127
128 bool icon_mode;
129};
130
131#endif
Note: See TracBrowser for help on using the repository browser.