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