CommandEntryDlg.cpp

00001 #include <kdialog.h>
00002 #include <klocale.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 <qvariant.h>
00015 #include <qgroupbox.h>
00016 #include <qpushbutton.h>
00017 #include <qcheckbox.h>
00018 #include <qlineedit.h>
00019 #include <qlayout.h>
00020 #include <qtooltip.h>
00021 #include <qwhatsthis.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( QWidget* parent, const char* name, bool modal, WFlags fl )
00031     : QDialog( parent, name, modal, fl )
00032 {
00033     if ( !name )
00034        setName( "CommandEntryDlg" );
00035     setSizeGripEnabled( FALSE );
00036     CommandEntryDlgLayout = new QVBoxLayout( this, 11, 6, "CommandEntryDlgLayout"); 
00037 
00038     QGroupBox_1 = new QGroupBox( this, "QGroupBox_1" );
00039     QGroupBox_1->setFrameShape( QGroupBox::Box );
00040     QGroupBox_1->setFrameShadow( QGroupBox::Sunken );
00041     QGroupBox_1->setColumnLayout(0, Qt::Vertical );
00042     QGroupBox_1->layout()->setSpacing( 6 );
00043     QGroupBox_1->layout()->setMargin( 11 );
00044     QGroupBox_1Layout = new QGridLayout( QGroupBox_1->layout() );
00045     QGroupBox_1Layout->setAlignment( Qt::AlignTop );
00046 
00047     m_ButtonPath = new QPushButton( QGroupBox_1, "m_ButtonPath" );
00048 
00049     QGroupBox_1Layout->addWidget( m_ButtonPath, 1, 0 );
00050 
00051     m_ButtonTest = new QPushButton( QGroupBox_1, "m_ButtonTest" );
00052 
00053     QGroupBox_1Layout->addWidget( m_ButtonTest, 0, 2 );
00054 
00055     m_checkModal = new QCheckBox( QGroupBox_1, "m_checkModal" );
00056 
00057     QGroupBox_1Layout->addMultiCellWidget( m_checkModal, 2, 2, 1, 2 );
00058 
00059     m_EditName = new QLineEdit( QGroupBox_1, "m_EditName" );
00060     m_EditName->setFocusPolicy( QLineEdit::StrongFocus );
00061 
00062     QGroupBox_1Layout->addWidget( m_EditName, 0, 1 );
00063 
00064     m_EditPath = new QLineEdit( QGroupBox_1, "m_EditPath" );
00065     m_EditPath->setFocusPolicy( QLineEdit::StrongFocus );
00066 
00067     QGroupBox_1Layout->addMultiCellWidget( m_EditPath, 1, 1, 1, 2 );
00068     spacer3 = new QSpacerItem( 90, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00069     QGroupBox_1Layout->addItem( spacer3, 2, 0 );
00070     Spacer16 = new QSpacerItem( 150, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00071     QGroupBox_1Layout->addItem( Spacer16, 0, 0 );
00072     CommandEntryDlgLayout->addWidget( QGroupBox_1 );
00073 
00074     layout2 = new QHBoxLayout( 0, 0, 6, "layout2"); 
00075     Spacer17 = new QSpacerItem( 207, 16, QSizePolicy::Expanding, QSizePolicy::Minimum );
00076     layout2->addItem( Spacer17 );
00077 
00078     m_ButtonOk = new QPushButton( this, "m_ButtonOk" );
00079     layout2->addWidget( m_ButtonOk );
00080 
00081     m_ButtonCancel = new QPushButton( this, "m_ButtonCancel" );
00082     layout2->addWidget( m_ButtonCancel );
00083     CommandEntryDlgLayout->addLayout( layout2 );
00084     languageChange();
00085     resize( QSize(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, Qt 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     QGroupBox_1->setTitle( tr2i18n( "Menu Entry" ) );
00119     m_ButtonPath->setText( tr2i18n( "Command:" ) );
00120     QToolTip::add( m_ButtonPath, tr2i18n( "Press button to select command path" ) );
00121     m_ButtonTest->setText( tr2i18n( "Test" ) );
00122     QToolTip::add( m_ButtonTest, tr2i18n( "Execute the command immediatly" ) );
00123     m_checkModal->setText( tr2i18n( "Wait for command to complete" ) );
00124     QToolTip::add( m_EditName, tr2i18n( "Enter menu entry name" ) );
00125     QToolTip::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     qWarning( "CommandEntryDlg::slotOk(): Not implemented yet" );
00133 }
00134 
00135 void CommandEntryDlg::slotPath()
00136 {
00137     qWarning( "CommandEntryDlg::slotPath(): Not implemented yet" );
00138 }
00139 
00140 void CommandEntryDlg::slotTest()
00141 {
00142     qWarning( "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