selecttopicbase.cpp
Go to the documentation of this file.00001 #include <kdialog.h>
00002 #include <klocale.h>
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include "selecttopicbase.h"
00013
00014 #include <qvariant.h>
00015 #include <qpushbutton.h>
00016 #include <qlabel.h>
00017 #include <qlistbox.h>
00018 #include <qlayout.h>
00019 #include <qtooltip.h>
00020 #include <qwhatsthis.h>
00021
00022
00023
00024
00025
00026
00027
00028
00029 SelectTopicBase::SelectTopicBase( QWidget* parent, const char* name, bool modal, WFlags fl )
00030 : QDialog( parent, name, modal, fl )
00031 {
00032 if ( !name )
00033 setName( "SelectTopicBase" );
00034 setSizeGripEnabled( TRUE );
00035 SelectTopicBaseLayout = new QGridLayout( this, 1, 1, 11, 6, "SelectTopicBaseLayout");
00036
00037 Layout1 = new QHBoxLayout( 0, 0, 6, "Layout1");
00038 Horizontal_Spacing2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00039 Layout1->addItem( Horizontal_Spacing2 );
00040
00041 buttonOk = new QPushButton( this, "buttonOk" );
00042 buttonOk->setAutoDefault( TRUE );
00043 buttonOk->setDefault( TRUE );
00044 Layout1->addWidget( buttonOk );
00045
00046 buttonCancel = new QPushButton( this, "buttonCancel" );
00047 buttonCancel->setAutoDefault( TRUE );
00048 Layout1->addWidget( buttonCancel );
00049
00050 SelectTopicBaseLayout->addLayout( Layout1, 2, 0 );
00051
00052 topicLabel = new QLabel( this, "topicLabel" );
00053
00054 SelectTopicBaseLayout->addWidget( topicLabel, 0, 0 );
00055
00056 topicBox = new QListBox( this, "topicBox" );
00057
00058 SelectTopicBaseLayout->addWidget( topicBox, 1, 0 );
00059 languageChange();
00060 resize( QSize(429, 211).expandedTo(minimumSizeHint()) );
00061 clearWState( WState_Polished );
00062
00063
00064 connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );
00065 connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
00066 connect( topicBox, SIGNAL( doubleClicked(QListBoxItem*) ), this, SLOT( accept() ) );
00067 connect( topicBox, SIGNAL( returnPressed(QListBoxItem*) ), this, SLOT( accept() ) );
00068
00069
00070 setTabOrder( topicBox, buttonOk );
00071 setTabOrder( buttonOk, buttonCancel );
00072 }
00073
00074
00075
00076
00077 SelectTopicBase::~SelectTopicBase()
00078 {
00079
00080 }
00081
00082
00083
00084
00085
00086 void SelectTopicBase::languageChange()
00087 {
00088 setCaption( tr2i18n( "Choose Topic" ) );
00089 buttonOk->setText( tr2i18n( "&OK" ) );
00090 buttonOk->setAccel( QKeySequence( QString::null ) );
00091 buttonCancel->setText( tr2i18n( "&Cancel" ) );
00092 buttonCancel->setAccel( QKeySequence( QString::null ) );
00093 topicLabel->setText( tr2i18n( "Choose a topic for <b>%1</b>:" ) );
00094 }
00095
00096 void SelectTopicBase::newSlot()
00097 {
00098 qWarning( "SelectTopicBase::newSlot(): Not implemented yet" );
00099 }
00100
00101 #include "selecttopicbase.moc"
This file is part of the documentation for KDevelop Version 3.1.2.