26 #include <tqstringlist.h>
28 #include <tqcombobox.h>
31 #include <tdelocale.h>
32 #include <kpushbutton.h>
33 #include <kstdguiitem.h>
35 #include "statusdialog.h"
36 #include "statusdialog.moc"
38 StatusDialog::StatusDialog(TQWidget* parent, const char* name) :
39 KDialog(parent,name,true)
41 setCaption(i18n( "Set Your Status"));
43 TQBoxLayout *topLayout = new TQVBoxLayout( this );
44 topLayout->setSpacing( spacingHint() );
45 topLayout->setMargin( marginHint() );
47 TQBoxLayout *statusLayout = new TQHBoxLayout( topLayout );
49 TQLabel *text = new TQLabel(i18n( "Set your status"), this);
50 statusLayout->addWidget( text );
52 mStatus = new TQComboBox( false, this);
53 mStatus->insertStringList(Attendee::statusList());
54 statusLayout->addWidget( mStatus );
56 TQBoxLayout *buttonLayout = new TQHBoxLayout( topLayout );
58 TQPushButton *ok = new KPushButton(KStdGuiItem::ok(), this);
59 connect ( ok,TQ_SIGNAL(clicked()), this,TQ_SLOT(accept()) );
60 buttonLayout->addWidget( ok );
62 TQPushButton *cancel = new KPushButton(KStdGuiItem::cancel(), this);
63 connect ( cancel,TQ_SIGNAL(clicked()), this,TQ_SLOT(reject()) );
64 buttonLayout->addWidget( cancel );
67 StatusDialog::~StatusDialog()
71 Attendee::PartStat StatusDialog::status()
73 return Attendee::PartStat( mStatus->currentItem() ) ;
|