00001
#include <kdialog.h>
00002
#include <klocale.h>
00003
00004
00005
00006
00007
00008
00009
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
00028
00029
00030
00031
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 QVBoxLayout(
this, KDialog::marginHint(), KDialog::spacingHint(),
"AddExistingDlgBaseLayout");
00040
00041
infoGroupBox =
new QGroupBox(
this,
"infoGroupBox" );
00042
infoGroupBox->setMaximumSize(
QSize( 32767, 32767 ) );
00043
infoGroupBox->setFrameShape( QGroupBox::Box );
00044
infoGroupBox->setFrameShadow( QGroupBox::Sunken );
00045
infoGroupBox->setColumnLayout(0, Qt::Vertical );
00046
infoGroupBox->layout()->setSpacing( KDialog::spacingHint() );
00047
infoGroupBox->layout()->setMargin( KDialog::marginHint() );
00048
infoGroupBoxLayout =
new QHBoxLayout(
infoGroupBox->layout() );
00049
infoGroupBoxLayout->setAlignment( Qt::AlignTop );
00050
00051
infoLayout1 =
new QVBoxLayout( 0, 0, KDialog::spacingHint(),
"infoLayout1");
00052
00053
directoryStaticLabel =
new QLabel(
infoGroupBox,
"directoryStaticLabel" );
00054
directoryStaticLabel->setSizePolicy(
QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)5, 0, 0,
directoryStaticLabel->sizePolicy().hasHeightForWidth() ) );
00055
QFont directoryStaticLabel_font(
directoryStaticLabel->font() );
00056
directoryStaticLabel->setFont( directoryStaticLabel_font );
00057
infoLayout1->addWidget(
directoryStaticLabel );
00058
00059
targetStaticLabel =
new QLabel(
infoGroupBox,
"targetStaticLabel" );
00060
targetStaticLabel->setSizePolicy(
QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)5, 0, 0,
targetStaticLabel->sizePolicy().hasHeightForWidth() ) );
00061
QFont targetStaticLabel_font(
targetStaticLabel->font() );
00062
targetStaticLabel->setFont( targetStaticLabel_font );
00063
infoLayout1->addWidget(
targetStaticLabel );
00064
infoGroupBoxLayout->addLayout(
infoLayout1 );
00065
00066
infoLayout2 =
new QVBoxLayout( 0, 0, KDialog::spacingHint(),
"infoLayout2");
00067
00068
directoryLabel =
new KSqueezedTextLabel(
infoGroupBox,
"directoryLabel" );
00069
directoryLabel->setSizePolicy(
QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 0,
directoryLabel->sizePolicy().hasHeightForWidth() ) );
00070
infoLayout2->addWidget(
directoryLabel );
00071
00072
targetLabel =
new QLabel(
infoGroupBox,
"targetLabel" );
00073
infoLayout2->addWidget(
targetLabel );
00074
infoGroupBoxLayout->addLayout(
infoLayout2 );
00075
AddExistingDlgBaseLayout->addWidget(
infoGroupBox );
00076
00077
Splitter2 =
new QSplitter(
this,
"Splitter2" );
00078
Splitter2->setOrientation( QSplitter::Vertical );
00079
00080
QWidget* privateLayoutWidget =
new QWidget(
Splitter2,
"Layout11" );
00081
Layout11 =
new QHBoxLayout( privateLayoutWidget, 0, KDialog::spacingHint(),
"Layout11");
00082
00083
sourceGroupBox =
new QGroupBox( privateLayoutWidget,
"sourceGroupBox" );
00084
sourceGroupBox->setMinimumSize(
QSize( 240, 250 ) );
00085
sourceGroupBox->setMaximumSize(
QSize( 32767, 32767 ) );
00086
sourceGroupBox->setColumnLayout(0, Qt::Vertical );
00087
sourceGroupBox->layout()->setSpacing( KDialog::spacingHint() );
00088
sourceGroupBox->layout()->setMargin( KDialog::marginHint() );
00089
sourceGroupBoxLayout =
new QVBoxLayout(
sourceGroupBox->layout() );
00090
sourceGroupBoxLayout->setAlignment( Qt::AlignTop );
00091
Layout11->addWidget(
sourceGroupBox );
00092
00093
Layout10 =
new QVBoxLayout( 0, 0, KDialog::spacingHint(),
"Layout10");
00094
arrowSpacer1 =
new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
00095
Layout10->addItem(
arrowSpacer1 );
00096
00097
addAllButton =
new QPushButton( privateLayoutWidget,
"addAllButton" );
00098
Layout10->addWidget(
addAllButton );
00099
00100
addSelectedButton =
new QPushButton( privateLayoutWidget,
"addSelectedButton" );
00101
Layout10->addWidget(
addSelectedButton );
00102
arrowSpacer2 =
new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
00103
Layout10->addItem(
arrowSpacer2 );
00104
Layout11->addLayout(
Layout10 );
00105
00106 QWidget* privateLayoutWidget_2 =
new QWidget(
Splitter2,
"Layout13" );
00107
Layout13 =
new QHBoxLayout( privateLayoutWidget_2, 0, KDialog::spacingHint(),
"Layout13");
00108
00109
Layout9 =
new QVBoxLayout( 0, 0, KDialog::spacingHint(),
"Layout9");
00110
00111
Layout8 =
new QHBoxLayout( 0, 0, KDialog::spacingHint(),
"Layout8");
00112
00113
destStaticLabel =
new QLabel( privateLayoutWidget_2,
"destStaticLabel" );
00114
QFont destStaticLabel_font(
destStaticLabel->font() );
00115
destStaticLabel->setFont( destStaticLabel_font );
00116
Layout8->addWidget(
destStaticLabel );
00117
00118
destLabel =
new KSqueezedTextLabel( privateLayoutWidget_2,
"destLabel" );
00119
Layout8->addWidget(
destLabel );
00120
Layout9->addLayout(
Layout8 );
00121
00122
destGroupBox =
new QGroupBox( privateLayoutWidget_2,
"destGroupBox" );
00123
destGroupBox->setMinimumSize(
QSize( 140, 100 ) );
00124
destGroupBox->setMaximumSize(
QSize( 32767, 32767 ) );
00125
destGroupBox->setColumnLayout(0, Qt::Vertical );
00126
destGroupBox->layout()->setSpacing( KDialog::spacingHint() );
00127
destGroupBox->layout()->setMargin( KDialog::marginHint() );
00128
destGroupBoxLayout =
new QVBoxLayout(
destGroupBox->layout() );
00129
destGroupBoxLayout->setAlignment( Qt::AlignTop );
00130
Layout9->addWidget(
destGroupBox );
00131
Layout13->addLayout(
Layout9 );
00132
00133
Layout10_2 =
new QVBoxLayout( 0, 0, KDialog::spacingHint(),
"Layout10_2");
00134
arrowSpacer1_2 =
new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
00135
Layout10_2->addItem(
arrowSpacer1_2 );
00136
00137
removeAllButton =
new QPushButton( privateLayoutWidget_2,
"removeAllButton" );
00138
Layout10_2->addWidget(
removeAllButton );
00139
00140
removeSelectedButton =
new QPushButton( privateLayoutWidget_2,
"removeSelectedButton" );
00141
Layout10_2->addWidget(
removeSelectedButton );
00142
arrowSpacer2_2 =
new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
00143
Layout10_2->addItem(
arrowSpacer2_2 );
00144
Layout13->addLayout(
Layout10_2 );
00145
AddExistingDlgBaseLayout->addWidget(
Splitter2 );
00146
00147
progressBar =
new KProgress(
this,
"progressBar" );
00148
progressBar->setEnabled( TRUE );
00149
AddExistingDlgBaseLayout->addWidget(
progressBar );
00150
00151
layout10 =
new QHBoxLayout( 0, 0, KDialog::spacingHint(),
"layout10");
00152
buttonSpacer =
new QSpacerItem( 317, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00153
layout10->addItem(
buttonSpacer );
00154
00155
okButton =
new QPushButton(
this,
"okButton" );
00156
okButton->setDefault( TRUE );
00157
layout10->addWidget(
okButton );
00158
00159
cancelButton =
new QPushButton(
this,
"cancelButton" );
00160
layout10->addWidget(
cancelButton );
00161
AddExistingDlgBaseLayout->addLayout(
layout10 );
00162
languageChange();
00163 resize(
QSize(497, 566).expandedTo(minimumSizeHint()) );
00164 clearWState( WState_Polished );
00165
00166
00167 connect(
cancelButton, SIGNAL( clicked() ),
this, SLOT( reject() ) );
00168
00169
00170 setTabOrder(
addAllButton,
addSelectedButton );
00171 setTabOrder(
addSelectedButton,
removeAllButton );
00172 setTabOrder(
removeAllButton,
removeSelectedButton );
00173 setTabOrder(
removeSelectedButton,
okButton );
00174 setTabOrder(
okButton,
cancelButton );
00175 }
00176
00177
00178
00179
00180 AddExistingDlgBase::~AddExistingDlgBase()
00181 {
00182
00183 }
00184
00185
00186
00187
00188
00189 void AddExistingDlgBase::languageChange()
00190 {
00191 setCaption( tr2i18n(
"ImportExistingDlgBase" ) );
00192
infoGroupBox->setTitle( tr2i18n(
"Subproject Information" ) );
00193
directoryStaticLabel->setText( tr2i18n(
"Directory:" ) );
00194
targetStaticLabel->setText( tr2i18n(
"Target:" ) );
00195
directoryLabel->
setText( tr2i18n(
"[DIRECTORY]" ) );
00196
targetLabel->setText( tr2i18n(
"[TARGET]" ) );
00197
sourceGroupBox->setTitle( tr2i18n(
"&Source Directory" ) );
00198 QToolTip::add(
sourceGroupBox, QString::null );
00199
addAllButton->setText( tr2i18n(
"A&dd All" ) );
00200 QToolTip::add(
addAllButton, tr2i18n(
"Import by creating symbolic links (recommended)" ) );
00201
addSelectedButton->setText( tr2i18n(
"&Add Selected" ) );
00202 QToolTip::add(
addSelectedButton, tr2i18n(
"Import by copying (not recommended)" ) );
00203
destStaticLabel->setText( tr2i18n(
"[INFO]" ) );
00204
destLabel->
setText( tr2i18n(
"[DESTINATION]" ) );
00205
destGroupBox->setTitle( tr2i18n(
"Add &Following" ) );
00206
removeAllButton->setText( tr2i18n(
"R&emove All" ) );
00207 QToolTip::add(
removeAllButton, tr2i18n(
"Removes all added files." ) );
00208
removeSelectedButton->setText( tr2i18n(
"&Remove Selected" ) );
00209 QToolTip::add(
removeSelectedButton, tr2i18n(
"Removes the selected files." ) );
00210
okButton->setText( tr2i18n(
"&OK" ) );
00211
cancelButton->setText( tr2i18n(
"&Cancel" ) );
00212 }
00213
00214
#include "addexistingdlgbase.moc"