Diffstat (limited to 'noncore/settings/appearance2/appearance.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/appearance2/appearance.cpp | 62 |
1 files changed, 33 insertions, 29 deletions
diff --git a/noncore/settings/appearance2/appearance.cpp b/noncore/settings/appearance2/appearance.cpp index 23630c5..66cf2c3 100644 --- a/noncore/settings/appearance2/appearance.cpp +++ b/noncore/settings/appearance2/appearance.cpp | |||
@@ -1,26 +1,30 @@ | |||
1 | /********************************************************************** | 1 | /* |
2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | 2 | =. This file is part of the OPIE Project |
3 | ** | 3 | .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> |
4 | ** This file is part of the Qtopia Environment. | 4 | .>+-= |
5 | ** | 5 | _;:, .> :=|. This library is free software; you can |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | .> <`_, > . <= redistribute it and/or modify it under |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | .="- .-=="i, .._ License as published by the Free Software |
9 | ** packaging of this file. | 9 | - . .-<_> .<> Foundation; either version 2 of the License, |
10 | ** | 10 | ._= =} : or (at your option) any later version. |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | .%`+i> _;_. |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | .i_,=:_. -<s. This library is distributed in the hope that |
13 | ** | 13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | : .. .:, . . . without even the implied warranty of |
15 | ** | 15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
17 | ** not clear to you. | 17 | ..}^=.= = ; Library General Public License for more |
18 | ** | 18 | ++= -. .` .: details. |
19 | *********************************************************************** | 19 | : = ...= . :.=- |
20 | ** | 20 | -. .:....=;==+<; You should have received a copy of the GNU |
21 | ** Enhancements by: Dan Williams, <williamsdr@acm.org> | 21 | -_. . . )=. = Library General Public License along with |
22 | ** | 22 | -- :-=` this library; see the file COPYING.LIB. |
23 | **********************************************************************/ | 23 | If not, write to the Free Software Foundation, |
24 | Inc., 59 Temple Place - Suite 330, | ||
25 | Boston, MA 02111-1307, USA. | ||
26 | |||
27 | */ | ||
24 | 28 | ||
25 | #include "appearance.h" | 29 | #include "appearance.h" |
26 | #include "editScheme.h" | 30 | #include "editScheme.h" |
@@ -490,21 +494,21 @@ void Appearance::editSchemeClicked ( ) | |||
490 | ColorListItem *item = (ColorListItem *) m_color_list-> item ( m_color_list-> currentItem ( )); | 494 | ColorListItem *item = (ColorListItem *) m_color_list-> item ( m_color_list-> currentItem ( )); |
491 | 495 | ||
492 | int cnt = 0; | 496 | int cnt = 0; |
493 | QString controlLabel [QColorGroup::NColorRoles]; | 497 | QString labels [QColorGroup::NColorRoles]; |
494 | QString controlColor [QColorGroup::NColorRoles]; | 498 | QColor colors [QColorGroup::NColorRoles]; |
495 | 499 | ||
496 | for ( QColorGroup::ColorRole role = (QColorGroup::ColorRole) 0; role != QColorGroup::NColorRoles; ((int) role )++ ) { | 500 | for ( QColorGroup::ColorRole role = (QColorGroup::ColorRole) 0; role != QColorGroup::NColorRoles; ((int) role )++ ) { |
497 | QColor col = item-> color ( role ); | 501 | QColor col = item-> color ( role ); |
498 | 502 | ||
499 | if ( col. isValid ( )) { | 503 | if ( col. isValid ( )) { |
500 | controlLabel [cnt] = item-> label ( role ); | 504 | labels [cnt] = item-> label ( role ); |
501 | controlColor [cnt] = col. name ( ); | 505 | colors [cnt] = col; |
502 | 506 | ||
503 | cnt++; | 507 | cnt++; |
504 | } | 508 | } |
505 | } | 509 | } |
506 | 510 | ||
507 | EditScheme* editdlg = new EditScheme( this, "editScheme", true, 0, cnt, controlLabel, controlColor ); | 511 | EditScheme* editdlg = new EditScheme( cnt, labels, colors, this, "editScheme", true ); |
508 | editdlg-> showMaximized ( ); | 512 | editdlg-> showMaximized ( ); |
509 | if ( editdlg-> exec ( ) == QDialog::Accepted ) { | 513 | if ( editdlg-> exec ( ) == QDialog::Accepted ) { |
510 | ColorListItem *citem = (ColorListItem *) m_color_list-> item ( 0 ); | 514 | ColorListItem *citem = (ColorListItem *) m_color_list-> item ( 0 ); |
@@ -512,7 +516,7 @@ void Appearance::editSchemeClicked ( ) | |||
512 | 516 | ||
513 | for ( QColorGroup::ColorRole role = (QColorGroup::ColorRole) 0; role != QColorGroup::NColorRoles; ((int) role )++ ) { | 517 | for ( QColorGroup::ColorRole role = (QColorGroup::ColorRole) 0; role != QColorGroup::NColorRoles; ((int) role )++ ) { |
514 | if ( item-> color ( role ). isValid ( )) { | 518 | if ( item-> color ( role ). isValid ( )) { |
515 | citem-> setColor ( role, QColor ( controlColor [cnt] )); | 519 | citem-> setColor ( role, colors [cnt] ); |
516 | cnt++; | 520 | cnt++; |
517 | } | 521 | } |
518 | } | 522 | } |