KDevelop API Documentation

fctypeeditbase.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 './fctypeeditbase.ui'
00005 **
00006 ** Created: Tue Feb 22 08:54:56 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 "fctypeeditbase.h"
00013 
00014 #include <qvariant.h>
00015 #include <kdialog.h>
00016 #include <qpushbutton.h>
00017 #include <qlabel.h>
00018 #include <qlineedit.h>
00019 #include <kicondialog.h>
00020 #include <kurlrequester.h>
00021 #include <qlayout.h>
00022 #include <qtooltip.h>
00023 #include <qwhatsthis.h>
00024 #include "kicondialog.h"
00025 #include "./fctypeeditbase.ui.h"
00026 
00027 /*
00028  *  Constructs a FCTypeEditBase as a child of 'parent', with the
00029  *  name 'name' and widget flags set to 'f'.
00030  *
00031  *  The dialog will by default be modeless, unless you set 'modal' to
00032  *  TRUE to construct a modal dialog.
00033  */
00034 FCTypeEditBase::FCTypeEditBase( QWidget* parent, const char* name, bool modal, WFlags fl )
00035     : QDialog( parent, name, modal, fl )
00036 {
00037     if ( !name )
00038     setName( "FCTypeEditBase" );
00039     FCTypeEditBaseLayout = new QGridLayout( this, 1, 1, KDialog::marginHint(), KDialog::spacingHint(), "FCTypeEditBaseLayout"); 
00040 
00041     layout5 = new QVBoxLayout( 0, 0, KDialog::spacingHint(), "layout5"); 
00042 
00043     textLabel1 = new QLabel( this, "textLabel1" );
00044     textLabel1->setFrameShape( QLabel::NoFrame );
00045     textLabel1->setFrameShadow( QLabel::Plain );
00046     textLabel1->setAlignment( int( QLabel::AlignBottom ) );
00047     layout5->addWidget( textLabel1 );
00048 
00049     typeext_edit = new QLineEdit( this, "typeext_edit" );
00050     layout5->addWidget( typeext_edit );
00051 
00052     FCTypeEditBaseLayout->addLayout( layout5, 0, 0 );
00053 
00054     layout3 = new QVBoxLayout( 0, 0, KDialog::spacingHint(), "layout3"); 
00055 
00056     textLabel3 = new QLabel( this, "textLabel3" );
00057     textLabel3->setAlignment( int( QLabel::AlignBottom ) );
00058     layout3->addWidget( textLabel3 );
00059 
00060     typename_edit = new QLineEdit( this, "typename_edit" );
00061     layout3->addWidget( typename_edit );
00062 
00063     FCTypeEditBaseLayout->addLayout( layout3, 0, 1 );
00064 
00065     layout3_2 = new QVBoxLayout( 0, 0, KDialog::spacingHint(), "layout3_2"); 
00066 
00067     textLabel3_2 = new QLabel( this, "textLabel3_2" );
00068     textLabel3_2->setAlignment( int( QLabel::AlignBottom ) );
00069     layout3_2->addWidget( textLabel3_2 );
00070 
00071     typedescr_edit = new QLineEdit( this, "typedescr_edit" );
00072     layout3_2->addWidget( typedescr_edit );
00073 
00074     FCTypeEditBaseLayout->addMultiCellLayout( layout3_2, 1, 1, 0, 1 );
00075 
00076     icon_url = new KIconButton( this, "icon_url" );
00077     icon_url->setMinimumSize( QSize( 80, 80 ) );
00078     icon_url->setFocusPolicy( KIconButton::StrongFocus );
00079 
00080     FCTypeEditBaseLayout->addMultiCellWidget( icon_url, 0, 1, 2, 2 );
00081 
00082     layout4 = new QVBoxLayout( 0, 0, KDialog::spacingHint(), "layout4"); 
00083 
00084     textLabel1_2 = new QLabel( this, "textLabel1_2" );
00085     textLabel1_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)5, 0, 0, textLabel1_2->sizePolicy().hasHeightForWidth() ) );
00086     textLabel1_2->setAlignment( int( QLabel::AlignBottom ) );
00087     layout4->addWidget( textLabel1_2 );
00088 
00089     template_url = new KURLRequester( this, "template_url" );
00090     template_url->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, template_url->sizePolicy().hasHeightForWidth() ) );
00091     template_url->setMinimumSize( QSize( 0, 26 ) );
00092     template_url->setFocusPolicy( KURLRequester::StrongFocus );
00093     layout4->addWidget( template_url );
00094 
00095     FCTypeEditBaseLayout->addMultiCellLayout( layout4, 2, 2, 0, 2 );
00096 
00097     layout1 = new QHBoxLayout( 0, 0, KDialog::spacingHint(), "layout1"); 
00098     spacer1 = new QSpacerItem( 40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00099     layout1->addItem( spacer1 );
00100 
00101     ok_button = new QPushButton( this, "ok_button" );
00102     ok_button->setDefault( TRUE );
00103     layout1->addWidget( ok_button );
00104 
00105     cancel_button = new QPushButton( this, "cancel_button" );
00106     layout1->addWidget( cancel_button );
00107 
00108     FCTypeEditBaseLayout->addMultiCellLayout( layout1, 4, 4, 0, 2 );
00109     languageChange();
00110     resize( QSize(476, 194).expandedTo(minimumSizeHint()) );
00111     clearWState( WState_Polished );
00112 
00113     // signals and slots connections
00114     connect( ok_button, SIGNAL( clicked() ), this, SLOT( accept() ) );
00115     connect( cancel_button, SIGNAL( clicked() ), this, SLOT( reject() ) );
00116 
00117     // tab order
00118     setTabOrder( typeext_edit, typename_edit );
00119     setTabOrder( typename_edit, typedescr_edit );
00120     setTabOrder( typedescr_edit, icon_url );
00121     setTabOrder( icon_url, template_url );
00122     setTabOrder( template_url, ok_button );
00123     setTabOrder( ok_button, cancel_button );
00124 
00125     // buddies
00126     textLabel1->setBuddy( typename_edit );
00127     textLabel3->setBuddy( typedescr_edit );
00128     textLabel3_2->setBuddy( typedescr_edit );
00129     textLabel1_2->setBuddy( template_url );
00130     init();
00131 }
00132 
00133 /*
00134  *  Destroys the object and frees any allocated resources
00135  */
00136 FCTypeEditBase::~FCTypeEditBase()
00137 {
00138     // no need to delete child widgets, Qt does it all for us
00139 }
00140 
00141 /*
00142  *  Sets the strings of the subwidgets using the current
00143  *  language.
00144  */
00145 void FCTypeEditBase::languageChange()
00146 {
00147     setCaption( tr2i18n( "File Type" ) );
00148     textLabel1->setText( tr2i18n( "Type &extension:" ) );
00149     textLabel3->setText( tr2i18n( "Type &name:" ) );
00150     textLabel3_2->setText( tr2i18n( "Type &description:" ) );
00151     icon_url->setText( QString::null );
00152     textLabel1_2->setText( tr2i18n( "Set template content from &file:" ) );
00153     ok_button->setText( tr2i18n( "&OK" ) );
00154     cancel_button->setText( tr2i18n( "&Cancel" ) );
00155 }
00156 
00157 #include "fctypeeditbase.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:40 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003