source: smplayer/trunk/src/prefgeneral.h

Last change on this file was 188, checked in by Silvan Scherrer, 8 years ago

SMPlayer: update trunk to version 17.1.0

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