KDevelop API Documentation

quickopenbase.cpp

Go to the documentation of this file.
00001 #include <kdialog.h>
00002 #include <klocale.h>
00003 /****************************************************************************
00004 ** Form implementation generated from reading ui file './quickopenbase.ui'
00005 **
00006 ** Created: Tue Mar 22 23:49:07 2005
00007 **      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.4   edited Nov 24 2003 $)
00008 **
00009 ** WARNING! All changes made in this file will be lost!
00010 ****************************************************************************/
00011 
00012 #include "quickopenbase.h"
00013 
00014 #include <qvariant.h>
00015 #include <qlabel.h>
00016 #include <klistbox.h>
00017 #include <qpushbutton.h>
00018 #include <klineedit.h>
00019 #include <qlayout.h>
00020 #include <qtooltip.h>
00021 #include <qwhatsthis.h>
00022 
00023 /*
00024  *  Constructs a QuickOpenDialogBase as a child of 'parent', with the
00025  *  name 'name' and widget flags set to 'f'.
00026  *
00027  *  The dialog will by default be modeless, unless you set 'modal' to
00028  *  TRUE to construct a modal dialog.
00029  */
00030 QuickOpenDialogBase::QuickOpenDialogBase( QWidget* parent, const char* name, bool modal, WFlags fl )
00031     : QDialog( parent, name, modal, fl )
00032 {
00033     if ( !name )
00034     setName( "QuickOpenDialogBase" );
00035     setSizeGripEnabled( TRUE );
00036     QuickOpenDialogBaseLayout = new QGridLayout( this, 1, 1, 11, 6, "QuickOpenDialogBaseLayout"); 
00037 
00038     nameLabel = new QLabel( this, "nameLabel" );
00039 
00040     QuickOpenDialogBaseLayout->addWidget( nameLabel, 0, 0 );
00041 
00042     itemListLabel = new QLabel( this, "itemListLabel" );
00043 
00044     QuickOpenDialogBaseLayout->addWidget( itemListLabel, 2, 0 );
00045 
00046     itemList = new KListBox( this, "itemList" );
00047 
00048     QuickOpenDialogBaseLayout->addWidget( itemList, 3, 0 );
00049 
00050     Layout1 = new QHBoxLayout( 0, 0, 6, "Layout1"); 
00051     Horizontal_Spacing2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00052     Layout1->addItem( Horizontal_Spacing2 );
00053 
00054     buttonOk = new QPushButton( this, "buttonOk" );
00055     buttonOk->setAutoDefault( TRUE );
00056     buttonOk->setDefault( TRUE );
00057     Layout1->addWidget( buttonOk );
00058 
00059     buttonCancel = new QPushButton( this, "buttonCancel" );
00060     buttonCancel->setAutoDefault( TRUE );
00061     Layout1->addWidget( buttonCancel );
00062 
00063     QuickOpenDialogBaseLayout->addLayout( Layout1, 4, 0 );
00064 
00065     nameEdit = new KLineEdit( this, "nameEdit" );
00066 
00067     QuickOpenDialogBaseLayout->addWidget( nameEdit, 1, 0 );
00068     languageChange();
00069     resize( QSize(369, 331).expandedTo(minimumSizeHint()) );
00070     clearWState( WState_Polished );
00071 
00072     // signals and slots connections
00073     connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );
00074     connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
00075     connect( itemList, SIGNAL( returnPressed(QListBoxItem*) ), this, SLOT( slotExecuted(QListBoxItem*) ) );
00076     connect( buttonOk, SIGNAL( clicked() ), this, SLOT( slotReturnPressed() ) );
00077     connect( itemList, SIGNAL( doubleClicked(QListBoxItem*) ), this, SLOT( slotExecuted(QListBoxItem*) ) );
00078     connect( nameEdit, SIGNAL( returnPressed() ), this, SLOT( slotReturnPressed() ) );
00079     connect( nameEdit, SIGNAL( textChanged(const QString&) ), this, SLOT( slotTextChanged(const QString&) ) );
00080 
00081     // tab order
00082     setTabOrder( nameEdit, itemList );
00083     setTabOrder( itemList, buttonOk );
00084     setTabOrder( buttonOk, buttonCancel );
00085 
00086     // buddies
00087     nameLabel->setBuddy( nameEdit );
00088     itemListLabel->setBuddy( itemList );
00089 }
00090 
00091 /*
00092  *  Destroys the object and frees any allocated resources
00093  */
00094 QuickOpenDialogBase::~QuickOpenDialogBase()
00095 {
00096     // no need to delete child widgets, Qt does it all for us
00097 }
00098 
00099 /*
00100  *  Sets the strings of the subwidgets using the current
00101  *  language.
00102  */
00103 void QuickOpenDialogBase::languageChange()
00104 {
00105     setCaption( tr2i18n( "Quick Open" ) );
00106     nameLabel->setText( tr2i18n( "[NAME]" ) );
00107     itemListLabel->setText( tr2i18n( "[ITEM LIST]" ) );
00108     buttonOk->setText( tr2i18n( "&OK" ) );
00109     buttonOk->setAccel( QKeySequence( QString::null ) );
00110     buttonCancel->setText( tr2i18n( "&Cancel" ) );
00111     buttonCancel->setAccel( QKeySequence( QString::null ) );
00112 }
00113 
00114 void QuickOpenDialogBase::slotTextChanged(const QString&)
00115 {
00116     qWarning( "QuickOpenDialogBase::slotTextChanged(const QString&): Not implemented yet" );
00117 }
00118 
00119 void QuickOpenDialogBase::slotReturnPressed()
00120 {
00121     qWarning( "QuickOpenDialogBase::slotReturnPressed(): Not implemented yet" );
00122 }
00123 
00124 void QuickOpenDialogBase::executed(QListBoxItem*)
00125 {
00126     qWarning( "QuickOpenDialogBase::executed(QListBoxItem*): Not implemented yet" );
00127 }
00128 
00129 void QuickOpenDialogBase::slotExecuted(QListBoxItem*)
00130 {
00131     qWarning( "QuickOpenDialogBase::slotExecuted(QListBoxItem*): Not implemented yet" );
00132 }
00133 
00134 #include "quickopenbase.moc"
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Mar 23 00:03:57 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003