| 1 | /* smplayer, GUI front-end for mplayer.
|
|---|
| 2 | Copyright (C) 2006-2013 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 | #ifndef Q_OS_WIN
|
|---|
| 122 | void setFloatingBypassWindowManager(bool b);
|
|---|
| 123 | bool floatingBypassWindowManager();
|
|---|
| 124 | #endif
|
|---|
| 125 |
|
|---|
| 126 | // Privacy tab
|
|---|
| 127 | void setRecentsMaxItems(int n);
|
|---|
| 128 | int recentsMaxItems();
|
|---|
| 129 |
|
|---|
| 130 | void setURLMaxItems(int n);
|
|---|
| 131 | int urlMaxItems();
|
|---|
| 132 |
|
|---|
| 133 | void setRememberDirs(bool b);
|
|---|
| 134 | bool rememberDirs();
|
|---|
| 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 |
|
|---|
| 145 | protected:
|
|---|
| 146 | virtual void retranslateStrings();
|
|---|
| 147 |
|
|---|
| 148 | private:
|
|---|
| 149 | bool language_changed;
|
|---|
| 150 | bool iconset_changed;
|
|---|
| 151 | bool gui_changed;
|
|---|
| 152 | bool style_changed;
|
|---|
| 153 | bool recents_changed;
|
|---|
| 154 | bool url_max_changed;
|
|---|
| 155 |
|
|---|
| 156 | #ifdef SKINS
|
|---|
| 157 | int n_skins;
|
|---|
| 158 | #endif
|
|---|
| 159 | };
|
|---|
| 160 |
|
|---|
| 161 | #endif
|
|---|