00001 #include <kdialog.h>
00002 #include <klocale.h>
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include "addsubprojectdlgbase.h"
00013
00014 #include <qvariant.h>
00015 #include <klineedit.h>
00016 #include <kdialog.h>
00017 #include <qpushbutton.h>
00018 #include <qgroupbox.h>
00019 #include <qlabel.h>
00020 #include <qlayout.h>
00021 #include <qtooltip.h>
00022 #include <qwhatsthis.h>
00023
00024
00025
00026
00027
00028
00029
00030
00031 AddSubprojectDlgBase::AddSubprojectDlgBase( QWidget* parent, const char* name, bool modal, WFlags fl )
00032 : QDialog( parent, name, modal, fl )
00033 {
00034 if ( !name )
00035 setName( "AddSubprojectDlgBase" );
00036 setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 0, sizePolicy().hasHeightForWidth() ) );
00037 setMaximumSize( QSize( 32767, 32767 ) );
00038 setBaseSize( QSize( 0, 0 ) );
00039 AddSubprojectDlgBaseLayout = new QGridLayout( this, 1, 1, KDialog::marginHint(), KDialog::spacingHint(), "AddSubprojectDlgBaseLayout");
00040
00041 fileGroupBox = new QGroupBox( this, "fileGroupBox" );
00042 fileGroupBox->setColumnLayout(0, Qt::Vertical );
00043 fileGroupBox->layout()->setSpacing( KDialog::spacingHint() );
00044 fileGroupBox->layout()->setMargin( KDialog::marginHint() );
00045 fileGroupBoxLayout = new QVBoxLayout( fileGroupBox->layout() );
00046 fileGroupBoxLayout->setAlignment( Qt::AlignTop );
00047
00048 Layout3 = new QHBoxLayout( 0, 0, KDialog::spacingHint(), "Layout3");
00049
00050 spStaticLabel = new QLabel( fileGroupBox, "spStaticLabel" );
00051 spStaticLabel->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)5, 0, 0, spStaticLabel->sizePolicy().hasHeightForWidth() ) );
00052 spStaticLabel->setMinimumSize( QSize( 0, 0 ) );
00053 QFont spStaticLabel_font( spStaticLabel->font() );
00054 spStaticLabel->setFont( spStaticLabel_font );
00055 Layout3->addWidget( spStaticLabel );
00056
00057 spEdit = new KLineEdit( fileGroupBox, "spEdit" );
00058 spEdit->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 0, spEdit->sizePolicy().hasHeightForWidth() ) );
00059 spEdit->setMinimumSize( QSize( 0, 0 ) );
00060 Layout3->addWidget( spEdit );
00061 fileGroupBoxLayout->addLayout( Layout3 );
00062
00063 AddSubprojectDlgBaseLayout->addWidget( fileGroupBox, 0, 0 );
00064 Spacer2 = new QSpacerItem( 20, 16, QSizePolicy::Minimum, QSizePolicy::Expanding );
00065 AddSubprojectDlgBaseLayout->addItem( Spacer2, 1, 0 );
00066
00067 buttonLayout = new QHBoxLayout( 0, 0, KDialog::spacingHint(), "buttonLayout");
00068 buttonSpacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00069 buttonLayout->addItem( buttonSpacer );
00070
00071 createButton = new QPushButton( this, "createButton" );
00072 createButton->setDefault( TRUE );
00073 buttonLayout->addWidget( createButton );
00074
00075 cancelButton = new QPushButton( this, "cancelButton" );
00076 buttonLayout->addWidget( cancelButton );
00077
00078 AddSubprojectDlgBaseLayout->addLayout( buttonLayout, 2, 0 );
00079 languageChange();
00080 resize( QSize(445, 126).expandedTo(minimumSizeHint()) );
00081 clearWState( WState_Polished );
00082
00083
00084 setTabOrder( spEdit, createButton );
00085 setTabOrder( createButton, cancelButton );
00086
00087
00088 spStaticLabel->setBuddy( spEdit );
00089 }
00090
00091
00092
00093
00094 AddSubprojectDlgBase::~AddSubprojectDlgBase()
00095 {
00096
00097 }
00098
00099
00100
00101
00102
00103 void AddSubprojectDlgBase::languageChange()
00104 {
00105 setCaption( tr2i18n( "Add New Subproject" ) );
00106 fileGroupBox->setTitle( tr2i18n( "Subproject" ) );
00107 spStaticLabel->setText( tr2i18n( "Subproject &name:" ) );
00108 createButton->setText( tr2i18n( "&OK" ) );
00109 cancelButton->setText( tr2i18n( "&Cancel" ) );
00110 }
00111
00112 #include "addsubprojectdlgbase.moc"