Go to the documentation of this file. 52 CalSelectDialog::CalSelectDialog( const TQString &caption, const TQString &label, 53 const TQStringList &list ) 54 : KDialogBase( 0, 0, true, caption, Ok|Cancel, Ok, true ) 56 TQFrame *frame = makeMainWidget(); 57 TQVBoxLayout *layout = new TQVBoxLayout( frame, 0, spacingHint() ); 59 TQLabel *labelWidget = new TQLabel( label, frame ); 60 layout->addWidget( labelWidget ); 62 mListBox = new TDEListBox( frame ); 63 mListBox->insertStringList( list ); 64 mListBox->setSelected( 0, true ); 65 mListBox->ensureCurrentVisible(); 66 layout->addWidget( mListBox, 10 ); 68 connect( mListBox, TQT_SIGNAL(doubleClicked(TQListBoxItem *)), 70 connect( mListBox, TQT_SIGNAL(returnPressed(TQListBoxItem *)), 77 setMinimumWidth( 320 ); 80 TQString CalSelectDialog::getItem( const TQString &caption, const TQString &label, 81 const TQStringList &list ) 83 CalSelectDialog dlg( caption, label, list ); 86 if ( dlg.exec() == Accepted ) { 87 result = dlg.mListBox->currentText(); 93 void CalSelectDialog::closeEvent( TQCloseEvent *event ) 98 void CalSelectDialog::reject() Namespace KCal is for global classes, objects and/or functions in libkcal.
This file is part of the API for handling calendar data and provides a dialog for asking the user to ...
|