KDevelop API Documentation

addexistingdlgbase.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 './addexistingdlgbase.ui'
00005 **
00006 ** Created: Tue Feb 22 09:12:23 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 "addexistingdlgbase.h"
00013 
00014 #include <qvariant.h>
00015 #include <ksqueezedtextlabel.h>
00016 #include <kprogress.h>
00017 #include <kdialog.h>
00018 #include <qpushbutton.h>
00019 #include <qgroupbox.h>
00020 #include <qlabel.h>
00021 #include <qsplitter.h>
00022 #include <qlayout.h>
00023 #include <qtooltip.h>
00024 #include <qwhatsthis.h>
00025 
00026 /*
00027  *  Constructs a AddExistingDlgBase as a child of 'parent', with the
00028  *  name 'name' and widget flags set to 'f'.
00029  *
00030  *  The dialog will by default be modeless, unless you set 'modal' to
00031  *  TRUE to construct a modal dialog.
00032  */
00033 AddExistingDlgBase::AddExistingDlgBase( QWidget* parent, const char* name, bool modal, WFlags fl )
00034     : QDialog( parent, name, modal, fl )
00035 {
00036     if ( !name )
00037     setName( "AddExistingDlgBase" );
00038     setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 0, sizePolicy().hasHeightForWidth() ) );
00039     AddExistingDlgBaseLayout = new QGridLayout( this, 1, 1, KDialog::marginHint(), KDialog::spacingHint(), "AddExistingDlgBaseLayout"); 
00040 
00041     layout10 = new QHBoxLayout( 0, 0, KDialog::spacingHint(), "layout10"); 
00042     buttonSpacer = new QSpacerItem( 317, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00043     layout10->addItem( buttonSpacer );
00044 
00045     okButton = new QPushButton( this, "okButton" );
00046     okButton->setDefault( TRUE );
00047     layout10->addWidget( okButton );
00048 
00049     cancelButton = new QPushButton( this, "cancelButton" );
00050     layout10->addWidget( cancelButton );
00051 
00052     AddExistingDlgBaseLayout->addLayout( layout10, 3, 0 );
00053 
00054     progressBar = new KProgress( this, "progressBar" );
00055     progressBar->setEnabled( TRUE );
00056 
00057     AddExistingDlgBaseLayout->addWidget( progressBar, 2, 0 );
00058 
00059     infoGroupBox = new QGroupBox( this, "infoGroupBox" );
00060     infoGroupBox->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, infoGroupBox->sizePolicy().hasHeightForWidth() ) );
00061     infoGroupBox->setMaximumSize( QSize( 32767, 32767 ) );
00062     infoGroupBox->setFrameShape( QGroupBox::Box );
00063     infoGroupBox->setFrameShadow( QGroupBox::Sunken );
00064     infoGroupBox->setColumnLayout(0, Qt::Vertical );
00065     infoGroupBox->layout()->setSpacing( KDialog::spacingHint() );
00066     infoGroupBox->layout()->setMargin( KDialog::marginHint() );
00067     infoGroupBoxLayout = new QHBoxLayout( infoGroupBox->layout() );
00068     infoGroupBoxLayout->setAlignment( Qt::AlignTop );
00069 
00070     infoLayout1 = new QVBoxLayout( 0, 0, KDialog::spacingHint(), "infoLayout1"); 
00071 
00072     directoryStaticLabel = new QLabel( infoGroupBox, "directoryStaticLabel" );
00073     directoryStaticLabel->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)5, 0, 0, directoryStaticLabel->sizePolicy().hasHeightForWidth() ) );
00074     QFont directoryStaticLabel_font(  directoryStaticLabel->font() );
00075     directoryStaticLabel->setFont( directoryStaticLabel_font ); 
00076     infoLayout1->addWidget( directoryStaticLabel );
00077 
00078     targetStaticLabel = new QLabel( infoGroupBox, "targetStaticLabel" );
00079     targetStaticLabel->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)5, 0, 0, targetStaticLabel->sizePolicy().hasHeightForWidth() ) );
00080     QFont targetStaticLabel_font(  targetStaticLabel->font() );
00081     targetStaticLabel->setFont( targetStaticLabel_font ); 
00082     infoLayout1->addWidget( targetStaticLabel );
00083     infoGroupBoxLayout->addLayout( infoLayout1 );
00084 
00085     infoLayout2 = new QVBoxLayout( 0, 0, KDialog::spacingHint(), "infoLayout2"); 
00086 
00087     directoryLabel = new KSqueezedTextLabel( infoGroupBox, "directoryLabel" );
00088     directoryLabel->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 0, directoryLabel->sizePolicy().hasHeightForWidth() ) );
00089     infoLayout2->addWidget( directoryLabel );
00090 
00091     targetLabel = new QLabel( infoGroupBox, "targetLabel" );
00092     infoLayout2->addWidget( targetLabel );
00093     infoGroupBoxLayout->addLayout( infoLayout2 );
00094 
00095     AddExistingDlgBaseLayout->addWidget( infoGroupBox, 0, 0 );
00096 
00097     splitter2 = new QSplitter( this, "splitter2" );
00098     splitter2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, splitter2->sizePolicy().hasHeightForWidth() ) );
00099     splitter2->setOrientation( QSplitter::Horizontal );
00100 
00101     QWidget* privateLayoutWidget = new QWidget( splitter2, "layout12" );
00102     layout12 = new QVBoxLayout( privateLayoutWidget, KDialog::marginHint(), KDialog::spacingHint(), "layout12"); 
00103 
00104     layout10_2 = new QHBoxLayout( 0, 0, KDialog::spacingHint(), "layout10_2"); 
00105     arrowSpacer1 = new QSpacerItem( 84, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00106     layout10_2->addItem( arrowSpacer1 );
00107 
00108     addAllButton = new QPushButton( privateLayoutWidget, "addAllButton" );
00109     layout10_2->addWidget( addAllButton );
00110 
00111     addSelectedButton = new QPushButton( privateLayoutWidget, "addSelectedButton" );
00112     layout10_2->addWidget( addSelectedButton );
00113     arrowSpacer2 = new QSpacerItem( 84, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00114     layout10_2->addItem( arrowSpacer2 );
00115     layout12->addLayout( layout10_2 );
00116 
00117     sourceGroupBox = new QGroupBox( privateLayoutWidget, "sourceGroupBox" );
00118     sourceGroupBox->setMinimumSize( QSize( 240, 250 ) );
00119     sourceGroupBox->setMaximumSize( QSize( 32767, 32767 ) );
00120     sourceGroupBox->setColumnLayout(0, Qt::Vertical );
00121     sourceGroupBox->layout()->setSpacing( KDialog::spacingHint() );
00122     sourceGroupBox->layout()->setMargin( KDialog::marginHint() );
00123     sourceGroupBoxLayout = new QVBoxLayout( sourceGroupBox->layout() );
00124     sourceGroupBoxLayout->setAlignment( Qt::AlignTop );
00125     layout12->addWidget( sourceGroupBox );
00126 
00127     QWidget* privateLayoutWidget_2 = new QWidget( splitter2, "layout13" );
00128     layout13 = new QVBoxLayout( privateLayoutWidget_2, KDialog::marginHint(), KDialog::spacingHint(), "layout13"); 
00129 
00130     layout11 = new QHBoxLayout( 0, 0, KDialog::spacingHint(), "layout11"); 
00131     arrowSpacer1_2 = new QSpacerItem( 21, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00132     layout11->addItem( arrowSpacer1_2 );
00133 
00134     removeAllButton = new QPushButton( privateLayoutWidget_2, "removeAllButton" );
00135     layout11->addWidget( removeAllButton );
00136 
00137     removeSelectedButton = new QPushButton( privateLayoutWidget_2, "removeSelectedButton" );
00138     layout11->addWidget( removeSelectedButton );
00139     arrowSpacer2_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00140     layout11->addItem( arrowSpacer2_2 );
00141     layout13->addLayout( layout11 );
00142 
00143     destGroupBox = new QGroupBox( privateLayoutWidget_2, "destGroupBox" );
00144     destGroupBox->setMinimumSize( QSize( 140, 100 ) );
00145     destGroupBox->setMaximumSize( QSize( 32767, 32767 ) );
00146     destGroupBox->setColumnLayout(0, Qt::Vertical );
00147     destGroupBox->layout()->setSpacing( KDialog::spacingHint() );
00148     destGroupBox->layout()->setMargin( KDialog::marginHint() );
00149     destGroupBoxLayout = new QVBoxLayout( destGroupBox->layout() );
00150     destGroupBoxLayout->setAlignment( Qt::AlignTop );
00151     layout13->addWidget( destGroupBox );
00152 
00153     AddExistingDlgBaseLayout->addWidget( splitter2, 1, 0 );
00154     languageChange();
00155     resize( QSize(592, 445).expandedTo(minimumSizeHint()) );
00156     clearWState( WState_Polished );
00157 
00158     // signals and slots connections
00159     connect( cancelButton, SIGNAL( clicked() ), this, SLOT( reject() ) );
00160 
00161     // tab order
00162     setTabOrder( addAllButton, addSelectedButton );
00163     setTabOrder( addSelectedButton, removeAllButton );
00164     setTabOrder( removeAllButton, removeSelectedButton );
00165     setTabOrder( removeSelectedButton, okButton );
00166     setTabOrder( okButton, cancelButton );
00167 }
00168 
00169 /*
00170  *  Destroys the object and frees any allocated resources
00171  */
00172 AddExistingDlgBase::~AddExistingDlgBase()
00173 {
00174     // no need to delete child widgets, Qt does it all for us
00175 }
00176 
00177 /*
00178  *  Sets the strings of the subwidgets using the current
00179  *  language.
00180  */
00181 void AddExistingDlgBase::languageChange()
00182 {
00183     setCaption( tr2i18n( "ImportExistingDlgBase" ) );
00184     okButton->setText( tr2i18n( "&OK" ) );
00185     cancelButton->setText( tr2i18n( "&Cancel" ) );
00186     infoGroupBox->setTitle( tr2i18n( "Subproject Information" ) );
00187     directoryStaticLabel->setText( tr2i18n( "Directory:" ) );
00188     targetStaticLabel->setText( tr2i18n( "Target:" ) );
00189     directoryLabel->setText( tr2i18n( "[DIRECTORY]" ) );
00190     targetLabel->setText( tr2i18n( "[TARGET]" ) );
00191     addAllButton->setText( tr2i18n( "A&dd All" ) );
00192     QToolTip::add( addAllButton, tr2i18n( "Import by creating symbolic links (recommended)" ) );
00193     addSelectedButton->setText( tr2i18n( "&Add Selected" ) );
00194     QToolTip::add( addSelectedButton, tr2i18n( "Import by copying (not recommended)" ) );
00195     sourceGroupBox->setTitle( tr2i18n( "&Source Directory" ) );
00196     QToolTip::add( sourceGroupBox, QString::null );
00197     removeAllButton->setText( tr2i18n( "R&emove All" ) );
00198     QToolTip::add( removeAllButton, tr2i18n( "Removes all added files." ) );
00199     removeSelectedButton->setText( tr2i18n( "&Remove Selected" ) );
00200     QToolTip::add( removeSelectedButton, tr2i18n( "Removes the selected files." ) );
00201     destGroupBox->setTitle( tr2i18n( "Add &Following" ) );
00202 }
00203 
00204 #include "addexistingdlgbase.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:21 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003