preferences.hpp

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * preferences.hpp : Preferences
00003  *****************************************************************************
00004  * Copyright (C) 2006-2007 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 _PREFS_DIALOG_H_
00025 #define _PREFS_DIALOG_H_
00026 
00027 #include "util/qvlcframe.hpp"
00028 #include "components/simple_preferences.hpp"
00029 
00030 class PrefsTree;
00031 class SPrefsCatList;
00032 class AdvPrefsPanel;
00033 class SPrefsPanel;
00034 class QTreeWidgetItem;
00035 class QTreeWidget;
00036 class QHBoxLayout;
00037 class QVBoxLayout;
00038 class QGroupBox;
00039 class QRadioButton;
00040 class QWidget;
00041 class QCheckBox;
00042 class QLabel;
00043 
00044 class PrefsDialog : public QVLCDialog
00045 {
00046     Q_OBJECT;
00047 public:
00048     static PrefsDialog * getInstance( intf_thread_t *p_intf )
00049     {
00050         if( !instance )
00051             instance = new PrefsDialog( (QWidget *)p_intf->p_sys->p_mi, p_intf );
00052         return instance;
00053     }
00054     virtual ~PrefsDialog() {};
00055 #if 0
00056     /*Called from extended settings, is not used anymore, but could be useful one day*/
00057     void showModulePrefs( char* );
00058 #endif
00059 
00060 private:
00061     PrefsDialog( QWidget *, intf_thread_t * );
00062     QGridLayout *main_layout;
00063 
00064     void destroyPanels();
00065 
00066     QWidget *main_panel;
00067     QHBoxLayout *main_panel_l;
00068 
00069     AdvPrefsPanel *advanced_panel;
00070     SPrefsPanel *current_simple_panel;
00071     SPrefsPanel *simple_panels[SPrefsMax];
00072 
00073     QWidget *tree_panel;
00074     QHBoxLayout *tree_panel_l;
00075 
00076     SPrefsCatList *simple_tree;
00077     PrefsTree *advanced_tree;
00078 
00079     QGroupBox *types;
00080     QRadioButton *small,*all;
00081 
00082     static PrefsDialog *instance;
00083 
00084 private slots:
00085     void setAdvanced();
00086     void setSmall();
00087 
00088     void changeAdvPanel( QTreeWidgetItem * );
00089     void changeSimplePanel( int );
00090 
00091     void save();
00092     void cancel();
00093     void reset();
00094 };
00095 
00096 #endif

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