00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
#include <qlabel.h>
00026
#include <qstringlist.h>
00027
#include <qlayout.h>
00028
#include <qcombobox.h>
00029
00030
#include <kdebug.h>
00031
#include <klocale.h>
00032
#include <kpushbutton.h>
00033
#include <kstdguiitem.h>
00034
00035
#include "statusdialog.h"
00036
#include "statusdialog.moc"
00037
00038 StatusDialog::StatusDialog(
QWidget* parent,
const char* name) :
00039 KDialog(parent,name,true)
00040 {
00041 setCaption(i18n(
"Set Your Status"));
00042
00043
QBoxLayout *topLayout =
new QVBoxLayout(
this );
00044 topLayout->
setSpacing( spacingHint() );
00045 topLayout->
setMargin( marginHint() );
00046
00047
QBoxLayout *statusLayout =
new QHBoxLayout( topLayout );
00048
00049
QLabel *text =
new QLabel(i18n(
"Set your status"),
this);
00050 statusLayout->
addWidget( text );
00051
00052 mStatus =
new QComboBox(
false,
this);
00053 mStatus->insertStringList(Attendee::statusList());
00054 statusLayout->
addWidget( mStatus );
00055
00056
QBoxLayout *buttonLayout =
new QHBoxLayout( topLayout );
00057
00058
QPushButton *ok =
new KPushButton(KStdGuiItem::ok(),
this);
00059 connect ( ok,SIGNAL(clicked()),
this,SLOT(accept()) );
00060 buttonLayout->
addWidget( ok );
00061
00062
QPushButton *cancel =
new KPushButton(KStdGuiItem::cancel(),
this);
00063 connect ( cancel,SIGNAL(clicked()),
this,SLOT(reject()) );
00064 buttonLayout->
addWidget( cancel );
00065 }
00066
00067 StatusDialog::~StatusDialog()
00068 {
00069 }
00070
00071 Attendee::PartStat StatusDialog::status()
00072 {
00073
return Attendee::PartStat( mStatus->currentItem() ) ;
00074 }