kaddressbook Library API Documentation

KAddressBook Class Reference

This class serves as the main window for KAddressBook. Main window class. More...

#include <kaddressbook.h>

Inheritance diagram for KAddressBook:

QWidget List of all members.

Public Slots

void addEmail (QString addr)
 DCOP METHODS.

void newContact ()
ASYNC showContactEditor (QString uid)
QString getNameByPhone (QString phone)
void save ()
 Saves the contents of the AddressBook back to disk.

void readConfig ()
 Reads the config file.

void writeConfig ()
 Writes the config file.

void undo ()
 Undo the last command using the undo stack.

void redo ()
 Redo the last command that was undone, using the redo stack.

void importKDE2 ()
 Import libkab data.

void importCSV ()
 Import comma-seperated list of all addressbook entries.

void importVCard (const QString &, bool)
 Import VCard files, the version is detected automatically.

void importVCardSimple ()
 Import VCard file.

void exportCSV ()
 Export comma-seperated list of all addressbook entries.

void exportVCard30 ()
 Export VCard 3.0 files.

void exportVCard (KABC::VCardConverter::Version)
 Export VCard files with given version.

void editAddressee (QString uid=QString::null)
 Shows the edit dialog for the given uid.

void newAddressee ()
 Creates a new addressee and shows the edit dialog for it.

void configure ()
 Launches the configuration dialog.

void print ()
 Creates a KAddressBookPrinter, which will display the print dialog and do the printing.

void configureFilters ()
 Displays the Edit Filters dialog box.

void setIncSearchWidget (IncSearchWidget *)
 Make the incremental search widget known.


Signals

void addresseeSelected (bool selected)
 Emitted whenever an addressee is selected in the view.

void modified (bool mod)
 Emitted whenever the address book is modified in some way.


Public Member Functions

 KAddressBook (QWidget *parent, const char *name=0)
ViewManagerviewManager ()

Protected Slots

void addresseeSelected (const QString &uid)
 Called whenever the user selects an entry in the view.

void addresseeExecuted (const QString &uid)
 called whenever the user activates an entry in the view.

void addresseeModified (const KABC::Addressee &)
 Called whenever an addressee is modified.

void viewModified ()
 Called whenever the view is modified in some way.

void slotOpenLDAPDialog ()
void slotLDAPRefresh ()
void configChanged ()
 Called whenever the configuration is changed.

void slotEditorDestroyed (const QString &uid)
void slotAddressBookChanged ()

Protected Member Functions

AddresseeEditorDialog * createAddresseeEditorDialog (QWidget *parent, const char *name=0)

Detailed Description

This class serves as the main window for KAddressBook. Main window class.

It handles the menus, toolbars, and status bars as well as creating the view.

Most of the actions of the application will be resolved here or in the view manager. Since the application can have multiple views, the actions cannot be connect directly to the views.

This class should be used as the main widget of the application. It will hold a VBox, with the view manager on top, and the quick edit widget on the bottom.

To interact with the view manager directly, it can be retrieved using viewManager().

Author:
Don Sanders <dsanders@kde.org>
Version:
0.1

Definition at line 42 of file kaddressbook.h.


Member Function Documentation

void KAddressBook::addEmail QString  addr  )  [slot]
 

DCOP METHODS.

Definition at line 100 of file kaddressbook.cpp.

References editAddressee(), and ViewManager::refresh().

void KAddressBook::save  )  [slot]
 

Saves the contents of the AddressBook back to disk.

Definition at line 214 of file kaddressbook.cpp.

References modified().

void KAddressBook::readConfig  )  [slot]
 

Reads the config file.

Definition at line 230 of file kaddressbook.cpp.

References ViewManager::readConfig().

Referenced by configChanged().

void KAddressBook::writeConfig  )  [slot]
 

Writes the config file.

Definition at line 235 of file kaddressbook.cpp.

References ViewManager::writeConfig().

Referenced by configure().

void KAddressBook::undo  )  [slot]
 

Undo the last command using the undo stack.

Definition at line 247 of file kaddressbook.cpp.

References ViewManager::refresh().

void KAddressBook::redo  )  [slot]
 

Redo the last command that was undone, using the redo stack.

Definition at line 255 of file kaddressbook.cpp.

References ViewManager::refresh().

void KAddressBook::importKDE2  )  [slot]
 

Import libkab data.

Definition at line 263 of file kaddressbook.cpp.

References QFile::exists(), and ViewManager::refresh().

void KAddressBook::importCSV  )  [slot]
 

Import comma-seperated list of all addressbook entries.

Definition at line 293 of file kaddressbook.cpp.

References modified(), and ViewManager::refresh().

void KAddressBook::importVCard const QString ,
bool 
[slot]
 

