addresseeemailselection.h
00001 /* 00002 This file is part of libkdepim. 00003 00004 Copyright (c) 2004 Tobias Koenig <tokoe@kde.org> 00005 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Library General Public 00008 License as published by the Free Software Foundation; either 00009 version 2 of the License, or (at your option) any later version. 00010 00011 This library is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 Library General Public License for more details. 00015 00016 You should have received a copy of the GNU Library General Public License 00017 along with this library; see the file COPYING.LIB. If not, write to 00018 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00019 Boston, MA 02110-1301, USA. 00020 */ 00021 00022 #ifndef KPIM_ADDRESSEE_EMAILSELECTION_H 00023 #define KPIM_ADDRESSEE_EMAILSELECTION_H 00024 00025 #include <addresseeselector.h> 00026 00027 namespace KPIM { 00028 00029 class KDE_EXPORT AddresseeEmailSelection : public Selection 00030 { 00031 public: 00032 AddresseeEmailSelection(); 00033 00037 virtual uint fieldCount() const; 00038 00042 virtual TQString fieldTitle( uint index ) const; 00043 00047 virtual uint itemCount( const KABC::Addressee &addresse ) const; 00048 00052 virtual TQString itemText( const KABC::Addressee &addresse, uint index ) const; 00053 00057 virtual TQPixmap itemIcon( const KABC::Addressee &addresse, uint index ) const; 00058 00062 virtual bool itemEnabled( const KABC::Addressee &addresse, uint index ) const; 00063 00067 virtual bool itemMatches( const KABC::Addressee &addresse, uint index, const TQString &pattern ) const; 00068 00072 virtual bool itemEquals( const KABC::Addressee &addresse, uint index, const TQString &pattern ) const; 00073 00077 virtual TQString distributionListText( const KABC::DistributionList *distributionList ) const; 00078 00082 virtual TQPixmap distributionListIcon( const KABC::DistributionList *distributionList ) const; 00083 00087 virtual bool distributionListEnabled( const KABC::DistributionList *distributionList ) const; 00088 00092 virtual bool distributionListMatches( const KABC::DistributionList *distributionList, 00093 const TQString &pattern ) const; 00094 00098 virtual uint addressBookCount() const; 00099 00103 virtual TQString addressBookTitle( uint index ) const; 00104 00108 virtual KABC::Addressee::List addressBookContent( uint index ) const; 00109 00110 TQStringList to() const; 00111 TQStringList cc() const; 00112 TQStringList bcc() const; 00113 00114 KABC::Addressee::List toAddresses() const; 00115 KABC::Addressee::List ccAddresses() const; 00116 KABC::Addressee::List bccAddresses() const; 00117 00118 TQStringList toDistributionLists() const; 00119 TQStringList ccDistributionLists() const; 00120 TQStringList bccDistributionLists() const; 00121 00122 void setSelectedTo( const TQStringList &emails ); 00123 void setSelectedCC( const TQStringList &emails ); 00124 void setSelectedBCC( const TQStringList &emails ); 00125 00126 private: 00127 virtual void addSelectedAddressees( uint fieldIndex, const KABC::Addressee&, uint itemIndex ); 00128 virtual void addSelectedDistributionList( uint fieldIndex, const KABC::DistributionList* ); 00129 00130 TQString email( const KABC::Addressee&, uint ) const; 00131 void setSelectedItem( uint fieldIndex, const TQStringList& ); 00132 00133 KABC::Addressee::List mToAddresseeList; 00134 KABC::Addressee::List mCcAddresseeList; 00135 KABC::Addressee::List mBccAddresseeList; 00136 00137 TQStringList mToEmailList; 00138 TQStringList mCcEmailList; 00139 TQStringList mBccEmailList; 00140 00141 TQStringList mToDistributionList; 00142 TQStringList mCcDistributionList; 00143 TQStringList mBccDistributionList; 00144 }; 00145 00146 } 00147 00148 #endif