simple_preferences.hpp

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * simple_preferences.hpp : Simple prefs
00003  ****************************************************************************
00004  * Copyright (C) 2006 the VideoLAN team
00005  * $Id: 626de8279bd38084013990262409ecb0f38166a8 $
00006  *
00007  * Authors: Clément Stenac <zorglub@videolan.org>
00008  *
00009  * This program is free software; you can redistribute it and/or modify
00010  * it under the terms of the GNU General Public License as published by
00011  * the Free Software Foundation; either version 2 of the License, or
00012  * (at your option) any later version.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software
00021  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
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 /* Display only the options for the selected audio output */
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

Generated on Tue May 25 08:04:57 2010 for VLC by  doxygen 1.5.6