statusdialog.cpp
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
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 }
This file is part of the documentation for korganizer Library Version 3.2.2.