kaddressbook
imaddressbase.cpp00001 #include <kdialog.h>
00002 #include <klocale.h>
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include "imaddressbase.h"
00013
00014 #include <qvariant.h>
00015 #include <qcombobox.h>
00016 #include <qlabel.h>
00017 #include <qlineedit.h>
00018 #include <qlayout.h>
00019 #include <qtooltip.h>
00020 #include <qwhatsthis.h>
00021
00022
00023
00024
00025
00026 IMAddressBase::IMAddressBase( QWidget* parent, const char* name, WFlags fl )
00027 : QWidget( parent, name, fl )
00028 {
00029 if ( !name )
00030 setName( "IMAddressBase" );
00031 setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)5, 0, 0, sizePolicy().hasHeightForWidth() ) );
00032 IMAddressBaseLayout = new QGridLayout( this, 1, 1, 11, 6, "IMAddressBaseLayout");
00033
00034 cmbProtocol = new QComboBox( FALSE, this, "cmbProtocol" );
00035
00036 IMAddressBaseLayout->addWidget( cmbProtocol, 0, 1 );
00037
00038 labelProtocol = new QLabel( this, "labelProtocol" );
00039
00040 IMAddressBaseLayout->addWidget( labelProtocol, 0, 0 );
00041
00042 edtAddress = new QLineEdit( this, "edtAddress" );
00043
00044 IMAddressBaseLayout->addWidget( edtAddress, 1, 1 );
00045
00046 labelAddress = new QLabel( this, "labelAddress" );
00047
00048 IMAddressBaseLayout->addWidget( labelAddress, 1, 0 );
00049
00050 labelNetwork = new QLabel( this, "labelNetwork" );
00051
00052 IMAddressBaseLayout->addWidget( labelNetwork, 2, 0 );
00053
00054 edtNetwork = new QLineEdit( this, "edtNetwork" );
00055
00056 IMAddressBaseLayout->addWidget( edtNetwork, 2, 1 );
00057 languageChange();
00058 resize( QSize(208, 121).expandedTo(minimumSizeHint()) );
00059 clearWState( WState_Polished );
00060
00061
00062 setTabOrder( cmbProtocol, edtAddress );
00063
00064
00065 labelProtocol->setBuddy( cmbProtocol );
00066 labelAddress->setBuddy( edtAddress );
00067 labelNetwork->setBuddy( edtNetwork );
00068 }
00069
00070
00071
00072
00073 IMAddressBase::~IMAddressBase()
00074 {
00075
00076 }
00077
00078
00079
00080
00081
00082 void IMAddressBase::languageChange()
00083 {
00084 setCaption( tr2i18n( "Edit Address" ) );
00085 labelProtocol->setText( tr2i18n( "&Protocol:" ) );
00086 labelAddress->setText( tr2i18n( "&Address:" ) );
00087 labelNetwork->setText( tr2i18n( "&Network:" ) );
00088 }
00089
00090 void IMAddressBase::slotProtocolChanged(const QString&)
00091 {
00092 qWarning( "IMAddressBase::slotProtocolChanged(const QString&): Not implemented yet" );
00093 }
00094
00095 void IMAddressBase::slotProtocolChanged()
00096 {
00097 qWarning( "IMAddressBase::slotProtocolChanged(): Not implemented yet" );
00098 }
00099
00100 #include "imaddressbase.moc"
|