libkdepim Library API Documentation

addresspicker.cpp

00001 #include <kdialog.h> 00002 #include <klocale.h> 00003 /**************************************************************************** 00004 ** Form implementation generated from reading ui file './addresspicker.ui' 00005 ** 00006 ** Created: Fri Oct 1 14:56:31 2004 00007 ** by: The User Interface Compiler ($Id: qt/main.cpp 3.3.3 edited Nov 24 2003 $) 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 <qpushbutton.h> 00019 #include <qlabel.h> 00020 #include <qlineedit.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 mSaveAs = new QPushButton( this, "mSaveAs" ); 00075 mSaveAs->setEnabled( FALSE ); 00076 00077 AddressPickerUILayout->addWidget( mSaveAs, 2, 2 ); 00078 00079 textLabel2 = new QLabel( this, "textLabel2" ); 00080 QFont textLabel2_font( textLabel2->font() ); 00081 textLabel2_font.setBold( TRUE ); 00082 textLabel2->setFont( textLabel2_font ); 00083 textLabel2->setAlignment( int( QLabel::WordBreak | QLabel::AlignCenter ) ); 00084 00085 AddressPickerUILayout->addWidget( textLabel2, 0, 2 ); 00086 00087 textLabel1 = new QLabel( this, "textLabel1" ); 00088 QFont textLabel1_font( textLabel1->font() ); 00089 textLabel1_font.setBold( TRUE ); 00090 textLabel1->setFont( textLabel1_font ); 00091 textLabel1->setAlignment( int( QLabel::WordBreak | QLabel::AlignCenter ) ); 00092 00093 AddressPickerUILayout->addWidget( textLabel1, 0, 0 ); 00094 00095 layout1 = new QHBoxLayout( 0, 0, 6, "layout1"); 00096 00097 TextLabel2 = new QLabel( this, "TextLabel2" ); 00098 layout1->addWidget( TextLabel2 ); 00099 00100 mFilterEdit = new QLineEdit( this, "mFilterEdit" ); 00101 mFilterEdit->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 1, 0, mFilterEdit->sizePolicy().hasHeightForWidth() ) ); 00102 layout1->addWidget( mFilterEdit ); 00103 00104 AddressPickerUILayout->addLayout( layout1, 2, 0 ); 00105 00106 mSelectedView = new KListView( this, "mSelectedView" ); 00107 mSelectedView->addColumn( tr2i18n( "Name" ) ); 00108 mSelectedView->addColumn( tr2i18n( "Email Address" ) ); 00109 mSelectedView->setProperty( "selectionMode", "Extended" ); 00110 mSelectedView->setAllColumnsShowFocus( TRUE ); 00111 mSelectedView->setShowSortIndicator( TRUE ); 00112 mSelectedView->setRootIsDecorated( TRUE ); 00113 mSelectedView->setResizeMode( KListView::AllColumns ); 00114 mSelectedView->setFullWidth( TRUE ); 00115 00116 AddressPickerUILayout->addWidget( mSelectedView, 1, 2 ); 00117 languageChange(); 00118 resize( QSize(591, 350).expandedTo(minimumSizeHint()) ); 00119 clearWState( WState_Polished ); 00120 00121 // buddies 00122 textLabel2->setBuddy( mSelectedView ); 00123 textLabel1->setBuddy( mAvailableView ); 00124 TextLabel2->setBuddy( mFilterEdit ); 00125 } 00126 00127 /* 00128 * Destroys the object and frees any allocated resources 00129 */ 00130 AddressPickerUI::~AddressPickerUI() 00131 { 00132 // no need to delete child widgets, Qt does it all for us 00133 } 00134 00135 /* 00136 * Sets the strings of the subwidgets using the current 00137 * language. 00138 */ 00139 void AddressPickerUI::languageChange() 00140 { 00141 setCaption( tr2i18n( "Address Selection" ) ); 00142 mAvailableView->header()->setLabel( 0, tr2i18n( "Name" ) ); 00143 mAvailableView->header()->setLabel( 1, tr2i18n( "Email Address" ) ); 00144 mToButton->setText( tr2i18n( "&To >>" ) ); 00145 mCCButton->setText( tr2i18n( "&CC >>" ) ); 00146 mBCCButton->setText( tr2i18n( "&BCC >>" ) ); 00147 mRemoveButton->setText( tr2i18n( "<< &Remove" ) ); 00148 mSaveAs->setText( tr2i18n( "Save as &Distribution List..." ) ); 00149 textLabel2->setText( tr2i18n( "&Selected Addresses" ) ); 00150 textLabel1->setText( tr2i18n( "&Address Book" ) ); 00151 TextLabel2->setText( tr2i18n( "&Filter on:" ) ); 00152 mFilterEdit->setText( QString::null ); 00153 mSelectedView->header()->setLabel( 0, tr2i18n( "Name" ) ); 00154 mSelectedView->header()->setLabel( 1, tr2i18n( "Email Address" ) ); 00155 } 00156 00157 #include "addresspicker.moc"
KDE Logo
This file is part of the documentation for libkdepim Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Oct 1 15:18:54 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003