kshowmail: kshowmail/ServerDlg.cpp Source File

- Main Page
- Namespaces
- Classes
- Files
- Directories

# ServerDlg.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/ServerDlg.ui'
    00005 **
    00006 ** Created: Di Mai 15 19:57:54 2007
    00007 **      by: The User Interface Compiler ($Id: ServerDlg_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 "ServerDlg.h"
    00013
    00014 #include <qvariant.h>
    00015 #include <qpushbutton.h>
    00016 #include <qlabel.h>
    00017 #include <qlineedit.h>
    00018 #include <qcheckbox.h>
    00019 #include <qcombobox.h>
    00020 #include <qspinbox.h>
    00021 #include <qlayout.h>
    00022 #include <qtooltip.h>
    00023 #include <qwhatsthis.h>
    00024
    00025 /*
    00026  *  Constructs a ServerDlg as a child of 'parent', with the
    00027  *  name 'name' and widget flags set to 'f'.
    00028  *
    00029  *  The dialog will by default be modeless, unless you set 'modal' to
    00030  *  TRUE to construct a modal dialog.
    00031  */
    00032 ServerDlg::ServerDlg( QWidget* parent, const char* name, bool modal, WFlags fl )
    00033     : QDialog( parent, name, modal, fl )
    00034 {
    00035     if ( !name )
    00036        setName( "ServerDlg" );
    00037     setSizeGripEnabled( FALSE );
    00038     ServerDlgLayout = new QGridLayout( this, 1, 1, 11, 6, "ServerDlgLayout");
    00039
    00040     QLabel_4 = new QLabel( this, "QLabel_4" );
    00041     QLabel_4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, QLabel_4->sizePolicy().hasHeightForWidth() ) );
    00042
    00043     ServerDlgLayout->addWidget( QLabel_4, 5, 0 );
    00044
    00045     m_EditAccount = new QLineEdit( this, "m_EditAccount" );
    00046     m_EditAccount->setFocusPolicy( QLineEdit::StrongFocus );
    00047
    00048     ServerDlgLayout->addWidget( m_EditAccount, 0, 1 );
    00049
    00050     m_EditServer = new QLineEdit( this, "m_EditServer" );
    00051     m_EditServer->setFocusPolicy( QLineEdit::StrongFocus );
    00052
    00053     ServerDlgLayout->addWidget( m_EditServer, 1, 1 );
    00054
    00055     QLabel_3 = new QLabel( this, "QLabel_3" );
    00056     QLabel_3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, QLabel_3->sizePolicy().hasHeightForWidth() ) );
    00057
    00058     ServerDlgLayout->addWidget( QLabel_3, 4, 0 );
    00059
    00060     CheckActive = new QCheckBox( this, "CheckActive" );
    00061
    00062     ServerDlgLayout->addWidget( CheckActive, 6, 1 );
    00063
    00064     Layout13 = new QHBoxLayout( 0, 0, 6, "Layout13");
    00065
    00066     m_ButtonOk = new QPushButton( this, "m_ButtonOk" );
    00067     m_ButtonOk->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, m_ButtonOk->sizePolicy().hasHeightForWidth() ) );
    00068     Layout13->addWidget( m_ButtonOk );
    00069     Spacer1 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
    00070     Layout13->addItem( Spacer1 );
    00071
    00072     m_ButtonCancel = new QPushButton( this, "m_ButtonCancel" );
    00073     m_ButtonCancel->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, m_ButtonCancel->sizePolicy().hasHeightForWidth() ) );
    00074     Layout13->addWidget( m_ButtonCancel );
    00075
    00076     ServerDlgLayout->addMultiCellLayout( Layout13, 7, 7, 0, 1 );
    00077
    00078     QLabel_1 = new QLabel( this, "QLabel_1" );
    00079     QLabel_1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, QLabel_1->sizePolicy().hasHeightForWidth() ) );
    00080
    00081     ServerDlgLayout->addWidget( QLabel_1, 0, 0 );
    00082
    00083     QLabel_2 = new QLabel( this, "QLabel_2" );
    00084     QLabel_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, QLabel_2->sizePolicy().hasHeightForWidth() ) );
    00085
    00086     ServerDlgLayout->addWidget( QLabel_2, 1, 0 );
    00087
    00088     QLabel_5 = new QLabel( this, "QLabel_5" );
    00089     QLabel_5->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, QLabel_5->sizePolicy().hasHeightForWidth() ) );
    00090
    00091     ServerDlgLayout->addWidget( QLabel_5, 2, 0 );
    00092
    00093     QLabel_6 = new QLabel( this, "QLabel_6" );
    00094     QLabel_6->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, QLabel_6->sizePolicy().hasHeightForWidth() ) );
    00095
    00096     ServerDlgLayout->addWidget( QLabel_6, 3, 0 );
    00097
    00098     Layout15 = new QHBoxLayout( 0, 0, 6, "Layout15");
    00099
    00100     m_ComboProtocol = new QComboBox( FALSE, this, "m_ComboProtocol" );
    00101     m_ComboProtocol->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, m_ComboProtocol->sizePolicy().hasHeightForWidth() ) );
    00102     m_ComboProtocol->setFocusPolicy( QComboBox::ClickFocus );
    00103     m_ComboProtocol->setInsertionPolicy( QComboBox::AtTop );
    00104     Layout15->addWidget( m_ComboProtocol );
    00105     Spacer11 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
    00106     Layout15->addItem( Spacer11 );
    00107
    00108     ServerDlgLayout->addLayout( Layout15, 2, 1 );
    00109
    00110     Layout14 = new QHBoxLayout( 0, 0, 6, "Layout14");
    00111
    00112     m_SpinPort = new QSpinBox( this, "m_SpinPort" );
    00113     m_SpinPort->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, m_SpinPort->sizePolicy().hasHeightForWidth() ) );
    00114     m_SpinPort->setFocusPolicy( QSpinBox::ClickFocus );
    00115     m_SpinPort->setMaxValue( 9999 );
    00116     Layout14->addWidget( m_SpinPort );
    00117     Spacer10 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
    00118     Layout14->addItem( Spacer10 );
    00119
    00120     ServerDlgLayout->addLayout( Layout14, 3, 1 );
    00121
    00122     m_EditUser = new QLineEdit( this, "m_EditUser" );
    00123     m_EditUser->setFocusPolicy( QLineEdit::StrongFocus );
    00124
    00125     ServerDlgLayout->addWidget( m_EditUser, 4, 1 );
    00126
    00127     m_EditPassword = new QLineEdit( this, "m_EditPassword" );
    00128     m_EditPassword->setFocusPolicy( QLineEdit::StrongFocus );
    00129     m_EditPassword->setEchoMode( QLineEdit::Password );
    00130
    00131     ServerDlgLayout->addWidget( m_EditPassword, 5, 1 );
    00132     languageChange();
    00133     resize( QSize(246, 256).expandedTo(minimumSizeHint()) );
    00134     clearWState( WState_Polished );
    00135
    00136     // signals and slots connections
    00137     connect( m_ButtonOk, SIGNAL( clicked() ), this, SLOT( slotButtonOkClicked() ) );
    00138     connect( m_ButtonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
    00139
    00140     // tab order
    00141     setTabOrder( m_EditAccount, m_EditServer );
    00142     setTabOrder( m_EditServer, m_EditUser );
    00143     setTabOrder( m_EditUser, m_EditPassword );
    00144     setTabOrder( m_EditPassword, m_ButtonOk );
    00145     setTabOrder( m_ButtonOk, m_ButtonCancel );
    00146     setTabOrder( m_ButtonCancel, CheckActive );
    00147     setTabOrder( CheckActive, m_ComboProtocol );
    00148     setTabOrder( m_ComboProtocol, m_SpinPort );
    00149 }
    00150
    00151 /*
    00152  *  Destroys the object and frees any allocated resources
    00153  */
    00154 ServerDlg::~ServerDlg()
    00155 {
    00156     // no need to delete child widgets, Qt does it all for us
    00157 }
    00158
    00159 /*
    00160  *  Sets the strings of the subwidgets using the current
    00161  *  language.
    00162  */
    00163 void ServerDlg::languageChange()
    00164 {
    00165     setCaption( tr2i18n( "Server Options" ) );
    00166     QLabel_4->setText( tr2i18n( "Password:" ) );
    00167     QLabel_3->setText( tr2i18n( "User:" ) );
    00168     CheckActive->setText( tr2i18n( "Active" ) );
    00169     m_ButtonOk->setText( tr2i18n( "OK" ) );
    00170     m_ButtonCancel->setText( tr2i18n( "Cancel" ) );
    00171     QLabel_1->setText( tr2i18n( "Account:" ) );
    00172     QLabel_2->setText( tr2i18n( "Server:" ) );
    00173     QLabel_5->setText( tr2i18n( "Protocol:" ) );
    00174     QLabel_6->setText( tr2i18n( "Port:" ) );
    00175 }
    00176
    00177 void ServerDlg::slotButtonOkClicked()
    00178 {
    00179     qWarning( "ServerDlg::slotButtonOkClicked(): Not implemented yet" );
    00180 }
    00181
    00182 #include "ServerDlg.moc"