simple_preferences.hpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef _SIMPLEPREFS_H_
00025 #define _SIMPLEPREFS_H_
00026
00027 #ifdef HAVE_CONFIG_H
00028 # include "config.h"
00029 #endif
00030
00031 #include <vlc_common.h>
00032 #include <vlc_interface.h>
00033
00034 #include "ui/sprefs_input.h"
00035 #include "ui/sprefs_audio.h"
00036 #include "ui/sprefs_video.h"
00037 #include "ui/sprefs_subtitles.h"
00038 #include "ui/sprefs_interface.h"
00039
00040 #ifdef WIN32
00041 # include "util/registry.hpp"
00042 #endif
00043
00044 #include <QWidget>
00045
00046 enum {
00047 SPrefsInterface = 0,
00048 SPrefsAudio,
00049 SPrefsVideo,
00050 SPrefsSubtitles,
00051 SPrefsInputAndCodecs,
00052 SPrefsHotkeys,
00053 SPrefsMax
00054 };
00055 #define SPrefsDefaultCat SPrefsInterface
00056
00057 enum {
00058 CachingCustom = 0,
00059 CachingLowest = 100,
00060 CachingLow = 200,
00061 CachingNormal = 300,
00062 CachingHigh = 750,
00063 CachingHigher = 2500
00064 };
00065
00066 enum {
00067 #ifdef WIN32
00068 directxW,
00069 #else
00070 alsaW,
00071 ossW,
00072 #endif
00073 fileW,
00074 audioOutCoB,
00075 normalizerChB,
00076 volLW,
00077 headphoneB,
00078 spdifChB,
00079 };
00080 enum { inputLE, cachingCoB };
00081 enum { skinRB, qtRB, styleCB };
00082
00083 class ConfigControl;
00084 class QComboBox;
00085 class QLineEdit;
00086 class QRadioButton;
00087 class QCheckBox;
00088 class QString;
00089
00090 #ifdef WIN32
00091 class QTreeWidgetItem;
00092 #endif
00093
00094 class SPrefsCatList : public QWidget
00095 {
00096 Q_OBJECT
00097 public:
00098 SPrefsCatList( intf_thread_t *, QWidget *, bool );
00099 virtual ~SPrefsCatList() {};
00100 private:
00101 intf_thread_t *p_intf;
00102 signals:
00103 void currentItemChanged( int );
00104 public slots:
00105 void switchPanel( int );
00106 };
00107
00108 class SPrefsPanel : public QWidget
00109 {
00110 Q_OBJECT
00111 public:
00112 SPrefsPanel( intf_thread_t *, QWidget *, int, bool );
00113 virtual ~SPrefsPanel();
00114 void apply();
00115 void clean();
00116 private:
00117 intf_thread_t *p_intf;
00118 QList<ConfigControl *> controls;
00119
00120 int number;
00121
00122 QList<QWidget *> optionWidgets;
00123 QStringList qs_filter;
00124
00125 #ifdef WIN32
00126 QList<QTreeWidgetItem *> listAsso;
00127 bool addType( const char * psz_ext, QTreeWidgetItem*, QTreeWidgetItem*, QVLCRegistry* );
00128 #endif
00129
00130
00131 private slots:
00132 void lastfm_Changed( int );
00133 void updateAudioOptions( int );
00134 void updateAudioVolume( int );
00135 #ifdef SYS_MINGW32
00136 void assoDialog();
00137 void saveAsso();
00138 #endif
00139 void changeStyle( QString );
00140 };
00141
00142 #endif