author | drw <drw> | 2005-06-05 22:47:00 (UTC) |
---|---|---|
committer | drw <drw> | 2005-06-05 22:47:00 (UTC) |
commit | 8ee47cc828388f6f3b44356dbcee5536a9e83e55 (patch) (unidiff) | |
tree | cf4c704b08b9ba277e22d0f42cbe45a2b1057a79 | |
parent | 56b8917e2cca3715e9a19941965ddd73e6bba5d4 (diff) | |
download | opie-8ee47cc828388f6f3b44356dbcee5536a9e83e55.zip opie-8ee47cc828388f6f3b44356dbcee5536a9e83e55.tar.gz opie-8ee47cc828388f6f3b44356dbcee5536a9e83e55.tar.bz2 |
Fix doc box headers
-rw-r--r-- | noncore/settings/appearance2/appearance.cpp | 51 | ||||
-rw-r--r-- | noncore/settings/appearance2/appearance.h | 51 | ||||
-rw-r--r-- | noncore/settings/appearance2/colorlistitem.h | 49 | ||||
-rw-r--r-- | noncore/settings/appearance2/decolistitem.h | 49 | ||||
-rw-r--r-- | noncore/settings/appearance2/editScheme.cpp | 51 | ||||
-rw-r--r-- | noncore/settings/appearance2/editScheme.h | 51 | ||||
-rw-r--r-- | noncore/settings/appearance2/exceptlistitem.h | 49 | ||||
-rw-r--r-- | noncore/settings/appearance2/main.cpp | 49 | ||||
-rw-r--r-- | noncore/settings/appearance2/sample.cpp | 51 | ||||
-rw-r--r-- | noncore/settings/appearance2/sample.h | 51 | ||||
-rw-r--r-- | noncore/settings/appearance2/stylelistitem.h | 49 |
11 files changed, 292 insertions, 259 deletions
diff --git a/noncore/settings/appearance2/appearance.cpp b/noncore/settings/appearance2/appearance.cpp index 1aa91bb..93e28fa 100644 --- a/noncore/settings/appearance2/appearance.cpp +++ b/noncore/settings/appearance2/appearance.cpp | |||
@@ -1,91 +1,94 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the OPIE Project | 2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project |
3 | |||
3 | Copyright (c) 2002 Trolltech AS <info@trolltech.com> | 4 | Copyright (c) 2002 Trolltech AS <info@trolltech.com> |
4 | =. Copyright (c) 2002 Dan Williams <williamsdr@acm.org> | 5 | Copyright (c) 2002 Dan Williams <drw@handhelds.org> |
5 | .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> | 6 | Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> |
6 | .>+-= | 7 | =. |
7 | _;:, .> :=|. This file is free software; you can | 8 | .=l. |
8 | .> <`_, > . <= redistribute it and/or modify it under | 9 | Â Â Â Â Â Â .>+-= |
9 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 10 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can |
10 | .="- .-=="i, .._ License as published by the Free Software | 11 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under |
11 | - . .-<_> .<> Foundation; either version 2 of the License, | 12 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public |
12 | ._= =} : or (at your option) any later version. | 13 | .="- .-=="i, Â Â .._ License as published by the Free Software |
13 | .%`+i> _;_. | 14 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, |
14 | .i_,=:_. -<s. This file is distributed in the hope that | 15 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. |
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 16 | Â Â .%`+i> Â Â Â _;_. |
16 | : .. .:, . . . without even the implied warranty of | 17 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 18 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; |
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | 19 | : .. Â Â .:, Â Â . . . without even the implied warranty of |
19 | ..}^=.= = ; Public License for more details. | 20 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A |
20 | ++= -. .` .: | 21 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU |
21 | : = ...= . :.=- You should have received a copy of the GNU | 22 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more |
22 | -. .:....=;==+<; General Public License along with this file; | 23 | ++= Â -. Â Â .` Â Â .: details. |
23 | -_. . . )=. = see the file COPYING. If not, write to the | 24 | : Â Â = Â ...= . :.=- |
24 | -- :-=` Free Software Foundation, Inc., | 25 | Â -. Â .:....=;==+<; You should have received a copy of the GNU |
25 | 59 Temple Place - Suite 330, | 26 | Â -_. . . Â )=. Â = Library General Public License along with |
27 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
28 | If not, write to the Free Software Foundation, | ||
29 | Inc., 59 Temple Place - Suite 330, | ||
26 | Boston, MA 02111-1307, USA. | 30 | Boston, MA 02111-1307, USA. |
27 | |||
28 | */ | 31 | */ |
29 | 32 | ||
30 | #include "appearance.h" | 33 | #include "appearance.h" |
31 | #include "editScheme.h" | 34 | #include "editScheme.h" |
32 | #include "stylelistitem.h" | 35 | #include "stylelistitem.h" |
33 | #include "decolistitem.h" | 36 | #include "decolistitem.h" |
34 | #include "colorlistitem.h" | 37 | #include "colorlistitem.h" |
35 | #include "exceptlistitem.h" | 38 | #include "exceptlistitem.h" |
36 | #include "sample.h" | 39 | #include "sample.h" |
37 | 40 | ||
38 | /* OPIE */ | 41 | /* OPIE */ |
39 | #include <opie2/odevice.h> | 42 | #include <opie2/odevice.h> |
40 | #include <opie2/ofiledialog.h> | 43 | #include <opie2/ofiledialog.h> |
41 | #include <opie2/otabwidget.h> | 44 | #include <opie2/otabwidget.h> |
42 | #include <opie2/odebug.h> | 45 | #include <opie2/odebug.h> |
43 | 46 | ||
44 | #include <qpe/config.h> | 47 | #include <qpe/config.h> |
45 | #include <qpe/global.h> | 48 | #include <qpe/global.h> |
46 | #include <qpe/qpeapplication.h> | 49 | #include <qpe/qpeapplication.h> |
47 | #include <qpe/qpemessagebox.h> | 50 | #include <qpe/qpemessagebox.h> |
48 | #include <qpe/qcopenvelope_qws.h> | 51 | #include <qpe/qcopenvelope_qws.h> |
49 | #include <qpe/qpestyle.h> | 52 | #include <qpe/qpestyle.h> |
50 | #include <qpe/lightstyle.h> | 53 | #include <qpe/lightstyle.h> |
51 | #include <qpe/styleinterface.h> | 54 | #include <qpe/styleinterface.h> |
52 | 55 | ||
53 | /* QT */ | 56 | /* QT */ |
54 | #include <qbuttongroup.h> | 57 | #include <qbuttongroup.h> |
55 | #include <qcheckbox.h> | 58 | #include <qcheckbox.h> |
56 | #include <qcombobox.h> | 59 | #include <qcombobox.h> |
57 | #include <qdialog.h> | 60 | #include <qdialog.h> |
58 | #include <qdir.h> | 61 | #include <qdir.h> |
59 | #include <qlabel.h> | 62 | #include <qlabel.h> |
60 | #include <qlayout.h> | 63 | #include <qlayout.h> |
61 | #include <qlineedit.h> | 64 | #include <qlineedit.h> |
62 | #include <qlistbox.h> | 65 | #include <qlistbox.h> |
63 | #include <qmessagebox.h> | 66 | #include <qmessagebox.h> |
64 | #include <qpushbutton.h> | 67 | #include <qpushbutton.h> |
65 | #include <qradiobutton.h> | 68 | #include <qradiobutton.h> |
66 | #if QT_VERSION >= 0x030000 | 69 | #if QT_VERSION >= 0x030000 |
67 | #include <qstylefactory.h> | 70 | #include <qstylefactory.h> |
68 | #endif | 71 | #endif |
69 | #include <qtoolbutton.h> | 72 | #include <qtoolbutton.h> |
70 | #include <qwindowsstyle.h> | 73 | #include <qwindowsstyle.h> |
71 | #include <qlistview.h> | 74 | #include <qlistview.h> |
72 | #include <qheader.h> | 75 | #include <qheader.h> |
73 | #include <qvbox.h> | 76 | #include <qvbox.h> |
74 | #include <qwhatsthis.h> | 77 | #include <qwhatsthis.h> |
75 | 78 | ||
76 | using namespace Opie; | 79 | using namespace Opie; |
77 | using namespace Opie::Ui; | 80 | using namespace Opie::Ui; |
78 | using namespace Opie::Core; | 81 | using namespace Opie::Core; |
79 | 82 | ||
80 | class DefaultWindowDecoration : public WindowDecorationInterface | 83 | class DefaultWindowDecoration : public WindowDecorationInterface |
81 | { | 84 | { |
82 | public: | 85 | public: |
83 | DefaultWindowDecoration() : ref(0) {} | 86 | DefaultWindowDecoration() : ref(0) {} |
84 | QString name() const | 87 | QString name() const |
85 | { | 88 | { |
86 | return "Default"; | 89 | return "Default"; |
87 | } | 90 | } |
88 | QPixmap icon() const | 91 | QPixmap icon() const |
89 | { | 92 | { |
90 | return QPixmap(); | 93 | return QPixmap(); |
91 | } | 94 | } |
diff --git a/noncore/settings/appearance2/appearance.h b/noncore/settings/appearance2/appearance.h index 287f9f7..ef7e874 100644 --- a/noncore/settings/appearance2/appearance.h +++ b/noncore/settings/appearance2/appearance.h | |||
@@ -1,90 +1,93 @@ | |||
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 | |
4 | .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> | 4 | Copyright (c) 2002 Dan Williams <drw@handhelds.org> |
5 | .>+-= | 5 | Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> |
6 | _;:, .> :=|. This file is free software; you can | 6 | =. |
7 | .> <`_, > . <= redistribute it and/or modify it under | 7 | .=l. |
8 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 8 | Â Â Â Â Â Â .>+-= |
9 | .="- .-=="i, .._ License as published by the Free Software | 9 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can |
10 | - . .-<_> .<> Foundation; either version 2 of the License, | 10 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under |
11 | ._= =} : or (at your option) any later version. | 11 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public |
12 | .%`+i> _;_. | 12 | .="- .-=="i, Â Â .._ License as published by the Free Software |
13 | .i_,=:_. -<s. This file is distributed in the hope that | 13 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, |
14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 14 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. |
15 | : .. .:, . . . without even the implied warranty of | 15 | Â Â .%`+i> Â Â Â _;_. |
16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 16 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that |
17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | 17 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; |
18 | ..}^=.= = ; Public License for more details. | 18 | : .. Â Â .:, Â Â . . . without even the implied warranty of |
19 | ++= -. .` .: | 19 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A |
20 | : = ...= . :.=- You should have received a copy of the GNU | 20 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU |
21 | -. .:....=;==+<; General Public License along with this file; | 21 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more |
22 | -_. . . )=. = see the file COPYING. If not, write to the | 22 | ++= Â -. Â Â .` Â Â .: details. |
23 | -- :-=` Free Software Foundation, Inc., | 23 | : Â Â = Â ...= . :.=- |
24 | 59 Temple Place - Suite 330, | 24 | Â -. Â .:....=;==+<; You should have received a copy of the GNU |
25 | Â -_. . . Â )=. Â = Library General Public License along with | ||
26 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
27 | If not, write to the Free Software Foundation, | ||
28 | Inc., 59 Temple Place - Suite 330, | ||
25 | Boston, MA 02111-1307, USA. | 29 | Boston, MA 02111-1307, USA. |
26 | |||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #ifndef APPEARANCESETTINGS_H | 32 | #ifndef APPEARANCESETTINGS_H |
30 | #define APPEARANCESETTINGS_H | 33 | #define APPEARANCESETTINGS_H |
31 | 34 | ||
32 | #include <opie2/ofontselector.h> | 35 | #include <opie2/ofontselector.h> |
33 | 36 | ||
34 | #include <qpe/fontdatabase.h> | 37 | #include <qpe/fontdatabase.h> |
35 | 38 | ||
36 | #include <qdialog.h> | 39 | #include <qdialog.h> |
37 | 40 | ||
38 | using Opie::Ui::OFontSelector; | 41 | using Opie::Ui::OFontSelector; |
39 | 42 | ||
40 | class QCheckBox; | 43 | class QCheckBox; |
41 | class QComboBox; | 44 | class QComboBox; |
42 | class QLabel; | 45 | class QLabel; |
43 | class QLineEdit; | 46 | class QLineEdit; |
44 | class QListBox; | 47 | class QListBox; |
45 | class QMultiLineEdit; | 48 | class QMultiLineEdit; |
46 | class QPushButton; | 49 | class QPushButton; |
47 | class QRadioButton; | 50 | class QRadioButton; |
48 | class QToolButton; | 51 | class QToolButton; |
49 | class SampleWindow; | 52 | class SampleWindow; |
50 | namespace Opie {namespace Ui {class OFontSelector;}} | 53 | namespace Opie {namespace Ui {class OFontSelector;}} |
51 | class QListView; | 54 | class QListView; |
52 | class QListViewItem; | 55 | class QListViewItem; |
53 | class Config; | 56 | class Config; |
54 | 57 | ||
55 | class Appearance : public QDialog | 58 | class Appearance : public QDialog |
56 | { | 59 | { |
57 | Q_OBJECT | 60 | Q_OBJECT |
58 | 61 | ||
59 | public: | 62 | public: |
60 | Appearance( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | 63 | Appearance( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); |
61 | ~Appearance(); | 64 | ~Appearance(); |
62 | static QString appName() { return QString::fromLatin1("appearance"); } | 65 | static QString appName() { return QString::fromLatin1("appearance"); } |
63 | 66 | ||
64 | protected: | 67 | protected: |
65 | virtual void accept ( ); | 68 | virtual void accept ( ); |
66 | virtual void done ( int r ); | 69 | virtual void done ( int r ); |
67 | 70 | ||
68 | protected slots: | 71 | protected slots: |
69 | void styleClicked ( int ); | 72 | void styleClicked ( int ); |
70 | void styleSettingsClicked ( ); | 73 | void styleSettingsClicked ( ); |
71 | void decoClicked ( int ); | 74 | void decoClicked ( int ); |
72 | void fontClicked ( const QFont & ); | 75 | void fontClicked ( const QFont & ); |
73 | void colorClicked ( int ); | 76 | void colorClicked ( int ); |
74 | 77 | ||
75 | void editSchemeClicked(); | 78 | void editSchemeClicked(); |
76 | void saveSchemeClicked(); | 79 | void saveSchemeClicked(); |
77 | void deleteSchemeClicked(); | 80 | void deleteSchemeClicked(); |
78 | 81 | ||
79 | void tabChanged ( QWidget * ); | 82 | void tabChanged ( QWidget * ); |
80 | 83 | ||
81 | private: | 84 | private: |
82 | void changeText(); | 85 | void changeText(); |
83 | 86 | ||
84 | QWidget *createStyleTab ( QWidget *parent, Config &cfg ); | 87 | QWidget *createStyleTab ( QWidget *parent, Config &cfg ); |
85 | QWidget *createDecoTab ( QWidget *parent, Config &cfg ); | 88 | QWidget *createDecoTab ( QWidget *parent, Config &cfg ); |
86 | QWidget *createFontTab ( QWidget *parent, Config &cfg ); | 89 | QWidget *createFontTab ( QWidget *parent, Config &cfg ); |
87 | QWidget *createColorTab ( QWidget *parent, Config &cfg ); | 90 | QWidget *createColorTab ( QWidget *parent, Config &cfg ); |
88 | QWidget *createAdvancedTab ( QWidget *parent, Config &cfg ); | 91 | QWidget *createAdvancedTab ( QWidget *parent, Config &cfg ); |
89 | 92 | ||
90 | private: | 93 | private: |
diff --git a/noncore/settings/appearance2/colorlistitem.h b/noncore/settings/appearance2/colorlistitem.h index f8d5c45..7f6014c 100644 --- a/noncore/settings/appearance2/colorlistitem.h +++ b/noncore/settings/appearance2/colorlistitem.h | |||
@@ -1,89 +1,92 @@ | |||
1 | /* | 1 | /* |
2 | =. This file is part of the OPIE Project | 2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project |
3 | .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> | ||
4 | .>+-= | ||
5 | _;:, .> :=|. This file is free software; you can | ||
6 | .> <`_, > . <= redistribute it and/or modify it under | ||
7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | ||
8 | .="- .-=="i, .._ License as published by the Free Software | ||
9 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
10 | ._= =} : or (at your option) any later version. | ||
11 | .%`+i> _;_. | ||
12 | .i_,=:_. -<s. This file is distributed in the hope that | ||
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
14 | : .. .:, . . . without even the implied warranty of | ||
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
17 | ..}^=.= = ; Public License for more details. | ||
18 | ++= -. .` .: | ||
19 | : = ...= . :.=- You should have received a copy of the GNU | ||
20 | -. .:....=;==+<; General Public License along with this file; | ||
21 | -_. . . )=. = see the file COPYING. If not, write to the | ||
22 | -- :-=` Free Software Foundation, Inc., | ||
23 | 59 Temple Place - Suite 330, | ||
24 | Boston, MA 02111-1307, USA. | ||
25 | 3 | ||
4 | Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> | ||
5 | =. | ||
6 | .=l. | ||
7 | Â Â Â Â Â Â .>+-= | ||
8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can | ||
9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, Â Â .._ License as published by the Free Software | ||
12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, | ||
13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. | ||
14 | Â Â .%`+i> Â Â Â _;_. | ||
15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that | ||
16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; | ||
17 | : .. Â Â .:, Â Â . . . without even the implied warranty of | ||
18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A | ||
19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU | ||
20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more | ||
21 | ++= Â -. Â Â .` Â Â .: details. | ||
22 | : Â Â = Â ...= . :.=- | ||
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
26 | */ | 29 | */ |
27 | 30 | ||
28 | #ifndef COLORLISTITEM_H | 31 | #ifndef COLORLISTITEM_H |
29 | #define COLORLISTITEM_H | 32 | #define COLORLISTITEM_H |
30 | 33 | ||
31 | #include <qlistbox.h> | 34 | #include <qlistbox.h> |
32 | #include <qpalette.h> | 35 | #include <qpalette.h> |
33 | #include <qapplication.h> | 36 | #include <qapplication.h> |
34 | 37 | ||
35 | #include <qpe/config.h> | 38 | #include <qpe/config.h> |
36 | 39 | ||
37 | class Appearance; | 40 | class Appearance; |
38 | 41 | ||
39 | class ColorListItem : public QListBoxText { | 42 | class ColorListItem : public QListBoxText { |
40 | public: | 43 | public: |
41 | ColorListItem ( const QString &t, Config &cfg ) : QListBoxText ( t ) | 44 | ColorListItem ( const QString &t, Config &cfg ) : QListBoxText ( t ) |
42 | { | 45 | { |
43 | m_colors = new QColor [s_colorcount]; | 46 | m_colors = new QColor [s_colorcount]; |
44 | load ( cfg ); | 47 | load ( cfg ); |
45 | } | 48 | } |
46 | 49 | ||
47 | virtual ~ColorListItem ( ) | 50 | virtual ~ColorListItem ( ) |
48 | { | 51 | { |
49 | delete [] m_colors; | 52 | delete [] m_colors; |
50 | } | 53 | } |
51 | 54 | ||
52 | QPalette palette ( ) | 55 | QPalette palette ( ) |
53 | { | 56 | { |
54 | return m_palette; | 57 | return m_palette; |
55 | } | 58 | } |
56 | 59 | ||
57 | bool load ( Config &cfg ) | 60 | bool load ( Config &cfg ) |
58 | { | 61 | { |
59 | for ( int i = 0; i < s_colorcount; i++ ) | 62 | for ( int i = 0; i < s_colorcount; i++ ) |
60 | m_colors [i] = QColor ( cfg. readEntry ( s_colorlut [i]. m_key, s_colorlut [i]. m_def )); | 63 | m_colors [i] = QColor ( cfg. readEntry ( s_colorlut [i]. m_key, s_colorlut [i]. m_def )); |
61 | 64 | ||
62 | buildPalette ( ); | 65 | buildPalette ( ); |
63 | return true; | 66 | return true; |
64 | } | 67 | } |
65 | 68 | ||
66 | void buildPalette ( ) | 69 | void buildPalette ( ) |
67 | { | 70 | { |
68 | m_palette = QPalette ( m_colors [r2i(QColorGroup::Button)], m_colors [r2i(QColorGroup::Background)] ); | 71 | m_palette = QPalette ( m_colors [r2i(QColorGroup::Button)], m_colors [r2i(QColorGroup::Background)] ); |
69 | m_palette. setColor ( QColorGroup::Highlight, m_colors [r2i(QColorGroup::Highlight)] ); | 72 | m_palette. setColor ( QColorGroup::Highlight, m_colors [r2i(QColorGroup::Highlight)] ); |
70 | m_palette. setColor ( QColorGroup::HighlightedText, m_colors [r2i(QColorGroup::HighlightedText)] ); | 73 | m_palette. setColor ( QColorGroup::HighlightedText, m_colors [r2i(QColorGroup::HighlightedText)] ); |
71 | m_palette. setColor ( QColorGroup::Text, m_colors [r2i(QColorGroup::Text)] ); | 74 | m_palette. setColor ( QColorGroup::Text, m_colors [r2i(QColorGroup::Text)] ); |
72 | m_palette. setColor ( QPalette::Active, QColorGroup::ButtonText, m_colors [r2i(QColorGroup::ButtonText)] ); | 75 | m_palette. setColor ( QPalette::Active, QColorGroup::ButtonText, m_colors [r2i(QColorGroup::ButtonText)] ); |
73 | m_palette. setColor ( QColorGroup::Base, m_colors [r2i(QColorGroup::Base)] ); | 76 | m_palette. setColor ( QColorGroup::Base, m_colors [r2i(QColorGroup::Base)] ); |
74 | m_palette. setColor ( QPalette::Disabled, QColorGroup::Text, m_palette. color ( QPalette::Active, QColorGroup::Background ). dark ( )); | 77 | m_palette. setColor ( QPalette::Disabled, QColorGroup::Text, m_palette. color ( QPalette::Active, QColorGroup::Background ). dark ( )); |
75 | } | 78 | } |
76 | 79 | ||
77 | bool save ( Config &cfg ) | 80 | bool save ( Config &cfg ) |
78 | { | 81 | { |
79 | for ( int i = 0; i < s_colorcount; i++ ) | 82 | for ( int i = 0; i < s_colorcount; i++ ) |
80 | cfg. writeEntry ( s_colorlut [i]. m_key, m_colors [i]. name ( )); | 83 | cfg. writeEntry ( s_colorlut [i]. m_key, m_colors [i]. name ( )); |
81 | return true; | 84 | return true; |
82 | } | 85 | } |
83 | 86 | ||
84 | QColor color ( QColorGroup::ColorRole role ) | 87 | QColor color ( QColorGroup::ColorRole role ) |
85 | { | 88 | { |
86 | int i = r2i ( role ); | 89 | int i = r2i ( role ); |
87 | return i >= 0 ? m_colors [i] : QColor ( ); | 90 | return i >= 0 ? m_colors [i] : QColor ( ); |
88 | } | 91 | } |
89 | 92 | ||
diff --git a/noncore/settings/appearance2/decolistitem.h b/noncore/settings/appearance2/decolistitem.h index da7924c..8dce455 100644 --- a/noncore/settings/appearance2/decolistitem.h +++ b/noncore/settings/appearance2/decolistitem.h | |||
@@ -1,89 +1,92 @@ | |||
1 | /* | 1 | /* |
2 | =. This file is part of the OPIE Project | 2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project |
3 | .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> | ||
4 | .>+-= | ||
5 | _;:, .> :=|. This file is free software; you can | ||
6 | .> <`_, > . <= redistribute it and/or modify it under | ||
7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | ||
8 | .="- .-=="i, .._ License as published by the Free Software | ||
9 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
10 | ._= =} : or (at your option) any later version. | ||
11 | .%`+i> _;_. | ||
12 | .i_,=:_. -<s. This file is distributed in the hope that | ||
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
14 | : .. .:, . . . without even the implied warranty of | ||
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
17 | ..}^=.= = ; Public License for more details. | ||
18 | ++= -. .` .: | ||
19 | : = ...= . :.=- You should have received a copy of the GNU | ||
20 | -. .:....=;==+<; General Public License along with this file; | ||
21 | -_. . . )=. = see the file COPYING. If not, write to the | ||
22 | -- :-=` Free Software Foundation, Inc., | ||
23 | 59 Temple Place - Suite 330, | ||
24 | Boston, MA 02111-1307, USA. | ||
25 | 3 | ||
4 | Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> | ||
5 | =. | ||
6 | .=l. | ||
7 | Â Â Â Â Â Â .>+-= | ||
8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can | ||
9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, Â Â .._ License as published by the Free Software | ||
12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, | ||
13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. | ||
14 | Â Â .%`+i> Â Â Â _;_. | ||
15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that | ||
16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; | ||
17 | : .. Â Â .:, Â Â . . . without even the implied warranty of | ||
18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A | ||
19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU | ||
20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more | ||
21 | ++= Â -. Â Â .` Â Â .: details. | ||
22 | : Â Â = Â ...= . :.=- | ||
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
26 | */ | 29 | */ |
27 | 30 | ||
28 | #ifndef DECOLISTITEM_H | 31 | #ifndef DECOLISTITEM_H |
29 | #define DECOLISTITEM_H | 32 | #define DECOLISTITEM_H |
30 | 33 | ||
31 | #include <qpe/windowdecorationinterface.h> | 34 | #include <qpe/windowdecorationinterface.h> |
32 | #include <qlistbox.h> | 35 | #include <qlistbox.h> |
33 | 36 | ||
34 | class DecoListItem : public QListBoxPixmap { | 37 | class DecoListItem : public QListBoxPixmap { |
35 | public: | 38 | public: |
36 | DecoListItem ( const QString &t ) : QListBoxPixmap ( QPixmap ( ), t ) | 39 | DecoListItem ( const QString &t ) : QListBoxPixmap ( QPixmap ( ), t ) |
37 | { | 40 | { |
38 | m_lib = 0; | 41 | m_lib = 0; |
39 | m_window_if = 0; | 42 | m_window_if = 0; |
40 | // m_settings_if = 0; | 43 | // m_settings_if = 0; |
41 | } | 44 | } |
42 | 45 | ||
43 | DecoListItem ( QLibrary *lib, WindowDecorationInterface *iface ) : QListBoxPixmap ( iface-> icon ( ), iface-> name ( )) | 46 | DecoListItem ( QLibrary *lib, WindowDecorationInterface *iface ) : QListBoxPixmap ( iface-> icon ( ), iface-> name ( )) |
44 | { | 47 | { |
45 | m_lib = lib; | 48 | m_lib = lib; |
46 | m_window_if = iface; | 49 | m_window_if = iface; |
47 | 50 | ||
48 | // iface-> queryInterface ( IID_WindowDecoration, (QUnknownInterface **) &m_settings_if ); | 51 | // iface-> queryInterface ( IID_WindowDecoration, (QUnknownInterface **) &m_settings_if ); |
49 | } | 52 | } |
50 | 53 | ||
51 | virtual ~DecoListItem ( ) | 54 | virtual ~DecoListItem ( ) |
52 | { | 55 | { |
53 | // if ( m_settings_if ) | 56 | // if ( m_settings_if ) |
54 | // m_settings_if-> release ( ); | 57 | // m_settings_if-> release ( ); |
55 | if ( m_window_if ) | 58 | if ( m_window_if ) |
56 | m_window_if-> release ( ); | 59 | m_window_if-> release ( ); |
57 | delete m_lib; | 60 | delete m_lib; |
58 | } | 61 | } |
59 | 62 | ||
60 | bool hasSettings ( ) const | 63 | bool hasSettings ( ) const |
61 | { | 64 | { |
62 | // return ( m_settings_if ); | 65 | // return ( m_settings_if ); |
63 | return false; | 66 | return false; |
64 | } | 67 | } |
65 | 68 | ||
66 | QWidget *settings ( QWidget * /*parent*/ ) | 69 | QWidget *settings ( QWidget * /*parent*/ ) |
67 | { | 70 | { |
68 | // return m_settings_if ? m_settings_if-> create ( parent ) : 0; | 71 | // return m_settings_if ? m_settings_if-> create ( parent ) : 0; |
69 | return 0; | 72 | return 0; |
70 | } | 73 | } |
71 | 74 | ||
72 | bool setSettings ( bool /*accepted*/ ) | 75 | bool setSettings ( bool /*accepted*/ ) |
73 | { | 76 | { |
74 | // if ( !m_settings_if ) | 77 | // if ( !m_settings_if ) |
75 | // return false; | 78 | // return false; |
76 | 79 | ||
77 | // if ( accepted ) | 80 | // if ( accepted ) |
78 | // return m_settings_if-> accept ( ); | 81 | // return m_settings_if-> accept ( ); |
79 | // else { | 82 | // else { |
80 | // m_settings_if-> reject ( ); | 83 | // m_settings_if-> reject ( ); |
81 | // return false; | 84 | // return false; |
82 | // } | 85 | // } |
83 | return false; | 86 | return false; |
84 | } | 87 | } |
85 | 88 | ||
86 | QString key ( ) | 89 | QString key ( ) |
87 | { | 90 | { |
88 | if ( m_lib ) | 91 | if ( m_lib ) |
89 | return QFileInfo ( m_lib-> library ( )). fileName ( ); | 92 | return QFileInfo ( m_lib-> library ( )). fileName ( ); |
diff --git a/noncore/settings/appearance2/editScheme.cpp b/noncore/settings/appearance2/editScheme.cpp index 18c69a5..2645833 100644 --- a/noncore/settings/appearance2/editScheme.cpp +++ b/noncore/settings/appearance2/editScheme.cpp | |||
@@ -1,74 +1,77 @@ | |||
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> | ||
4 | .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> | ||
5 | .>+-= | ||
6 | _;:, .> :=|. This file is free software; you can | ||
7 | .> <`_, > . <= redistribute it and/or modify it under | ||
8 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | ||
9 | .="- .-=="i, .._ License as published by the Free Software | ||
10 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
11 | ._= =} : or (at your option) any later version. | ||
12 | .%`+i> _;_. | ||
13 | .i_,=:_. -<s. This file is distributed in the hope that | ||
14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
15 | : .. .:, . . . without even the implied warranty of | ||
16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
18 | ..}^=.= = ; Public License for more details. | ||
19 | ++= -. .` .: | ||
20 | : = ...= . :.=- You should have received a copy of the GNU | ||
21 | -. .:....=;==+<; General Public License along with this file; | ||
22 | -_. . . )=. = see the file COPYING. If not, write to the | ||
23 | -- :-=` Free Software Foundation, Inc., | ||
24 | 59 Temple Place - Suite 330, | ||
25 | Boston, MA 02111-1307, USA. | ||
26 | 3 | ||
4 | Copyright (c) 2002 Dan Williams <drw@handhelds.org> | ||
5 | Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> | ||
6 | =. | ||
7 | .=l. | ||
8 | Â Â Â Â Â Â .>+-= | ||
9 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can | ||
10 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under | ||
11 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public | ||
12 | .="- .-=="i, Â Â .._ License as published by the Free Software | ||
13 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, | ||
14 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. | ||
15 | Â Â .%`+i> Â Â Â _;_. | ||
16 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that | ||
17 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; | ||
18 | : .. Â Â .:, Â Â . . . without even the implied warranty of | ||
19 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A | ||
20 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU | ||
21 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more | ||
22 | ++= Â -. Â Â .` Â Â .: details. | ||
23 | : Â Â = Â ...= . :.=- | ||
24 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
25 | Â -_. . . Â )=. Â = Library General Public License along with | ||
26 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
27 | If not, write to the Free Software Foundation, | ||
28 | Inc., 59 Temple Place - Suite 330, | ||
29 | Boston, MA 02111-1307, USA. | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #include "editScheme.h" | 32 | #include "editScheme.h" |
30 | 33 | ||
31 | #include <qaction.h> | 34 | #include <qaction.h> |
32 | #include <qlabel.h> | 35 | #include <qlabel.h> |
33 | #include <qlayout.h> | 36 | #include <qlayout.h> |
34 | #include <qpopupmenu.h> | 37 | #include <qpopupmenu.h> |
35 | #include <qscrollview.h> | 38 | #include <qscrollview.h> |
36 | #include <qtoolbutton.h> | 39 | #include <qtoolbutton.h> |
37 | #include <qwhatsthis.h> | 40 | #include <qwhatsthis.h> |
38 | 41 | ||
39 | using namespace Opie::Ui; | 42 | using namespace Opie::Ui; |
40 | EditScheme::EditScheme ( int cnt, const QString *labels, QColor *colors, QWidget* parent, const char* name, bool modal, WFlags ) | 43 | EditScheme::EditScheme ( int cnt, const QString *labels, QColor *colors, QWidget* parent, const char* name, bool modal, WFlags ) |
41 | : QDialog ( parent, name, modal, WStyle_ContextHelp ) | 44 | : QDialog ( parent, name, modal, WStyle_ContextHelp ) |
42 | { | 45 | { |
43 | setCaption ( tr( "Edit scheme" ) ); | 46 | setCaption ( tr( "Edit scheme" ) ); |
44 | QGridLayout *layout = new QGridLayout ( this, 0, 0, 4, 4 ); | 47 | QGridLayout *layout = new QGridLayout ( this, 0, 0, 4, 4 ); |
45 | 48 | ||
46 | m_count = cnt; | 49 | m_count = cnt; |
47 | m_buttons = new Opie::OColorButton * [cnt]; | 50 | m_buttons = new Opie::OColorButton * [cnt]; |
48 | m_colors = colors; | 51 | m_colors = colors; |
49 | 52 | ||
50 | for ( int i = 0; i < cnt; i++ ) | 53 | for ( int i = 0; i < cnt; i++ ) |
51 | { | 54 | { |
52 | QLabel *l = new QLabel ( labels [i], this ); | 55 | QLabel *l = new QLabel ( labels [i], this ); |
53 | layout-> addWidget ( l, i, 0 ); | 56 | layout-> addWidget ( l, i, 0 ); |
54 | QWhatsThis::add( l, tr( "Click here to select a color for: " ).arg( labels [i] ) ); | 57 | QWhatsThis::add( l, tr( "Click here to select a color for: " ).arg( labels [i] ) ); |
55 | 58 | ||
56 | m_buttons [i] = new Opie::OColorButton ( this, colors [i] ); | 59 | m_buttons [i] = new Opie::OColorButton ( this, colors [i] ); |
57 | layout-> addWidget ( m_buttons [i], i, 1 ); | 60 | layout-> addWidget ( m_buttons [i], i, 1 ); |
58 | QWhatsThis::add( m_buttons [i], tr( "Click here to select a color for: " ).arg( labels [i] ) ); | 61 | QWhatsThis::add( m_buttons [i], tr( "Click here to select a color for: " ).arg( labels [i] ) ); |
59 | } | 62 | } |
60 | } | 63 | } |
61 | 64 | ||
62 | EditScheme::~EditScheme ( ) | 65 | EditScheme::~EditScheme ( ) |
63 | { | 66 | { |
64 | delete [] m_buttons; | 67 | delete [] m_buttons; |
65 | } | 68 | } |
66 | 69 | ||
67 | void EditScheme::accept ( ) | 70 | void EditScheme::accept ( ) |
68 | { | 71 | { |
69 | for ( int i = 0; i < m_count; i++ ) | 72 | for ( int i = 0; i < m_count; i++ ) |
70 | m_colors [i] = m_buttons [i]-> color ( ); | 73 | m_colors [i] = m_buttons [i]-> color ( ); |
71 | 74 | ||
72 | QDialog::accept ( ); | 75 | QDialog::accept ( ); |
73 | } | 76 | } |
74 | 77 | ||
diff --git a/noncore/settings/appearance2/editScheme.h b/noncore/settings/appearance2/editScheme.h index 302652c..55897c4 100644 --- a/noncore/settings/appearance2/editScheme.h +++ b/noncore/settings/appearance2/editScheme.h | |||
@@ -1,55 +1,58 @@ | |||
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 | |
4 | .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> | 4 | Copyright (c) 2002 Dan Williams <drw@handhelds.org> |
5 | .>+-= | 5 | Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> |
6 | _;:, .> :=|. This file is free software; you can | 6 | =. |
7 | .> <`_, > . <= redistribute it and/or modify it under | 7 | .=l. |
8 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 8 | Â Â Â Â Â Â .>+-= |
9 | .="- .-=="i, .._ License as published by the Free Software | 9 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can |
10 | - . .-<_> .<> Foundation; either version 2 of the License, | 10 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under |
11 | ._= =} : or (at your option) any later version. | 11 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public |
12 | .%`+i> _;_. | 12 | .="- .-=="i, Â Â .._ License as published by the Free Software |
13 | .i_,=:_. -<s. This file is distributed in the hope that | 13 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, |
14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 14 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. |
15 | : .. .:, . . . without even the implied warranty of | 15 | Â Â .%`+i> Â Â Â _;_. |
16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 16 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that |
17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | 17 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; |
18 | ..}^=.= = ; Public License for more details. | 18 | : .. Â Â .:, Â Â . . . without even the implied warranty of |
19 | ++= -. .` .: | 19 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A |
20 | : = ...= . :.=- You should have received a copy of the GNU | 20 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU |
21 | -. .:....=;==+<; General Public License along with this file; | 21 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more |
22 | -_. . . )=. = see the file COPYING. If not, write to the | 22 | ++= Â -. Â Â .` Â Â .: details. |
23 | -- :-=` Free Software Foundation, Inc., | 23 | : Â Â = Â ...= . :.=- |
24 | 59 Temple Place - Suite 330, | 24 | Â -. Â .:....=;==+<; You should have received a copy of the GNU |
25 | Â -_. . . Â )=. Â = Library General Public License along with | ||
26 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
27 | If not, write to the Free Software Foundation, | ||
28 | Inc., 59 Temple Place - Suite 330, | ||
25 | Boston, MA 02111-1307, USA. | 29 | Boston, MA 02111-1307, USA. |
26 | |||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #ifndef EDITSCHEME_H | 32 | #ifndef EDITSCHEME_H |
30 | #define EDITSCHEME_H | 33 | #define EDITSCHEME_H |
31 | 34 | ||
32 | #include <opie2/ocolorbutton.h> | 35 | #include <opie2/ocolorbutton.h> |
33 | 36 | ||
34 | #include <qdialog.h> | 37 | #include <qdialog.h> |
35 | 38 | ||
36 | class QColor; | 39 | class QColor; |
37 | namespace Opie {namespace Ui {class OColor;}} | 40 | namespace Opie {namespace Ui {class OColor;}} |
38 | 41 | ||
39 | class EditScheme : public QDialog { | 42 | class EditScheme : public QDialog { |
40 | Q_OBJECT | 43 | Q_OBJECT |
41 | 44 | ||
42 | public: | 45 | public: |
43 | EditScheme ( int cnt, const QString *labels, QColor *colors, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); | 46 | EditScheme ( int cnt, const QString *labels, QColor *colors, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); |
44 | virtual ~EditScheme ( ); | 47 | virtual ~EditScheme ( ); |
45 | 48 | ||
46 | protected slots: | 49 | protected slots: |
47 | virtual void accept ( ); | 50 | virtual void accept ( ); |
48 | 51 | ||
49 | private: | 52 | private: |
50 | int m_count; | 53 | int m_count; |
51 | QColor *m_colors; | 54 | QColor *m_colors; |
52 | Opie::OColorButton **m_buttons; | 55 | Opie::OColorButton **m_buttons; |
53 | }; | 56 | }; |
54 | 57 | ||
55 | #endif | 58 | #endif |
diff --git a/noncore/settings/appearance2/exceptlistitem.h b/noncore/settings/appearance2/exceptlistitem.h index 7b4fa48..365fa90 100644 --- a/noncore/settings/appearance2/exceptlistitem.h +++ b/noncore/settings/appearance2/exceptlistitem.h | |||
@@ -1,89 +1,92 @@ | |||
1 | /* | 1 | /* |
2 | =. This file is part of the OPIE Project | 2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project |
3 | .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> | 3 | |
4 | .>+-= | 4 | Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> |
5 | _;:, .> :=|. This file is free software; you can | 5 | =. |
6 | .> <`_, > . <= redistribute it and/or modify it under | 6 | .=l. |
7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 7 | Â Â Â Â Â Â .>+-= |
8 | .="- .-=="i, .._ License as published by the Free Software | 8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can |
9 | - . .-<_> .<> Foundation; either version 2 of the License, | 9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under |
10 | ._= =} : or (at your option) any later version. | 10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public |
11 | .%`+i> _;_. | 11 | .="- .-=="i, Â Â .._ License as published by the Free Software |
12 | .i_,=:_. -<s. This file is distributed in the hope that | 12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, |
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. |
14 | : .. .:, . . . without even the implied warranty of | 14 | Â Â .%`+i> Â Â Â _;_. |
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that |
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | 16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; |
17 | ..}^=.= = ; Public License for more details. | 17 | : .. Â Â .:, Â Â . . . without even the implied warranty of |
18 | ++= -. .` .: | 18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | : = ...= . :.=- You should have received a copy of the GNU | 19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU |
20 | -. .:....=;==+<; General Public License along with this file; | 20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more |
21 | -_. . . )=. = see the file COPYING. If not, write to the | 21 | ++= Â -. Â Â .` Â Â .: details. |
22 | -- :-=` Free Software Foundation, Inc., | 22 | : Â Â = Â ...= . :.=- |
23 | 59 Temple Place - Suite 330, | 23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU |
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
24 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
25 | |||
26 | */ | 29 | */ |
27 | 30 | ||
28 | #ifndef EXCEPTLISTITEM_H | 31 | #ifndef EXCEPTLISTITEM_H |
29 | #define EXCEPTLISTITEM_H | 32 | #define EXCEPTLISTITEM_H |
30 | 33 | ||
31 | #include <qlistview.h> | 34 | #include <qlistview.h> |
32 | #include <qpixmap.h> | 35 | #include <qpixmap.h> |
33 | #include <qimage.h> | 36 | #include <qimage.h> |
34 | #include <qpainter.h> | 37 | #include <qpainter.h> |
35 | 38 | ||
36 | class ExceptListItem : public QListViewItem { | 39 | class ExceptListItem : public QListViewItem { |
37 | public: | 40 | public: |
38 | ExceptListItem ( QListView *lv, QListViewItem *after, const QString &t, bool nostyle = true, bool nofont = true, bool nodeco = true ) : QListViewItem ( lv, after ) | 41 | ExceptListItem ( QListView *lv, QListViewItem *after, const QString &t, bool nostyle = true, bool nofont = true, bool nodeco = true ) : QListViewItem ( lv, after ) |
39 | { | 42 | { |
40 | m_text = t; | 43 | m_text = t; |
41 | 44 | ||
42 | m_nofont = nofont; | 45 | m_nofont = nofont; |
43 | m_nostyle = nostyle; | 46 | m_nostyle = nostyle; |
44 | m_nodeco = nodeco; | 47 | m_nodeco = nodeco; |
45 | 48 | ||
46 | init ( ); | 49 | init ( ); |
47 | } | 50 | } |
48 | 51 | ||
49 | virtual ~ExceptListItem ( ) | 52 | virtual ~ExceptListItem ( ) |
50 | { | 53 | { |
51 | } | 54 | } |
52 | 55 | ||
53 | static void overlay ( QImage &img, const QImage &ovl ) | 56 | static void overlay ( QImage &img, const QImage &ovl ) |
54 | { | 57 | { |
55 | if (( img. size ( ) != ovl. size ( )) || | 58 | if (( img. size ( ) != ovl. size ( )) || |
56 | ( img. depth ( ) != ovl. depth ( ))) | 59 | ( img. depth ( ) != ovl. depth ( ))) |
57 | return; | 60 | return; |
58 | 61 | ||
59 | for ( int y = 0; y != img. height ( ); y++ ) { | 62 | for ( int y = 0; y != img. height ( ); y++ ) { |
60 | QRgb *iline = (QRgb *) img. scanLine ( y ); | 63 | QRgb *iline = (QRgb *) img. scanLine ( y ); |
61 | QRgb *oline = (QRgb *) ovl. scanLine ( y ); | 64 | QRgb *oline = (QRgb *) ovl. scanLine ( y ); |
62 | 65 | ||
63 | for ( int x = 0; x != img. width ( ); x++ ) { | 66 | for ( int x = 0; x != img. width ( ); x++ ) { |
64 | QRgb i = *iline; | 67 | QRgb i = *iline; |
65 | QRgb o = *oline; | 68 | QRgb o = *oline; |
66 | 69 | ||
67 | *iline = qRgba (( qRed ( i ) + qRed ( o )) / 2, | 70 | *iline = qRgba (( qRed ( i ) + qRed ( o )) / 2, |
68 | ( qGreen ( i ) + qGreen ( o )) / 2, | 71 | ( qGreen ( i ) + qGreen ( o )) / 2, |
69 | ( qBlue ( i ) + qBlue ( o )) / 2, | 72 | ( qBlue ( i ) + qBlue ( o )) / 2, |
70 | ( qAlpha ( i ) + qAlpha ( o )) / 2 ); | 73 | ( qAlpha ( i ) + qAlpha ( o )) / 2 ); |
71 | iline++; | 74 | iline++; |
72 | oline++; | 75 | oline++; |
73 | } | 76 | } |
74 | } | 77 | } |
75 | } | 78 | } |
76 | 79 | ||
77 | static void init ( ) | 80 | static void init ( ) |
78 | { | 81 | { |
79 | static bool init = false; | 82 | static bool init = false; |
80 | 83 | ||
81 | if ( init ) | 84 | if ( init ) |
82 | return; | 85 | return; |
83 | 86 | ||
84 | QImage noimg = Resource::loadImage ( "appearance/no.png" ); | 87 | QImage noimg = Resource::loadImage ( "appearance/no.png" ); |
85 | QImage fontimg = Resource::loadImage ( "appearance/font.png" ); | 88 | QImage fontimg = Resource::loadImage ( "appearance/font.png" ); |
86 | QImage styleimg = Resource::loadImage ( "appearance/style.png" ); | 89 | QImage styleimg = Resource::loadImage ( "appearance/style.png" ); |
87 | QImage decoimg = Resource::loadImage ( "appearance/deco.png" ); | 90 | QImage decoimg = Resource::loadImage ( "appearance/deco.png" ); |
88 | 91 | ||
89 | s_fontpix [0] = new QPixmap ( ); | 92 | s_fontpix [0] = new QPixmap ( ); |
diff --git a/noncore/settings/appearance2/main.cpp b/noncore/settings/appearance2/main.cpp index 87061e3..5c0f302 100644 --- a/noncore/settings/appearance2/main.cpp +++ b/noncore/settings/appearance2/main.cpp | |||
@@ -1,34 +1,37 @@ | |||
1 | /* | 1 | /* |
2 | =. This file is part of the OPIE Project | 2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project |
3 | .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> | ||
4 | .>+-= | ||
5 | _;:, .> :=|. This file is free software; you can | ||
6 | .> <`_, > . <= redistribute it and/or modify it under | ||
7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | ||
8 | .="- .-=="i, .._ License as published by the Free Software | ||
9 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
10 | ._= =} : or (at your option) any later version. | ||
11 | .%`+i> _;_. | ||
12 | .i_,=:_. -<s. This file is distributed in the hope that | ||
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
14 | : .. .:, . . . without even the implied warranty of | ||
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
17 | ..}^=.= = ; Public License for more details. | ||
18 | ++= -. .` .: | ||
19 | : = ...= . :.=- You should have received a copy of the GNU | ||
20 | -. .:....=;==+<; General Public License along with this file; | ||
21 | -_. . . )=. = see the file COPYING. If not, write to the | ||
22 | -- :-=` Free Software Foundation, Inc., | ||
23 | 59 Temple Place - Suite 330, | ||
24 | Boston, MA 02111-1307, USA. | ||
25 | 3 | ||
4 | Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> | ||
5 | =. | ||
6 | .=l. | ||
7 | Â Â Â Â Â Â .>+-= | ||
8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can | ||
9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, Â Â .._ License as published by the Free Software | ||
12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, | ||
13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. | ||
14 | Â Â .%`+i> Â Â Â _;_. | ||
15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that | ||
16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; | ||
17 | : .. Â Â .:, Â Â . . . without even the implied warranty of | ||
18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A | ||
19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU | ||
20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more | ||
21 | ++= Â -. Â Â .` Â Â .: details. | ||
22 | : Â Â = Â ...= . :.=- | ||
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
26 | */ | 29 | */ |
27 | 30 | ||
28 | #include "appearance.h" | 31 | #include "appearance.h" |
29 | 32 | ||
30 | #include <opie2/oapplicationfactory.h> | 33 | #include <opie2/oapplicationfactory.h> |
31 | 34 | ||
32 | 35 | ||
33 | using namespace Opie::Core; | 36 | using namespace Opie::Core; |
34 | OPIE_EXPORT_APP( OApplicationFactory<Appearance> ) | 37 | OPIE_EXPORT_APP( OApplicationFactory<Appearance> ) |
diff --git a/noncore/settings/appearance2/sample.cpp b/noncore/settings/appearance2/sample.cpp index f6c4dca..557a23e 100644 --- a/noncore/settings/appearance2/sample.cpp +++ b/noncore/settings/appearance2/sample.cpp | |||
@@ -1,90 +1,93 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the OPIE Project | 2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project |
3 | =. Copyright (c) 2002 Trolltech AS <info@trolltech.com> | 3 | |
4 | .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> | 4 | Copyright (c) 2002 Trolltech AS <info@trolltech.com> |
5 | .>+-= | 5 | Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> |
6 | _;:, .> :=|. This file is free software; you can | 6 | =. |
7 | .> <`_, > . <= redistribute it and/or modify it under | 7 | .=l. |
8 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 8 | Â Â Â Â Â Â .>+-= |
9 | .="- .-=="i, .._ License as published by the Free Software | 9 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can |
10 | - . .-<_> .<> Foundation; either version 2 of the License, | 10 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under |
11 | ._= =} : or (at your option) any later version. | 11 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public |
12 | .%`+i> _;_. | 12 | .="- .-=="i, Â Â .._ License as published by the Free Software |
13 | .i_,=:_. -<s. This file is distributed in the hope that | 13 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, |
14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 14 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. |
15 | : .. .:, . . . without even the implied warranty of | 15 | Â Â .%`+i> Â Â Â _;_. |
16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 16 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that |
17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | 17 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; |
18 | ..}^=.= = ; Public License for more details. | 18 | : .. Â Â .:, Â Â . . . without even the implied warranty of |
19 | ++= -. .` .: | 19 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A |
20 | : = ...= . :.=- You should have received a copy of the GNU | 20 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU |
21 | -. .:....=;==+<; General Public License along with this file; | 21 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more |
22 | -_. . . )=. = see the file COPYING. If not, write to the | 22 | ++= Â -. Â Â .` Â Â .: details. |
23 | -- :-=` Free Software Foundation, Inc., | 23 | : Â Â = Â ...= . :.=- |
24 | 59 Temple Place - Suite 330, | 24 | Â -. Â .:....=;==+<; You should have received a copy of the GNU |
25 | Â -_. . . Â )=. Â = Library General Public License along with | ||
26 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
27 | If not, write to the Free Software Foundation, | ||
28 | Inc., 59 Temple Place - Suite 330, | ||
25 | Boston, MA 02111-1307, USA. | 29 | Boston, MA 02111-1307, USA. |
26 | |||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #include <qvbox.h> | 32 | #include <qvbox.h> |
30 | #include <qpopupmenu.h> | 33 | #include <qpopupmenu.h> |
31 | #include <qpainter.h> | 34 | #include <qpainter.h> |
32 | #include <qmenubar.h> | 35 | #include <qmenubar.h> |
33 | #include <qcheckbox.h> | 36 | #include <qcheckbox.h> |
34 | #include <qpushbutton.h> | 37 | #include <qpushbutton.h> |
35 | #include <qscrollbar.h> | 38 | #include <qscrollbar.h> |
36 | #include <qlayout.h> | 39 | #include <qlayout.h> |
37 | #include <qwhatsthis.h> | 40 | #include <qwhatsthis.h> |
38 | #include <qpixmapcache.h> | 41 | #include <qpixmapcache.h> |
39 | #include <qtimer.h> | 42 | #include <qtimer.h> |
40 | #include <qobjectlist.h> | 43 | #include <qobjectlist.h> |
41 | #include <qcommonstyle.h> | 44 | #include <qcommonstyle.h> |
42 | 45 | ||
43 | #include "sample.h" | 46 | #include "sample.h" |
44 | 47 | ||
45 | 48 | ||
46 | class SampleText : public QWidget | 49 | class SampleText : public QWidget |
47 | { | 50 | { |
48 | public: | 51 | public: |
49 | SampleText( const QString &t, bool h, QWidget *parent ) | 52 | SampleText( const QString &t, bool h, QWidget *parent ) |
50 | : QWidget( parent ), hl(h), text(t) | 53 | : QWidget( parent ), hl(h), text(t) |
51 | { | 54 | { |
52 | if ( hl ) | 55 | if ( hl ) |
53 | setBackgroundMode( PaletteHighlight ); | 56 | setBackgroundMode( PaletteHighlight ); |
54 | else | 57 | else |
55 | setBackgroundMode( PaletteBase ); | 58 | setBackgroundMode( PaletteBase ); |
56 | } | 59 | } |
57 | 60 | ||
58 | QSize sizeHint() const | 61 | QSize sizeHint() const |
59 | { | 62 | { |
60 | QFontMetrics fm(font()); | 63 | QFontMetrics fm(font()); |
61 | return QSize( fm.width(text)+10, fm.height()+4 ); | 64 | return QSize( fm.width(text)+10, fm.height()+4 ); |
62 | } | 65 | } |
63 | 66 | ||
64 | void paintEvent( QPaintEvent * ) | 67 | void paintEvent( QPaintEvent * ) |
65 | { | 68 | { |
66 | QPainter p(this); | 69 | QPainter p(this); |
67 | if ( hl ) | 70 | if ( hl ) |
68 | p.setPen( colorGroup().highlightedText() ); | 71 | p.setPen( colorGroup().highlightedText() ); |
69 | else | 72 | else |
70 | p.setPen( colorGroup().text() ); | 73 | p.setPen( colorGroup().text() ); |
71 | p.drawText( rect(), AlignCenter, text ); | 74 | p.drawText( rect(), AlignCenter, text ); |
72 | } | 75 | } |
73 | 76 | ||
74 | private: | 77 | private: |
75 | bool hl; | 78 | bool hl; |
76 | QString text; | 79 | QString text; |
77 | }; | 80 | }; |
78 | 81 | ||
79 | 82 | ||
80 | SampleWindow::SampleWindow( QWidget *parent ) : QWidget(parent), iface(0) | 83 | SampleWindow::SampleWindow( QWidget *parent ) : QWidget(parent), iface(0) |
81 | { | 84 | { |
82 | init(); | 85 | init(); |
83 | } | 86 | } |
84 | 87 | ||
85 | QSize SampleWindow::sizeHint() const | 88 | QSize SampleWindow::sizeHint() const |
86 | { | 89 | { |
87 | return container->sizeHint() + QSize( 10, 35 ); | 90 | return container->sizeHint() + QSize( 10, 35 ); |
88 | } | 91 | } |
89 | 92 | ||
90 | void SampleWindow::setFont( const QFont &f ) | 93 | void SampleWindow::setFont( const QFont &f ) |
diff --git a/noncore/settings/appearance2/sample.h b/noncore/settings/appearance2/sample.h index 27e6db5..ba18038 100644 --- a/noncore/settings/appearance2/sample.h +++ b/noncore/settings/appearance2/sample.h | |||
@@ -1,77 +1,80 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the OPIE Project | 2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project |
3 | =. Copyright (c) 2002 Trolltech AS <info@trolltech.com> | ||
4 | .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> | ||
5 | .>+-= | ||
6 | _;:, .> :=|. This file is free software; you can | ||
7 | .> <`_, > . <= redistribute it and/or modify it under | ||
8 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | ||
9 | .="- .-=="i, .._ License as published by the Free Software | ||
10 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
11 | ._= =} : or (at your option) any later version. | ||
12 | .%`+i> _;_. | ||
13 | .i_,=:_. -<s. This file is distributed in the hope that | ||
14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
15 | : .. .:, . . . without even the implied warranty of | ||
16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
18 | ..}^=.= = ; Public License for more details. | ||
19 | ++= -. .` .: | ||
20 | : = ...= . :.=- You should have received a copy of the GNU | ||
21 | -. .:....=;==+<; General Public License along with this file; | ||
22 | -_. . . )=. = see the file COPYING. If not, write to the | ||
23 | -- :-=` Free Software Foundation, Inc., | ||
24 | 59 Temple Place - Suite 330, | ||
25 | Boston, MA 02111-1307, USA. | ||
26 | 3 | ||
4 | Copyright (c) 2002 Trolltech AS <info@trolltech.com> | ||
5 | Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> | ||
6 | =. | ||
7 | .=l. | ||
8 | Â Â Â Â Â Â .>+-= | ||
9 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can | ||
10 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under | ||
11 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public | ||
12 | .="- .-=="i, Â Â .._ License as published by the Free Software | ||
13 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, | ||
14 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. | ||
15 | Â Â .%`+i> Â Â Â _;_. | ||
16 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that | ||
17 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; | ||
18 | : .. Â Â .:, Â Â . . . without even the implied warranty of | ||
19 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A | ||
20 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU | ||
21 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more | ||
22 | ++= Â -. Â Â .` Â Â .: details. | ||
23 | : Â Â = Â ...= . :.=- | ||
24 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
25 | Â -_. . . Â )=. Â = Library General Public License along with | ||
26 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
27 | If not, write to the Free Software Foundation, | ||
28 | Inc., 59 Temple Place - Suite 330, | ||
29 | Boston, MA 02111-1307, USA. | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | #ifndef __PREVIEW_H__ | 32 | #ifndef __PREVIEW_H__ |
30 | #define __PREVIEW_H__ | 33 | #define __PREVIEW_H__ |
31 | 34 | ||
32 | #include <qwidget.h> | 35 | #include <qwidget.h> |
33 | 36 | ||
34 | #include <qpe/windowdecorationinterface.h> | 37 | #include <qpe/windowdecorationinterface.h> |
35 | 38 | ||
36 | class QVBox; | 39 | class QVBox; |
37 | class QPopupMenu; | 40 | class QPopupMenu; |
38 | class SampleText; | 41 | class SampleText; |
39 | 42 | ||
40 | class SampleWindow : public QWidget | 43 | class SampleWindow : public QWidget |
41 | { | 44 | { |
42 | Q_OBJECT | 45 | Q_OBJECT |
43 | public: | 46 | public: |
44 | SampleWindow( QWidget *parent ); | 47 | SampleWindow( QWidget *parent ); |
45 | 48 | ||
46 | QSize sizeHint() const; | 49 | QSize sizeHint() const; |
47 | 50 | ||
48 | virtual void setFont( const QFont &f ); | 51 | virtual void setFont( const QFont &f ); |
49 | 52 | ||
50 | void setStyle2 ( QStyle *sty, const QPalette &p ); | 53 | void setStyle2 ( QStyle *sty, const QPalette &p ); |
51 | void setDecoration( WindowDecorationInterface *i ); | 54 | void setDecoration( WindowDecorationInterface *i ); |
52 | void setPalette ( const QPalette & ); | 55 | void setPalette ( const QPalette & ); |
53 | 56 | ||
54 | virtual void paintEvent( QPaintEvent * ); | 57 | virtual void paintEvent( QPaintEvent * ); |
55 | 58 | ||
56 | void init(); | 59 | void init(); |
57 | 60 | ||
58 | virtual bool eventFilter( QObject *, QEvent *e ); | 61 | virtual bool eventFilter( QObject *, QEvent *e ); |
59 | virtual void paletteChange( const QPalette &old ); | 62 | virtual void paletteChange( const QPalette &old ); |
60 | virtual void resizeEvent( QResizeEvent *re ); | 63 | virtual void resizeEvent( QResizeEvent *re ); |
61 | 64 | ||
62 | public slots: | 65 | public slots: |
63 | void fixGeometry(); | 66 | void fixGeometry(); |
64 | 67 | ||
65 | protected: | 68 | protected: |
66 | WindowDecorationInterface *iface; | 69 | WindowDecorationInterface *iface; |
67 | WindowDecorationInterface::WindowData wd; | 70 | WindowDecorationInterface::WindowData wd; |
68 | QVBox *container; | 71 | QVBox *container; |
69 | QPopupMenu *popup; | 72 | QPopupMenu *popup; |
70 | int th; | 73 | int th; |
71 | int tb; | 74 | int tb; |
72 | int lb; | 75 | int lb; |
73 | int rb; | 76 | int rb; |
74 | int bb; | 77 | int bb; |
75 | }; | 78 | }; |
76 | 79 | ||
77 | #endif | 80 | #endif |
diff --git a/noncore/settings/appearance2/stylelistitem.h b/noncore/settings/appearance2/stylelistitem.h index b6c72c3..613fa71 100644 --- a/noncore/settings/appearance2/stylelistitem.h +++ b/noncore/settings/appearance2/stylelistitem.h | |||
@@ -1,89 +1,92 @@ | |||
1 | /* | 1 | /* |
2 | =. This file is part of the OPIE Project | 2 | Â Â Â Â Â Â Â Â This file is part of the Opie Project |
3 | .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> | ||
4 | .>+-= | ||
5 | _;:, .> :=|. This file is free software; you can | ||
6 | .> <`_, > . <= redistribute it and/or modify it under | ||
7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | ||
8 | .="- .-=="i, .._ License as published by the Free Software | ||
9 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
10 | ._= =} : or (at your option) any later version. | ||
11 | .%`+i> _;_. | ||
12 | .i_,=:_. -<s. This file is distributed in the hope that | ||
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
14 | : .. .:, . . . without even the implied warranty of | ||
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | ||
17 | ..}^=.= = ; Public License for more details. | ||
18 | ++= -. .` .: | ||
19 | : = ...= . :.=- You should have received a copy of the GNU | ||
20 | -. .:....=;==+<; General Public License along with this file; | ||
21 | -_. . . )=. = see the file COPYING. If not, write to the | ||
22 | -- :-=` Free Software Foundation, Inc., | ||
23 | 59 Temple Place - Suite 330, | ||
24 | Boston, MA 02111-1307, USA. | ||
25 | 3 | ||
4 | Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> | ||
5 | =. | ||
6 | .=l. | ||
7 | Â Â Â Â Â Â .>+-= | ||
8 | Â _;:, Â Â .> Â Â :=|. This program is free software; you can | ||
9 | .> <`_, Â > Â . Â <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- Â : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, Â Â .._ License as published by the Free Software | ||
12 | Â - . Â .-<_> Â Â .<> Foundation; either version 2 of the License, | ||
13 | Â Â Â ._= =} Â Â Â : or (at your option) any later version. | ||
14 | Â Â .%`+i> Â Â Â _;_. | ||
15 | Â Â .i_,=:_. Â Â Â -<s. This program is distributed in the hope that | ||
16 | Â Â Â + Â . Â -:. Â Â Â = it will be useful, but WITHOUT ANY WARRANTY; | ||
17 | : .. Â Â .:, Â Â . . . without even the implied warranty of | ||
18 | Â Â =_ Â Â Â Â + Â Â =;=|` MERCHANTABILITY or FITNESS FOR A | ||
19 | Â _.=:. Â Â Â : Â Â :=>`: PARTICULAR PURPOSE. See the GNU | ||
20 | ..}^=.= Â Â Â = Â Â Â ; Library General Public License for more | ||
21 | ++= Â -. Â Â .` Â Â .: details. | ||
22 | : Â Â = Â ...= . :.=- | ||
23 | Â -. Â .:....=;==+<; You should have received a copy of the GNU | ||
24 | Â -_. . . Â )=. Â = Library General Public License along with | ||
25 | Â Â -- Â Â Â Â :-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
26 | */ | 29 | */ |
27 | 30 | ||
28 | #ifndef STYLELISTITEM_H | 31 | #ifndef STYLELISTITEM_H |
29 | #define STYLELISTITEM_H | 32 | #define STYLELISTITEM_H |
30 | 33 | ||
31 | /* OPIE */ | 34 | /* OPIE */ |
32 | #include <qpe/styleinterface.h> | 35 | #include <qpe/styleinterface.h> |
33 | #include <qpe/qlibrary.h> | 36 | #include <qpe/qlibrary.h> |
34 | #include <qpe/resource.h> | 37 | #include <qpe/resource.h> |
35 | 38 | ||
36 | /* QT */ | 39 | /* QT */ |
37 | #include <qlistbox.h> | 40 | #include <qlistbox.h> |
38 | #include <qfileinfo.h> | 41 | #include <qfileinfo.h> |
39 | 42 | ||
40 | #include <stdio.h> | 43 | #include <stdio.h> |
41 | 44 | ||
42 | class StyleListItem : public QListBoxText { | 45 | class StyleListItem : public QListBoxText { |
43 | public: | 46 | public: |
44 | StyleListItem ( const QString &t, QStyle *sty ) : QListBoxText ( t ) | 47 | StyleListItem ( const QString &t, QStyle *sty ) : QListBoxText ( t ) |
45 | { | 48 | { |
46 | m_lib = 0; | 49 | m_lib = 0; |
47 | m_style_if = 0; | 50 | m_style_if = 0; |
48 | m_settings_if = 0; | 51 | m_settings_if = 0; |
49 | m_style = sty; | 52 | m_style = sty; |
50 | } | 53 | } |
51 | 54 | ||
52 | StyleListItem ( QLibrary *lib, StyleInterface *iface ) : QListBoxText ( iface-> name ( )) | 55 | StyleListItem ( QLibrary *lib, StyleInterface *iface ) : QListBoxText ( iface-> name ( )) |
53 | { | 56 | { |
54 | m_lib = lib; | 57 | m_lib = lib; |
55 | m_style_if = iface; | 58 | m_style_if = iface; |
56 | m_settings_if = 0; | 59 | m_settings_if = 0; |
57 | m_style = iface-> style ( ); | 60 | m_style = iface-> style ( ); |
58 | 61 | ||
59 | iface-> queryInterface ( IID_StyleExtended, (QUnknownInterface **) &m_settings_if ); | 62 | iface-> queryInterface ( IID_StyleExtended, (QUnknownInterface **) &m_settings_if ); |
60 | } | 63 | } |
61 | 64 | ||
62 | virtual ~StyleListItem ( ) | 65 | virtual ~StyleListItem ( ) |
63 | { | 66 | { |
64 | delete m_style; | 67 | delete m_style; |
65 | 68 | ||
66 | if ( m_settings_if ) | 69 | if ( m_settings_if ) |
67 | m_settings_if-> release ( ); | 70 | m_settings_if-> release ( ); |
68 | if ( m_style_if ) | 71 | if ( m_style_if ) |
69 | m_style_if-> release ( ); | 72 | m_style_if-> release ( ); |
70 | delete m_lib; | 73 | delete m_lib; |
71 | } | 74 | } |
72 | 75 | ||
73 | bool hasSettings ( ) const | 76 | bool hasSettings ( ) const |
74 | { | 77 | { |
75 | return m_settings_if ? m_settings_if-> hasSettings ( ) : false; | 78 | return m_settings_if ? m_settings_if-> hasSettings ( ) : false; |
76 | } | 79 | } |
77 | 80 | ||
78 | QWidget *settings ( QWidget *parent ) | 81 | QWidget *settings ( QWidget *parent ) |
79 | { | 82 | { |
80 | return m_settings_if ? m_settings_if-> create ( parent ) : 0; | 83 | return m_settings_if ? m_settings_if-> create ( parent ) : 0; |
81 | } | 84 | } |
82 | 85 | ||
83 | bool setSettings ( bool accepted ) | 86 | bool setSettings ( bool accepted ) |
84 | { | 87 | { |
85 | if ( !m_settings_if ) | 88 | if ( !m_settings_if ) |
86 | return false; | 89 | return false; |
87 | 90 | ||
88 | if ( accepted ) | 91 | if ( accepted ) |
89 | return m_settings_if-> accept ( ); | 92 | return m_settings_if-> accept ( ); |