00001 #include <kdialog.h>
00002 #include <tdelocale.h>
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include "ServerDlg.h"
00013
00014 #include <tqvariant.h>
00015 #include <tqpushbutton.h>
00016 #include <tqlabel.h>
00017 #include <tqlineedit.h>
00018 #include <tqcheckbox.h>
00019 #include <tqcombobox.h>
00020 #include <tqspinbox.h>
00021 #include <tqlayout.h>
00022 #include <tqtooltip.h>
00023 #include <tqwhatsthis.h>
00024
00025
00026
00027
00028
00029
00030
00031
00032 ServerDlg::ServerDlg( TQWidget* parent, const char* name, bool modal, WFlags fl )
00033 : TQDialog( parent, name, modal, fl )
00034 {
00035 if ( !name )
00036 setName( "ServerDlg" );
00037 setSizeGripEnabled( FALSE );
00038 ServerDlgLayout = new TQGridLayout( this, 1, 1, 11, 6, "ServerDlgLayout");
00039
00040 TQLabel_4 = new TQLabel( this, "TQLabel_4" );
00041 TQLabel_4->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, TQLabel_4->sizePolicy().hasHeightForWidth() ) );
00042
00043 ServerDlgLayout->addWidget( TQLabel_4, 5, 0 );
00044
00045 m_EditAccount = new TQLineEdit( this, "m_EditAccount" );
00046 m_EditAccount->setFocusPolicy( TQLineEdit::StrongFocus );
00047
00048 ServerDlgLayout->addWidget( m_EditAccount, 0, 1 );
00049
00050 m_EditServer = new TQLineEdit( this, "m_EditServer" );
00051 m_EditServer->setFocusPolicy( TQLineEdit::StrongFocus );
00052
00053 ServerDlgLayout->addWidget( m_EditServer, 1, 1 );
00054
00055 TQLabel_3 = new TQLabel( this, "TQLabel_3" );
00056 TQLabel_3->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, TQLabel_3->sizePolicy().hasHeightForWidth() ) );
00057
00058 ServerDlgLayout->addWidget( TQLabel_3, 4, 0 );
00059
00060 CheckActive = new TQCheckBox( this, "CheckActive" );
00061
00062 ServerDlgLayout->addWidget( CheckActive, 6, 1 );
00063
00064 Layout13 = new TQHBoxLayout( 0, 0, 6, "Layout13");
00065
00066 m_ButtonOk = new TQPushButton( this, "m_ButtonOk" );
00067 m_ButtonOk->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, m_ButtonOk->sizePolicy().hasHeightForWidth() ) );
00068 Layout13->addWidget( m_ButtonOk );
00069 Spacer1 = new TQSpacerItem( 0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
00070 Layout13->addItem( Spacer1 );
00071
00072 m_ButtonCancel = new TQPushButton( this, "m_ButtonCancel" );
00073 m_ButtonCancel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, m_ButtonCancel->sizePolicy().hasHeightForWidth() ) );
00074 Layout13->addWidget( m_ButtonCancel );
00075
00076 ServerDlgLayout->addMultiCellLayout( Layout13, 7, 7, 0, 1 );
00077
00078 TQLabel_1 = new TQLabel( this, "TQLabel_1" );
00079 TQLabel_1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, TQLabel_1->sizePolicy().hasHeightForWidth() ) );
00080
00081 ServerDlgLayout->addWidget( TQLabel_1, 0, 0 );
00082
00083 TQLabel_2 = new TQLabel( this, "TQLabel_2" );
00084 TQLabel_2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, TQLabel_2->sizePolicy().hasHeightForWidth() ) );
00085
00086 ServerDlgLayout->addWidget( TQLabel_2, 1, 0 );
00087
00088 TQLabel_5 = new TQLabel( this, "TQLabel_5" );
00089 TQLabel_5->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, TQLabel_5->sizePolicy().hasHeightForWidth() ) );
00090
00091 ServerDlgLayout->addWidget( TQLabel_5, 2, 0 );
00092
00093 TQLabel_6 = new TQLabel( this, "TQLabel_6" );
00094 TQLabel_6->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, TQLabel_6->sizePolicy().hasHeightForWidth() ) );
00095
00096 ServerDlgLayout->addWidget( TQLabel_6, 3, 0 );
00097
00098 Layout15 = new TQHBoxLayout( 0, 0, 6, "Layout15");
00099
00100 m_ComboProtocol = new TQComboBox( FALSE, this, "m_ComboProtocol" );
00101 m_ComboProtocol->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, m_ComboProtocol->sizePolicy().hasHeightForWidth() ) );
00102 m_ComboProtocol->setFocusPolicy( TQComboBox::ClickFocus );
00103 m_ComboProtocol->setInsertionPolicy( TQComboBox::AtTop );
00104 Layout15->addWidget( m_ComboProtocol );
00105 Spacer11 = new TQSpacerItem( 0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
00106 Layout15->addItem( Spacer11 );
00107
00108 ServerDlgLayout->addLayout( Layout15, 2, 1 );
00109
00110 Layout14 = new TQHBoxLayout( 0, 0, 6, "Layout14");
00111
00112 m_SpinPort = new TQSpinBox( this, "m_SpinPort" );
00113 m_SpinPort->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, m_SpinPort->sizePolicy().hasHeightForWidth() ) );
00114 m_SpinPort->setFocusPolicy( TQSpinBox::ClickFocus );
00115 m_SpinPort->setMaxValue( 9999 );
00116 Layout14->addWidget( m_SpinPort );
00117 Spacer10 = new TQSpacerItem( 0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
00118 Layout14->addItem( Spacer10 );
00119
00120 ServerDlgLayout->addLayout( Layout14, 3, 1 );
00121
00122 m_EditUser = new TQLineEdit( this, "m_EditUser" );
00123 m_EditUser->setFocusPolicy( TQLineEdit::StrongFocus );
00124
00125 ServerDlgLayout->addWidget( m_EditUser, 4, 1 );
00126
00127 m_EditPassword = new TQLineEdit( this, "m_EditPassword" );
00128 m_EditPassword->setFocusPolicy( TQLineEdit::StrongFocus );
00129 m_EditPassword->setEchoMode( TQLineEdit::Password );
00130
00131 ServerDlgLayout->addWidget( m_EditPassword, 5, 1 );
00132 languageChange();
00133 resize( TQSize(246, 256).expandedTo(minimumSizeHint()) );
00134 clearWState( WState_Polished );
00135
00136
00137 connect( m_ButtonOk, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotButtonOkClicked() ) );
00138 connect( m_ButtonCancel, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
00139
00140
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
00153
00154 ServerDlg::~ServerDlg()
00155 {
00156
00157 }
00158
00159
00160
00161
00162
00163 void ServerDlg::languageChange()
00164 {
00165 setCaption( tr2i18n( "Server Options" ) );
00166 TQLabel_4->setText( tr2i18n( "Password:" ) );
00167 TQLabel_3->setText( tr2i18n( "User:" ) );
00168 CheckActive->setText( tr2i18n( "Active" ) );
00169 m_ButtonOk->setText( tr2i18n( "OK" ) );
00170 m_ButtonCancel->setText( tr2i18n( "Cancel" ) );
00171 TQLabel_1->setText( tr2i18n( "Account:" ) );
00172 TQLabel_2->setText( tr2i18n( "Server:" ) );
00173 TQLabel_5->setText( tr2i18n( "Protocol:" ) );
00174 TQLabel_6->setText( tr2i18n( "Port:" ) );
00175 }
00176
00177 void ServerDlg::slotButtonOkClicked()
00178 {
00179 tqWarning( "ServerDlg::slotButtonOkClicked(): Not implemented yet" );
00180 }
00181
00182 #include "ServerDlg.moc"