00001 #include <kdialog.h>
00002 #include <tdelocale.h>
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include "CommandEntryDlg.h"
00013
00014 #include <ntqvariant.h>
00015 #include <ntqgroupbox.h>
00016 #include <ntqpushbutton.h>
00017 #include <ntqcheckbox.h>
00018 #include <ntqlineedit.h>
00019 #include <ntqlayout.h>
00020 #include <ntqtooltip.h>
00021 #include <ntqwhatsthis.h>
00022
00023
00024
00025
00026
00027
00028
00029
00030 CommandEntryDlg::CommandEntryDlg( TQWidget* parent, const char* name, bool modal, WFlags fl )
00031 : TQDialog( parent, name, modal, fl )
00032 {
00033 if ( !name )
00034 setName( "CommandEntryDlg" );
00035 setSizeGripEnabled( FALSE );
00036 CommandEntryDlgLayout = new TQVBoxLayout( this, 11, 6, "CommandEntryDlgLayout");
00037
00038 TQGroupBox_1 = new TQGroupBox( this, "TQGroupBox_1" );
00039 TQGroupBox_1->setFrameShape( TQGroupBox::Box );
00040 TQGroupBox_1->setFrameShadow( TQGroupBox::Sunken );
00041 TQGroupBox_1->setColumnLayout(0, TQt::Vertical );
00042 TQGroupBox_1->layout()->setSpacing( 6 );
00043 TQGroupBox_1->layout()->setMargin( 11 );
00044 TQGroupBox_1Layout = new TQGridLayout( TQGroupBox_1->layout() );
00045 TQGroupBox_1Layout->setAlignment( TQt::AlignTop );
00046
00047 m_ButtonPath = new TQPushButton( TQGroupBox_1, "m_ButtonPath" );
00048
00049 TQGroupBox_1Layout->addWidget( m_ButtonPath, 1, 0 );
00050
00051 m_ButtonTest = new TQPushButton( TQGroupBox_1, "m_ButtonTest" );
00052
00053 TQGroupBox_1Layout->addWidget( m_ButtonTest, 0, 2 );
00054
00055 m_checkModal = new TQCheckBox( TQGroupBox_1, "m_checkModal" );
00056
00057 TQGroupBox_1Layout->addMultiCellWidget( m_checkModal, 2, 2, 1, 2 );
00058
00059 m_EditName = new TQLineEdit( TQGroupBox_1, "m_EditName" );
00060 m_EditName->setFocusPolicy( TQLineEdit::StrongFocus );
00061
00062 TQGroupBox_1Layout->addWidget( m_EditName, 0, 1 );
00063
00064 m_EditPath = new TQLineEdit( TQGroupBox_1, "m_EditPath" );
00065 m_EditPath->setFocusPolicy( TQLineEdit::StrongFocus );
00066
00067 TQGroupBox_1Layout->addMultiCellWidget( m_EditPath, 1, 1, 1, 2 );
00068 spacer3 = new TQSpacerItem( 90, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
00069 TQGroupBox_1Layout->addItem( spacer3, 2, 0 );
00070 Spacer16 = new TQSpacerItem( 150, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
00071 TQGroupBox_1Layout->addItem( Spacer16, 0, 0 );
00072 CommandEntryDlgLayout->addWidget( TQGroupBox_1 );
00073
00074 layout2 = new TQHBoxLayout( 0, 0, 6, "layout2");
00075 Spacer17 = new TQSpacerItem( 207, 16, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
00076 layout2->addItem( Spacer17 );
00077
00078 m_ButtonOk = new TQPushButton( this, "m_ButtonOk" );
00079 layout2->addWidget( m_ButtonOk );
00080
00081 m_ButtonCancel = new TQPushButton( this, "m_ButtonCancel" );
00082 layout2->addWidget( m_ButtonCancel );
00083 CommandEntryDlgLayout->addLayout( layout2 );
00084 languageChange();
00085 resize( TQSize(387, 207).expandedTo(minimumSizeHint()) );
00086 clearWState( WState_Polished );
00087
00088
00089 connect( m_ButtonTest, SIGNAL( clicked() ), this, SLOT( slotTest() ) );
00090 connect( m_ButtonPath, SIGNAL( clicked() ), this, SLOT( slotPath() ) );
00091 connect( m_ButtonOk, SIGNAL( clicked() ), this, SLOT( slotOk() ) );
00092 connect( m_ButtonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
00093
00094
00095 setTabOrder( m_EditName, m_ButtonTest );
00096 setTabOrder( m_ButtonTest, m_ButtonPath );
00097 setTabOrder( m_ButtonPath, m_EditPath );
00098 setTabOrder( m_EditPath, m_checkModal );
00099 setTabOrder( m_checkModal, m_ButtonOk );
00100 setTabOrder( m_ButtonOk, m_ButtonCancel );
00101 }
00102
00103
00104
00105
00106 CommandEntryDlg::~CommandEntryDlg()
00107 {
00108
00109 }
00110
00111
00112
00113
00114
00115 void CommandEntryDlg::languageChange()
00116 {
00117 setCaption( tr2i18n( "User command" ) );
00118 TQGroupBox_1->setTitle( tr2i18n( "Menu Entry" ) );
00119 m_ButtonPath->setText( tr2i18n( "Command:" ) );
00120 TQToolTip::add( m_ButtonPath, tr2i18n( "Press button to select command path" ) );
00121 m_ButtonTest->setText( tr2i18n( "Test" ) );
00122 TQToolTip::add( m_ButtonTest, tr2i18n( "Execute the command immediatly" ) );
00123 m_checkModal->setText( tr2i18n( "Wait for command to complete" ) );
00124 TQToolTip::add( m_EditName, tr2i18n( "Enter menu entry name" ) );
00125 TQToolTip::add( m_EditPath, tr2i18n( "<qt>Enter path to selected command and arguments<br><user>, <server>, <passwd>, <header> and <body> may be used as arguments</qt>" ) );
00126 m_ButtonOk->setText( tr2i18n( "OK" ) );
00127 m_ButtonCancel->setText( tr2i18n( "Cancel" ) );
00128 }
00129
00130 void CommandEntryDlg::slotOk()
00131 {
00132 tqWarning( "CommandEntryDlg::slotOk(): Not implemented yet" );
00133 }
00134
00135 void CommandEntryDlg::slotPath()
00136 {
00137 tqWarning( "CommandEntryDlg::slotPath(): Not implemented yet" );
00138 }
00139
00140 void CommandEntryDlg::slotTest()
00141 {
00142 tqWarning( "CommandEntryDlg::slotTest(): Not implemented yet" );
00143 }
00144
00145 #include "CommandEntryDlg.moc"