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
00024 #include <klocale.h>
00025
00026 #include "birthdaysdialog.h"
00027 #include "birthdaysdialog.moc"
00028
00029 BirthdaysDialog::BirthdaysDialog(QWidget *parent) :
00030 KDialogBase(Plain,i18n("Import Birthdays From KAddressBook"),User1|Cancel,
00031 User1,parent,"bimport",true,true,i18n("Import"))
00032 {
00033 setMaximumSize(350,200);
00034 QFrame *topFrame = plainPage();
00035 QGridLayout *topLayout = new QGridLayout(topFrame,2,1);
00036 mAlarm = new QCheckBox(i18n("Set alarm"),topFrame);
00037 topLayout->addWidget(mAlarm,0,0);
00038
00039 QBoxLayout *alarmLayout = new QHBoxLayout(topLayout);
00040 topLayout->addLayout(alarmLayout,1,0);
00041
00042 mALabel = new QLabel(i18n("Alarm before (in days):"),topFrame);
00043 alarmLayout->addWidget(mALabel);
00044 mAlarmTimeEdit = new KRestrictedLine(topFrame, "alarmTimeEdit","1234567890");
00045 mAlarmTimeEdit->setText("0");
00046 alarmLayout->addWidget(mAlarmTimeEdit);
00047
00048 mAlarmTimeEdit->setDisabled(true);
00049 mALabel->setDisabled(true);
00050
00051 connect(mAlarm,SIGNAL(clicked()),SLOT(alarmClicked()));
00052 }
00053
00054 BirthdaysDialog::~BirthdaysDialog()
00055 {
00056 }
00057
00058 void BirthdaysDialog::slotUser1()
00059 {
00060 accept();
00061 }
00062
00063 void BirthdaysDialog::alarmClicked()
00064 {
00065 mAlarmTimeEdit->setDisabled(!mAlarm->isChecked());
00066 mALabel->setDisabled(!mAlarm->isChecked());
00067 }
00068
00069
This file is part of the documentation for kdelibs Version 3.1.4.