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

Last change on this file since 178 was 176, checked in by Silvan Scherrer, 9 years ago

smplayer: update trunk to version 16.4

  • Property svn:eol-style set to LF
File size: 3.0 KB
Line 
1/* smplayer, GUI front-end for mplayer.
2 Copyright (C) 2006-2016 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 QTextBrowser;
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
54public:
55 enum Section { General=0, Drives=1, Performance=2,
56 Subtitles=3, Gui=4, Mouse=5, Advanced=6, Associations=7 };
57
58 PreferencesDialog( QWidget * parent = 0, Qt::WindowFlags f = 0 );
59 ~PreferencesDialog();
60
61 PrefGeneral * mod_general() { return page_general; };
62 PrefInterface * mod_interface() { return page_interface; };
63 PrefInput * mod_input() { return page_input; };
64 PrefAdvanced * mod_advanced() { return page_advanced; };
65 PrefPlaylist * mod_playlist() { return page_playlist; };
66 PrefUpdates * mod_updates() { return page_updates; };
67 PrefNetwork * mod_network() { return page_network; };
68
69 void addSection(PrefWidget *w);
70
71 // Pass data to the standard dialogs
72 void setData(Preferences * pref);
73
74 // Apply changes
75 void getData(Preferences * pref);
76
77 // Return true if the mplayer process should be restarted.
78 bool requiresRestart();
79
80public slots:
81 void showSection(Section s);
82
83 virtual void accept(); // Reimplemented to send a signal
84 virtual void reject();
85
86signals:
87 void applied();
88
89protected:
90 virtual void retranslateStrings();
91 virtual void changeEvent ( QEvent * event ) ;
92
93protected slots:
94 void apply();
95 void showHelp();
96
97protected:
98 PrefGeneral * page_general;
99 PrefDrives * page_drives;
100 PrefPerformance * page_performance;
101 PrefSubtitles * page_subtitles;
102 PrefInterface * page_interface;
103 PrefInput * page_input;
104 PrefPlaylist * page_playlist;
105 PrefTV * page_tv;
106 PrefUpdates * page_updates;
107 PrefNetwork * page_network;
108 PrefAdvanced * page_advanced;
109
110#if USE_ASSOCIATIONS
111 PrefAssociations* page_associations;
112#endif
113
114 QTextBrowser * help_window;
115
116private:
117 QPushButton * okButton;
118 QPushButton * cancelButton;
119 QPushButton * applyButton;
120 QPushButton * helpButton;
121};
122
123#endif
Note: See TracBrowser for help on using the repository browser.