00001 /* 00002 This file is part of the Opie Project 00003 00004 Copyright (c) 2002 Dan Williams <drw@handhelds.org> 00005 Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> 00006 =. 00007 .=l. 00008 .>+-= 00009 _;:, .> :=|. This program is free software; you can 00010 .> <`_, > . <= redistribute it and/or modify it under 00011 :`=1 )Y*s>-.-- : the terms of the GNU Library General Public 00012 .="- .-=="i, .._ License as published by the Free Software 00013 - . .-<_> .<> Foundation; either version 2 of the License, 00014 ._= =} : or (at your option) any later version. 00015 .%`+i> _;_. 00016 .i_,=:_. -<s. This program is distributed in the hope that 00017 + . -:. = it will be useful, but WITHOUT ANY WARRANTY; 00018 : .. .:, . . . without even the implied warranty of 00019 =_ + =;=|` MERCHANTABILITY or FITNESS FOR A 00020 _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU 00021 ..}^=.= = ; Library General Public License for more 00022 ++= -. .` .: details. 00023 : = ...= . :.=- 00024 -. .:....=;==+<; You should have received a copy of the GNU 00025 -_. . . )=. = Library General Public License along with 00026 -- :-=` this library; see the file COPYING.LIB. 00027 If not, write to the Free Software Foundation, 00028 Inc., 59 Temple Place - Suite 330, 00029 Boston, MA 02111-1307, USA. 00030 */ 00031 00032 #ifndef APPEARANCESETTINGS_H 00033 #define APPEARANCESETTINGS_H 00034 00035 #include <opie2/ofontselector.h> 00036 00037 #include <qpe/fontdatabase.h> 00038 00039 #include <qdialog.h> 00040 #include <qspinbox.h> 00041 00042 using Opie::Ui::OFontSelector; 00043 00044 class QCheckBox; 00045 class QComboBox; 00046 class QLabel; 00047 class QLineEdit; 00048 class QListBox; 00049 class QMultiLineEdit; 00050 class QPushButton; 00051 class QRadioButton; 00052 class QToolButton; 00053 class SampleWindow; 00054 namespace Opie {namespace Ui {class OFontSelector;}} 00055 class QListView; 00056 class QListViewItem; 00057 class Config; 00058 00059 class Appearance : public QDialog 00060 { 00061 Q_OBJECT 00062 00063 public: 00064 Appearance( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 00065 ~Appearance(); 00066 static QString appName() { return QString::fromLatin1("appearance"); } 00067 00068 protected: 00069 virtual void accept ( ); 00070 virtual void done ( int r ); 00071 00072 protected slots: 00073 void styleClicked ( int ); 00074 void styleSettingsClicked ( ); 00075 void decoClicked ( int ); 00076 void fontClicked ( const QFont & ); 00077 void colorClicked ( int ); 00078 00079 void editSchemeClicked(); 00080 void saveSchemeClicked(); 00081 void deleteSchemeClicked(); 00082 00083 void tabChanged ( QWidget * ); 00084 00085 private: 00086 void changeText(); 00087 00088 QWidget *createStyleTab ( QWidget *parent, Config &cfg ); 00089 QWidget *createDecoTab ( QWidget *parent, Config &cfg ); 00090 QWidget *createFontTab ( QWidget *parent, Config &cfg ); 00091 QWidget *createColorTab ( QWidget *parent, Config &cfg ); 00092 QWidget *createAdvancedTab ( QWidget *parent, Config &cfg ); 00093 00094 private: 00095 bool m_style_changed; 00096 bool m_font_changed; 00097 bool m_scheme_changed; 00098 bool m_deco_changed; 00099 bool m_color_changed; 00100 00101 int m_original_style; 00102 int m_original_deco; 00103 int m_original_tabstyle; 00104 bool m_original_tabpos; 00105 00106 QListBox * m_style_list; 00107 QPushButton * m_style_settings; 00108 00109 QListBox * m_deco_list; 00110 00111 QListBox * m_color_list; 00112 00113 Opie::Ui::OFontSelector *m_fontselect; 00114 00115 SampleWindow *m_sample; 00116 00117 QComboBox * m_tabstyle_list; 00118 QRadioButton *m_tabstyle_top; 00119 QRadioButton *m_tabstyle_bottom; 00120 00121 QRadioButton *m_rotdir_cw; 00122 QRadioButton *m_rotdir_ccw; 00123 QRadioButton *m_rotdir_flip; 00124 00125 QWidget * m_advtab; 00126 QCheckBox *m_leftHand; 00127 00128 QSpinBox *m_bigIconSize; 00129 QSpinBox *m_smallIconSize; 00130 QCheckBox *m_useBigPixmaps; 00131 }; 00132 00133 #endif
1.4.2