KDevelop API Documentation

parts/filecreate/fctemplateeditbase.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 './fctemplateeditbase.ui' 00005 ** 00006 ** Created: Tue Oct 19 07:50:17 2004 00007 ** by: The User Interface Compiler ($Id: qt/main.cpp 3.3.3 edited Nov 24 2003 $) 00008 ** 00009 ** WARNING! All changes made in this file will be lost! 00010 ****************************************************************************/ 00011 00012 #include "fctemplateeditbase.h" 00013 00014 #include <qvariant.h> 00015 #include <kdialog.h> 00016 #include <qpushbutton.h> 00017 #include <qlabel.h> 00018 #include <qlineedit.h> 00019 #include <kurlrequester.h> 00020 #include <qlayout.h> 00021 #include <qtooltip.h> 00022 #include <qwhatsthis.h> 00023 #include "./fctemplateeditbase.ui.h" 00024 00025 /* 00026 * Constructs a FCTemplateEditBase as a child of 'parent', with the 00027 * name 'name' and widget flags set to 'f'. 00028 * 00029 * The dialog will by default be modeless, unless you set 'modal' to 00030 * TRUE to construct a modal dialog. 00031 */ 00032 FCTemplateEditBase::FCTemplateEditBase( QWidget* parent, const char* name, bool modal, WFlags fl ) 00033 : QDialog( parent, name, modal, fl ) 00034 { 00035 if ( !name ) 00036 setName( "FCTemplateEditBase" ); 00037 FCTemplateEditBaseLayout = new QGridLayout( this, 1, 1, KDialog::marginHint(), KDialog::spacingHint(), "FCTemplateEditBaseLayout"); 00038 00039 layout5 = new QVBoxLayout( 0, 0, KDialog::spacingHint(), "layout5"); 00040 00041 textLabel1 = new QLabel( this, "textLabel1" ); 00042 textLabel1->setFrameShadow( QLabel::Plain ); 00043 textLabel1->setAlignment( int( QLabel::AlignBottom ) ); 00044 layout5->addWidget( textLabel1 ); 00045 00046 templatename_edit = new QLineEdit( this, "templatename_edit" ); 00047 layout5->addWidget( templatename_edit ); 00048 00049 FCTemplateEditBaseLayout->addLayout( layout5, 0, 0 ); 00050 00051 layout4 = new QVBoxLayout( 0, 0, KDialog::spacingHint(), "layout4"); 00052 00053 textLabel1_2 = new QLabel( this, "textLabel1_2" ); 00054 textLabel1_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)5, 0, 0, textLabel1_2->sizePolicy().hasHeightForWidth() ) ); 00055 textLabel1_2->setAlignment( int( QLabel::AlignBottom ) ); 00056 layout4->addWidget( textLabel1_2 ); 00057 00058 template_url = new KURLRequester( this, "template_url" ); 00059 template_url->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, template_url->sizePolicy().hasHeightForWidth() ) ); 00060 template_url->setMinimumSize( QSize( 0, 26 ) ); 00061 template_url->setFocusPolicy( KURLRequester::StrongFocus ); 00062 layout4->addWidget( template_url ); 00063 00064 FCTemplateEditBaseLayout->addLayout( layout4, 1, 0 ); 00065 00066 layout1 = new QHBoxLayout( 0, 0, KDialog::spacingHint(), "layout1"); 00067 spacer1 = new QSpacerItem( 40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); 00068 layout1->addItem( spacer1 ); 00069 00070 ok_button = new QPushButton( this, "ok_button" ); 00071 ok_button->setDefault( TRUE ); 00072 layout1->addWidget( ok_button ); 00073 00074 cancel_button = new QPushButton( this, "cancel_button" ); 00075 layout1->addWidget( cancel_button ); 00076 00077 FCTemplateEditBaseLayout->addLayout( layout1, 3, 0 ); 00078 languageChange(); 00079 resize( QSize(467, 149).expandedTo(minimumSizeHint()) ); 00080 clearWState( WState_Polished ); 00081 00082 // signals and slots connections 00083 connect( ok_button, SIGNAL( clicked() ), this, SLOT( accept() ) ); 00084 connect( cancel_button, SIGNAL( clicked() ), this, SLOT( reject() ) ); 00085 00086 // tab order 00087 setTabOrder( templatename_edit, template_url ); 00088 setTabOrder( template_url, ok_button ); 00089 setTabOrder( ok_button, cancel_button ); 00090 00091 // buddies 00092 textLabel1->setBuddy( templatename_edit ); 00093 textLabel1_2->setBuddy( template_url ); 00094 init(); 00095 } 00096 00097 /* 00098 * Destroys the object and frees any allocated resources 00099 */ 00100 FCTemplateEditBase::~FCTemplateEditBase() 00101 { 00102 // no need to delete child widgets, Qt does it all for us 00103 } 00104 00105 /* 00106 * Sets the strings of the subwidgets using the current 00107 * language. 00108 */ 00109 void FCTemplateEditBase::languageChange() 00110 { 00111 setCaption( tr2i18n( "File Template" ) ); 00112 textLabel1->setText( tr2i18n( "Template &name:" ) ); 00113 textLabel1_2->setText( tr2i18n( "Set template content from &file:" ) ); 00114 ok_button->setText( tr2i18n( "&OK" ) ); 00115 cancel_button->setText( tr2i18n( "&Cancel" ) ); 00116 } 00117 00118 #include "fctemplateeditbase.moc"
KDE Logo
This file is part of the documentation for KDevelop Version 3.0.4.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Oct 19 08:01:51 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003