CommandEntryDlg.cpp

00001 #include <kdialog.h>
00002 #include <tdelocale.h>
00003 /****************************************************************************
00004 ** Form implementation generated from reading ui file '/home/kuddel/Daten/Documents/programmieren/kshowmail/kshowmail/kshowmail/CommandEntryDlg.ui'
00005 **
00006 ** Created: Di Mai 15 19:57:54 2007
00007 **      by: The User Interface Compiler ($Id: CommandEntryDlg_8cpp-source.html,v 1.8 2007/05/16 20:11:59 kuddel-fl Exp $)
00008 **
00009 ** WARNING! All changes made in this file will be lost!
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  *  Constructs a CommandEntryDlg as a child of 'parent', with the
00025  *  name 'name' and widget flags set to 'f'.
00026  *
00027  *  The dialog will by default be modeless, unless you set 'modal' to
00028  *  TRUE to construct a modal dialog.
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     // signals and slots connections
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     // tab order
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  *  Destroys the object and frees any allocated resources
00105  */
00106 CommandEntryDlg::~CommandEntryDlg()
00107 {
00108     // no need to delete child widgets, TQt does it all for us
00109 }
00110 
00111 /*
00112  *  Sets the strings of the subwidgets using the current
00113  *  language.
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>&lt;user&gt;, &lt;server&gt;, &lt;passwd&gt;, &lt;header&gt; and &lt;body&gt; 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"

Generated on Wed May 16 21:15:18 2007 for kshowmail by  doxygen 1.5.0