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