kdgantt

itemAttributeDialog.cpp

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