korganizer
Go to the documentation of this file.
27 #include <QButtonGroup>
29 #include <QRadioButton>
30 #include <QVBoxLayout>
35 setCaption( i18n(
"Configure Day Numbers" ) );
36 setButtons( Ok | Cancel );
37 setDefaultButton( Ok );
40 setMainWidget( topFrame );
41 QVBoxLayout *topLayout =
new QVBoxLayout( topFrame );
42 topLayout->setSpacing( spacingHint() );
43 topLayout->setMargin( 0 );
45 QGroupBox *dayNumBox =
new QGroupBox( i18n(
"Show Date Number" ), topFrame );
46 topLayout->addWidget( dayNumBox );
47 QVBoxLayout *groupLayout =
new QVBoxLayout( dayNumBox );
50 mDayNumGroup =
new QButtonGroup(
this );
51 btn =
new QRadioButton( i18n(
"Show day number" ), dayNumBox );
53 groupLayout->addWidget( btn );
54 btn =
new QRadioButton( i18n(
"Show days to end of year" ), dayNumBox );
56 groupLayout->addWidget( btn );
57 btn =
new QRadioButton( i18n(
"Show both" ), dayNumBox );
59 groupLayout->addWidget( btn );
61 connect(
this, SIGNAL(okClicked()),
this, SLOT(
slotOk()) );
72 KConfig _config( QLatin1String(
"korganizerrc"), KConfig::NoGlobals );
73 KConfigGroup config( &_config,
"Calendar/Datenums Plugin" );
74 int datenum = config.readEntry(
76 QAbstractButton *btn = mDayNumGroup->button( datenum );
80 btn->setChecked(
true );
85 KConfig _config( QLatin1String(
"korganizerrc"), KConfig::NoGlobals );
86 KConfigGroup config( &_config,
"Calendar/Datenums Plugin" );
87 config.writeEntry(
"ShowDayNumbers", mDayNumGroup->checkedId() );
97 #include "configdialog.moc"
ConfigDialog(QWidget *parent=0)
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:56:19 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.