summaryrefslogtreecommitdiffabout
path: root/kaddressbook/views/configuretableviewdialog.cpp
Side-by-side diff
Diffstat (limited to 'kaddressbook/views/configuretableviewdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/views/configuretableviewdialog.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/kaddressbook/views/configuretableviewdialog.cpp b/kaddressbook/views/configuretableviewdialog.cpp
index 8bcceb2..0e36abd 100644
--- a/kaddressbook/views/configuretableviewdialog.cpp
+++ b/kaddressbook/views/configuretableviewdialog.cpp
@@ -165,101 +165,105 @@ void LookAndFeelPage::saveSettings( KConfig *config )
config->writeEntry( "TextColor", lbColors->color( 1 ) );
config->writeEntry( "HeaderBackgroundColor", lbColors->color( 2 ) );
config->writeEntry( "HeaderTextColor", lbColors->color( 3 ) );
config->writeEntry( "HighlightColor", lbColors->color( 4 ) );
config->writeEntry( "HighlightedTextColor", lbColors->color( 5 ) );
config->writeEntry( "AlternatingBackgroundColor", lbColors->color( 6 ) );
}
// fonts
config->writeEntry( "EnableCustomFonts", cbEnableCustomFonts->isChecked() );
if ( cbEnableCustomFonts->isChecked() )
{
config->writeEntry( "TextFont", lTextFont->font() );
config->writeEntry( "HeaderFont", lHeaderFont->font() );
}
}
void LookAndFeelPage::setTextFont()
{
QFont f( lTextFont->font() );
#ifndef KAB_EMBEDDED
if ( KFontDialog::getFont( f, false, this ) == QDialog::Accepted )
updateFontLabel( f, lTextFont );
#else //KAB_EMBEDDED
bool ok;
QFont fout = KFontDialog::getFont( f, ok);
if ( ok )
updateFontLabel( fout, lTextFont );
#endif //KAB_EMBEDDED
}
void LookAndFeelPage::setHeaderFont()
{
QFont f( lHeaderFont->font() );
#ifndef KAB_EMBEDDED
if ( KFontDialog::getFont( f,false, this ) == QDialog::Accepted )
updateFontLabel( f, lHeaderFont );
#else //KAB_EMBEDDED
bool ok;
QFont fout = KFontDialog::getFont( f, ok);
if ( ok )
updateFontLabel( fout, lHeaderFont );
#endif //KAB_EMBEDDED
}
void LookAndFeelPage::enableFonts()
{
vbFonts->setEnabled( cbEnableCustomFonts->isChecked() );
+ if ( cbEnableCustomFonts->isChecked() )
+ vbFonts->setFocus();
}
void LookAndFeelPage::enableColors()
{
- lbColors->setEnabled( cbEnableCustomColors->isChecked() );
+ lbColors->setEnabled( cbEnableCustomColors->isChecked() );
+ if ( cbEnableCustomColors->isChecked() )
+ lbColors->setFocus();
}
void LookAndFeelPage::initGUI()
{
int spacing = KDialog::spacingHint();
int margin = KDialog::marginHint();
QTabWidget *tabs = new QTabWidget( this );
// General
QVBox *generalTab = new QVBox( this, "generaltab" );
generalTab->setSpacing( spacing );
generalTab->setMargin( margin );
QButtonGroup *group = new QButtonGroup(1, Qt::Horizontal,
i18n("Row Separator"), generalTab);
mAlternateButton = new QRadioButton(i18n("Alternating backgrounds"),
group, "mAlternateButton");
mLineButton = new QRadioButton(i18n("Single line"), group, "mLineButton");
mNoneButton = new QRadioButton(i18n("None"), group, "mNoneButton");
mBackgroundBox = new QCheckBox(i18n("Enable background image:"), generalTab,
"mBackgroundBox");
connect(mBackgroundBox, SIGNAL(toggled(bool)),
SLOT(enableBackgroundToggled(bool)));
// LR image not implemented
mBackgroundBox->setEnabled( false );
mBackgroundName = new KURLRequester(generalTab, "mBackgroundName");
#ifndef KAB_EMBEDDED
mBackgroundName->setMode(KFile::File | KFile::ExistingOnly |
KFile::LocalOnly);
mBackgroundName->setFilter(KImageIO::pattern(KImageIO::Reading));
#endif //KAB_EMBEDDED
// ToolTip Checkbox
mToolTipBox = new QCheckBox(i18n("Enable contact tooltips"), generalTab,
"mToolTipBox");
tabs->addTab( generalTab, i18n("&General") );
// Colors
QVBox *colorTab = new QVBox( this, "colortab" );
colorTab->setSpacing( spacing );
colorTab->setMargin( spacing );
cbEnableCustomColors = new QCheckBox( i18n("&Enable custom Colors"), colorTab );
connect( cbEnableCustomColors, SIGNAL(clicked()), this, SLOT(enableColors()) );