00001
#include <kdialog.h>
00002
#include <klocale.h>
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
#include "importdlgbase.h"
00013
00014
#include <qvariant.h>
00015
#include <kdialog.h>
00016
#include <qlabel.h>
00017
#include <qcombobox.h>
00018
#include <qpushbutton.h>
00019
#include <qlineedit.h>
00020
#include <qframe.h>
00021
#include <kurlrequester.h>
00022
#include <qlayout.h>
00023
#include <qtooltip.h>
00024
#include <qwhatsthis.h>
00025
00026
00027
00028
00029
00030
00031
00032
00033 ImportDialogBase::ImportDialogBase(
QWidget* parent,
const char* name,
bool modal, WFlags fl )
00034 :
QDialog( parent, name, modal, fl )
00035 {
00036
if ( !name )
00037 setName(
"import_dialog" );
00038
import_dialogLayout =
new QGridLayout(
this, 1, 1, KDialog::marginHint(), KDialog::spacingHint(),
"import_dialogLayout");
00039
00040
dir_label =
new QLabel(
this,
"dir_label" );
00041
00042
import_dialogLayout->addWidget(
dir_label, 0, 0 );
00043
00044
vcsCombo =
new QComboBox( FALSE,
this,
"vcsCombo" );
00045
vcsCombo->setSizePolicy(
QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, 0, 0,
vcsCombo->sizePolicy().hasHeightForWidth() ) );
00046
00047
import_dialogLayout->addWidget(
vcsCombo, 1, 1 );
00048
00049
fetchModuleButton =
new QPushButton(
this,
"fetchModuleButton" );
00050
fetchModuleButton->setSizePolicy(
QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0,
fetchModuleButton->sizePolicy().hasHeightForWidth() ) );
00051
fetchModuleButton->setAutoDefault( FALSE );
00052
00053
import_dialogLayout->addWidget(
fetchModuleButton, 1, 2 );
00054
00055
textLabel1 =
new QLabel(
this,
"textLabel1" );
00056
00057
import_dialogLayout->addWidget(
textLabel1, 1, 0 );
00058
00059
name_label =
new QLabel(
this,
"name_label" );
00060
00061
import_dialogLayout->addWidget(
name_label, 2, 0 );
00062
00063
name_edit =
new QLineEdit(
this,
"name_edit" );
00064
name_edit->setSizePolicy(
QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, 1, 0,
name_edit->sizePolicy().hasHeightForWidth() ) );
00065
00066
import_dialogLayout->addMultiCellWidget(
name_edit, 2, 2, 1, 2 );
00067
Spacer1 =
new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Minimum );
00068
import_dialogLayout->addItem(
Spacer1, 4, 2 );
00069
00070
author_edit =
new QLineEdit(
this,
"author_edit" );
00071
author_edit->setSizePolicy(
QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, 1, 0,
author_edit->sizePolicy().hasHeightForWidth() ) );
00072
00073
import_dialogLayout->addMultiCellWidget(
author_edit, 5, 5, 1, 2 );
00074
00075
author_label =
new QLabel(
this,
"author_label" );
00076
00077
import_dialogLayout->addWidget(
author_label, 5, 0 );
00078
00079
TextLabel5 =
new QLabel(
this,
"TextLabel5" );
00080
00081
import_dialogLayout->addWidget(
TextLabel5, 6, 0 );
00082
00083
Layout1 =
new QHBoxLayout( 0, 0, KDialog::spacingHint(),
"Layout1");
00084
Spacer3 =
new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00085
Layout1->addItem(
Spacer3 );
00086
00087
ok_button =
new QPushButton(
this,
"ok_button" );
00088
ok_button->setDefault( TRUE );
00089
Layout1->addWidget(
ok_button );
00090
00091
cancel_button =
new QPushButton(
this,
"cancel_button" );
00092
Layout1->addWidget(
cancel_button );
00093
00094
import_dialogLayout->addMultiCellLayout(
Layout1, 9, 9, 0, 2 );
00095
00096
email_edit =
new QLineEdit(
this,
"email_edit" );
00097
email_edit->setSizePolicy(
QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, 1, 0,
email_edit->sizePolicy().hasHeightForWidth() ) );
00098
00099
import_dialogLayout->addMultiCellWidget(
email_edit, 6, 6, 1, 2 );
00100
00101
project_combo =
new QComboBox( FALSE,
this,
"project_combo" );
00102
project_combo->setSizePolicy(
QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, 1, 0,
project_combo->sizePolicy().hasHeightForWidth() ) );
00103
00104
import_dialogLayout->addMultiCellWidget(
project_combo, 3, 3, 1, 2 );
00105
00106
project_label =
new QLabel(
this,
"project_label" );
00107
00108
import_dialogLayout->addWidget(
project_label, 3, 0 );
00109
Spacer2 =
new QSpacerItem( 20, 52, QSizePolicy::Minimum, QSizePolicy::Expanding );
00110
import_dialogLayout->addItem(
Spacer2, 7, 2 );
00111
00112
line1 =
new QFrame(
this,
"line1" );
00113
line1->setFrameShape( QFrame::HLine );
00114
line1->setFrameShadow( QFrame::Sunken );
00115
line1->setFrameShape( QFrame::HLine );
00116
00117
import_dialogLayout->addMultiCellWidget(
line1, 8, 8, 0, 2 );
00118
00119
urlinput_edit =
new KURLRequester(
this,
"urlinput_edit" );
00120
00121
import_dialogLayout->addMultiCellWidget(
urlinput_edit, 0, 0, 1, 2 );
00122
languageChange();
00123 resize(
QSize(437, 280).expandedTo(minimumSizeHint()) );
00124 clearWState( WState_Polished );
00125
00126
00127 connect(
ok_button, SIGNAL( clicked() ),
this, SLOT( accept() ) );
00128 connect(
cancel_button, SIGNAL( clicked() ),
this, SLOT( reject() ) );
00129
00130
00131 setTabOrder(
urlinput_edit,
vcsCombo );
00132 setTabOrder(
vcsCombo,
fetchModuleButton );
00133 setTabOrder(
fetchModuleButton,
name_edit );
00134 setTabOrder(
name_edit,
project_combo );
00135 setTabOrder(
project_combo,
author_edit );
00136 setTabOrder(
author_edit,
email_edit );
00137 setTabOrder(
email_edit,
ok_button );
00138 setTabOrder(
ok_button,
cancel_button );
00139
00140
00141
dir_label->setBuddy(
urlinput_edit );
00142
textLabel1->setBuddy(
vcsCombo );
00143
name_label->setBuddy(
name_edit );
00144
author_label->setBuddy(
author_edit );
00145
TextLabel5->setBuddy(
email_edit );
00146
project_label->setBuddy(
project_combo );
00147 }
00148
00149
00150
00151
00152 ImportDialogBase::~ImportDialogBase()
00153 {
00154
00155 }
00156
00157
00158
00159
00160
00161 void ImportDialogBase::languageChange()
00162 {
00163 setCaption( tr2i18n(
"Import Existing Project" ) );
00164
dir_label->setText( tr2i18n(
"&Directory:" ) );
00165
fetchModuleButton->setText( tr2i18n(
"Fetch &Module" ) );
00166
textLabel1->setText( tr2i18n(
"&Fetch from:" ) );
00167
name_label->setText( tr2i18n(
"Project &name:" ) );
00168
author_label->setText( tr2i18n(
"&Author:" ) );
00169
TextLabel5->setText( tr2i18n(
"&Email:" ) );
00170
ok_button->setText( tr2i18n(
"&OK" ) );
00171
cancel_button->setText( tr2i18n(
"&Cancel" ) );
00172
project_label->setText( tr2i18n(
"&Project type:" ) );
00173 }
00174
00175 void ImportDialogBase::dirButtonClicked()
00176 {
00177 qWarning(
"ImportDialogBase::dirButtonClicked(): Not implemented yet" );
00178 }
00179
00180 void ImportDialogBase::dirChanged()
00181 {
00182 qWarning(
"ImportDialogBase::dirChanged(): Not implemented yet" );
00183 }
00184
00185
#include "importdlgbase.moc"