00001 #include <kdialog.h>
00002 #include <klocale.h>
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include "choosetargetdlgbase.h"
00013
00014 #include <qvariant.h>
00015 #include <kdialog.h>
00016 #include <qpushbutton.h>
00017 #include <qradiobutton.h>
00018 #include <qframe.h>
00019 #include <qgroupbox.h>
00020 #include <qlabel.h>
00021 #include <kcombobox.h>
00022 #include <klistbox.h>
00023 #include <qcheckbox.h>
00024 #include <qlayout.h>
00025 #include <qtooltip.h>
00026 #include <qwhatsthis.h>
00027
00028
00029
00030
00031
00032
00033
00034
00035 ChooseTargetDlgBase::ChooseTargetDlgBase( QWidget* parent, const char* name, bool modal, WFlags fl )
00036 : QDialog( parent, name, modal, fl )
00037 {
00038 if ( !name )
00039 setName( "ChooseTargetDlgBase" );
00040 ChooseTargetDlgBaseLayout = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint(), "ChooseTargetDlgBaseLayout");
00041
00042 activeTargetRadioButton = new QRadioButton( this, "activeTargetRadioButton" );
00043 activeTargetRadioButton->setChecked( TRUE );
00044 ChooseTargetDlgBaseLayout->addWidget( activeTargetRadioButton );
00045
00046 frame5 = new QFrame( this, "frame5" );
00047 frame5->setFrameShape( QFrame::HLine );
00048 frame5->setFrameShadow( QFrame::Sunken );
00049 frame5->setLineWidth( 1 );
00050 ChooseTargetDlgBaseLayout->addWidget( frame5 );
00051
00052 chooseTargetRadioButton = new QRadioButton( this, "chooseTargetRadioButton" );
00053 ChooseTargetDlgBaseLayout->addWidget( chooseTargetRadioButton );
00054 Spacer2_2 = new QSpacerItem( 20, 16, QSizePolicy::Minimum, QSizePolicy::Fixed );
00055 ChooseTargetDlgBaseLayout->addItem( Spacer2_2 );
00056
00057 choosenTargetGroupBox = new QGroupBox( this, "choosenTargetGroupBox" );
00058 choosenTargetGroupBox->setEnabled( TRUE );
00059 choosenTargetGroupBox->setColumnLayout(0, Qt::Vertical );
00060 choosenTargetGroupBox->layout()->setSpacing( KDialog::spacingHint() );
00061 choosenTargetGroupBox->layout()->setMargin( KDialog::marginHint() );
00062 choosenTargetGroupBoxLayout = new QGridLayout( choosenTargetGroupBox->layout() );
00063 choosenTargetGroupBoxLayout->setAlignment( Qt::AlignTop );
00064
00065 targetStaticLabel = new QLabel( choosenTargetGroupBox, "targetStaticLabel" );
00066 targetStaticLabel->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 0, targetStaticLabel->sizePolicy().hasHeightForWidth() ) );
00067 QFont targetStaticLabel_font( targetStaticLabel->font() );
00068 targetStaticLabel->setFont( targetStaticLabel_font );
00069
00070 choosenTargetGroupBoxLayout->addWidget( targetStaticLabel, 2, 0 );
00071
00072 choosenTargetLabel = new QLabel( choosenTargetGroupBox, "choosenTargetLabel" );
00073 choosenTargetLabel->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)5, 0, 0, choosenTargetLabel->sizePolicy().hasHeightForWidth() ) );
00074
00075 choosenTargetGroupBoxLayout->addWidget( choosenTargetLabel, 2, 1 );
00076
00077 subprojectComboBox = new KHistoryCombo( choosenTargetGroupBox, "subprojectComboBox" );
00078 subprojectComboBox->setDuplicatesEnabled( FALSE );
00079
00080 choosenTargetGroupBoxLayout->addMultiCellWidget( subprojectComboBox, 0, 0, 0, 1 );
00081
00082 targetComboBox = new KHistoryCombo( choosenTargetGroupBox, "targetComboBox" );
00083 targetComboBox->setDuplicatesEnabled( TRUE );
00084
00085 choosenTargetGroupBoxLayout->addMultiCellWidget( targetComboBox, 1, 1, 0, 1 );
00086 ChooseTargetDlgBaseLayout->addWidget( choosenTargetGroupBox );
00087
00088 groupBox1 = new QGroupBox( this, "groupBox1" );
00089 groupBox1->setColumnLayout(0, Qt::Vertical );
00090 groupBox1->layout()->setSpacing( KDialog::spacingHint() );
00091 groupBox1->layout()->setMargin( KDialog::marginHint() );
00092 groupBox1Layout = new QVBoxLayout( groupBox1->layout() );
00093 groupBox1Layout->setAlignment( Qt::AlignTop );
00094
00095 newFilesListBox = new KListBox( groupBox1, "newFilesListBox" );
00096 newFilesListBox->setSelectionMode( KListBox::NoSelection );
00097 groupBox1Layout->addWidget( newFilesListBox );
00098
00099 textLabel1 = new QLabel( groupBox1, "textLabel1" );
00100 groupBox1Layout->addWidget( textLabel1 );
00101 ChooseTargetDlgBaseLayout->addWidget( groupBox1 );
00102
00103 neverAskAgainCheckBox = new QCheckBox( this, "neverAskAgainCheckBox" );
00104 ChooseTargetDlgBaseLayout->addWidget( neverAskAgainCheckBox );
00105 Spacer2 = new QSpacerItem( 20, 16, QSizePolicy::Minimum, QSizePolicy::Fixed );
00106 ChooseTargetDlgBaseLayout->addItem( Spacer2 );
00107
00108 buttonLayout = new QHBoxLayout( 0, 0, KDialog::spacingHint(), "buttonLayout");
00109 buttonSpacer = new QSpacerItem( 30, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00110 buttonLayout->addItem( buttonSpacer );
00111
00112 removeButton = new QPushButton( this, "removeButton" );
00113 buttonLayout->addWidget( removeButton );
00114
00115 cancelButton = new QPushButton( this, "cancelButton" );
00116 buttonLayout->addWidget( cancelButton );
00117 ChooseTargetDlgBaseLayout->addLayout( buttonLayout );
00118 languageChange();
00119 resize( QSize(556, 529).expandedTo(minimumSizeHint()) );
00120 clearWState( WState_Polished );
00121
00122
00123 connect( cancelButton, SIGNAL( clicked() ), this, SLOT( reject() ) );
00124 connect( removeButton, SIGNAL( clicked() ), this, SLOT( accept() ) );
00125
00126
00127 setTabOrder( activeTargetRadioButton, chooseTargetRadioButton );
00128 setTabOrder( chooseTargetRadioButton, subprojectComboBox );
00129 setTabOrder( subprojectComboBox, targetComboBox );
00130 setTabOrder( targetComboBox, newFilesListBox );
00131 setTabOrder( newFilesListBox, neverAskAgainCheckBox );
00132 setTabOrder( neverAskAgainCheckBox, removeButton );
00133 setTabOrder( removeButton, cancelButton );
00134 }
00135
00136
00137
00138
00139 ChooseTargetDlgBase::~ChooseTargetDlgBase()
00140 {
00141
00142 }
00143
00144
00145
00146
00147
00148 void ChooseTargetDlgBase::languageChange()
00149 {
00150 setCaption( tr2i18n( "Automake Manager - Choose Target" ) );
00151 activeTargetRadioButton->setText( tr2i18n( "Add new &files to my active target" ) );
00152 chooseTargetRadioButton->setText( tr2i18n( "Choose &another target" ) );
00153 choosenTargetGroupBox->setTitle( tr2i18n( "Choose &Target" ) );
00154 targetStaticLabel->setText( tr2i18n( "Target:" ) );
00155 choosenTargetLabel->setText( tr2i18n( "[TARGET]" ) );
00156 groupBox1->setTitle( tr2i18n( "&New Files" ) );
00157 textLabel1->setText( tr2i18n( "<b>Note:</b> If you abort your files will be created <b>but will not</b> be added to the project." ) );
00158 neverAskAgainCheckBox->setText( tr2i18n( "&Do not ask me again and use always my active target" ) );
00159 removeButton->setText( tr2i18n( "&OK" ) );
00160 cancelButton->setText( tr2i18n( "&Cancel" ) );
00161 }
00162
00163 void ChooseTargetDlgBase::slotActiveTargetToggled(bool)
00164 {
00165 qWarning( "ChooseTargetDlgBase::slotActiveTargetToggled(bool): Not implemented yet" );
00166 }
00167
00168 void ChooseTargetDlgBase::slotChooseTargetToggled(bool)
00169 {
00170 qWarning( "ChooseTargetDlgBase::slotChooseTargetToggled(bool): Not implemented yet" );
00171 }
00172
00173 void ChooseTargetDlgBase::slotSubprojectChanged(const QString&)
00174 {
00175 qWarning( "ChooseTargetDlgBase::slotSubprojectChanged(const QString&): Not implemented yet" );
00176 }
00177
00178 void ChooseTargetDlgBase::slotTargetChanged(const QString&)
00179 {
00180 qWarning( "ChooseTargetDlgBase::slotTargetChanged(const QString&): Not implemented yet" );
00181 }
00182
00183 #include "choosetargetdlgbase.moc"