Diffstat (limited to 'kaddressbook/views/configuretableviewdialog.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | kaddressbook/views/configuretableviewdialog.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kaddressbook/views/configuretableviewdialog.cpp b/kaddressbook/views/configuretableviewdialog.cpp index cd09bcf..8bcceb2 100644 --- a/kaddressbook/views/configuretableviewdialog.cpp +++ b/kaddressbook/views/configuretableviewdialog.cpp | |||
@@ -94,48 +94,49 @@ LookAndFeelPage::LookAndFeelPage(QWidget *parent, const char *name) | |||
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 | lbColors->insertItem( new ColorListItem( i18n("Background Color"), | 119 | lbColors->insertItem( new ColorListItem( i18n("Background Color"), |
119 | config->readColorEntry( "BackgroundColor", &c ) ) ); | 120 | config->readColorEntry( "BackgroundColor", &c ) ) ); |
120 | c = colorGroup().foreground(); | 121 | c = colorGroup().foreground(); |
121 | lbColors->insertItem( new ColorListItem( i18n("Text Color"), | 122 | lbColors->insertItem( new ColorListItem( i18n("Text Color"), |
122 | config->readColorEntry( "TextColor", &c ) ) ); | 123 | config->readColorEntry( "TextColor", &c ) ) ); |
123 | c = colorGroup().button(); | 124 | c = colorGroup().button(); |
124 | lbColors->insertItem( new ColorListItem( i18n("Header Background Color"), | 125 | lbColors->insertItem( new ColorListItem( i18n("Header Background Color"), |
125 | config->readColorEntry( "HeaderBackgroundColor", &c ) ) ); | 126 | config->readColorEntry( "HeaderBackgroundColor", &c ) ) ); |
126 | c = colorGroup().buttonText(); | 127 | c = colorGroup().buttonText(); |
127 | lbColors->insertItem( new ColorListItem( i18n("Header Text Color"), | 128 | lbColors->insertItem( new ColorListItem( i18n("Header Text Color"), |
128 | config->readColorEntry( "HeaderTextColor", &c ) ) ); | 129 | config->readColorEntry( "HeaderTextColor", &c ) ) ); |
129 | c = colorGroup().highlight(); | 130 | c = colorGroup().highlight(); |
130 | lbColors->insertItem( new ColorListItem( i18n("Highlight Color"), | 131 | lbColors->insertItem( new ColorListItem( i18n("Highlight Color"), |
131 | config->readColorEntry( "HighlightColor", &c ) ) ); | 132 | config->readColorEntry( "HighlightColor", &c ) ) ); |
132 | c = colorGroup().highlightedText(); | 133 | c = colorGroup().highlightedText(); |
133 | lbColors->insertItem( new ColorListItem( i18n("Highlighted Text Color"), | 134 | lbColors->insertItem( new ColorListItem( i18n("Highlighted Text Color"), |
134 | config->readColorEntry( "HighlightedTextColor", &c ) ) ); | 135 | config->readColorEntry( "HighlightedTextColor", &c ) ) ); |
135 | c = colorGroup().background(); | 136 | c = colorGroup().background(); |
136 | lbColors->insertItem( new ColorListItem( i18n("Alternating Background Color"), | 137 | lbColors->insertItem( new ColorListItem( i18n("Alternating Background Color"), |
137 | config->readColorEntry( "AlternatingBackgroundColor", &c ) ) ); | 138 | config->readColorEntry( "AlternatingBackgroundColor", &c ) ) ); |
138 | 139 | ||
139 | enableColors(); | 140 | enableColors(); |
140 | 141 | ||
141 | // fonts | 142 | // fonts |
@@ -220,49 +221,50 @@ void LookAndFeelPage::initGUI() | |||
220 | { | 221 | { |
221 | int spacing = KDialog::spacingHint(); | 222 | int spacing = KDialog::spacingHint(); |
222 | int margin = KDialog::marginHint(); | 223 | int margin = KDialog::marginHint(); |
223 | 224 | ||
224 | QTabWidget *tabs = new QTabWidget( this ); | 225 | QTabWidget *tabs = new QTabWidget( this ); |
225 | 226 | ||
226 | // General | 227 | // General |
227 | QVBox *generalTab = new QVBox( this, "generaltab" ); | 228 | QVBox *generalTab = new QVBox( this, "generaltab" ); |
228 | 229 | ||
229 | generalTab->setSpacing( spacing ); | 230 | generalTab->setSpacing( spacing ); |
230 | generalTab->setMargin( margin ); | 231 | generalTab->setMargin( margin ); |
231 | 232 | ||
232 | QButtonGroup *group = new QButtonGroup(1, Qt::Horizontal, | 233 | QButtonGroup *group = new QButtonGroup(1, Qt::Horizontal, |
233 | i18n("Row Separator"), generalTab); | 234 | i18n("Row Separator"), generalTab); |
234 | 235 | ||
235 | mAlternateButton = new QRadioButton(i18n("Alternating backgrounds"), | 236 | mAlternateButton = new QRadioButton(i18n("Alternating backgrounds"), |
236 | group, "mAlternateButton"); | 237 | group, "mAlternateButton"); |
237 | mLineButton = new QRadioButton(i18n("Single line"), group, "mLineButton"); | 238 | mLineButton = new QRadioButton(i18n("Single line"), group, "mLineButton"); |
238 | mNoneButton = new QRadioButton(i18n("None"), group, "mNoneButton"); | 239 | mNoneButton = new QRadioButton(i18n("None"), group, "mNoneButton"); |
239 | 240 | ||
240 | mBackgroundBox = new QCheckBox(i18n("Enable background image:"), generalTab, | 241 | mBackgroundBox = new QCheckBox(i18n("Enable background image:"), generalTab, |
241 | "mBackgroundBox"); | 242 | "mBackgroundBox"); |
242 | connect(mBackgroundBox, SIGNAL(toggled(bool)), | 243 | connect(mBackgroundBox, SIGNAL(toggled(bool)), |
243 | SLOT(enableBackgroundToggled(bool))); | 244 | SLOT(enableBackgroundToggled(bool))); |
244 | 245 | // LR image not implemented | |
246 | mBackgroundBox->setEnabled( false ); | ||
245 | mBackgroundName = new KURLRequester(generalTab, "mBackgroundName"); | 247 | mBackgroundName = new KURLRequester(generalTab, "mBackgroundName"); |
246 | #ifndef KAB_EMBEDDED | 248 | #ifndef KAB_EMBEDDED |
247 | mBackgroundName->setMode(KFile::File | KFile::ExistingOnly | | 249 | mBackgroundName->setMode(KFile::File | KFile::ExistingOnly | |
248 | KFile::LocalOnly); | 250 | KFile::LocalOnly); |
249 | mBackgroundName->setFilter(KImageIO::pattern(KImageIO::Reading)); | 251 | mBackgroundName->setFilter(KImageIO::pattern(KImageIO::Reading)); |
250 | #endif //KAB_EMBEDDED | 252 | #endif //KAB_EMBEDDED |
251 | 253 | ||
252 | // ToolTip Checkbox | 254 | // ToolTip Checkbox |
253 | mToolTipBox = new QCheckBox(i18n("Enable contact tooltips"), generalTab, | 255 | mToolTipBox = new QCheckBox(i18n("Enable contact tooltips"), generalTab, |
254 | "mToolTipBox"); | 256 | "mToolTipBox"); |
255 | 257 | ||
256 | tabs->addTab( generalTab, i18n("&General") ); | 258 | tabs->addTab( generalTab, i18n("&General") ); |
257 | 259 | ||
258 | // Colors | 260 | // Colors |
259 | QVBox *colorTab = new QVBox( this, "colortab" ); | 261 | QVBox *colorTab = new QVBox( this, "colortab" ); |
260 | colorTab->setSpacing( spacing ); | 262 | colorTab->setSpacing( spacing ); |
261 | colorTab->setMargin( spacing ); | 263 | colorTab->setMargin( spacing ); |
262 | cbEnableCustomColors = new QCheckBox( i18n("&Enable custom Colors"), colorTab ); | 264 | cbEnableCustomColors = new QCheckBox( i18n("&Enable custom Colors"), colorTab ); |
263 | connect( cbEnableCustomColors, SIGNAL(clicked()), this, SLOT(enableColors()) ); | 265 | connect( cbEnableCustomColors, SIGNAL(clicked()), this, SLOT(enableColors()) ); |
264 | lbColors = new ColorListBox( colorTab ); | 266 | lbColors = new ColorListBox( colorTab ); |
265 | tabs->addTab( colorTab, i18n("&Colors") ); | 267 | tabs->addTab( colorTab, i18n("&Colors") ); |
266 | 268 | ||
267 | QWhatsThis::add( cbEnableCustomColors, i18n( | 269 | QWhatsThis::add( cbEnableCustomColors, i18n( |
268 | "If custom colors are enabled, you may choose the colors for the view below. " | 270 | "If custom colors are enabled, you may choose the colors for the view below. " |