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

Last change on this file since 178 was 176, checked in by Silvan Scherrer, 9 years ago

smplayer: update trunk to version 16.4

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