preferences.hpp 2.34 KB
Newer Older
Clément Stenac's avatar
Clément Stenac committed
1
/*****************************************************************************
2
 * preferences.hpp : Preferences
3 4
 *****************************************************************************
 * Copyright (C) 2006-2007 the VideoLAN team
5
 * $Id$
Clément Stenac's avatar
Clément Stenac committed
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
 *
 * Authors: Clément Stenac <zorglub@videolan.org>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22
 *****************************************************************************/
Clément Stenac's avatar
Clément Stenac committed
23

24 25
#ifndef QVLC_PREFS_DIALOG_H_
#define QVLC_PREFS_DIALOG_H_ 1
Clément Stenac's avatar
Clément Stenac committed
26 27

#include "util/qvlcframe.hpp"
28
#include "components/simple_preferences.hpp"
Clément Stenac's avatar
Clément Stenac committed
29 30

class PrefsTree;
Clément Stenac's avatar
Clément Stenac committed
31
class SPrefsCatList;
32
class AdvPrefsPanel;
Clément Stenac's avatar
Clément Stenac committed
33
class SPrefsPanel;
Clément Stenac's avatar
Clément Stenac committed
34 35 36 37 38 39 40 41
class QTreeWidgetItem;
class QTreeWidget;
class QHBoxLayout;
class QVBoxLayout;
class QGroupBox;
class QRadioButton;
class QWidget;
class QCheckBox;
42
class QLabel;
Clément Stenac's avatar
Clément Stenac committed
43

44
class PrefsDialog : public QVLCDialog
Clément Stenac's avatar
Clément Stenac committed
45
{
46
    Q_OBJECT
Clément Stenac's avatar
Clément Stenac committed
47
public:
48 49
    PrefsDialog( QWidget *, intf_thread_t * );
    virtual ~PrefsDialog() {}
50 51
#if 0
    /*Called from extended settings, is not used anymore, but could be useful one day*/
Clément Stenac's avatar
Clément Stenac committed
52
    void showModulePrefs( char* );
53
#endif
54

Clément Stenac's avatar
Clément Stenac committed
55
private:
56
    QGridLayout *main_layout;
Clément Stenac's avatar
Clément Stenac committed
57

58 59
    QWidget *main_panel;
    QHBoxLayout *main_panel_l;
60 61

    AdvPrefsPanel *advanced_panel;
62
    SPrefsPanel *current_simple_panel;
63
    SPrefsPanel *simple_panels[SPrefsMax];
64 65 66

    QWidget *tree_panel;
    QHBoxLayout *tree_panel_l;
67

Clément Stenac's avatar
Clément Stenac committed
68
    SPrefsCatList *simple_tree;
69 70
    PrefsTree *advanced_tree;

Clément Stenac's avatar
Clément Stenac committed
71 72
    QGroupBox *types;
    QRadioButton *small,*all;
Clément Stenac's avatar
Clément Stenac committed
73

74 75
    bool b_small;

Clément Stenac's avatar
Clément Stenac committed
76
private slots:
77
    void setAdvanced();
78 79 80 81 82 83 84 85
    void setSmall();

    void changeAdvPanel( QTreeWidgetItem * );
    void changeSimplePanel( int );

    void save();
    void cancel();
    void reset();
86
    void close() { save(); };
Clément Stenac's avatar
Clément Stenac committed
87 88 89
};

#endif