Diffstat (limited to 'kaddressbook/views/configuretableviewdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/views/configuretableviewdialog.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kaddressbook/views/configuretableviewdialog.cpp b/kaddressbook/views/configuretableviewdialog.cpp index 0e36abd..c329cd9 100644 --- a/kaddressbook/views/configuretableviewdialog.cpp +++ b/kaddressbook/views/configuretableviewdialog.cpp | |||
@@ -62,97 +62,97 @@ ConfigureTableViewWidget::ConfigureTableViewWidget( KABC::AddressBook *ab, | |||
62 | 62 | ||
63 | mPage = new LookAndFeelPage( page ); | 63 | mPage = new LookAndFeelPage( page ); |
64 | } | 64 | } |
65 | 65 | ||
66 | ConfigureTableViewWidget::~ConfigureTableViewWidget() | 66 | ConfigureTableViewWidget::~ConfigureTableViewWidget() |
67 | { | 67 | { |
68 | } | 68 | } |
69 | 69 | ||
70 | void ConfigureTableViewWidget::restoreSettings( KConfig *config ) | 70 | void ConfigureTableViewWidget::restoreSettings( KConfig *config ) |
71 | { | 71 | { |
72 | ViewConfigureWidget::restoreSettings( config ); | 72 | ViewConfigureWidget::restoreSettings( config ); |
73 | 73 | ||
74 | mPage->restoreSettings( config ); | 74 | mPage->restoreSettings( config ); |
75 | } | 75 | } |
76 | 76 | ||
77 | void ConfigureTableViewWidget::saveSettings( KConfig *config ) | 77 | void ConfigureTableViewWidget::saveSettings( KConfig *config ) |
78 | { | 78 | { |
79 | ViewConfigureWidget::saveSettings( config ); | 79 | ViewConfigureWidget::saveSettings( config ); |
80 | 80 | ||
81 | mPage->saveSettings( config ); | 81 | mPage->saveSettings( config ); |
82 | } | 82 | } |
83 | 83 | ||
84 | 84 | ||
85 | 85 | ||
86 | LookAndFeelPage::LookAndFeelPage(QWidget *parent, const char *name) | 86 | LookAndFeelPage::LookAndFeelPage(QWidget *parent, const char *name) |
87 | : QVBox(parent, name) | 87 | : QVBox(parent, name) |
88 | { | 88 | { |
89 | initGUI(); | 89 | initGUI(); |
90 | 90 | ||
91 | // Set initial state | 91 | // Set initial state |
92 | enableBackgroundToggled(mBackgroundBox->isChecked()); | 92 | enableBackgroundToggled(mBackgroundBox->isChecked()); |
93 | } | 93 | } |
94 | 94 | ||
95 | void LookAndFeelPage::restoreSettings( KConfig *config ) | 95 | void LookAndFeelPage::restoreSettings( KConfig *config ) |
96 | { | 96 | { |
97 | mAlternateButton->setChecked(config->readBoolEntry("ABackground", true)); | 97 | mAlternateButton->setChecked(config->readBoolEntry("ABackground", true)); |
98 | mLineButton->setChecked(config->readBoolEntry("SingleLine", false)); | 98 | mLineButton->setChecked(config->readBoolEntry("SingleLine", false)); |
99 | mToolTipBox->setChecked(config->readBoolEntry("ToolTips", true)); | 99 | mToolTipBox->setChecked(config->readBoolEntry("ToolTips", true)); |
100 | 100 | ||
101 | if (!mAlternateButton->isChecked() & !mLineButton->isChecked()) | 101 | if (!mAlternateButton->isChecked() & !mLineButton->isChecked()) |
102 | mNoneButton->setChecked(true); | 102 | mNoneButton->setChecked(true); |
103 | 103 | ||
104 | mBackgroundBox->setChecked(config->readBoolEntry("Background", false)); | 104 | mBackgroundBox->setChecked(config->readBoolEntry("Background", false)); |
105 | mBackgroundName->lineEdit()->setText(config->readEntry("BackgroundName")); | 105 | mBackgroundName->lineEdit()->setText(config->readEntry("BackgroundName")); |
106 | 106 | ||
107 | // colors | 107 | // colors |
108 | cbEnableCustomColors->setChecked( config->readBoolEntry( "EnableCustomColors", false ) ); | 108 | cbEnableCustomColors->setChecked( config->readBoolEntry( "EnableCustomColors", false ) ); |
109 | QColor c; | 109 | QColor c; |
110 | qDebug("LookAndFeelPage::restoreSettings make base color configurable"); | 110 | //qDebug("LookAndFeelPage::restoreSettings make base color configurable"); |
111 | 111 | ||
112 | #ifndef KAB_EMBEDDED | 112 | #ifndef KAB_EMBEDDED |
113 | c = KGlobalSettings::baseColor(); | 113 | c = KGlobalSettings::baseColor(); |
114 | #else //KAB_EMBEDDED | 114 | #else //KAB_EMBEDDED |
115 | c = QColor(0,0,0); | 115 | c = QColor(0,0,0); |
116 | #endif //KAB_EMBEDDED | 116 | #endif //KAB_EMBEDDED |
117 | 117 | ||
118 | c = colorGroup().background(); | 118 | c = colorGroup().background(); |
119 | lbColors->insertItem( new ColorListItem( i18n("Background Color"), | 119 | lbColors->insertItem( new ColorListItem( i18n("Background Color"), |
120 | config->readColorEntry( "BackgroundColor", &c ) ) ); | 120 | config->readColorEntry( "BackgroundColor", &c ) ) ); |
121 | c = colorGroup().foreground(); | 121 | c = colorGroup().foreground(); |
122 | lbColors->insertItem( new ColorListItem( i18n("Text Color"), | 122 | lbColors->insertItem( new ColorListItem( i18n("Text Color"), |
123 | config->readColorEntry( "TextColor", &c ) ) ); | 123 | config->readColorEntry( "TextColor", &c ) ) ); |
124 | c = colorGroup().button(); | 124 | c = colorGroup().button(); |
125 | lbColors->insertItem( new ColorListItem( i18n("Header Background Color"), | 125 | lbColors->insertItem( new ColorListItem( i18n("Header Background Color"), |
126 | config->readColorEntry( "HeaderBackgroundColor", &c ) ) ); | 126 | config->readColorEntry( "HeaderBackgroundColor", &c ) ) ); |
127 | c = colorGroup().buttonText(); | 127 | c = colorGroup().buttonText(); |
128 | lbColors->insertItem( new ColorListItem( i18n("Header Text Color"), | 128 | lbColors->insertItem( new ColorListItem( i18n("Header Text Color"), |
129 | config->readColorEntry( "HeaderTextColor", &c ) ) ); | 129 | config->readColorEntry( "HeaderTextColor", &c ) ) ); |
130 | c = colorGroup().highlight(); | 130 | c = colorGroup().highlight(); |
131 | lbColors->insertItem( new ColorListItem( i18n("Highlight Color"), | 131 | lbColors->insertItem( new ColorListItem( i18n("Highlight Color"), |
132 | config->readColorEntry( "HighlightColor", &c ) ) ); | 132 | config->readColorEntry( "HighlightColor", &c ) ) ); |
133 | c = colorGroup().highlightedText(); | 133 | c = colorGroup().highlightedText(); |
134 | lbColors->insertItem( new ColorListItem( i18n("Highlighted Text Color"), | 134 | lbColors->insertItem( new ColorListItem( i18n("Highlighted Text Color"), |
135 | config->readColorEntry( "HighlightedTextColor", &c ) ) ); | 135 | config->readColorEntry( "HighlightedTextColor", &c ) ) ); |
136 | c = colorGroup().background(); | 136 | c = colorGroup().background(); |
137 | lbColors->insertItem( new ColorListItem( i18n("Alternating Background Color"), | 137 | lbColors->insertItem( new ColorListItem( i18n("Alternating Background Color"), |
138 | config->readColorEntry( "AlternatingBackgroundColor", &c ) ) ); | 138 | config->readColorEntry( "AlternatingBackgroundColor", &c ) ) ); |
139 | 139 | ||
140 | enableColors(); | 140 | enableColors(); |
141 | 141 | ||
142 | // fonts | 142 | // fonts |
143 | QFont fnt = font(); | 143 | QFont fnt = font(); |
144 | updateFontLabel( config->readFontEntry( "TextFont", &fnt ), (QLabel*)lTextFont ); | 144 | updateFontLabel( config->readFontEntry( "TextFont", &fnt ), (QLabel*)lTextFont ); |
145 | fnt.setBold( true ); | 145 | fnt.setBold( true ); |
146 | updateFontLabel( config->readFontEntry( "HeaderFont", &fnt ), (QLabel*)lHeaderFont ); | 146 | updateFontLabel( config->readFontEntry( "HeaderFont", &fnt ), (QLabel*)lHeaderFont ); |
147 | cbEnableCustomFonts->setChecked( config->readBoolEntry( "EnableCustomFonts", false ) ); | 147 | cbEnableCustomFonts->setChecked( config->readBoolEntry( "EnableCustomFonts", false ) ); |
148 | enableFonts(); | 148 | enableFonts(); |
149 | 149 | ||
150 | } | 150 | } |
151 | 151 | ||
152 | void LookAndFeelPage::saveSettings( KConfig *config ) | 152 | void LookAndFeelPage::saveSettings( KConfig *config ) |
153 | { | 153 | { |
154 | config->writeEntry("ABackground", mAlternateButton->isChecked()); | 154 | config->writeEntry("ABackground", mAlternateButton->isChecked()); |
155 | config->writeEntry("SingleLine", mLineButton->isChecked()); | 155 | config->writeEntry("SingleLine", mLineButton->isChecked()); |
156 | config->writeEntry("ToolTips", mToolTipBox->isChecked()); | 156 | config->writeEntry("ToolTips", mToolTipBox->isChecked()); |
157 | config->writeEntry("Background", mBackgroundBox->isChecked()); | 157 | config->writeEntry("Background", mBackgroundBox->isChecked()); |
158 | config->writeEntry("BackgroundName", mBackgroundName->lineEdit()->text()); | 158 | config->writeEntry("BackgroundName", mBackgroundName->lineEdit()->text()); |