birthdaysdialog.cpp
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include <qframe.h>
00022 #include <qlayout.h>
00023 #include <qcheckbox.h>
00024 #include <qlabel.h>
00025
00026 #include <krestrictedline.h>
00027
00028 #include <klocale.h>
00029
00030 #include "birthdaysdialog.h"
00031 #include "birthdaysdialog.moc"
00032
00033 BirthdaysDialog::BirthdaysDialog(QWidget *parent) :
00034 KDialogBase(Plain,i18n("Import Birthdays From KAddressBook"),User1|Cancel,
00035 User1,parent,"bimport",true,true,i18n("Import"))
00036 {
00037 setMaximumSize(350,200);
00038 QFrame *topFrame = plainPage();
00039 QGridLayout *topLayout = new QGridLayout(topFrame,2,1);
00040 mAlarm = new QCheckBox(i18n("Set alarm"),topFrame);
00041 topLayout->addWidget(mAlarm,0,0);
00042
00043 QBoxLayout *alarmLayout = new QHBoxLayout(topLayout);
00044 topLayout->addLayout(alarmLayout,1,0);
00045
00046 mALabel = new QLabel(i18n("Alarm before (in days):"),topFrame);
00047 alarmLayout->addWidget(mALabel);
00048 mAlarmTimeEdit = new KRestrictedLine(topFrame, "alarmTimeEdit","1234567890");
00049 mAlarmTimeEdit->setText("0");
00050 alarmLayout->addWidget(mAlarmTimeEdit);
00051
00052 mAlarmTimeEdit->setDisabled(true);
00053 mALabel->setDisabled(true);
00054
00055 connect(mAlarm,SIGNAL(clicked()),SLOT(alarmClicked()));
00056 }
00057
00058 BirthdaysDialog::~BirthdaysDialog()
00059 {
00060 }
00061
00062 void BirthdaysDialog::slotUser1()
00063 {
00064 accept();
00065 }
00066
00067 void BirthdaysDialog::alarmClicked()
00068 {
00069 mAlarmTimeEdit->setDisabled(!mAlarm->isChecked());
00070 mALabel->setDisabled(!mAlarm->isChecked());
00071 }
00072
00073
This file is part of the documentation for korganizer Library Version 3.2.2.