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

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

SMPlayer: update trunk to latest 0.8.7

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