-rw-r--r-- | noncore/settings/appearance2/appearance.cpp | 7 | ||||
-rw-r--r-- | noncore/settings/appearance2/appearance.h | 38 | ||||
-rw-r--r-- | noncore/settings/appearance2/appearance2.pro | 6 | ||||
-rw-r--r-- | noncore/settings/appearance2/editScheme.cpp | 22 | ||||
-rw-r--r-- | noncore/settings/appearance2/editScheme.h | 20 |
5 files changed, 48 insertions, 45 deletions
diff --git a/noncore/settings/appearance2/appearance.cpp b/noncore/settings/appearance2/appearance.cpp index ba12e55..b39203b 100644 --- a/noncore/settings/appearance2/appearance.cpp +++ b/noncore/settings/appearance2/appearance.cpp | |||
@@ -7,68 +7,67 @@ | |||
7 | _;:, .> :=|. This file is free software; you can | 7 | _;:, .> :=|. This file is free software; you can |
8 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
10 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | - . .-<_> .<> Foundation; either version 2 of the License, | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | ._= =} : or (at your option) any later version. | 12 | ._= =} : or (at your option) any later version. |
13 | .%`+i> _;_. | 13 | .%`+i> _;_. |
14 | .i_,=:_. -<s. This file is distributed in the hope that | 14 | .i_,=:_. -<s. This file is distributed in the hope that |
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General |
19 | ..}^=.= = ; Public License for more details. | 19 | ..}^=.= = ; Public License for more details. |
20 | ++= -. .` .: | 20 | ++= -. .` .: |
21 | : = ...= . :.=- You should have received a copy of the GNU | 21 | : = ...= . :.=- You should have received a copy of the GNU |
22 | -. .:....=;==+<; General Public License along with this file; | 22 | -. .:....=;==+<; General Public License along with this file; |
23 | -_. . . )=. = see the file COPYING. If not, write to the | 23 | -_. . . )=. = see the file COPYING. If not, write to the |
24 | -- :-=` Free Software Foundation, Inc., | 24 | -- :-=` Free Software Foundation, Inc., |
25 | 59 Temple Place - Suite 330, | 25 | 59 Temple Place - Suite 330, |
26 | Boston, MA 02111-1307, USA. | 26 | Boston, MA 02111-1307, USA. |
27 | 27 | ||
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include "appearance.h" | 30 | #include "appearance.h" |
31 | #include "editScheme.h" | 31 | #include "editScheme.h" |
32 | #include "stylelistitem.h" | 32 | #include "stylelistitem.h" |
33 | #include "decolistitem.h" | 33 | #include "decolistitem.h" |
34 | #include "colorlistitem.h" | 34 | #include "colorlistitem.h" |
35 | #include "exceptlistitem.h" | 35 | #include "exceptlistitem.h" |
36 | #include "sample.h" | 36 | #include "sample.h" |
37 | 37 | ||
38 | /* OPIE */ | 38 | /* OPIE */ |
39 | #include <opie/ofontselector.h> | 39 | #include <opie2/odevice.h> |
40 | #include <opie/odevice.h> | 40 | #include <opie2/ofiledialog.h> |
41 | #include <opie/ofiledialog.h> | 41 | #include <opie2/otabwidget.h> |
42 | #include <opie/otabwidget.h> | ||
43 | 42 | ||
44 | #include <qpe/config.h> | 43 | #include <qpe/config.h> |
45 | #include <qpe/global.h> | 44 | #include <qpe/global.h> |
46 | #include <qpe/qpeapplication.h> | 45 | #include <qpe/qpeapplication.h> |
47 | #include <qpe/qpemessagebox.h> | 46 | #include <qpe/qpemessagebox.h> |
48 | #include <qpe/qcopenvelope_qws.h> | 47 | #include <qpe/qcopenvelope_qws.h> |
49 | #include <qpe/qpestyle.h> | 48 | #include <qpe/qpestyle.h> |
50 | #include <qpe/lightstyle.h> | 49 | #include <qpe/lightstyle.h> |
51 | #include <qpe/styleinterface.h> | 50 | #include <qpe/styleinterface.h> |
52 | 51 | ||
53 | /* QT */ | 52 | /* QT */ |
54 | #include <qbuttongroup.h> | 53 | #include <qbuttongroup.h> |
55 | #include <qcheckbox.h> | 54 | #include <qcheckbox.h> |
56 | #include <qcombobox.h> | 55 | #include <qcombobox.h> |
57 | #include <qdialog.h> | 56 | #include <qdialog.h> |
58 | #include <qdir.h> | 57 | #include <qdir.h> |
59 | #include <qlabel.h> | 58 | #include <qlabel.h> |
60 | #include <qlayout.h> | 59 | #include <qlayout.h> |
61 | #include <qlineedit.h> | 60 | #include <qlineedit.h> |
62 | #include <qlistbox.h> | 61 | #include <qlistbox.h> |
63 | #include <qmessagebox.h> | 62 | #include <qmessagebox.h> |
64 | #include <qpushbutton.h> | 63 | #include <qpushbutton.h> |
65 | #include <qradiobutton.h> | 64 | #include <qradiobutton.h> |
66 | #if QT_VERSION >= 300 | 65 | #if QT_VERSION >= 300 |
67 | #include <qstylefactory.h> | 66 | #include <qstylefactory.h> |
68 | #endif | 67 | #endif |
69 | #include <qtoolbutton.h> | 68 | #include <qtoolbutton.h> |
70 | #include <qwindowsstyle.h> | 69 | #include <qwindowsstyle.h> |
71 | #include <qlistview.h> | 70 | #include <qlistview.h> |
72 | #include <qheader.h> | 71 | #include <qheader.h> |
73 | #include <qvbox.h> | 72 | #include <qvbox.h> |
74 | #include <qwhatsthis.h> | 73 | #include <qwhatsthis.h> |
diff --git a/noncore/settings/appearance2/appearance.h b/noncore/settings/appearance2/appearance.h index 51e9636..f45f549 100644 --- a/noncore/settings/appearance2/appearance.h +++ b/noncore/settings/appearance2/appearance.h | |||
@@ -1,128 +1,132 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the OPIE Project | 2 | This file is part of the OPIE Project |
3 | =. Copyright (c) 2002 Dan Williams <williamsdr@acm.org> | 3 | =. Copyright (c) 2002 Dan Williams <williamsdr@acm.org> |
4 | .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> | 4 | .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> |
5 | .>+-= | 5 | .>+-= |
6 | _;:, .> :=|. This file is free software; you can | 6 | _;:, .> :=|. This file is free software; you can |
7 | .> <`_, > . <= redistribute it and/or modify it under | 7 | .> <`_, > . <= redistribute it and/or modify it under |
8 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 8 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
9 | .="- .-=="i, .._ License as published by the Free Software | 9 | .="- .-=="i, .._ License as published by the Free Software |
10 | - . .-<_> .<> Foundation; either version 2 of the License, | 10 | - . .-<_> .<> Foundation; either version 2 of the License, |
11 | ._= =} : or (at your option) any later version. | 11 | ._= =} : or (at your option) any later version. |
12 | .%`+i> _;_. | 12 | .%`+i> _;_. |
13 | .i_,=:_. -<s. This file is distributed in the hope that | 13 | .i_,=:_. -<s. This file is distributed in the hope that |
14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
15 | : .. .:, . . . without even the implied warranty of | 15 | : .. .:, . . . without even the implied warranty of |
16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | 17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General |
18 | ..}^=.= = ; Public License for more details. | 18 | ..}^=.= = ; Public License for more details. |
19 | ++= -. .` .: | 19 | ++= -. .` .: |
20 | : = ...= . :.=- You should have received a copy of the GNU | 20 | : = ...= . :.=- You should have received a copy of the GNU |
21 | -. .:....=;==+<; General Public License along with this file; | 21 | -. .:....=;==+<; General Public License along with this file; |
22 | -_. . . )=. = see the file COPYING. If not, write to the | 22 | -_. . . )=. = see the file COPYING. If not, write to the |
23 | -- :-=` Free Software Foundation, Inc., | 23 | -- :-=` Free Software Foundation, Inc., |
24 | 59 Temple Place - Suite 330, | 24 | 59 Temple Place - Suite 330, |
25 | Boston, MA 02111-1307, USA. | 25 | Boston, MA 02111-1307, USA. |
26 | 26 | ||
27 | */ | 27 | */ |
28 | 28 | ||
29 | #ifndef APPEARANCESETTINGS_H | 29 | #ifndef APPEARANCESETTINGS_H |
30 | #define APPEARANCESETTINGS_H | 30 | #define APPEARANCESETTINGS_H |
31 | 31 | ||
32 | #include <opie2/ofontselector.h> | ||
33 | |||
32 | #include <qpe/fontdatabase.h> | 34 | #include <qpe/fontdatabase.h> |
33 | 35 | ||
34 | #include <qdialog.h> | 36 | #include <qdialog.h> |
35 | 37 | ||
38 | using Opie::OFontSelector; | ||
39 | |||
36 | class QCheckBox; | 40 | class QCheckBox; |
37 | class QComboBox; | 41 | class QComboBox; |
38 | class QLabel; | 42 | class QLabel; |
39 | class QLineEdit; | 43 | class QLineEdit; |
40 | class QListBox; | 44 | class QListBox; |
41 | class QMultiLineEdit; | 45 | class QMultiLineEdit; |
42 | class QPushButton; | 46 | class QPushButton; |
43 | class QRadioButton; | 47 | class QRadioButton; |
44 | class QToolButton; | 48 | class QToolButton; |
45 | class SampleWindow; | 49 | class SampleWindow; |
46 | class OFontSelector; | 50 | class OFontSelector; |
47 | class QListView; | 51 | class QListView; |
48 | class QListViewItem; | 52 | class QListViewItem; |
49 | class Config; | 53 | class Config; |
50 | 54 | ||
51 | class Appearance : public QDialog | 55 | class Appearance : public QDialog |
52 | { | 56 | { |
53 | Q_OBJECT | 57 | Q_OBJECT |
54 | 58 | ||
55 | public: | 59 | public: |
56 | Appearance( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | 60 | Appearance( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); |
57 | ~Appearance(); | 61 | ~Appearance(); |
58 | static QString appName() { return QString::fromLatin1("appearance"); } | 62 | static QString appName() { return QString::fromLatin1("appearance"); } |
59 | 63 | ||
60 | protected: | 64 | protected: |
61 | virtual void accept ( ); | 65 | virtual void accept ( ); |
62 | virtual void done ( int r ); | 66 | virtual void done ( int r ); |
63 | 67 | ||
64 | protected slots: | 68 | protected slots: |
65 | void styleClicked ( int ); | 69 | void styleClicked ( int ); |
66 | void styleSettingsClicked ( ); | 70 | void styleSettingsClicked ( ); |
67 | void decoClicked ( int ); | 71 | void decoClicked ( int ); |
68 | void fontClicked ( const QFont & ); | 72 | void fontClicked ( const QFont & ); |
69 | void colorClicked ( int ); | 73 | void colorClicked ( int ); |
70 | 74 | ||
71 | void editSchemeClicked(); | 75 | void editSchemeClicked(); |
72 | void saveSchemeClicked(); | 76 | void saveSchemeClicked(); |
73 | void deleteSchemeClicked(); | 77 | void deleteSchemeClicked(); |
74 | 78 | ||
75 | void tabChanged ( QWidget * ); | 79 | void tabChanged ( QWidget * ); |
76 | 80 | ||
77 | void addExcept ( ); | 81 | void addExcept ( ); |
78 | void delExcept ( ); | 82 | void delExcept ( ); |
79 | void upExcept ( ); | 83 | void upExcept ( ); |
80 | void downExcept ( ); | 84 | void downExcept ( ); |
81 | void clickedExcept ( QListViewItem *, const QPoint &, int ); | 85 | void clickedExcept ( QListViewItem *, const QPoint &, int ); |
82 | 86 | ||
83 | private: | 87 | private: |
84 | void changeText(); | 88 | void changeText(); |
85 | 89 | ||
86 | QWidget *createStyleTab ( QWidget *parent, Config &cfg ); | 90 | QWidget *createStyleTab ( QWidget *parent, Config &cfg ); |
87 | QWidget *createDecoTab ( QWidget *parent, Config &cfg ); | 91 | QWidget *createDecoTab ( QWidget *parent, Config &cfg ); |
88 | QWidget *createFontTab ( QWidget *parent, Config &cfg ); | 92 | QWidget *createFontTab ( QWidget *parent, Config &cfg ); |
89 | QWidget *createColorTab ( QWidget *parent, Config &cfg ); | 93 | QWidget *createColorTab ( QWidget *parent, Config &cfg ); |
90 | QWidget *createAdvancedTab ( QWidget *parent, Config &cfg ); | 94 | QWidget *createAdvancedTab ( QWidget *parent, Config &cfg ); |
91 | 95 | ||
92 | private: | 96 | private: |
93 | bool m_style_changed; | 97 | bool m_style_changed; |
94 | bool m_font_changed; | 98 | bool m_font_changed; |
95 | bool m_scheme_changed; | 99 | bool m_scheme_changed; |
96 | bool m_deco_changed; | 100 | bool m_deco_changed; |
97 | bool m_color_changed; | 101 | bool m_color_changed; |
98 | 102 | ||
99 | int m_original_style; | 103 | int m_original_style; |
100 | int m_original_deco; | 104 | int m_original_deco; |
101 | int m_original_tabstyle; | 105 | int m_original_tabstyle; |
102 | bool m_original_tabpos; | 106 | bool m_original_tabpos; |
103 | 107 | ||
104 | QListBox * m_style_list; | 108 | QListBox * m_style_list; |
105 | QPushButton * m_style_settings; | 109 | QPushButton * m_style_settings; |
106 | 110 | ||
107 | QListBox * m_deco_list; | 111 | QListBox * m_deco_list; |
108 | 112 | ||
109 | QListBox * m_color_list; | 113 | QListBox * m_color_list; |
110 | 114 | ||
111 | OFontSelector *m_fontselect; | 115 | OFontSelector *m_fontselect; |
116 | |||
117 | SampleWindow *m_sample; | ||
112 | 118 | ||
113 | SampleWindow *m_sample; | ||
114 | |||
115 | QComboBox * m_tabstyle_list; | 119 | QComboBox * m_tabstyle_list; |
116 | QRadioButton *m_tabstyle_top; | 120 | QRadioButton *m_tabstyle_top; |
117 | QRadioButton *m_tabstyle_bottom; | 121 | QRadioButton *m_tabstyle_bottom; |
118 | 122 | ||
119 | QRadioButton *m_rotdir_cw; | 123 | QRadioButton *m_rotdir_cw; |
120 | QRadioButton *m_rotdir_ccw; | 124 | QRadioButton *m_rotdir_ccw; |
121 | QRadioButton *m_rotdir_flip; | 125 | QRadioButton *m_rotdir_flip; |
122 | 126 | ||
123 | QWidget * m_advtab; | 127 | QWidget * m_advtab; |
124 | QListView * m_except; | 128 | QListView * m_except; |
125 | QCheckBox * m_force; | 129 | QCheckBox * m_force; |
126 | }; | 130 | }; |
127 | 131 | ||
128 | #endif | 132 | #endif |
diff --git a/noncore/settings/appearance2/appearance2.pro b/noncore/settings/appearance2/appearance2.pro index ca5a4ec..e2d73c2 100644 --- a/noncore/settings/appearance2/appearance2.pro +++ b/noncore/settings/appearance2/appearance2.pro | |||
@@ -1,12 +1,10 @@ | |||
1 | CONFIG = qt warn_on release quick-app | 1 | CONFIG = qt warn_on release quick-app |
2 | HEADERS = appearance.h editScheme.h sample.h | 2 | HEADERS = appearance.h editScheme.h sample.h |
3 | SOURCES = appearance.cpp editScheme.cpp main.cpp sample.cpp | 3 | SOURCES = appearance.cpp editScheme.cpp main.cpp sample.cpp |
4 | INCLUDEPATH += $(OPIEDIR)/include | 4 | INCLUDEPATH += $(OPIEDIR)/include |
5 | DEPENDPATH += ../$(OPIEDIR)/include | ||
6 | LIBS += -lqpe -lopie | ||
7 | INCLUDEPATH += $(OPIEDIR)/include | ||
8 | DEPENDPATH += $(OPIEDIR)/include | 5 | DEPENDPATH += $(OPIEDIR)/include |
6 | LIBS += -lqpe -lopiecore2 -lopieui2 -lqtaux2 | ||
9 | 7 | ||
10 | TARGET = appearance | 8 | TARGET = appearance |
11 | 9 | ||
12 | include ( $(OPIEDIR)/include.pro ) | 10 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/noncore/settings/appearance2/editScheme.cpp b/noncore/settings/appearance2/editScheme.cpp index 7e5225f..0f3702f 100644 --- a/noncore/settings/appearance2/editScheme.cpp +++ b/noncore/settings/appearance2/editScheme.cpp | |||
@@ -1,75 +1,73 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the OPIE Project | 2 | This file is part of the OPIE Project |
3 | =. Copyright (c) 2002 Dan Williams <williamsdr@acm.org> | 3 | =. Copyright (c) 2002 Dan Williams <williamsdr@acm.org> |
4 | .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> | 4 | .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> |
5 | .>+-= | 5 | .>+-= |
6 | _;:, .> :=|. This file is free software; you can | 6 | _;:, .> :=|. This file is free software; you can |
7 | .> <`_, > . <= redistribute it and/or modify it under | 7 | .> <`_, > . <= redistribute it and/or modify it under |
8 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 8 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
9 | .="- .-=="i, .._ License as published by the Free Software | 9 | .="- .-=="i, .._ License as published by the Free Software |
10 | - . .-<_> .<> Foundation; either version 2 of the License, | 10 | - . .-<_> .<> Foundation; either version 2 of the License, |
11 | ._= =} : or (at your option) any later version. | 11 | ._= =} : or (at your option) any later version. |
12 | .%`+i> _;_. | 12 | .%`+i> _;_. |
13 | .i_,=:_. -<s. This file is distributed in the hope that | 13 | .i_,=:_. -<s. This file is distributed in the hope that |
14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
15 | : .. .:, . . . without even the implied warranty of | 15 | : .. .:, . . . without even the implied warranty of |
16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | 17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General |
18 | ..}^=.= = ; Public License for more details. | 18 | ..}^=.= = ; Public License for more details. |
19 | ++= -. .` .: | 19 | ++= -. .` .: |
20 | : = ...= . :.=- You should have received a copy of the GNU | 20 | : = ...= . :.=- You should have received a copy of the GNU |
21 | -. .:....=;==+<; General Public License along with this file; | 21 | -. .:....=;==+<; General Public License along with this file; |
22 | -_. . . )=. = see the file COPYING. If not, write to the | 22 | -_. . . )=. = see the file COPYING. If not, write to the |
23 | -- :-=` Free Software Foundation, Inc., | 23 | -- :-=` Free Software Foundation, Inc., |
24 | 59 Temple Place - Suite 330, | 24 | 59 Temple Place - Suite 330, |
25 | Boston, MA 02111-1307, USA. | 25 | Boston, MA 02111-1307, USA. |
26 | 26 | ||
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include "editScheme.h" | 29 | #include "editScheme.h" |
30 | 30 | ||
31 | #include <opie/ocolorbutton.h> | ||
32 | |||
33 | #include <qaction.h> | 31 | #include <qaction.h> |
34 | #include <qlabel.h> | 32 | #include <qlabel.h> |
35 | #include <qlayout.h> | 33 | #include <qlayout.h> |
36 | #include <qpopupmenu.h> | 34 | #include <qpopupmenu.h> |
37 | #include <qscrollview.h> | 35 | #include <qscrollview.h> |
38 | #include <qtoolbutton.h> | 36 | #include <qtoolbutton.h> |
39 | #include <qwhatsthis.h> | 37 | #include <qwhatsthis.h> |
40 | 38 | ||
41 | EditScheme::EditScheme ( int cnt, const QString *labels, QColor *colors, QWidget* parent, const char* name, bool modal, WFlags ) | 39 | EditScheme::EditScheme ( int cnt, const QString *labels, QColor *colors, QWidget* parent, const char* name, bool modal, WFlags ) |
42 | : QDialog ( parent, name, modal, WStyle_ContextHelp ) | 40 | : QDialog ( parent, name, modal, WStyle_ContextHelp ) |
43 | { | 41 | { |
44 | setCaption ( tr( "Edit scheme" ) ); | 42 | setCaption ( tr( "Edit scheme" ) ); |
45 | QGridLayout *layout = new QGridLayout ( this, 0, 0, 4, 4 ); | 43 | QGridLayout *layout = new QGridLayout ( this, 0, 0, 4, 4 ); |
46 | 44 | ||
47 | m_count = cnt; | 45 | m_count = cnt; |
48 | m_buttons = new OColorButton * [cnt]; | 46 | m_buttons = new OColorButton * [cnt]; |
49 | m_colors = colors; | 47 | m_colors = colors; |
50 | 48 | ||
51 | for ( int i = 0; i < cnt; i++ ) | 49 | for ( int i = 0; i < cnt; i++ ) |
52 | { | 50 | { |
53 | QLabel *l = new QLabel ( labels [i], this ); | 51 | QLabel *l = new QLabel ( labels [i], this ); |
54 | layout-> addWidget ( l, i, 0 ); | 52 | layout-> addWidget ( l, i, 0 ); |
55 | QWhatsThis::add( l, tr( "Click here to select a color for: " ).arg( labels [i] ) ); | 53 | QWhatsThis::add( l, tr( "Click here to select a color for: " ).arg( labels [i] ) ); |
56 | 54 | ||
57 | m_buttons [i] = new OColorButton ( this, colors [i] ); | 55 | m_buttons [i] = new OColorButton ( this, colors [i] ); |
58 | layout-> addWidget ( m_buttons [i], i, 1 ); | 56 | layout-> addWidget ( m_buttons [i], i, 1 ); |
59 | QWhatsThis::add( m_buttons [i], tr( "Click here to select a color for: " ).arg( labels [i] ) ); | 57 | QWhatsThis::add( m_buttons [i], tr( "Click here to select a color for: " ).arg( labels [i] ) ); |
60 | } | 58 | } |
61 | } | 59 | } |
62 | 60 | ||
63 | EditScheme::~EditScheme ( ) | 61 | EditScheme::~EditScheme ( ) |
64 | { | 62 | { |
65 | delete [] m_buttons; | 63 | delete [] m_buttons; |
66 | } | 64 | } |
67 | 65 | ||
68 | void EditScheme::accept ( ) | 66 | void EditScheme::accept ( ) |
69 | { | 67 | { |
70 | for ( int i = 0; i < m_count; i++ ) | 68 | for ( int i = 0; i < m_count; i++ ) |
71 | m_colors [i] = m_buttons [i]-> color ( ); | 69 | m_colors [i] = m_buttons [i]-> color ( ); |
72 | 70 | ||
73 | QDialog::accept ( ); | 71 | QDialog::accept ( ); |
74 | } | 72 | } |
75 | 73 | ||
diff --git a/noncore/settings/appearance2/editScheme.h b/noncore/settings/appearance2/editScheme.h index 93dc50d..c7539cb 100644 --- a/noncore/settings/appearance2/editScheme.h +++ b/noncore/settings/appearance2/editScheme.h | |||
@@ -1,53 +1,57 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the OPIE Project | 2 | This file is part of the OPIE Project |
3 | =. Copyright (c) 2002 Dan Williams <williamsdr@acm.org> | 3 | =. Copyright (c) 2002 Dan Williams <williamsdr@acm.org> |
4 | .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> | 4 | .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> |
5 | .>+-= | 5 | .>+-= |
6 | _;:, .> :=|. This file is free software; you can | 6 | _;:, .> :=|. This file is free software; you can |
7 | .> <`_, > . <= redistribute it and/or modify it under | 7 | .> <`_, > . <= redistribute it and/or modify it under |
8 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 8 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
9 | .="- .-=="i, .._ License as published by the Free Software | 9 | .="- .-=="i, .._ License as published by the Free Software |
10 | - . .-<_> .<> Foundation; either version 2 of the License, | 10 | - . .-<_> .<> Foundation; either version 2 of the License, |
11 | ._= =} : or (at your option) any later version. | 11 | ._= =} : or (at your option) any later version. |
12 | .%`+i> _;_. | 12 | .%`+i> _;_. |
13 | .i_,=:_. -<s. This file is distributed in the hope that | 13 | .i_,=:_. -<s. This file is distributed in the hope that |
14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
15 | : .. .:, . . . without even the implied warranty of | 15 | : .. .:, . . . without even the implied warranty of |
16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | 17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General |
18 | ..}^=.= = ; Public License for more details. | 18 | ..}^=.= = ; Public License for more details. |
19 | ++= -. .` .: | 19 | ++= -. .` .: |
20 | : = ...= . :.=- You should have received a copy of the GNU | 20 | : = ...= . :.=- You should have received a copy of the GNU |
21 | -. .:....=;==+<; General Public License along with this file; | 21 | -. .:....=;==+<; General Public License along with this file; |
22 | -_. . . )=. = see the file COPYING. If not, write to the | 22 | -_. . . )=. = see the file COPYING. If not, write to the |
23 | -- :-=` Free Software Foundation, Inc., | 23 | -- :-=` Free Software Foundation, Inc., |
24 | 59 Temple Place - Suite 330, | 24 | 59 Temple Place - Suite 330, |
25 | Boston, MA 02111-1307, USA. | 25 | Boston, MA 02111-1307, USA. |
26 | 26 | ||
27 | */ | 27 | */ |
28 | 28 | ||
29 | #ifndef EDITSCHEME_H | 29 | #ifndef EDITSCHEME_H |
30 | #define EDITSCHEME_H | 30 | #define EDITSCHEME_H |
31 | 31 | ||
32 | #include <opie2/ocolorbutton.h> | ||
33 | |||
32 | #include <qdialog.h> | 34 | #include <qdialog.h> |
33 | 35 | ||
36 | using Opie::OColorButton; | ||
37 | |||
34 | class QColor; | 38 | class QColor; |
35 | class OColorButton; | 39 | class OColorButton; |
36 | 40 | ||
37 | class EditScheme : public QDialog { | 41 | class EditScheme : public QDialog { |
38 | Q_OBJECT | 42 | Q_OBJECT |
39 | 43 | ||
40 | public: | 44 | public: |
41 | EditScheme ( int cnt, const QString *labels, QColor *colors, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); | 45 | EditScheme ( int cnt, const QString *labels, QColor *colors, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); |
42 | virtual ~EditScheme ( ); | 46 | virtual ~EditScheme ( ); |
43 | 47 | ||
44 | protected slots: | 48 | protected slots: |
45 | virtual void accept ( ); | 49 | virtual void accept ( ); |
46 | 50 | ||
47 | private: | 51 | private: |
48 | int m_count; | 52 | int m_count; |
49 | QColor *m_colors; | 53 | QColor *m_colors; |
50 | OColorButton **m_buttons; | 54 | OColorButton **m_buttons; |
51 | }; | 55 | }; |
52 | 56 | ||
53 | #endif | 57 | #endif |