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$
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 #include <QWidget>
00034 
00035 #include "ui/sprefs_input.h"
00036 #include "ui/sprefs_audio.h"
00037 #include "ui/sprefs_video.h"
00038 #include "ui/sprefs_subtitles.h"
00039 #include "ui/sprefs_interface.h"
00040 #ifdef WIN32
00041 #include "util/registry.hpp"
00042 #endif
00043 
00044 enum {
00045     SPrefsInterface = 0,
00046     SPrefsAudio,
00047     SPrefsVideo,
00048     SPrefsSubtitles,
00049     SPrefsInputAndCodecs,
00050     SPrefsHotkeys,
00051     SPrefsMax
00052 };
00053 #define SPrefsDefaultCat SPrefsInterface
00054 
00055 enum {
00056     CachingCustom = 0,
00057     CachingLowest = 100,
00058     CachingLow = 200,
00059     CachingNormal = 300,
00060     CachingHigh = 400,
00061     CachingHigher = 500
00062 };
00063 
00064 enum {
00065 #ifdef WIN32
00066        directxW,
00067 #else
00068        alsaW,
00069        ossW,
00070 #endif
00071        fileW,
00072        audioOutCoB,
00073        normalizerChB,
00074        volLW };
00075 enum { recordChB, dumpChB, bandwidthChB, timeshiftChB, inputLE, cachingCoB };
00076 enum { skinRB, qtRB };
00077 
00078 class ConfigControl;
00079 class QComboBox;
00080 class QLineEdit;
00081 class QRadioButton;
00082 class QCheckBox;
00083 class QString;
00084 
00085 #ifdef WIN32
00086 class QTreeWidgetItem;
00087 #endif
00088 
00089 class SPrefsCatList : public QWidget
00090 {
00091     Q_OBJECT;
00092 public:
00093     SPrefsCatList( intf_thread_t *, QWidget *);
00094     virtual ~SPrefsCatList() {};
00095 private:
00096     intf_thread_t *p_intf;
00097 signals:
00098     void currentItemChanged( int );
00099 public slots:
00100     void switchPanel( int );
00101 };
00102 
00103 class SPrefsPanel : public QWidget
00104 {
00105     Q_OBJECT
00106 public:
00107     SPrefsPanel( intf_thread_t *, QWidget *, int );
00108     virtual ~SPrefsPanel();
00109     void apply();
00110     void clean();
00111 private:
00112     intf_thread_t *p_intf;
00113     QList<ConfigControl *> controls;
00114 
00115     int number;
00116 
00117     QList<QWidget *> optionWidgets;
00118     QString qs_filter;
00119 
00120 #ifdef WIN32
00121     QList<QTreeWidgetItem *> listAsso;
00122     bool addType( const char * psz_ext, QTreeWidgetItem*, QTreeWidgetItem*, QVLCRegistry* );
00123 #endif
00124 
00125 /* Display only the options for the selected audio output */
00126 private slots:
00127     void lastfm_Changed( int );
00128     void updateAudioOptions( int );
00129     void updateAudioVolume( int );
00130 #ifdef SYS_MINGW32
00131     void assoDialog();
00132     void saveAsso();
00133 #endif
00134 };
00135 
00136 #endif

Generated on Wed Aug 13 08:02:37 2008 for VLC by  doxygen 1.5.1