korganizer Library API Documentation

birthdaysdialog.cpp

00001 /*
00002     This file is part of KOrganizer.
00003     Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
00004 
00005     This program is free software; you can redistribute it and/or modify
00006     it under the terms of the GNU General Public License as published by
00007     the Free Software Foundation; either version 2 of the License, or
00008     (at your option) any later version.
00009 
00010     This program is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00013     GNU General Public License for more details.
00014 
00015     You should have received a copy of the GNU General Public License
00016     along with this program; if not, write to the Free Software
00017     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
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 
KDE Logo
This file is part of the documentation for korganizer Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat May 1 11:38:26 2004 by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2003