-rw-r--r-- | noncore/settings/appearance2/appearance.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/noncore/settings/appearance2/appearance.cpp b/noncore/settings/appearance2/appearance.cpp index 6b9fe4d..f918767 100644 --- a/noncore/settings/appearance2/appearance.cpp +++ b/noncore/settings/appearance2/appearance.cpp | |||
@@ -656,72 +656,72 @@ void Appearance::fontClicked ( const QFont &f ) | |||
656 | { | 656 | { |
657 | m_font_changed |= ( f != m_sample-> font ( )); | 657 | m_font_changed |= ( f != m_sample-> font ( )); |
658 | m_sample-> setFont ( f ); | 658 | m_sample-> setFont ( f ); |
659 | } | 659 | } |
660 | 660 | ||
661 | void Appearance::colorClicked ( int index ) | 661 | void Appearance::colorClicked ( int index ) |
662 | { | 662 | { |
663 | ColorListItem *item = (ColorListItem *) m_color_list-> item ( index ); | 663 | ColorListItem *item = (ColorListItem *) m_color_list-> item ( index ); |
664 | 664 | ||
665 | if ( item ) | 665 | if ( item ) |
666 | m_sample-> setPalette ( item-> palette ( )); | 666 | m_sample-> setPalette ( item-> palette ( )); |
667 | 667 | ||
668 | m_color_changed |= ( item-> palette ( ) != qApp-> palette ( )); | 668 | m_color_changed |= ( item-> palette ( ) != qApp-> palette ( )); |
669 | } | 669 | } |
670 | 670 | ||
671 | 671 | ||
672 | void Appearance::editSchemeClicked ( ) | 672 | void Appearance::editSchemeClicked ( ) |
673 | { | 673 | { |
674 | ColorListItem *item = (ColorListItem *) m_color_list-> item ( m_color_list-> currentItem ( )); | 674 | ColorListItem *item = (ColorListItem *) m_color_list-> item ( m_color_list-> currentItem ( )); |
675 | 675 | ||
676 | int cnt = 0; | 676 | int cnt = 0; |
677 | QString labels [QColorGroup::NColorRoles]; | 677 | QString labels [QColorGroup::NColorRoles]; |
678 | QColor colors [QColorGroup::NColorRoles]; | 678 | QColor colors [QColorGroup::NColorRoles]; |
679 | 679 | ||
680 | for ( QColorGroup::ColorRole role = (QColorGroup::ColorRole) 0; role != QColorGroup::NColorRoles; ((int) role )++ ) | 680 | for ( int role = 0; role < (int) QColorGroup::NColorRoles; ++role ) |
681 | { | 681 | { |
682 | QColor col = item-> color ( role ); | 682 | QColor col = item->color( static_cast<QColorGroup::ColorRole>( role ) ); |
683 | 683 | ||
684 | if ( col. isValid ( )) | 684 | if ( col. isValid ( )) |
685 | { | 685 | { |
686 | labels [cnt] = item-> label ( role ); | 686 | labels[cnt] = item->label( static_cast<QColorGroup::ColorRole>( role ) ); |
687 | colors [cnt] = col; | 687 | colors[cnt] = col; |
688 | 688 | ||
689 | cnt++; | 689 | cnt++; |
690 | } | 690 | } |
691 | } | 691 | } |
692 | 692 | ||
693 | EditScheme* editdlg = new EditScheme( cnt, labels, colors, this, "editScheme", true ); | 693 | EditScheme* editdlg = new EditScheme( cnt, labels, colors, this, "editScheme", true ); |
694 | if ( QPEApplication::execDialog( editdlg ) == QDialog::Accepted ) | 694 | if ( QPEApplication::execDialog( editdlg ) == QDialog::Accepted ) |
695 | { | 695 | { |
696 | ColorListItem *citem = (ColorListItem *) m_color_list-> item ( 0 ); | 696 | ColorListItem *citem = (ColorListItem *) m_color_list-> item ( 0 ); |
697 | cnt = 0; | 697 | cnt = 0; |
698 | 698 | ||
699 | for ( QColorGroup::ColorRole role = (QColorGroup::ColorRole) 0; role != QColorGroup::NColorRoles; ((int) role )++ ) | 699 | for ( int role = 0; role < (int) QColorGroup::NColorRoles; ++role ) |
700 | { | 700 | { |
701 | if ( item-> color ( role ). isValid ( )) | 701 | if ( item->color( static_cast<QColorGroup::ColorRole>( role ) ).isValid() ) |
702 | { | 702 | { |
703 | citem-> setColor ( role, colors [cnt] ); | 703 | citem->setColor( static_cast<QColorGroup::ColorRole>( role ), colors[cnt] ); |
704 | cnt++; | 704 | cnt++; |
705 | } | 705 | } |
706 | } | 706 | } |
707 | 707 | ||
708 | m_color_list-> setCurrentItem ( 0 ); | 708 | m_color_list-> setCurrentItem ( 0 ); |
709 | colorClicked ( 0 ); | 709 | colorClicked ( 0 ); |
710 | 710 | ||
711 | m_color_changed = true; | 711 | m_color_changed = true; |
712 | } | 712 | } |
713 | delete editdlg; | 713 | delete editdlg; |
714 | } | 714 | } |
715 | 715 | ||
716 | 716 | ||
717 | void Appearance::saveSchemeClicked() | 717 | void Appearance::saveSchemeClicked() |
718 | { | 718 | { |
719 | ColorListItem *item = (ColorListItem *) m_color_list-> item ( m_color_list-> currentItem ( )); | 719 | ColorListItem *item = (ColorListItem *) m_color_list-> item ( m_color_list-> currentItem ( )); |
720 | 720 | ||
721 | if ( !item ) | 721 | if ( !item ) |
722 | return; | 722 | return; |
723 | 723 | ||
724 | QDialog *d = new QDialog ( this, 0, true ); | 724 | QDialog *d = new QDialog ( this, 0, true ); |
725 | d-> setCaption ( tr( "Save Scheme" )); | 725 | d-> setCaption ( tr( "Save Scheme" )); |
726 | QLineEdit *ed = new QLineEdit ( d ); | 726 | QLineEdit *ed = new QLineEdit ( d ); |
727 | ( new QVBoxLayout ( d, 3, 3 ))-> addWidget ( ed ); | 727 | ( new QVBoxLayout ( d, 3, 3 ))-> addWidget ( ed ); |