kaddressbook

imeditorbase.cpp

00001 #include <kdialog.h>
00002 #include <klocale.h>
00003 /****************************************************************************
00004 ** Form implementation generated from reading ui file './imeditorbase.ui'
00005 **
00006 ** Created: Thu Mar 29 06:12:21 2007
00007 **      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.8   edited Jan 11 14:47 $)
00008 **
00009 ** WARNING! All changes made in this file will be lost!
00010 ****************************************************************************/
00011 
00012 #include "imeditorbase.h"
00013 
00014 #include <qvariant.h>
00015 #include <qpushbutton.h>
00016 #include <kpushbutton.h>
00017 #include <qheader.h>
00018 #include <klistview.h>
00019 #include <kactivelabel.h>
00020 #include <qlayout.h>
00021 #include <qtooltip.h>
00022 #include <qwhatsthis.h>
00023 #include "kpushbutton.h"
00024 #include "klistview.h"
00025 #include "kactivelabel.h"
00026 
00027 /*
00028  *  Constructs a IMEditorBase as a child of 'parent', with the
00029  *  name 'name' and widget flags set to 'f'.
00030  */
00031 IMEditorBase::IMEditorBase( QWidget* parent, const char* name, WFlags fl )
00032     : QWidget( parent, name, fl )
00033 {
00034     if ( !name )
00035     setName( "IMEditorBase" );
00036     setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)7, 0, 0, sizePolicy().hasHeightForWidth() ) );
00037     IMEditorBaseLayout = new QGridLayout( this, 1, 1, 0, KDialog::spacingHint(), "IMEditorBaseLayout"); 
00038     spacer1 = new QSpacerItem( 20, 16, QSizePolicy::Minimum, QSizePolicy::Expanding );
00039     IMEditorBaseLayout->addItem( spacer1, 4, 1 );
00040 
00041     btnSetStandard = new QPushButton( this, "btnSetStandard" );
00042 
00043     IMEditorBaseLayout->addWidget( btnSetStandard, 3, 1 );
00044 
00045     btnDelete = new KPushButton( this, "btnDelete" );
00046 
00047     IMEditorBaseLayout->addWidget( btnDelete, 2, 1 );
00048 
00049     btnEdit = new KPushButton( this, "btnEdit" );
00050 
00051     IMEditorBaseLayout->addWidget( btnEdit, 1, 1 );
00052 
00053     btnAdd = new KPushButton( this, "btnAdd" );
00054 
00055     IMEditorBaseLayout->addWidget( btnAdd, 0, 1 );
00056 
00057     lvAddresses = new KListView( this, "lvAddresses" );
00058     lvAddresses->addColumn( tr2i18n( "Protocol" ) );
00059     lvAddresses->addColumn( tr2i18n( "Address" ) );
00060     lvAddresses->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)3, 1, 0, lvAddresses->sizePolicy().hasHeightForWidth() ) );
00061     lvAddresses->setMinimumSize( QSize( 200, 28 ) );
00062     lvAddresses->setProperty( "selectionMode", "Extended" );
00063     lvAddresses->setAllColumnsShowFocus( TRUE );
00064     lvAddresses->setFullWidth( TRUE );
00065 
00066     IMEditorBaseLayout->addMultiCellWidget( lvAddresses, 0, 4, 0, 0 );
00067 
00068     lblWarning = new KActiveLabel( this, "lblWarning" );
00069     lblWarning->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, 0, 0, lblWarning->sizePolicy().hasHeightForWidth() ) );
00070 
00071     IMEditorBaseLayout->addMultiCellWidget( lblWarning, 5, 5, 0, 1 );
00072     languageChange();
00073     resize( QSize(442, 247).expandedTo(minimumSizeHint()) );
00074     clearWState( WState_Polished );
00075 }
00076 
00077 /*
00078  *  Destroys the object and frees any allocated resources
00079  */
00080 IMEditorBase::~IMEditorBase()
00081 {
00082     // no need to delete child widgets, Qt does it all for us
00083 }
00084 
00085 /*
00086  *  Sets the strings of the subwidgets using the current
00087  *  language.
00088  */
00089 void IMEditorBase::languageChange()
00090 {
00091     setCaption( tr2i18n( "IM Addresses" ) );
00092     btnSetStandard->setText( tr2i18n( "&Set Standard" ) );
00093     QToolTip::add( btnSetStandard, tr2i18n( "The IM Address that is set as the standard is the address that is shown in main editor window." ) );
00094     QWhatsThis::add( btnSetStandard, tr2i18n( "<qt>Only one IM Address can be set as the standard IM Address.<br>The standard IM Address is shown in the main editor window, and other programs may use this as hint for deciding which IM Address to show.</qt>" ) );
00095     btnDelete->setText( tr2i18n( "&Remove" ) );
00096     btnEdit->setText( tr2i18n( "&Edit..." ) );
00097     btnAdd->setText( tr2i18n( "&Add..." ) );
00098     lvAddresses->header()->setLabel( 0, tr2i18n( "Protocol" ) );
00099     lvAddresses->header()->setLabel( 1, tr2i18n( "Address" ) );
00100     lblWarning->setText( tr2i18n( "<em>Note:</em> Please read the help page before adding or editing Instant Messenging Addresses here." ) );
00101 }
00102 
00103 #include "imeditorbase.moc"
KDE Home | KDE Accessibility Home | Description of Access Keys