source: smplayer/trunk/src/prefgeneral.h@ 116

Last change on this file since 116 was 112, checked in by Silvan Scherrer, 15 years ago

Smplayer: eol-style

  • Property svn:eol-style set to LF
File size: 4.5 KB
Line 
1/* smplayer, GUI front-end for mplayer.
2 Copyright (C) 2006-2010 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 _PREFGENERAL_H_
20#define _PREFGENERAL_H_
21
22#include "ui_prefgeneral.h"
23#include "prefwidget.h"
24#include "inforeader.h"
25#include "deviceinfo.h"
26#include "preferences.h"
27
28#ifdef Q_OS_WIN
29#define USE_DSOUND_DEVICES 1
30#else
31#define USE_ALSA_DEVICES 1
32#define USE_XV_ADAPTORS 1
33#endif
34
35#ifdef Q_OS_OS2
36#define MPLAYER_KAI_VERSION 30994
37#endif
38
39class PrefGeneral : public PrefWidget, public Ui::PrefGeneral
40{
41 Q_OBJECT
42
43public:
44 PrefGeneral( QWidget * parent = 0, Qt::WindowFlags f = 0 );
45 ~PrefGeneral();
46
47 // Return the name of the section
48 virtual QString sectionName();
49 // Return the icon of the section
50 virtual QPixmap sectionIcon();
51
52 // Pass data to the dialog
53 void setData(Preferences * pref);
54
55 // Apply changes
56 void getData(Preferences * pref);
57
58 bool fileSettingsMethodChanged() { return filesettings_method_changed; };
59
60protected:
61 virtual void createHelp();
62
63 // Tab General
64 void setMplayerPath( QString path );
65 QString mplayerPath();
66
67 void setUseScreenshots(bool b);
68 bool useScreenshots();
69
70 void setScreenshotDir( QString path );
71 QString screenshotDir();
72
73 void setVO( QString vo_driver );
74 QString VO();
75
76 void setAO( QString ao_driver );
77 QString AO();
78
79 void setRememberSettings(bool b);
80 bool rememberSettings();
81
82 void setRememberTimePos(bool b);
83 bool rememberTimePos();
84
85 void setFileSettingsMethod(QString method);
86 QString fileSettingsMethod();
87
88 void setAudioLang(QString lang);
89 QString audioLang();
90
91 void setSubtitleLang(QString lang);
92 QString subtitleLang();
93
94 void setAudioTrack(int track);
95 int audioTrack();
96
97 void setSubtitleTrack(int track);
98 int subtitleTrack();
99
100 void setCloseOnFinish(bool b);
101 bool closeOnFinish();
102
103 void setPauseWhenHidden(bool b);
104 bool pauseWhenHidden();
105
106 // Tab video and audio
107 void setEq2(bool b);
108 bool eq2();
109
110 void setStartInFullscreen(bool b);
111 bool startInFullscreen();
112
113#if defined(Q_OS_WIN) || defined(Q_OS_OS2)
114 void setAvoidScreensaver(bool b);
115 bool avoidScreensaver();
116
117 void setTurnScreensaverOff(bool b);
118 bool turnScreensaverOff();
119#else
120 void setDisableScreensaver(bool b);
121 bool disableScreensaver();
122#endif
123
124#ifndef Q_OS_WIN
125 void setDisableFiltersWithVdpau(bool b);
126 bool disableFiltersWithVdpau();
127#endif
128
129 void setBlackbordersOnFullscreen(bool b);
130 bool blackbordersOnFullscreen();
131
132 void setAutoq(int n);
133 int autoq();
134
135 void setGlobalVolume(bool b);
136 bool globalVolume();
137
138 void setAutoSyncFactor(int factor);
139 int autoSyncFactor();
140
141 void setAutoSyncActivated(bool b);
142 bool autoSyncActivated();
143
144 void setMc(double value);
145 double mc();
146
147 void setMcActivated(bool b);
148 bool mcActivated();
149
150 void setSoftVol(bool b);
151 bool softVol();
152
153 void setUseAudioEqualizer(bool b);
154 bool useAudioEqualizer();
155
156 void setAc3DTSPassthrough(bool b);
157 bool Ac3DTSPassthrough();
158
159 void setInitialVolNorm(bool b);
160 bool initialVolNorm();
161
162 void setInitialPostprocessing(bool b);
163 bool initialPostprocessing();
164
165 void setInitialDeinterlace(int ID);
166 int initialDeinterlace();
167
168 void setInitialZoom(double v);
169 double initialZoom();
170
171 void setDirectRendering(bool b);
172 bool directRendering();
173
174 void setDoubleBuffer(bool b);
175 bool doubleBuffer();
176
177 void setUseSlices(bool b);
178 bool useSlices();
179
180 void setAmplification(int n);
181 int amplification();
182
183 void setAudioChannels(int ID);
184 int audioChannels();
185
186 void setScaleTempoFilter(Preferences::OptionState value);
187 Preferences::OptionState scaleTempoFilter();
188
189protected slots:
190 void vo_combo_changed(int);
191 void ao_combo_changed(int);
192
193protected:
194 virtual void retranslateStrings();
195 void updateDriverCombos();
196
197 InfoList vo_list;
198 InfoList ao_list;
199
200#if USE_DSOUND_DEVICES
201 DeviceList dsound_devices;
202#endif
203
204#if USE_ALSA_DEVICES
205 DeviceList alsa_devices;
206#endif
207#if USE_XV_ADAPTORS
208 DeviceList xv_adaptors;
209#endif
210
211private:
212 bool filesettings_method_changed;
213};
214
215#endif
Note: See TracBrowser for help on using the repository browser.