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

Last change on this file since 142 was 142, checked in by Silvan Scherrer, 12 years ago

SMPlayer: update trunk to 0.8.5

  • Property svn:eol-style set to LF
File size: 4.6 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 _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 void setBlackbordersOnFullscreen(bool b);
125 bool blackbordersOnFullscreen();
126
127 void setAutoq(int n);
128 int autoq();
129
130 void setGlobalVolume(bool b);
131 bool globalVolume();
132
133 void setAutoSyncFactor(int factor);
134 int autoSyncFactor();
135
136 void setAutoSyncActivated(bool b);
137 bool autoSyncActivated();
138
139 void setMc(double value);
140 double mc();
141
142 void setMcActivated(bool b);
143 bool mcActivated();
144
145 void setSoftVol(bool b);
146 bool softVol();
147
148 void setUseAudioEqualizer(bool b);
149 bool useAudioEqualizer();
150
151 void setAc3DTSPassthrough(bool b);
152 bool Ac3DTSPassthrough();
153
154 void setInitialVolNorm(bool b);
155 bool initialVolNorm();
156
157 void setInitialPostprocessing(bool b);
158 bool initialPostprocessing();
159
160 void setInitialDeinterlace(int ID);
161 int initialDeinterlace();
162
163 void setInitialZoom(double v);
164 double initialZoom();
165
166 void setDirectRendering(bool b);
167 bool directRendering();
168
169 void setDoubleBuffer(bool b);
170 bool doubleBuffer();
171
172 void setUseSlices(bool b);
173 bool useSlices();
174
175 void setAmplification(int n);
176 int amplification();
177
178 void setAudioChannels(int ID);
179 int audioChannels();
180
181 void setScaleTempoFilter(Preferences::OptionState value);
182 Preferences::OptionState scaleTempoFilter();
183
184protected slots:
185 void vo_combo_changed(int);
186 void ao_combo_changed(int);
187
188#ifndef Q_OS_WIN
189 void on_vdpau_button_clicked();
190#endif
191
192protected:
193 virtual void retranslateStrings();
194 void updateDriverCombos();
195
196 InfoList vo_list;
197 InfoList ao_list;
198
199#if USE_DSOUND_DEVICES
200 DeviceList dsound_devices;
201#endif
202
203#if USE_ALSA_DEVICES
204 DeviceList alsa_devices;
205#endif
206#if USE_XV_ADAPTORS
207 DeviceList xv_adaptors;
208#endif
209
210private:
211 bool filesettings_method_changed;
212
213#ifndef Q_OS_WIN
214 struct Preferences::VDPAU_settings vdpau;
215#endif
216
217};
218
219#endif
Note: See TracBrowser for help on using the repository browser.