Diffstat (limited to 'noncore/settings/appearance2/editScheme.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/appearance2/editScheme.cpp | 22 |
1 files changed, 10 insertions, 12 deletions
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 | |||
@@ -7,69 +7,67 @@ | |||
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 | ||