KDevelop API Documentation

quickopenfunctionchooseformbase.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 './quickopenfunctionchooseformbase.ui'
00005 **
00006 ** Created: Tue Feb 22 08:59:26 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 "quickopenfunctionchooseformbase.h"
00013 
00014 #include <qvariant.h>
00015 #include <ksqueezedtextlabel.h>
00016 #include <klistbox.h>
00017 #include <qlabel.h>
00018 #include <qpushbutton.h>
00019 #include <qlayout.h>
00020 #include <qtooltip.h>
00021 #include <qwhatsthis.h>
00022 
00023 /*
00024  *  Constructs a QuickOpenFunctionChooseFormBase 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 QuickOpenFunctionChooseFormBase::QuickOpenFunctionChooseFormBase( QWidget* parent, const char* name, bool modal, WFlags fl )
00031     : QDialog( parent, name, modal, fl )
00032 {
00033     if ( !name )
00034     setName( "QuickOpenFunctionChooseFormBase" );
00035 
00036     filepathlabel = new KSqueezedTextLabel( this, "filepathlabel" );
00037     filepathlabel->setGeometry( QRect( 10, 320, 585, 20 ) );
00038     filepathlabel->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, filepathlabel->sizePolicy().hasHeightForWidth() ) );
00039 
00040     argBox = new KListBox( this, "argBox" );
00041     argBox->setGeometry( QRect( 240, 40, 360, 260 ) );
00042     argBox->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, argBox->sizePolicy().hasHeightForWidth() ) );
00043 
00044     fileBox = new KListBox( this, "fileBox" );
00045     fileBox->setGeometry( QRect( 10, 40, 220, 260 ) );
00046     fileBox->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, fileBox->sizePolicy().hasHeightForWidth() ) );
00047 
00048     textLabel1 = new QLabel( this, "textLabel1" );
00049     textLabel1->setGeometry( QRect( 11, 11, 200, 20 ) );
00050 
00051     textLabel2 = new QLabel( this, "textLabel2" );
00052     textLabel2->setGeometry( QRect( 236, 11, 358, 20 ) );
00053     textLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)5, 0, 0, textLabel2->sizePolicy().hasHeightForWidth() ) );
00054 
00055     okBtn = new QPushButton( this, "okBtn" );
00056     okBtn->setGeometry( QRect( 240, 360, 175, 26 ) );
00057     okBtn->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, okBtn->sizePolicy().hasHeightForWidth() ) );
00058     okBtn->setDefault( TRUE );
00059     okBtn->setFlat( FALSE );
00060 
00061     cancelBtn = new QPushButton( this, "cancelBtn" );
00062     cancelBtn->setGeometry( QRect( 430, 360, 170, 28 ) );
00063     cancelBtn->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)5, 0, 0, cancelBtn->sizePolicy().hasHeightForWidth() ) );
00064     languageChange();
00065     resize( QSize(615, 399).expandedTo(minimumSizeHint()) );
00066     clearWState( WState_Polished );
00067 
00068     // signals and slots connections
00069     connect( okBtn, SIGNAL( clicked() ), this, SLOT( accept() ) );
00070     connect( argBox, SIGNAL( highlighted(int) ), this, SLOT( slotFileChange(int) ) );
00071     connect( fileBox, SIGNAL( highlighted(int) ), this, SLOT( slotArgsChange(int) ) );
00072     connect( argBox, SIGNAL( returnPressed(QListBoxItem*) ), this, SLOT( accept() ) );
00073     connect( argBox, SIGNAL( clicked(QListBoxItem*) ), this, SLOT( accept() ) );
00074     connect( fileBox, SIGNAL( returnPressed(QListBoxItem*) ), this, SLOT( accept() ) );
00075     connect( fileBox, SIGNAL( clicked(QListBoxItem*) ), this, SLOT( accept() ) );
00076     connect( cancelBtn, SIGNAL( clicked() ), this, SLOT( reject() ) );
00077 
00078     // tab order
00079     setTabOrder( fileBox, argBox );
00080     setTabOrder( argBox, okBtn );
00081     setTabOrder( okBtn, cancelBtn );
00082 }
00083 
00084 /*
00085  *  Destroys the object and frees any allocated resources
00086  */
00087 QuickOpenFunctionChooseFormBase::~QuickOpenFunctionChooseFormBase()
00088 {
00089     // no need to delete child widgets, Qt does it all for us
00090 }
00091 
00092 /*
00093  *  Sets the strings of the subwidgets using the current
00094  *  language.
00095  */
00096 void QuickOpenFunctionChooseFormBase::languageChange()
00097 {
00098     filepathlabel->setText( QString::null );
00099     argBox->setCurrentItem( -1 );
00100     textLabel1->setText( tr2i18n( "File name:" ) );
00101     textLabel2->setText( tr2i18n( "Function arguments list:" ) );
00102     okBtn->setText( tr2i18n( "&OK" ) );
00103     cancelBtn->setText( tr2i18n( "&Cancel" ) );
00104 }
00105 
00106 #include "quickopenfunctionchooseformbase.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 Tue Feb 22 09:22:41 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003