kword

KWMailMergeKABCConfig.h

00001 /*
00002    This file is part of the KDE project
00003    Copyright (C) 2004 Dirk Schmidt <fs@dirk-schmidt.net>
00004  
00005    This library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Library General Public
00007    License as published by the Free Software Foundation; either
00008    version 2 of the License, or (at your option) any later version.
00009  
00010    This library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Library General Public License for more details.
00014  
00015    You should have received a copy of the GNU Library General Public License
00016    along with this library; see the file COPYING.LIB.  If not, write to
00017    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018  * Boston, MA 02110-1301, USA.
00019 */
00020 
00021 #ifndef _KWMAILMERGE_KABC_CONFIG_H_
00022 #define _KWMAILMERGE_KABC_CONFIG_H_
00023 
00024 #include <kdialogbase.h>
00025 #include <klistview.h>
00026 #include <kabc/stdaddressbook.h>
00027 
00028 #include "KWMailMergeKABC.h"
00029 
00030 
00031 class AddressPickerUI;
00032 class KWMailMergeKABC;
00033 
00034 class KWMailMergeKABCConfig: public KDialogBase
00035 {
00036     Q_OBJECT
00037 public:
00038     KWMailMergeKABCConfig( QWidget *parent, KWMailMergeKABC *db_ );
00039     virtual ~KWMailMergeKABCConfig();
00040 
00041 
00042 private slots:
00043 
00047     void addSelectedContacts();
00048 
00052     void removeSelectedContacts();
00053 
00057     void launchAddressbook() const;
00058 
00062     void acceptSelection();
00063 
00067     void filterChanged( const QString& txt );
00068 
00072     void saveDistributionList();
00073 private:
00077     AddressPickerUI *_ui;
00078 
00082     QStringList _usedCategories;
00083 
00087     KWMailMergeKABC *_db;
00088 
00092     void destroyAvailableClones( const QString& uid );
00093 
00097     void initSelectedAddressees();
00098 
00102     void initSelectedLists();
00103 
00107     void initSlotSignalConnections();
00108 
00114     void removeContact( QListViewItem* item );
00115 
00120     void updateAvailable();
00121 };
00122 
00123 
00124 class KWMailMergeKABCConfigListItem : public QListViewItem
00125 {
00126 
00127 public:
00128     KWMailMergeKABCConfigListItem( QListView *parent, const KABC::Addressee& addressEntry );
00129     KWMailMergeKABCConfigListItem( QListViewItem *parent, const KABC::Addressee& addressEntry );
00130     virtual ~KWMailMergeKABCConfigListItem();
00131 
00135     KABC::Addressee addressee() const;
00136 
00142     QString text( int column ) const;
00143 
00144 
00145 private:
00146     KABC::Addressee _addressEntry;
00147 
00148 };
00149 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys