kaddressbook

imaddressbase.cpp

00001 #include <kdialog.h>
00002 #include <klocale.h>
00003 /****************************************************************************
00004 ** Form implementation generated from reading ui file './imaddressbase.ui'
00005 **
00006 ** Created: Mon Mar 1 14:31:35 2010
00007 **
00008 ** WARNING! All changes made in this file will be lost!
00009 ****************************************************************************/
00010 
00011 #include "imaddressbase.h"
00012 
00013 #include <qvariant.h>
00014 #include <qcombobox.h>
00015 #include <qlabel.h>
00016 #include <qlineedit.h>
00017 #include <qlayout.h>
00018 #include <qtooltip.h>
00019 #include <qwhatsthis.h>
00020 
00021 /*
00022  *  Constructs a IMAddressBase as a child of 'parent', with the
00023  *  name 'name' and widget flags set to 'f'.
00024  */
00025 IMAddressBase::IMAddressBase( QWidget* parent, const char* name, WFlags fl )
00026     : QWidget( parent, name, fl )
00027 {
00028     if ( !name )
00029     setName( "IMAddressBase" );
00030     setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)5, 0, 0, sizePolicy().hasHeightForWidth() ) );
00031     IMAddressBaseLayout = new QGridLayout( this, 1, 1, 11, 6, "IMAddressBaseLayout"); 
00032 
00033     cmbProtocol = new QComboBox( FALSE, this, "cmbProtocol" );
00034 
00035     IMAddressBaseLayout->addWidget( cmbProtocol, 0, 1 );
00036 
00037     labelProtocol = new QLabel( this, "labelProtocol" );
00038 
00039     IMAddressBaseLayout->addWidget( labelProtocol, 0, 0 );
00040 
00041     edtAddress = new QLineEdit( this, "edtAddress" );
00042 
00043     IMAddressBaseLayout->addWidget( edtAddress, 1, 1 );
00044 
00045     labelAddress = new QLabel( this, "labelAddress" );
00046 
00047     IMAddressBaseLayout->addWidget( labelAddress, 1, 0 );
00048 
00049     labelNetwork = new QLabel( this, "labelNetwork" );
00050 
00051     IMAddressBaseLayout->addWidget( labelNetwork, 2, 0 );
00052 
00053     edtNetwork = new QLineEdit( this, "edtNetwork" );
00054 
00055     IMAddressBaseLayout->addWidget( edtNetwork, 2, 1 );
00056     languageChange();
00057     resize( QSize(208, 121).expandedTo(minimumSizeHint()) );
00058     clearWState( WState_Polished );
00059 
00060     // tab order
00061     setTabOrder( cmbProtocol, edtAddress );
00062 
00063     // buddies
00064     labelProtocol->setBuddy( cmbProtocol );
00065     labelAddress->setBuddy( edtAddress );
00066     labelNetwork->setBuddy( edtNetwork );
00067 }
00068 
00069 /*
00070  *  Destroys the object and frees any allocated resources
00071  */
00072 IMAddressBase::~IMAddressBase()
00073 {
00074     // no need to delete child widgets, Qt does it all for us
00075 }
00076 
00077 /*
00078  *  Sets the strings of the subwidgets using the current
00079  *  language.
00080  */
00081 void IMAddressBase::languageChange()
00082 {
00083     setCaption( tr2i18n( "Edit Address" ) );
00084     labelProtocol->setText( tr2i18n( "&Protocol:" ) );
00085     labelAddress->setText( tr2i18n( "&Address:" ) );
00086     labelNetwork->setText( tr2i18n( "&Network:" ) );
00087 }
00088 
00089 void IMAddressBase::slotProtocolChanged(const QString&)
00090 {
00091     qWarning( "IMAddressBase::slotProtocolChanged(const QString&): Not implemented yet" );
00092 }
00093 
00094 void IMAddressBase::slotProtocolChanged()
00095 {
00096     qWarning( "IMAddressBase::slotProtocolChanged(): Not implemented yet" );
00097 }
00098 
00099 #include "imaddressbase.moc"
KDE Home | KDE Accessibility Home | Description of Access Keys