summaryrefslogtreecommitdiff
path: root/noncore/settings/appearance2/appearance.h
blob: 79e71eb06bb52a5e2dc446b7cf83bbe3ddc552e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
/*
                             This file is part of the Opie Project

                             Copyright (c)  2002 Dan Williams <drw@handhelds.org>
                             Copyright (c)  2002 Robert Griebl <sandman@handhelds.org>
              =.
            .=l.
           .>+-=
 _;:,     .>    :=|.         This program is free software; you can
.> <`_,   >  .   <=          redistribute it and/or  modify it under
:`=1 )Y*s>-.--   :           the terms of the GNU Library General Public
.="- .-=="i,     .._         License as published by the Free Software
 - .   .-<_>     .<>         Foundation; either version 2 of the License,
     ._= =}       :          or (at your option) any later version.
    .%`+i>       _;_.
    .i_,=:_.      -<s.       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
..}^=.=       =       ;      Library General Public License for more
++=   -.     .`     .:       details.
:     =  ...= . :.=-
 -.   .:....=;==+<;          You should have received a copy of the GNU
  -_. . .   )=.  =           Library General Public License along with
    --        :-=`           this library; see the file COPYING.LIB.
                             If not, write to the Free Software Foundation,
                             Inc., 59 Temple Place - Suite 330,
                             Boston, MA 02111-1307, USA.
*/

#ifndef APPEARANCESETTINGS_H
#define APPEARANCESETTINGS_H

#include <opie2/ofontselector.h>

#include <qpe/fontdatabase.h>

#include <qdialog.h>
#include <qspinbox.h>

using Opie::Ui::OFontSelector;

class QCheckBox;
class QComboBox;
class QLabel;
class QLineEdit;
class QListBox;
class QMultiLineEdit;
class QPushButton;
class QRadioButton;
class QToolButton;
class SampleWindow;
namespace Opie {namespace Ui {class OFontSelector;}}
class QListView;
class QListViewItem;
class Config;

class Appearance : public QDialog
{
    Q_OBJECT

public:
    Appearance( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
    ~Appearance();
    static QString appName() { return QString::fromLatin1("appearance"); }

protected:
    virtual void accept ( );
    virtual void done ( int r );

protected slots:
    void styleClicked ( int );
    void styleSettingsClicked ( );
    void decoClicked ( int );
    void fontClicked ( const QFont & );
    void colorClicked ( int );

    void editSchemeClicked();
    void saveSchemeClicked();
    void deleteSchemeClicked();

    void tabChanged ( QWidget * );

private:
    void changeText();

    QWidget *createStyleTab ( QWidget *parent, Config &cfg );
    QWidget *createDecoTab ( QWidget *parent, Config &cfg );
    QWidget *createFontTab ( QWidget *parent, Config &cfg );
    QWidget *createColorTab ( QWidget *parent, Config &cfg );
    QWidget *createAdvancedTab ( QWidget *parent, Config &cfg );

private:
    bool m_style_changed;
    bool m_font_changed;
    bool m_scheme_changed;
    bool m_deco_changed;
    bool m_color_changed;

    int  m_original_style;
    int  m_original_deco;
    int  m_original_tabstyle;
    bool m_original_tabpos;

    QListBox *    m_style_list;
    QPushButton * m_style_settings;

    QListBox *    m_deco_list;

    QListBox *    m_color_list;

    Opie::Ui::OFontSelector *m_fontselect;

    SampleWindow *m_sample;

    QComboBox *   m_tabstyle_list;
    QRadioButton *m_tabstyle_top;
    QRadioButton *m_tabstyle_bottom;

    QRadioButton *m_rotdir_cw;
    QRadioButton *m_rotdir_ccw;
    QRadioButton *m_rotdir_flip;

    QWidget *     m_advtab;
    QCheckBox    *m_leftHand;

    QSpinBox	*m_bigIconSize;
    QSpinBox	*m_smallIconSize;
    QCheckBox	*m_useBigPixmaps;
};

#endif