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

Last change on this file since 119 was 119, checked in by Silvan Scherrer, 14 years ago

SMPlayer: latest svn update

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