~bratsche/vlc/vlc-notify-add-actions-with-server-support

« back to all changes in this revision

Viewing changes to modules/gui/qt4/dialogs/preferences.hpp

  • Committer: Bazaar Package Importer
  • Date: 2008-11-28 09:41:28 UTC
  • Revision ID: jamesw@ubuntu.com-20081128094128-qc1zhxqwlf2ov8cl
Tags: upstream-ubuntu-0.9.2
Import upstream version 0.9.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*****************************************************************************
 
2
 * preferences.hpp : Preferences
 
3
 *****************************************************************************
 
4
 * Copyright (C) 2006-2007 the VideoLAN team
 
5
 * $Id: 44260ff7f789fb86c1fbedf8c0326a9d0d721051 $
 
6
 *
 
7
 * Authors: Clément Stenac <zorglub@videolan.org>
 
8
 *
 
9
 * This program is free software; you can redistribute it and/or modify
 
10
 * it under the terms of the GNU General Public License as published by
 
11
 * the Free Software Foundation; either version 2 of the License, or
 
12
 * (at your option) any later version.
 
13
 *
 
14
 * This program is distributed in the hope that it will be useful,
 
15
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
16
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
17
 * GNU General Public License for more details.
 
18
 *
 
19
 * You should have received a copy of the GNU General Public License
 
20
 * along with this program; if not, write to the Free Software
 
21
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
 
22
 *****************************************************************************/
 
23
 
 
24
#ifndef _PREFS_DIALOG_H_
 
25
#define _PREFS_DIALOG_H_
 
26
 
 
27
#include "util/qvlcframe.hpp"
 
28
#include "components/simple_preferences.hpp"
 
29
 
 
30
class PrefsTree;
 
31
class SPrefsCatList;
 
32
class AdvPrefsPanel;
 
33
class SPrefsPanel;
 
34
class QTreeWidgetItem;
 
35
class QTreeWidget;
 
36
class QHBoxLayout;
 
37
class QVBoxLayout;
 
38
class QGroupBox;
 
39
class QRadioButton;
 
40
class QWidget;
 
41
class QCheckBox;
 
42
class QLabel;
 
43
 
 
44
class PrefsDialog : public QVLCDialog
 
45
{
 
46
    Q_OBJECT;
 
47
public:
 
48
    static PrefsDialog * getInstance( intf_thread_t *p_intf )
 
49
    {
 
50
        if( !instance )
 
51
            instance = new PrefsDialog( (QWidget *)p_intf->p_sys->p_mi, p_intf );
 
52
        return instance;
 
53
    }
 
54
    virtual ~PrefsDialog() {};
 
55
#if 0
 
56
    /*Called from extended settings, is not used anymore, but could be useful one day*/
 
57
    void showModulePrefs( char* );
 
58
#endif
 
59
 
 
60
protected:
 
61
    virtual void closeEvent( QCloseEvent *e ){ instance = NULL; close(); }
 
62
private:
 
63
    PrefsDialog( QWidget *, intf_thread_t * );
 
64
    QGridLayout *main_layout;
 
65
 
 
66
    void destroyPanels();
 
67
 
 
68
    QWidget *main_panel;
 
69
    QHBoxLayout *main_panel_l;
 
70
 
 
71
    AdvPrefsPanel *advanced_panel;
 
72
    SPrefsPanel *current_simple_panel;
 
73
    SPrefsPanel *simple_panels[SPrefsMax];
 
74
 
 
75
    QWidget *tree_panel;
 
76
    QHBoxLayout *tree_panel_l;
 
77
 
 
78
    SPrefsCatList *simple_tree;
 
79
    PrefsTree *advanced_tree;
 
80
 
 
81
    QGroupBox *types;
 
82
    QRadioButton *small,*all;
 
83
 
 
84
    static PrefsDialog *instance;
 
85
 
 
86
private slots:
 
87
    void setAdvanced();
 
88
    void setSmall();
 
89
 
 
90
    void changeAdvPanel( QTreeWidgetItem * );
 
91
    void changeSimplePanel( int );
 
92
 
 
93
    void save();
 
94
    void cancel();
 
95
    void reset();
 
96
};
 
97
 
 
98
#endif