korganizer Library API Documentation

statusdialog.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 #include <qlabel.h> 00021 #include <qstringlist.h> 00022 #include <qlayout.h> 00023 00024 #include <kdebug.h> 00025 #include <klocale.h> 00026 #include <kpushbutton.h> 00027 #include <kstdguiitem.h> 00028 00029 #include "statusdialog.h" 00030 #include "statusdialog.moc" 00031 00032 StatusDialog::StatusDialog(QWidget* parent, const char* name) : 00033 KDialog(parent,name,true) 00034 { 00035 setCaption(i18n("Set Your Status")); 00036 00037 QBoxLayout *topLayout = new QVBoxLayout( this ); 00038 topLayout->setSpacing( spacingHint() ); 00039 topLayout->setMargin( marginHint() ); 00040 00041 QBoxLayout *statusLayout = new QHBoxLayout( topLayout ); 00042 00043 QLabel *text = new QLabel(i18n("Set your status"),this); 00044 statusLayout->addWidget( text ); 00045 00046 mStatus = new QComboBox(false,this); 00047 mStatus->insertStringList(Attendee::statusList()); 00048 statusLayout->addWidget( mStatus ); 00049 00050 QBoxLayout *buttonLayout = new QHBoxLayout( topLayout ); 00051 00052 QPushButton *ok = new KPushButton(KStdGuiItem::ok(), this); 00053 connect ( ok,SIGNAL(clicked()), this,SLOT(accept()) ); 00054 buttonLayout->addWidget( ok ); 00055 00056 QPushButton *cancel = new KPushButton(KStdGuiItem::cancel(), this); 00057 connect ( cancel,SIGNAL(clicked()), this,SLOT(reject()) ); 00058 buttonLayout->addWidget( cancel ); 00059 } 00060 00061 StatusDialog::~StatusDialog() 00062 { 00063 } 00064 00065 Attendee::PartStat StatusDialog::status() 00066 { 00067 return Attendee::PartStat( mStatus->currentItem() ) ; 00068 }
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 Wed Jul 28 23:58:14 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003