• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdenetwork API Reference
  • KDE Home
  • Contact Us
 

kopete/kopete

  • sources
  • kde-4.14
  • kdenetwork
  • kopete
  • kopete
  • contactlist
kopeteaddrbookexport.h
Go to the documentation of this file.
1 /*
2  kopeteaddrbookexport.h - Kopete Online Status
3 
4  Logic for exporting data acquired from messaging systems to the
5  KDE address book
6 
7  Copyright (c) 2004 by Will Stephenson <wstephenson@kde.org>
8 
9  Kopete (c) 2002-2004 by the Kopete developers <kopete-devel@kde.org>
10 
11  *************************************************************************
12  * *
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. *
17  * *
18  *************************************************************************
19 */
20 
21 #ifndef KOPETEADDRBOOKEXPORT_H
22 #define KOPETEADDRBOOKEXPORT_H
23 
24 #include <kabc/stdaddressbook.h>
25 #include <kabc/addressee.h>
26 
27 #include "kopeteproperty.h"
28 #include "ui_kopeteaddrbookexportui.h"
29 #include <QPixmap>
30 
31 class KDialog;
32 class K3ListBox;
33 
34 namespace Kopete
35 {
36 class Contact;
37 class MetaContact;
38 }
39 
40 class KopeteAddressBookExport : public QObject, private Ui::AddressBookExportUI
41 {
42 Q_OBJECT
43 
44 public:
45  KopeteAddressBookExport( QWidget *parent, Kopete::MetaContact *mc );
46  ~KopeteAddressBookExport();
47 
52  int showDialog();
56  void exportData();
57 
58 protected:
62  void initLabels();
66  void fetchKABCData();
70  void fetchPhoneNumbers( K3ListBox * listBox, KABC::PhoneNumber::Type type, uint& counter );
74  void fetchIMData();
78  void populateIM( const Kopete::Contact *contact, const QPixmap &icon,
79  QComboBox *combo, const Kopete::PropertyTmpl &property );
83  void populateIM( const Kopete::Contact *contact, const QPixmap &icon,
84  K3ListBox *combo, const Kopete::PropertyTmpl &property );
85 
87  bool newValue( QComboBox *combo );
88  QStringList newValues( K3ListBox *listBox, uint counter );
89 
90  // the GUI
91  QWidget *mParent;
92  KDialog * mDialog;
93  QPixmap mAddrBookIcon;
94  AddressBookExportUI *mUI;
95  Kopete::MetaContact *mMetaContact;
96  KABC::AddressBook *mAddressBook;
97  KABC::Addressee mAddressee;
98 
99  // counters tracking the number of KABC values where multiple values are possible in a single key
100  uint numEmails, numHomePhones, numWorkPhones, numMobilePhones;
101 
102 };
103 
104 #endif
QWidget
KopeteAddressBookExport
Definition: kopeteaddrbookexport.h:40
KopeteAddressBookExport::exportData
void exportData()
Export the data to KABC if changed, omitting any duplicates.
Definition: kopeteaddrbookexport.cpp:199
KopeteAddressBookExport::mAddressBook
KABC::AddressBook * mAddressBook
Definition: kopeteaddrbookexport.h:96
KopeteAddressBookExport::mDialog
KDialog * mDialog
Definition: kopeteaddrbookexport.h:92
KopeteAddressBookExport::numEmails
uint numEmails
Definition: kopeteaddrbookexport.h:100
KopeteAddressBookExport::newValue
bool newValue(QComboBox *combo)
Check the selected item is not the first (existing KABC) item, or the same as it. ...
Definition: kopeteaddrbookexport.cpp:273
KopeteAddressBookExport::mParent
QWidget * mParent
Definition: kopeteaddrbookexport.h:91
KopeteAddressBookExport::mUI
AddressBookExportUI * mUI
Definition: kopeteaddrbookexport.h:94
KopeteAddressBookExport::KopeteAddressBookExport
KopeteAddressBookExport(QWidget *parent, Kopete::MetaContact *mc)
Definition: kopeteaddrbookexport.cpp:38
KDialog
KopeteAddressBookExport::showDialog
int showDialog()
Display the dialog.
Definition: kopeteaddrbookexport.cpp:168
KopeteAddressBookExport::fetchPhoneNumbers
void fetchPhoneNumbers(K3ListBox *listBox, KABC::PhoneNumber::Type type, uint &counter)
Populate a listbox with a given type of phone number.
Definition: kopeteaddrbookexport.cpp:110
Kopete::Items::Type
Type
Definition: kopeteitembase.h:57
KopeteAddressBookExport::numMobilePhones
uint numMobilePhones
Definition: kopeteaddrbookexport.h:100
Kopete::Items::MetaContact
Definition: kopeteitembase.h:57
KopeteAddressBookExport::populateIM
void populateIM(const Kopete::Contact *contact, const QPixmap &icon, QComboBox *combo, const Kopete::PropertyTmpl &property)
Populate a combobox with a contact's IM data.
Definition: kopeteaddrbookexport.cpp:150
KopeteAddressBookExport::fetchKABCData
void fetchKABCData()
Populate the GUI with data from KABC.
Definition: kopeteaddrbookexport.cpp:65
QObject::property
QVariant property(const char *name) const
QObject
KopeteAddressBookExport::initLabels
void initLabels()
Initialise the GUI labels with labels from KABC.
Definition: kopeteaddrbookexport.cpp:51
KopeteAddressBookExport::newValues
QStringList newValues(K3ListBox *listBox, uint counter)
Definition: kopeteaddrbookexport.cpp:281
QStringList
QPixmap
KopeteAddressBookExport::numHomePhones
uint numHomePhones
Definition: kopeteaddrbookexport.h:100
KopeteAddressBookExport::mMetaContact
Kopete::MetaContact * mMetaContact
Definition: kopeteaddrbookexport.h:95
KopeteAddressBookExport::~KopeteAddressBookExport
~KopeteAddressBookExport()
Definition: kopeteaddrbookexport.cpp:46
KopeteAddressBookExport::fetchIMData
void fetchIMData()
Populate the GUI with data from IM systems.
Definition: kopeteaddrbookexport.cpp:124
KopeteAddressBookExport::numWorkPhones
uint numWorkPhones
Definition: kopeteaddrbookexport.h:100
KopeteAddressBookExport::mAddrBookIcon
QPixmap mAddrBookIcon
Definition: kopeteaddrbookexport.h:93
KopeteAddressBookExport::mAddressee
KABC::Addressee mAddressee
Definition: kopeteaddrbookexport.h:97
QObject::parent
QObject * parent() const
QComboBox
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:29:08 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kopete/kopete

Skip menu "kopete/kopete"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdenetwork API Reference

Skip menu "kdenetwork API Reference"
  • kget
  • kopete
  •   kopete
  •   libkopete
  • krdc
  • krfb

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal