00001 #include <kdialog.h>
00002 #include <klocale.h>
00003
00004
00005
00006
00007
00008
00009
00010
00011 #include "itemAttributeDialog.h"
00012
00013 #include <qvariant.h>
00014 #include <qpushbutton.h>
00015 #include <qlabel.h>
00016 #include <qlineedit.h>
00017 #include <qdatetimeedit.h>
00018 #include <qcombobox.h>
00019 #include <qspinbox.h>
00020 #include <qslider.h>
00021 #include <qcheckbox.h>
00022 #include <qlayout.h>
00023 #include <qtooltip.h>
00024 #include <qwhatsthis.h>
00025 #include "KDGanttViewEventItem.h"
00026 #include "KDGanttViewItem.h"
00027 #include "KDGanttViewSummaryItem.h"
00028 #include "./itemAttributeDialog.ui.h"
00029
00030
00031
00032
00033
00034
00035
00036
00037 itemAttributeDialog::itemAttributeDialog( QWidget* parent, const char* name, bool modal, WFlags fl )
00038 : QDialog( parent, name, modal, fl )
00039 {
00040 if ( !name )
00041 setName( "itemAttributeDialog" );
00042 itemAttributeDialogLayout = new QVBoxLayout( this, 11, 6, "itemAttributeDialogLayout");
00043
00044 Layout4 = new QHBoxLayout( 0, 0, 6, "Layout4");
00045
00046 TextLabel1_2 = new QLabel( this, "TextLabel1_2" );
00047 Layout4->addWidget( TextLabel1_2 );
00048
00049 itemName = new QLineEdit( this, "itemName" );
00050 Layout4->addWidget( itemName );
00051 itemAttributeDialogLayout->addLayout( Layout4 );
00052 Spacer2 = new QSpacerItem( 0, 16, QSizePolicy::Minimum, QSizePolicy::Expanding );
00053 itemAttributeDialogLayout->addItem( Spacer2 );
00054
00055 Layout5 = new QGridLayout( 0, 1, 1, 0, 6, "Layout5");
00056
00057 TextLabel4 = new QLabel( this, "TextLabel4" );
00058
00059 Layout5->addWidget( TextLabel4, 1, 0 );
00060
00061 TextLabel8 = new QLabel( this, "TextLabel8" );
00062
00063 Layout5->addWidget( TextLabel8, 5, 0 );
00064
00065 TimeEdit5 = new QTimeEdit( this, "TimeEdit5" );
00066
00067 Layout5->addWidget( TimeEdit5, 4, 5 );
00068
00069 TextLabel1 = new QLabel( this, "TextLabel1" );
00070
00071 Layout5->addWidget( TextLabel1, 0, 1 );
00072
00073 TextLabel5 = new QLabel( this, "TextLabel5" );
00074
00075 Layout5->addWidget( TextLabel5, 2, 0 );
00076
00077 DateEdit1 = new QDateEdit( this, "DateEdit1" );
00078 DateEdit1->setAutoAdvance( TRUE );
00079
00080 Layout5->addWidget( DateEdit1, 3, 2 );
00081
00082 MiddleBox = new QComboBox( FALSE, this, "MiddleBox" );
00083
00084 Layout5->addWidget( MiddleBox, 1, 3 );
00085
00086 DateEdit2 = new QDateEdit( this, "DateEdit2" );
00087 DateEdit2->setAutoAdvance( TRUE );
00088
00089 Layout5->addWidget( DateEdit2, 3, 3 );
00090
00091 StartShape = new QLabel( this, "StartShape" );
00092
00093 Layout5->addWidget( StartShape, 0, 2 );
00094
00095 ChangeStart = new QPushButton( this, "ChangeStart" );
00096
00097 Layout5->addWidget( ChangeStart, 2, 2 );
00098
00099 TextLabel2 = new QLabel( this, "TextLabel2" );
00100
00101 Layout5->addWidget( TextLabel2, 0, 3 );
00102
00103 StartBox = new QComboBox( FALSE, this, "StartBox" );
00104
00105 Layout5->addWidget( StartBox, 1, 2 );
00106
00107 TextLabel3 = new QLabel( this, "TextLabel3" );
00108
00109 Layout5->addWidget( TextLabel3, 0, 4 );
00110
00111 DateEdit4 = new QDateEdit( this, "DateEdit4" );
00112
00113 Layout5->addWidget( DateEdit4, 3, 1 );
00114
00115 DateEdit3 = new QDateEdit( this, "DateEdit3" );
00116 DateEdit3->setAutoAdvance( TRUE );
00117
00118 Layout5->addWidget( DateEdit3, 3, 4 );
00119
00120 TextLabel2_2 = new QLabel( this, "TextLabel2_2" );
00121
00122 Layout5->addWidget( TextLabel2_2, 0, 5 );
00123
00124 HighMiddle = new QPushButton( this, "HighMiddle" );
00125
00126 Layout5->addWidget( HighMiddle, 5, 3 );
00127
00128 HighStart = new QPushButton( this, "HighStart" );
00129
00130 Layout5->addWidget( HighStart, 5, 2 );
00131
00132 ChangeMiddle = new QPushButton( this, "ChangeMiddle" );
00133
00134 Layout5->addWidget( ChangeMiddle, 2, 3 );
00135
00136 TimeEdit3 = new QTimeEdit( this, "TimeEdit3" );
00137 TimeEdit3->setAutoAdvance( TRUE );
00138
00139 Layout5->addWidget( TimeEdit3, 4, 4 );
00140
00141 ChangeEnd = new QPushButton( this, "ChangeEnd" );
00142
00143 Layout5->addWidget( ChangeEnd, 2, 4 );
00144
00145 TextLabel6 = new QLabel( this, "TextLabel6" );
00146
00147 Layout5->addWidget( TextLabel6, 3, 0 );
00148
00149 HighEnd = new QPushButton( this, "HighEnd" );
00150
00151 Layout5->addWidget( HighEnd, 5, 4 );
00152
00153 EndBox = new QComboBox( FALSE, this, "EndBox" );
00154
00155 Layout5->addWidget( EndBox, 1, 4 );
00156
00157 TimeEdit4 = new QTimeEdit( this, "TimeEdit4" );
00158
00159 Layout5->addWidget( TimeEdit4, 4, 1 );
00160
00161 DateEdit5 = new QDateEdit( this, "DateEdit5" );
00162
00163 Layout5->addWidget( DateEdit5, 3, 5 );
00164
00165 TimeEdit1 = new QTimeEdit( this, "TimeEdit1" );
00166 TimeEdit1->setAutoAdvance( TRUE );
00167
00168 Layout5->addWidget( TimeEdit1, 4, 2 );
00169
00170 TimeEdit2 = new QTimeEdit( this, "TimeEdit2" );
00171 TimeEdit2->setAutoAdvance( TRUE );
00172
00173 Layout5->addWidget( TimeEdit2, 4, 3 );
00174
00175 TextLabel10 = new QLabel( this, "TextLabel10" );
00176
00177 Layout5->addWidget( TextLabel10, 4, 0 );
00178 itemAttributeDialogLayout->addLayout( Layout5 );
00179 Spacer3 = new QSpacerItem( 0, 16, QSizePolicy::Minimum, QSizePolicy::Expanding );
00180 itemAttributeDialogLayout->addItem( Spacer3 );
00181
00182 Layout3 = new QHBoxLayout( 0, 0, 6, "Layout3");
00183
00184 Layout1 = new QHBoxLayout( 0, 0, 6, "Layout1");
00185
00186 TextLabel7 = new QLabel( this, "TextLabel7" );
00187 Layout1->addWidget( TextLabel7 );
00188
00189 LineEdit1 = new QLineEdit( this, "LineEdit1" );
00190 LineEdit1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, 0, 0, LineEdit1->sizePolicy().hasHeightForWidth() ) );
00191 Layout1->addWidget( LineEdit1 );
00192 Layout3->addLayout( Layout1 );
00193
00194 Layout2 = new QHBoxLayout( 0, 0, 6, "Layout2");
00195
00196 TextLabel9 = new QLabel( this, "TextLabel9" );
00197 TextLabel9->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
00198 Layout2->addWidget( TextLabel9 );
00199
00200 ChangeText = new QPushButton( this, "ChangeText" );
00201 Layout2->addWidget( ChangeText );
00202 Layout3->addLayout( Layout2 );
00203 itemAttributeDialogLayout->addLayout( Layout3 );
00204
00205 Layout8 = new QHBoxLayout( 0, 0, 6, "Layout8");
00206
00207 PrioLabel = new QLabel( this, "PrioLabel" );
00208 Layout8->addWidget( PrioLabel );
00209
00210 PrioSpinBox = new QSpinBox( this, "PrioSpinBox" );
00211 PrioSpinBox->setMaxValue( 199 );
00212 PrioSpinBox->setMinValue( 1 );
00213 Layout8->addWidget( PrioSpinBox );
00214
00215 PrioSlider = new QSlider( this, "PrioSlider" );
00216 PrioSlider->setMinValue( 1 );
00217 PrioSlider->setMaxValue( 199 );
00218 PrioSlider->setOrientation( QSlider::Horizontal );
00219 Layout8->addWidget( PrioSlider );
00220
00221 CalBox = new QCheckBox( this, "CalBox" );
00222 Layout8->addWidget( CalBox );
00223 itemAttributeDialogLayout->addLayout( Layout8 );
00224 languageChange();
00225 resize( QSize(744, 319).expandedTo(minimumSizeHint()) );
00226 clearWState( WState_Polished );
00227
00228
00229 connect( ChangeText, SIGNAL( clicked() ), this, SLOT( ChangeText_clicked() ) );
00230 connect( ChangeStart, SIGNAL( clicked() ), this, SLOT( ChangeStart_clicked() ) );
00231 connect( ChangeMiddle, SIGNAL( clicked() ), this, SLOT( ChangeMiddle_clicked() ) );
00232 connect( ChangeEnd, SIGNAL( clicked() ), this, SLOT( ChangeEnd_clicked() ) );
00233 connect( HighStart, SIGNAL( clicked() ), this, SLOT( HighStart_clicked() ) );
00234 connect( HighMiddle, SIGNAL( clicked() ), this, SLOT( HighMiddle_clicked() ) );
00235 connect( HighEnd, SIGNAL( clicked() ), this, SLOT( HighEnd_clicked() ) );
00236 connect( DateEdit1, SIGNAL( valueChanged(const QDate&) ), this, SLOT( DateEdit1_valueChanged(const QDate&) ) );
00237 connect( TimeEdit1, SIGNAL( valueChanged(const QTime&) ), this, SLOT( TimeEdit1_valueChanged(const QTime&) ) );
00238 connect( DateEdit2, SIGNAL( valueChanged(const QDate&) ), this, SLOT( DateEdit2_valueChanged(const QDate&) ) );
00239 connect( TimeEdit2, SIGNAL( valueChanged(const QTime&) ), this, SLOT( TimeEdit2_valueChanged(const QTime&) ) );
00240 connect( DateEdit3, SIGNAL( valueChanged(const QDate&) ), this, SLOT( DateEdit3_valueChanged(const QDate&) ) );
00241 connect( TimeEdit3, SIGNAL( valueChanged(const QTime&) ), this, SLOT( TimeEdit3_valueChanged(const QTime&) ) );
00242 connect( LineEdit1, SIGNAL( textChanged(const QString&) ), this, SLOT( LineEdit1_textChanged(const QString&) ) );
00243 connect( StartBox, SIGNAL( activated(const QString&) ), this, SLOT( StartBox_activated(const QString&) ) );
00244 connect( MiddleBox, SIGNAL( activated(const QString&) ), this, SLOT( MiddleBox_activated(const QString&) ) );
00245 connect( EndBox, SIGNAL( activated(const QString&) ), this, SLOT( EndBox_activated(const QString&) ) );
00246 connect( DateEdit4, SIGNAL( valueChanged(const QDate&) ), this, SLOT( DateEdit4_valueChanged(const QDate&) ) );
00247 connect( TimeEdit4, SIGNAL( valueChanged(const QTime&) ), this, SLOT( TimeEdit4_valueChanged(const QTime&) ) );
00248 connect( DateEdit5, SIGNAL( valueChanged(const QDate&) ), this, SLOT( DateEdit5_valueChanged(const QDate&) ) );
00249 connect( TimeEdit5, SIGNAL( valueChanged(const QTime&) ), this, SLOT( TimeEdit5_valueChanged(const QTime&) ) );
00250 connect( itemName, SIGNAL( textChanged(const QString&) ), this, SLOT( itemName_textChanged(const QString&) ) );
00251 connect( PrioSpinBox, SIGNAL( valueChanged(int) ), this, SLOT( PrioSpinBox_valueChanged(int) ) );
00252 connect( CalBox, SIGNAL( toggled(bool) ), this, SLOT( CalBox_toggled(bool) ) );
00253 connect( PrioSlider, SIGNAL( valueChanged(int) ), this, SLOT( PrioSlider_valueChanged(int) ) );
00254 init();
00255 }
00256
00257
00258
00259
00260 itemAttributeDialog::~itemAttributeDialog()
00261 {
00262
00263 }
00264
00265
00266
00267
00268
00269 void itemAttributeDialog::languageChange()
00270 {
00271 setCaption( tr2i18n( "Edit Item Attributes" ) );
00272 TextLabel1_2->setText( tr2i18n( "Item name:" ) );
00273 TextLabel4->setText( tr2i18n( "ShapeType:" ) );
00274 TextLabel8->setText( tr2i18n( "Highlight color:" ) );
00275 TextLabel1->setText( tr2i18n( "Lead" ) );
00276 TextLabel5->setText( tr2i18n( "ShapeColor:" ) );
00277 MiddleBox->clear();
00278 MiddleBox->insertItem( tr2i18n( "TriangleDown" ) );
00279 MiddleBox->insertItem( tr2i18n( "TriangleUp" ) );
00280 MiddleBox->insertItem( tr2i18n( "Diamond" ) );
00281 MiddleBox->insertItem( tr2i18n( "Square" ) );
00282 MiddleBox->insertItem( tr2i18n( "Circle" ) );
00283 StartShape->setText( tr2i18n( "Start" ) );
00284 ChangeStart->setText( tr2i18n( "Change" ) );
00285 TextLabel2->setText( tr2i18n( "Middle" ) );
00286 StartBox->clear();
00287 StartBox->insertItem( tr2i18n( "TriangleDown" ) );
00288 StartBox->insertItem( tr2i18n( "TriangleUp" ) );
00289 StartBox->insertItem( tr2i18n( "Diamond" ) );
00290 StartBox->insertItem( tr2i18n( "Square" ) );
00291 StartBox->insertItem( tr2i18n( "Circle" ) );
00292 TextLabel3->setText( tr2i18n( "End" ) );
00293 TextLabel2_2->setText( tr2i18n( "Actual End" ) );
00294 HighMiddle->setText( tr2i18n( "Change" ) );
00295 HighStart->setText( tr2i18n( "Change" ) );
00296 ChangeMiddle->setText( tr2i18n( "Change" ) );
00297 ChangeEnd->setText( tr2i18n( "Change" ) );
00298 TextLabel6->setText( tr2i18n( "Date:" ) );
00299 HighEnd->setText( tr2i18n( "Change" ) );
00300 EndBox->clear();
00301 EndBox->insertItem( tr2i18n( "TriangleDown" ) );
00302 EndBox->insertItem( tr2i18n( "TriangleUp" ) );
00303 EndBox->insertItem( tr2i18n( "Diamond" ) );
00304 EndBox->insertItem( tr2i18n( "Square" ) );
00305 EndBox->insertItem( tr2i18n( "Circle" ) );
00306 TextLabel10->setText( tr2i18n( "Time:" ) );
00307 TextLabel7->setText( tr2i18n( "Displayed text:" ) );
00308 TextLabel9->setText( tr2i18n( "Text color:" ) );
00309 ChangeText->setText( tr2i18n( "Change" ) );
00310 PrioLabel->setText( tr2i18n( "Priority:" ) );
00311 CalBox->setText( tr2i18n( "Display subitems as group" ) );
00312 }
00313
00314 #include "itemAttributeDialog.moc"