korganizer

publishdialog_base.cpp

00001 #include <kdialog.h>
00002 #include <klocale.h>
00003 /****************************************************************************
00004 ** Form implementation generated from reading ui file './publishdialog_base.ui'
00005 **
00006 ** Created: Wed Jun 13 16:09:02 2012
00007 **
00008 ** WARNING! All changes made in this file will be lost!
00009 ****************************************************************************/
00010 
00011 #include "publishdialog_base.h"
00012 
00013 #include <qvariant.h>
00014 #include <qheader.h>
00015 #include <qlistview.h>
00016 #include <qlabel.h>
00017 #include <qlineedit.h>
00018 #include <qpushbutton.h>
00019 #include <qlayout.h>
00020 #include <qtooltip.h>
00021 #include <qwhatsthis.h>
00022 
00023 /*
00024  *  Constructs a PublishDialog_base as a child of 'parent', with the
00025  *  name 'name' and widget flags set to 'f'.
00026  */
00027 PublishDialog_base::PublishDialog_base( QWidget* parent, const char* name, WFlags fl )
00028     : QWidget( parent, name, fl )
00029 {
00030     if ( !name )
00031     setName( "PublishDialog_base" );
00032     PublishDialog_baseLayout = new QGridLayout( this, 1, 1, 0, 6, "PublishDialog_baseLayout"); 
00033 
00034     mAddressListView = new QListView( this, "mAddressListView" );
00035     mAddressListView->addColumn( tr2i18n( "Name" ) );
00036     mAddressListView->addColumn( tr2i18n( "Email" ) );
00037 
00038     PublishDialog_baseLayout->addMultiCellWidget( mAddressListView, 0, 3, 0, 1 );
00039 
00040     TextLabel1 = new QLabel( this, "TextLabel1" );
00041 
00042     PublishDialog_baseLayout->addWidget( TextLabel1, 4, 0 );
00043 
00044     TextLabel2 = new QLabel( this, "TextLabel2" );
00045 
00046     PublishDialog_baseLayout->addWidget( TextLabel2, 5, 0 );
00047 
00048     mEmailLineEdit = new QLineEdit( this, "mEmailLineEdit" );
00049 
00050     PublishDialog_baseLayout->addWidget( mEmailLineEdit, 5, 1 );
00051 
00052     mNameLineEdit = new QLineEdit( this, "mNameLineEdit" );
00053 
00054     PublishDialog_baseLayout->addWidget( mNameLineEdit, 4, 1 );
00055 
00056     mNew = new QPushButton( this, "mNew" );
00057 
00058     PublishDialog_baseLayout->addWidget( mNew, 0, 2 );
00059 
00060     mSelectAddressee = new QPushButton( this, "mSelectAddressee" );
00061 
00062     PublishDialog_baseLayout->addWidget( mSelectAddressee, 2, 2 );
00063 
00064     mRemove = new QPushButton( this, "mRemove" );
00065 
00066     PublishDialog_baseLayout->addWidget( mRemove, 1, 2 );
00067     spacer102 = new QSpacerItem( 20, 241, QSizePolicy::Minimum, QSizePolicy::Expanding );
00068     PublishDialog_baseLayout->addMultiCell( spacer102, 3, 5, 2, 2 );
00069     languageChange();
00070     resize( QSize(420, 379).expandedTo(minimumSizeHint()) );
00071     clearWState( WState_Polished );
00072 
00073     // tab order
00074     setTabOrder( mAddressListView, mNameLineEdit );
00075     setTabOrder( mNameLineEdit, mEmailLineEdit );
00076     setTabOrder( mEmailLineEdit, mNew );
00077     setTabOrder( mNew, mRemove );
00078     setTabOrder( mRemove, mSelectAddressee );
00079 }
00080 
00081 /*
00082  *  Destroys the object and frees any allocated resources
00083  */
00084 PublishDialog_base::~PublishDialog_base()
00085 {
00086     // no need to delete child widgets, Qt does it all for us
00087 }
00088 
00089 /*
00090  *  Sets the strings of the subwidgets using the current
00091  *  language.
00092  */
00093 void PublishDialog_base::languageChange()
00094 {
00095     mAddressListView->header()->setLabel( 0, tr2i18n( "Name" ) );
00096     mAddressListView->header()->setLabel( 1, tr2i18n( "Email" ) );
00097     TextLabel1->setText( tr2i18n( "Name:" ) );
00098     TextLabel2->setText( tr2i18n( "Email:" ) );
00099     mEmailLineEdit->setText( QString::null );
00100     mNew->setText( tr2i18n( "&New" ) );
00101     mSelectAddressee->setText( tr2i18n( "Select &Addressee..." ) );
00102     mRemove->setText( tr2i18n( "&Remove" ) );
00103 }
00104 
00105 #include "publishdialog_base.moc"
KDE Home | KDE Accessibility Home | Description of Access Keys