kword

KWMailMergeTDEABCConfig.h
1/*
2 This file is part of the KDE project
3 Copyright (C) 2004 Dirk Schmidt <fs@dirk-schmidt.net>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
19*/
20
21#ifndef _KWMAILMERGE_KABC_CONFIG_H_
22#define _KWMAILMERGE_KABC_CONFIG_H_
23
24#include <kdialogbase.h>
25#include <tdelistview.h>
26#include <tdeabc/stdaddressbook.h>
27
28#include "KWMailMergeTDEABC.h"
29
30
31class AddressPickerUI;
32class KWMailMergeTDEABC;
33
34class KWMailMergeTDEABCConfig: public KDialogBase
35{
36 TQ_OBJECT
37
38public:
39 KWMailMergeTDEABCConfig( TQWidget *parent, KWMailMergeTDEABC *db_ );
40 virtual ~KWMailMergeTDEABCConfig();
41
42
43private slots:
44
48 void addSelectedContacts();
49
53 void removeSelectedContacts();
54
58 void launchAddressbook() const;
59
63 void acceptSelection();
64
68 void filterChanged( const TQString& txt );
69
73 void saveDistributionList();
74private:
78 AddressPickerUI *_ui;
79
83 TQStringList _usedCategories;
84
88 KWMailMergeTDEABC *_db;
89
93 void destroyAvailableClones( const TQString& uid );
94
98 void initSelectedAddressees();
99
103 void initSelectedLists();
104
108 void initSlotSignalConnections();
109
115 void removeContact( TQListViewItem* item );
116
121 void updateAvailable();
122};
123
124
125class KWMailMergeTDEABCConfigListItem : public TQListViewItem
126{
127
128public:
129 KWMailMergeTDEABCConfigListItem( TQListView *parent, const TDEABC::Addressee& addressEntry );
130 KWMailMergeTDEABCConfigListItem( TQListViewItem *parent, const TDEABC::Addressee& addressEntry );
131 virtual ~KWMailMergeTDEABCConfigListItem();
132
136 TDEABC::Addressee addressee() const;
137
143 TQString text( int column ) const;
144
145
146private:
147 TDEABC::Addressee _addressEntry;
148
149};
150#endif