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

Last change on this file since 156 was 156, checked in by Silvan Scherrer, 11 years ago

SMPlayer: update trunk to 0.8.6

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