29 #include <QVBoxLayout>
35 setMainWidget( topFrame );
36 setCaption( i18n(
"Configure Holidays" ) );
37 setButtons( Ok | Cancel );
38 setDefaultButton( Ok );
40 QVBoxLayout *topLayout =
new QVBoxLayout( topFrame );
41 topLayout->setMargin( 0 );
42 topLayout->setSpacing( spacingHint() );
44 mIsraelBox =
new QCheckBox( topFrame );
45 mIsraelBox->setText( i18n(
"Use Israeli holidays" ) );
46 topLayout->addWidget( mIsraelBox );
48 mParshaBox =
new QCheckBox( topFrame );
49 mParshaBox->setText( i18n(
"Show weekly parsha" ) );
50 topLayout->addWidget( mParshaBox );
52 mOmerBox =
new QCheckBox( topFrame );
53 mOmerBox->setText( i18n(
"Show day of Omer" ) );
54 topLayout->addWidget( mOmerBox );
56 mCholBox =
new QCheckBox( topFrame );
57 mCholBox->setText( i18n(
"Show Chol HaMoed" ) );
58 topLayout->addWidget( mCholBox );
59 connect(
this, SIGNAL(okClicked()),
this, SLOT(
slotOk()) );
69 KConfig config( QLatin1String(
"korganizerrc") );
71 KConfigGroup group( &config,
"Hebrew Calendar Plugin" );
72 mIsraelBox->setChecked(
73 group.readEntry(
"UseIsraelSettings",
74 ( KGlobal::locale()->country() == QLatin1String(
".il" ) ) ) );
75 mParshaBox->setChecked( group.readEntry(
"ShowParsha",
true ) );
76 mCholBox->setChecked( group.readEntry(
"ShowChol_HaMoed",
true ) );
77 mOmerBox->setChecked( group.readEntry(
"ShowOmer",
true ) );
82 KConfig config( QLatin1String(
"korganizerrc" ));
83 KConfigGroup group( &config,
"Hebrew Calendar Plugin" );
84 group.writeEntry(
"UseIsraelSettings", mIsraelBox->isChecked() );
85 group.writeEntry(
"ShowParsha", mParshaBox->isChecked() );
86 group.writeEntry(
"ShowChol_HaMoed", mCholBox->isChecked() );
87 group.writeEntry(
"ShowOmer", mOmerBox->isChecked() );
97 #include "configdialog.moc"
ConfigDialog(QWidget *parent=0)