00001 #include <kdialog.h>
00002 #include <tdelocale.h>
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include "CommandDlg.h"
00013
00014 #include <ntqvariant.h>
00015 #include <ntqpushbutton.h>
00016 #include <ntqgroupbox.h>
00017 #include <ntqcombobox.h>
00018 #include <ntqlayout.h>
00019 #include <ntqtooltip.h>
00020 #include <ntqwhatsthis.h>
00021
00022
00023
00024
00025
00026
00027
00028
00029 CommandDlg::CommandDlg( TQWidget* parent, const char* name, bool modal, WFlags fl )
00030 : TQDialog( parent, name, modal, fl )
00031 {
00032 if ( !name )
00033 setName( "CommandDlg" );
00034 setSizeGripEnabled( FALSE );
00035 CommandDlgLayout = new TQGridLayout( this, 1, 1, 11, 6, "CommandDlgLayout");
00036
00037 Layout6 = new TQHBoxLayout( 0, 0, 6, "Layout6");
00038 Spacer11 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
00039 Layout6->addItem( Spacer11 );
00040
00041 m_ButtonOk = new TQPushButton( this, "m_ButtonOk" );
00042 Layout6->addWidget( m_ButtonOk );
00043
00044 m_ButtonCancel = new TQPushButton( this, "m_ButtonCancel" );
00045 Layout6->addWidget( m_ButtonCancel );
00046
00047 CommandDlgLayout->addLayout( Layout6, 1, 0 );
00048
00049 TQGroupBox_1 = new TQGroupBox( this, "TQGroupBox_1" );
00050 TQGroupBox_1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, 0, 0, TQGroupBox_1->sizePolicy().hasHeightForWidth() ) );
00051 TQGroupBox_1->setColumnLayout(0, TQt::Vertical );
00052 TQGroupBox_1->layout()->setSpacing( 6 );
00053 TQGroupBox_1->layout()->setMargin( 11 );
00054 TQGroupBox_1Layout = new TQGridLayout( TQGroupBox_1->layout() );
00055 TQGroupBox_1Layout->setAlignment( TQt::AlignTop );
00056
00057 m_ButtonAdd = new TQPushButton( TQGroupBox_1, "m_ButtonAdd" );
00058 m_ButtonAdd->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, m_ButtonAdd->sizePolicy().hasHeightForWidth() ) );
00059
00060 TQGroupBox_1Layout->addWidget( m_ButtonAdd, 1, 0 );
00061
00062 m_ButtonEdit = new TQPushButton( TQGroupBox_1, "m_ButtonEdit" );
00063 m_ButtonEdit->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, m_ButtonEdit->sizePolicy().hasHeightForWidth() ) );
00064
00065 TQGroupBox_1Layout->addWidget( m_ButtonEdit, 1, 1 );
00066
00067 m_ButtonCopy = new TQPushButton( TQGroupBox_1, "m_ButtonCopy" );
00068 m_ButtonCopy->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, m_ButtonCopy->sizePolicy().hasHeightForWidth() ) );
00069
00070 TQGroupBox_1Layout->addWidget( m_ButtonCopy, 1, 2 );
00071
00072 m_ButtonDelete = new TQPushButton( TQGroupBox_1, "m_ButtonDelete" );
00073 m_ButtonDelete->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, m_ButtonDelete->sizePolicy().hasHeightForWidth() ) );
00074
00075 TQGroupBox_1Layout->addWidget( m_ButtonDelete, 1, 3 );
00076
00077 m_ComboCommand = new TQComboBox( FALSE, TQGroupBox_1, "m_ComboCommand" );
00078 m_ComboCommand->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, m_ComboCommand->sizePolicy().hasHeightForWidth() ) );
00079 m_ComboCommand->setInsertionPolicy( TQComboBox::AtTop );
00080
00081 TQGroupBox_1Layout->addMultiCellWidget( m_ComboCommand, 0, 0, 0, 3 );
00082
00083 CommandDlgLayout->addWidget( TQGroupBox_1, 0, 0 );
00084 languageChange();
00085 resize( TQSize(378, 146).expandedTo(minimumSizeHint()) );
00086 clearWState( WState_Polished );
00087
00088
00089 connect( m_ButtonAdd, SIGNAL( clicked() ), this, SLOT( slotAdd() ) );
00090 connect( m_ButtonEdit, SIGNAL( clicked() ), this, SLOT( slotEdit() ) );
00091 connect( m_ButtonCopy, SIGNAL( clicked() ), this, SLOT( slotCopy() ) );
00092 connect( m_ButtonDelete, SIGNAL( clicked() ), this, SLOT( slotDelete() ) );
00093 connect( m_ButtonOk, SIGNAL( clicked() ), this, SLOT( slotOk() ) );
00094 connect( m_ButtonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
00095 connect( m_ComboCommand, SIGNAL( activated(int) ), this, SLOT( slotCommandActivated(int) ) );
00096
00097
00098 setTabOrder( m_ComboCommand, m_ButtonAdd );
00099 setTabOrder( m_ButtonAdd, m_ButtonEdit );
00100 setTabOrder( m_ButtonEdit, m_ButtonCopy );
00101 setTabOrder( m_ButtonCopy, m_ButtonDelete );
00102 setTabOrder( m_ButtonDelete, m_ButtonOk );
00103 setTabOrder( m_ButtonOk, m_ButtonCancel );
00104 }
00105
00106
00107
00108
00109 CommandDlg::~CommandDlg()
00110 {
00111
00112 }
00113
00114
00115
00116
00117
00118 void CommandDlg::languageChange()
00119 {
00120 setCaption( tr2i18n( "Command" ) );
00121 m_ButtonOk->setText( tr2i18n( "OK" ) );
00122 m_ButtonCancel->setText( tr2i18n( "Cancel" ) );
00123 TQGroupBox_1->setTitle( tr2i18n( "User commands" ) );
00124 m_ButtonAdd->setText( tr2i18n( "Add" ) );
00125 TQToolTip::add( m_ButtonAdd, tr2i18n( "Add user command" ) );
00126 m_ButtonEdit->setText( tr2i18n( "Edit" ) );
00127 TQToolTip::add( m_ButtonEdit, tr2i18n( "Edit user command" ) );
00128 m_ButtonCopy->setText( tr2i18n( "Copy" ) );
00129 TQToolTip::add( m_ButtonCopy, tr2i18n( "Copy user command" ) );
00130 m_ButtonDelete->setText( tr2i18n( "Delete" ) );
00131 TQToolTip::add( m_ButtonDelete, tr2i18n( "Delete user command" ) );
00132 }
00133
00134 void CommandDlg::slotCommandActivated(int)
00135 {
00136 tqWarning( "CommandDlg::slotCommandActivated(int): Not implemented yet" );
00137 }
00138
00139 void CommandDlg::slotAdd()
00140 {
00141 tqWarning( "CommandDlg::slotAdd(): Not implemented yet" );
00142 }
00143
00144 void CommandDlg::slotCopy()
00145 {
00146 tqWarning( "CommandDlg::slotCopy(): Not implemented yet" );
00147 }
00148
00149 void CommandDlg::slotDelete()
00150 {
00151 tqWarning( "CommandDlg::slotDelete(): Not implemented yet" );
00152 }
00153
00154 void CommandDlg::slotEdit()
00155 {
00156 tqWarning( "CommandDlg::slotEdit(): Not implemented yet" );
00157 }
00158
00159 void CommandDlg::slotOk()
00160 {
00161 tqWarning( "CommandDlg::slotOk(): Not implemented yet" );
00162 }
00163
00164 #include "CommandDlg.moc"