2
kopeteaddrbookexport.h - Kopete Online Status
4
Logic for exporting data acquired from messaging systems to the
7
Copyright (c) 2004 by Will Stephenson <wstephenson@kde.org>
9
Kopete (c) 2002-2004 by the Kopete developers <kopete-devel@kde.org>
11
*************************************************************************
13
* This program is free software; you can redistribute it and/or modify *
14
* it under the terms of the GNU General Public License as published by *
15
* the Free Software Foundation; either version 2 of the License, or *
16
* (at your option) any later version. *
18
*************************************************************************
21
#ifndef KOPETEADDRBOOKEXPORT_H
22
#define KOPETEADDRBOOKEXPORT_H
24
#include <kabc/stdaddressbook.h>
25
#include <kabc/addressee.h>
27
#include "kopeteproperty.h"
28
#include "ui_kopeteaddrbookexportui.h"
41
class KopeteAddressBookExport : public QObject, private Ui::AddressBookExportUI
46
KopeteAddressBookExport( QWidget *parent, Kopete::MetaContact *mc );
47
~KopeteAddressBookExport();
51
* @return a QDialog return code
55
* Export the data to KABC if changed, omitting any duplicates
61
* Initialise the GUI labels with labels from KABC
65
* Populate the GUI with data from KABC
69
* Populate a listbox with a given type of phone number
71
void fetchPhoneNumbers( K3ListBox * listBox, KABC::PhoneNumber::Type type, uint& counter );
73
* Populate the GUI with data from IM systems
77
* Populate a combobox with a contact's IM data
79
void populateIM( const Kopete::Contact *contact, const QPixmap &icon,
80
QComboBox *combo, const Kopete::PropertyTmpl &property );
82
* Populate a listbox with a contact's IM data
84
void populateIM( const Kopete::Contact *contact, const QPixmap &icon,
85
K3ListBox *combo, const Kopete::PropertyTmpl &property );
87
/** Check the selected item is not the first (existing KABC) item, or the same as it */
88
bool newValue( QComboBox *combo );
89
QStringList newValues( K3ListBox *listBox, uint counter );
94
QPixmap mAddrBookIcon;
95
AddressBookExportUI *mUI;
96
Kopete::MetaContact *mMetaContact;
97
KABC::AddressBook *mAddressBook;
98
KABC::Addressee mAddressee;
100
// counters tracking the number of KABC values where multiple values are possible in a single key
101
uint numEmails, numHomePhones, numWorkPhones, numMobilePhones;