libkdepim

addresspicker.cpp

00001 #include <kdialog.h>
00002 #include <klocale.h>
00003 /****************************************************************************
00004 ** Form implementation generated from reading ui file './addresspicker.ui'
00005 **
00006 ** Created: Thu Oct 1 16:13:35 2009
00007 **      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.7   edited Aug 31 2005 $)
00008 **
00009 ** WARNING! All changes made in this file will be lost!
00010 ****************************************************************************/
00011 
00012 #include "addresspicker.h"
00013 
00014 #include <qvariant.h>
00015 #include <qheader.h>
00016 #include <klistview.h>
00017 #include <kpushbutton.h>
00018 #include <qlabel.h>
00019 #include <qlineedit.h>
00020 #include <qpushbutton.h>
00021 #include <qlayout.h>
00022 #include <qtooltip.h>
00023 #include <qwhatsthis.h>
00024 
00025 /*
00026  *  Constructs a AddressPickerUI as a child of 'parent', with the
00027  *  name 'name' and widget flags set to 'f'.
00028  */
00029 AddressPickerUI::AddressPickerUI( QWidget* parent, const char* name, WFlags fl )
00030     : QWidget( parent, name, fl )
00031 {
00032     if ( !name )
00033     setName( "AddressPickerUI" );
00034     AddressPickerUILayout = new QGridLayout( this, 1, 1, 11, 6, "AddressPickerUILayout"); 
00035 
00036     mAvailableView = new KListView( this, "mAvailableView" );
00037     mAvailableView->addColumn( tr2i18n( "Name" ) );
00038     mAvailableView->addColumn( tr2i18n( "Email Address" ) );
00039     mAvailableView->setProperty( "selectionMode", "Extended" );
00040     mAvailableView->setAllColumnsShowFocus( TRUE );
00041     mAvailableView->setShowSortIndicator( TRUE );
00042     mAvailableView->setRootIsDecorated( TRUE );
00043     mAvailableView->setResizeMode( KListView::AllColumns );
00044     mAvailableView->setFullWidth( TRUE );
00045 
00046     AddressPickerUILayout->addWidget( mAvailableView, 1, 0 );
00047 
00048     layout10 = new QVBoxLayout( 0, 0, 6, "layout10"); 
00049     spacer1 = new QSpacerItem( 20, 16, QSizePolicy::Minimum, QSizePolicy::Expanding );
00050     layout10->addItem( spacer1 );
00051 
00052     mToButton = new KPushButton( this, "mToButton" );
00053     mToButton->setEnabled( FALSE );
00054     layout10->addWidget( mToButton );
00055 
00056     mCCButton = new KPushButton( this, "mCCButton" );
00057     mCCButton->setEnabled( FALSE );
00058     layout10->addWidget( mCCButton );
00059 
00060     mBCCButton = new KPushButton( this, "mBCCButton" );
00061     mBCCButton->setEnabled( FALSE );
00062     layout10->addWidget( mBCCButton );
00063     spacer2 = new QSpacerItem( 20, 16, QSizePolicy::Minimum, QSizePolicy::Expanding );
00064     layout10->addItem( spacer2 );
00065 
00066     mRemoveButton = new KPushButton( this, "mRemoveButton" );
00067     mRemoveButton->setEnabled( FALSE );
00068     layout10->addWidget( mRemoveButton );
00069     spacer2_2 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
00070     layout10->addItem( spacer2_2 );
00071 
00072     AddressPickerUILayout->addLayout( layout10, 1, 1 );
00073 
00074     textLabel2 = new QLabel( this, "textLabel2" );
00075     QFont textLabel2_font(  textLabel2->font() );
00076     textLabel2_font.setBold( TRUE );
00077     textLabel2->setFont( textLabel2_font ); 
00078     textLabel2->setAlignment( int( QLabel::WordBreak | QLabel::AlignCenter ) );
00079 
00080     AddressPickerUILayout->addWidget( textLabel2, 0, 2 );
00081 
00082     textLabel1 = new QLabel( this, "textLabel1" );
00083     QFont textLabel1_font(  textLabel1->font() );
00084     textLabel1_font.setBold( TRUE );
00085     textLabel1->setFont( textLabel1_font ); 
00086     textLabel1->setAlignment( int( QLabel::WordBreak | QLabel::AlignCenter ) );
00087 
00088     AddressPickerUILayout->addWidget( textLabel1, 0, 0 );
00089 
00090     layout1 = new QHBoxLayout( 0, 0, 6, "layout1"); 
00091 
00092     TextLabel2 = new QLabel( this, "TextLabel2" );
00093     layout1->addWidget( TextLabel2 );
00094 
00095     mFilterEdit = new QLineEdit( this, "mFilterEdit" );
00096     mFilterEdit->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 1, 0, mFilterEdit->sizePolicy().hasHeightForWidth() ) );
00097     layout1->addWidget( mFilterEdit );
00098 
00099     AddressPickerUILayout->addLayout( layout1, 2, 0 );
00100 
00101     mSelectedView = new KListView( this, "mSelectedView" );
00102     mSelectedView->addColumn( tr2i18n( "Name" ) );
00103     mSelectedView->addColumn( tr2i18n( "Email Address" ) );
00104     mSelectedView->setProperty( "selectionMode", "Extended" );
00105     mSelectedView->setAllColumnsShowFocus( TRUE );
00106     mSelectedView->setShowSortIndicator( TRUE );
00107     mSelectedView->setRootIsDecorated( TRUE );
00108     mSelectedView->setResizeMode( KListView::AllColumns );
00109     mSelectedView->setFullWidth( TRUE );
00110 
00111     AddressPickerUILayout->addWidget( mSelectedView, 1, 2 );
00112 
00113     mSaveAs = new QPushButton( this, "mSaveAs" );
00114     mSaveAs->setEnabled( FALSE );
00115 
00116     AddressPickerUILayout->addWidget( mSaveAs, 2, 2 );
00117 
00118     mLdapSearch = new QPushButton( this, "mLdapSearch" );
00119 
00120     AddressPickerUILayout->addWidget( mLdapSearch, 3, 0 );
00121     languageChange();
00122     resize( QSize(591, 442).expandedTo(minimumSizeHint()) );
00123     clearWState( WState_Polished );
00124 
00125     // buddies
00126     textLabel2->setBuddy( mSelectedView );
00127     textLabel1->setBuddy( mAvailableView );
00128     TextLabel2->setBuddy( mFilterEdit );
00129 }
00130 
00131 /*
00132  *  Destroys the object and frees any allocated resources
00133  */
00134 AddressPickerUI::~AddressPickerUI()
00135 {
00136     // no need to delete child widgets, Qt does it all for us
00137 }
00138 
00139 /*
00140  *  Sets the strings of the subwidgets using the current
00141  *  language.
00142  */
00143 void AddressPickerUI::languageChange()
00144 {
00145     setCaption( tr2i18n( "Address Selection" ) );
00146     mAvailableView->header()->setLabel( 0, tr2i18n( "Name" ) );
00147     mAvailableView->header()->setLabel( 1, tr2i18n( "Email Address" ) );
00148     mToButton->setText( tr2i18n( "&To >>" ) );
00149     mCCButton->setText( tr2i18n( "&CC >>" ) );
00150     mBCCButton->setText( tr2i18n( "&BCC >>" ) );
00151     mRemoveButton->setText( tr2i18n( "<< &Remove" ) );
00152     textLabel2->setText( tr2i18n( "&Selected Addresses" ) );
00153     textLabel1->setText( tr2i18n( "&Address Book" ) );
00154     TextLabel2->setText( tr2i18n( "&Filter on:" ) );
00155     mFilterEdit->setText( QString::null );
00156     mSelectedView->header()->setLabel( 0, tr2i18n( "Name" ) );
00157     mSelectedView->header()->setLabel( 1, tr2i18n( "Email Address" ) );
00158     mSaveAs->setText( tr2i18n( "Save as &Distribution List..." ) );
00159     mSaveAs->setAccel( QKeySequence( tr2i18n( "Alt+D" ) ) );
00160     mLdapSearch->setText( tr2i18n( "&Search Directory Service" ) );
00161 }
00162 
00163 #include "addresspicker.moc"
KDE Home | KDE Accessibility Home | Description of Access Keys