Import VCard files, the version is detected automatically.

Definition at line 310 of file kaddressbook.cpp.

References QFile::close(), editAddressee(), QString::fromUtf8(), QString::isEmpty(), modified(), QFile::open(), QFile::readAll(), ViewManager::refresh(), and QStringList::split().

Referenced by importVCardSimple().

void KAddressBook::importVCardSimple  )  [slot]
 

Import VCard file.

Simple refers to the fact that no QString is passed here, used for menu items

Definition at line 305 of file kaddressbook.cpp.

References importVCard().

void KAddressBook::exportCSV  )  [slot]
 

Export comma-seperated list of all addressbook entries.

Definition at line 368 of file kaddressbook.cpp.

References QFile::close(), QString::isEmpty(), and QFile::open().

void KAddressBook::exportVCard30  )  [slot]
 

Export VCard 3.0 files.

Definition at line 417 of file kaddressbook.cpp.

References exportVCard().

void KAddressBook::exportVCard KABC::VCardConverter::Version   )  [slot]
 

Export VCard files with given version.

Definition at line 422 of file kaddressbook.cpp.

References QString::arg(), QFile::close(), QString::isEmpty(), QFile::open(), ViewManager::selectedUids(), and QTextStream::setEncoding().

Referenced by exportVCard30().

void KAddressBook::editAddressee QString  uid = QString::null  )  [slot]
 

Shows the edit dialog for the given uid.

If the uid is QString::null, the method will try to find a selected addressee in the view.

Definition at line 144 of file kaddressbook.cpp.

References QDict< AddresseeEditorDialog >::find(), QDict< AddresseeEditorDialog >::insert(), ViewManager::isQuickEditVisible(), and ViewManager::selectedUids().

Referenced by addEmail(), addresseeExecuted(), and importVCard().

void KAddressBook::newAddressee  )  [slot]
 

Creates a new addressee and shows the edit dialog for it.

If the new edit dialog is cancel, the addressee will be destroyed. If the edit dialog is accepted, the addressee will be inserted into the view and the view will be told to refresh.

Definition at line 175 of file kaddressbook.cpp.

References QDict< AddresseeEditorDialog >::insert().

void KAddressBook::configure  )  [slot]
 

Launches the configuration dialog.

Definition at line 542 of file kaddressbook.cpp.

References configChanged(), and writeConfig().

void KAddressBook::print  )  [slot]
 

Creates a KAddressBookPrinter, which will display the print dialog and do the printing.

Definition at line 578 of file kaddressbook.cpp.

References ViewManager::selectedUids().

void KAddressBook::configureFilters  )  [slot]
 

Displays the Edit Filters dialog box.

Definition at line 623 of file kaddressbook.cpp.

References ViewManager::filters(), and ViewManager::filtersChanged().

void KAddressBook::setIncSearchWidget IncSearchWidget *   )  [slot]
 

Make the incremental search widget known.

Not elegant, but works.

Definition at line 633 of file kaddressbook.cpp.

void KAddressBook::addresseeSelected const QString uid  )  [protected, slot]
 

Called whenever the user selects an entry in the view.

Definition at line 501 of file kaddressbook.cpp.

void KAddressBook::addresseeExecuted const QString uid  )  [protected, slot]
 

called whenever the user activates an entry in the view.

Definition at line 506 of file kaddressbook.cpp.

References editAddressee(), and ViewManager::isQuickEditVisible().

void KAddressBook::addresseeModified const KABC::Addressee &   )  [protected, slot]
 

Called whenever an addressee is modified.

This method will create the proper undo item (new or edit) and update the addressee database.

Definition at line 514 of file kaddressbook.cpp.

References modified(), and ViewManager::refresh().

void KAddressBook::viewModified  )  [protected, slot]
 

Called whenever the view is modified in some way.

This could mean that the view supports inline editing and the user is editing a contact.

Definition at line 538 of file kaddressbook.cpp.

References modified().

void KAddressBook::configChanged  )  [protected, slot]
 

Called whenever the configuration is changed.

This happens when the user presses the OK or Apply button in the PrefsDialog.

Definition at line 601 of file kaddressbook.cpp.

References readConfig().

Referenced by configure().

void KAddressBook::addresseeSelected bool  selected  )  [signal]
 

Emitted whenever an addressee is selected in the view.

Parameters:
selected True if an addressee was selected, false otherwise.

void KAddressBook::modified bool  mod  )  [signal]
 

Emitted whenever the address book is modified in some way.

Parameters:
mod True if the address book has been modified, false otherwise.

Referenced by addresseeModified(), importCSV(), importVCard(), save(), and viewModified().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sun Feb 15 11:40:38 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001