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 PREFINTERFACE_H
|
---|
20 | #define PREFINTERFACE_H
|
---|
21 |
|
---|
22 | #include "ui_prefinterface.h"
|
---|
23 | #include "prefwidget.h"
|
---|
24 | #include "config.h"
|
---|
25 |
|
---|
26 | class Preferences;
|
---|
27 |
|
---|
28 | class PrefInterface : public PrefWidget, public Ui::PrefInterface
|
---|
29 | {
|
---|
30 | Q_OBJECT
|
---|
31 |
|
---|
32 | public:
|
---|
33 | PrefInterface( QWidget * parent = 0, Qt::WindowFlags f = 0 );
|
---|
34 | ~PrefInterface();
|
---|
35 |
|
---|
36 | virtual QString sectionName();
|
---|
37 | virtual QPixmap sectionIcon();
|
---|
38 |
|
---|
39 | // Pass data to the dialog
|
---|
40 | void setData(Preferences * pref);
|
---|
41 |
|
---|
42 | // Apply changes
|
---|
43 | void getData(Preferences * pref);
|
---|
44 |
|
---|
45 | bool languageChanged() { return language_changed; };
|
---|
46 | bool iconsetChanged() { return iconset_changed; };
|
---|
47 | bool guiChanged() { return gui_changed; }
|
---|
48 | bool styleChanged() { return style_changed; };
|
---|
49 | bool recentsChanged() { return recents_changed; };
|
---|
50 | bool urlMaxChanged() { return url_max_changed; };
|
---|
51 |
|
---|
52 | protected:
|
---|
53 | virtual void createHelp();
|
---|
54 | void createLanguageCombo();
|
---|
55 |
|
---|
56 | void setLanguage(QString lang);
|
---|
57 | QString language();
|
---|
58 |
|
---|
59 | void setIconSet(QString set);
|
---|
60 | QString iconSet();
|
---|
61 |
|
---|
62 | void setResizeMethod(int v);
|
---|
63 | int resizeMethod();
|
---|
64 |
|
---|
65 | void setSaveSize(bool b);
|
---|
66 | bool saveSize();
|
---|
67 |
|
---|
68 | void setGUI(QString gui_name);
|
---|
69 | QString GUI();
|
---|
70 |
|
---|
71 | void setStyle(QString style);
|
---|
72 | QString style();
|
---|
73 |
|
---|
74 | #ifdef SINGLE_INSTANCE
|
---|
75 | void setUseSingleInstance(bool b);
|
---|
76 | bool useSingleInstance();
|
---|
77 | #endif
|
---|
78 |
|
---|
79 | void setSeeking1(int n);
|
---|
80 | int seeking1();
|
---|
81 |
|
---|
82 | void setSeeking2(int n);
|
---|
83 | int seeking2();
|
---|
84 |
|
---|
85 | void setSeeking3(int n);
|
---|
86 | int seeking3();
|
---|
87 |
|
---|
88 | void setSeeking4(int n);
|
---|
89 | int seeking4();
|
---|
90 |
|
---|
91 | void setUpdateWhileDragging(bool);
|
---|
92 | bool updateWhileDragging();
|
---|
93 |
|
---|
94 | #ifdef SEEKBAR_RESOLUTION
|
---|
95 | void setRelativeSeeking(bool);
|
---|
96 | #endif
|
---|
97 | bool relativeSeeking();
|
---|
98 |
|
---|
99 | void setPreciseSeeking(bool);
|
---|
100 | bool preciseSeeking();
|
---|
101 |
|
---|
102 | void setDefaultFont(QString font_desc);
|
---|
103 | QString defaultFont();
|
---|
104 |
|
---|
105 | void setHideVideoOnAudioFiles(bool b);
|
---|
106 | bool hideVideoOnAudioFiles();
|
---|
107 |
|
---|
108 | // Floating tab
|
---|
109 | void setFloatingAnimated(bool b);
|
---|
110 | bool floatingAnimated();
|
---|
111 |
|
---|
112 | void setFloatingWidth(int percentage);
|
---|
113 | int floatingWidth();
|
---|
114 |
|
---|
115 | void setFloatingMargin(int pixels);
|
---|
116 | int floatingMargin();
|
---|
117 |
|
---|
118 | void setDisplayFloatingInCompactMode(bool b);
|
---|
119 | bool displayFloatingInCompactMode();
|
---|
120 |
|
---|
121 | // Privacy tab
|
---|
122 | void setRecentsMaxItems(int n);
|
---|
123 | int recentsMaxItems();
|
---|
124 |
|
---|
125 | void setURLMaxItems(int n);
|
---|
126 | int urlMaxItems();
|
---|
127 |
|
---|
128 | void setRememberDirs(bool b);
|
---|
129 | bool rememberDirs();
|
---|
130 |
|
---|
131 | #ifdef HDPI_SUPPORT
|
---|
132 | void loadHDPIData();
|
---|
133 | void saveHDPIData();
|
---|
134 | #endif
|
---|
135 |
|
---|
136 | protected slots:
|
---|
137 | void on_changeFontButton_clicked();
|
---|
138 | #ifdef SINGLE_INSTANCE
|
---|
139 | void changeInstanceImages();
|
---|
140 | #endif
|
---|
141 | #ifdef SKINS
|
---|
142 | void GUIChanged(int index);
|
---|
143 | #endif
|
---|
144 | void resizeMethodChanged(int index);
|
---|
145 |
|
---|
146 | #ifdef HDPI_SUPPORT
|
---|
147 | void updateHDPIScaleNumber(int v);
|
---|
148 | #endif
|
---|
149 |
|
---|
150 | protected:
|
---|
151 | virtual void retranslateStrings();
|
---|
152 |
|
---|
153 | private:
|
---|
154 | bool language_changed;
|
---|
155 | bool iconset_changed;
|
---|
156 | bool gui_changed;
|
---|
157 | bool style_changed;
|
---|
158 | bool recents_changed;
|
---|
159 | bool url_max_changed;
|
---|
160 |
|
---|
161 | #ifdef SKINS
|
---|
162 | int n_skins;
|
---|
163 | #endif
|
---|
164 | };
|
---|
165 |
|
---|
166 | #endif
|
---|