00001 #include <kdialog.h>
00002 #include <klocale.h>
00003
00004
00005
00006
00007
00008
00009
00010
00011 #include "cmdpropertiesdialog_base.h"
00012
00013 #include <qvariant.h>
00014 #include <qlineedit.h>
00015 #include <qlabel.h>
00016 #include <qcheckbox.h>
00017 #include <qheader.h>
00018 #include <qlistview.h>
00019 #include <qpushbutton.h>
00020 #include <qlayout.h>
00021 #include <qtooltip.h>
00022 #include <qwhatsthis.h>
00023
00024
00025
00026
00027
00028
00029
00030
00031 CmdPropertiesDialog_base::CmdPropertiesDialog_base( QWidget* parent, const char* name, bool modal, WFlags fl )
00032 : QDialog( parent, name, modal, fl )
00033 {
00034 if ( !name )
00035 setName( "CmdPropertiesDialog_base" );
00036 setSizeGripEnabled( TRUE );
00037 CmdPropertiesDialog_baseLayout = new QGridLayout( this, 1, 1, 11, 6, "CmdPropertiesDialog_baseLayout");
00038
00039 mNameEdit = new QLineEdit( this, "mNameEdit" );
00040
00041 CmdPropertiesDialog_baseLayout->addMultiCellWidget( mNameEdit, 0, 0, 1, 3 );
00042
00043 mStringEdit = new QLineEdit( this, "mStringEdit" );
00044
00045 CmdPropertiesDialog_baseLayout->addMultiCellWidget( mStringEdit, 1, 1, 1, 3 );
00046
00047 TextLabel1 = new QLabel( this, "TextLabel1" );
00048
00049 CmdPropertiesDialog_baseLayout->addWidget( TextLabel1, 0, 0 );
00050
00051 TextLabel2 = new QLabel( this, "TextLabel2" );
00052
00053 CmdPropertiesDialog_baseLayout->addWidget( TextLabel2, 1, 0 );
00054
00055 mHexCheck = new QCheckBox( this, "mHexCheck" );
00056
00057 CmdPropertiesDialog_baseLayout->addMultiCellWidget( mHexCheck, 3, 3, 0, 3 );
00058
00059 mParameterList = new QListView( this, "mParameterList" );
00060 mParameterList->addColumn( tr2i18n( "Position" ) );
00061 mParameterList->addColumn( tr2i18n( "Parameter" ) );
00062 mParameterList->addColumn( tr2i18n( "Value" ) );
00063
00064 CmdPropertiesDialog_baseLayout->addMultiCellWidget( mParameterList, 2, 2, 0, 3 );
00065 Horizontal_Spacing2 = new QSpacerItem( 79, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00066 CmdPropertiesDialog_baseLayout->addMultiCell( Horizontal_Spacing2, 4, 4, 0, 1 );
00067
00068 buttonOk = new QPushButton( this, "buttonOk" );
00069 buttonOk->setAutoDefault( TRUE );
00070 buttonOk->setDefault( TRUE );
00071
00072 CmdPropertiesDialog_baseLayout->addWidget( buttonOk, 4, 2 );
00073
00074 buttonCancel = new QPushButton( this, "buttonCancel" );
00075 buttonCancel->setAutoDefault( TRUE );
00076
00077 CmdPropertiesDialog_baseLayout->addWidget( buttonCancel, 4, 3 );
00078 languageChange();
00079 resize( QSize(323, 281).expandedTo(minimumSizeHint()) );
00080 clearWState( WState_Polished );
00081
00082
00083 connect( mParameterList, SIGNAL( rightButtonClicked(QListViewItem*,const QPoint&,int) ), this, SLOT( editParameterName(QListViewItem*) ) );
00084 connect( buttonOk, SIGNAL( clicked() ), this, SLOT( slotAccept() ) );
00085 connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
00086 }
00087
00088
00089
00090
00091 CmdPropertiesDialog_base::~CmdPropertiesDialog_base()
00092 {
00093
00094 }
00095
00096
00097
00098
00099
00100 void CmdPropertiesDialog_base::languageChange()
00101 {
00102 setCaption( tr2i18n( "Command Properties" ) );
00103 TextLabel1->setText( tr2i18n( "Name:" ) );
00104 TextLabel2->setText( tr2i18n( "String:" ) );
00105 mHexCheck->setText( tr2i18n( "Hex result" ) );
00106 mParameterList->header()->setLabel( 0, tr2i18n( "Position" ) );
00107 mParameterList->header()->setLabel( 1, tr2i18n( "Parameter" ) );
00108 mParameterList->header()->setLabel( 2, tr2i18n( "Value" ) );
00109 buttonOk->setText( tr2i18n( "&OK" ) );
00110 buttonCancel->setText( tr2i18n( "&Cancel" ) );
00111 }
00112
00113 void CmdPropertiesDialog_base::editParameterName(QListViewItem*)
00114 {
00115 qWarning( "CmdPropertiesDialog_base::editParameterName(QListViewItem*): Not implemented yet" );
00116 }
00117
00118 void CmdPropertiesDialog_base::slotAccept()
00119 {
00120 qWarning( "CmdPropertiesDialog_base::slotAccept(): Not implemented yet" );
00121 }
00122
00123 #include "cmdpropertiesdialog_base.moc"