kaddressbook Library API Documentation

KAddressBookIconView Class Reference

This is an example kaddressbook view that is implemented using KIconView. More...

#include <kaddressbookiconview.h>

Inheritance diagram for KAddressBookIconView:

KAddressBookView QWidget List of all members.

Public Slots

void refresh (QString uid=QString::null)
void setSelected (QString uid=QString::null, bool selected=true)

Public Methods

 KAddressBookIconView (KAB::Core *core, QWidget *parent, const char *name=0)
virtual ~KAddressBookIconView ()
virtual QStringList selectedUids ()
virtual QString type () const
virtual KABC::Field * sortField () const
virtual void readConfig (KConfig *config)

Protected Slots

void addresseeExecuted (QIconViewItem *item)
void addresseeSelected ()
void rmbClicked (QIconViewItem *, const QPoint &)

Detailed Description

This is an example kaddressbook view that is implemented using KIconView.

This view is not the most useful view, but it displays how simple implementing a new view can be.

Definition at line 42 of file kaddressbookiconview.h.


Member Function Documentation

QStringList KAddressBookIconView::selectedUids   [virtual]
 

Must be overloaded in subclasses.

Should return a list of all the uids of selected contacts.

Implements KAddressBookView.

Definition at line 192 of file kaddressbookiconview.cpp.

References QIconViewItem::isSelected(), and QIconViewItem::nextItem().

virtual QString KAddressBookIconView::type   const [inline, virtual]
 

Return the type of the view: Icon, Table, etc.

Please make sure that this is the same value that ViewWrapper::type() will return for your view.

Implements KAddressBookView.

Definition at line 52 of file kaddressbookiconview.h.

KABC::Field * KAddressBookIconView::sortField   const [virtual]
 

Returns:
The current sort field.

Implements KAddressBookView.

Definition at line 171 of file kaddressbookiconview.cpp.

void KAddressBookIconView::readConfig KConfig *    config [virtual]
 

Called whenever this view should read the config.

This can be used as a sign that the config has changed, therefore the view should assume the worst and rebuild itself if necessary. For example, in a table view this method may be called when the user adds or removes columns from the view.

If overloaded in the subclass, do not forget to call super class's method.

Parameters:
config  The KConfig object to read from. The group will already be set, so do not change the group.

Reimplemented from KAddressBookView.

Definition at line 177 of file kaddressbookiconview.cpp.

References KAddressBookView::executed(), and KAddressBookView::readConfig().

void KAddressBookIconView::refresh QString    uid = QString::null [virtual, slot]
 

Must be overloaded in subclasses to refresh the view.

Refreshing includes updating the view to ensure that only items in the document are visible. If uid is valid, only the addressee with uid needs to be refreshed. This is an optimization only.

Implements KAddressBookView.

Definition at line 211 of file kaddressbookiconview.cpp.

References KAddressBookView::addressees(), QPtrList< AddresseeIconViewItem >::append(), QPtrList< AddresseeIconViewItem >::clear(), KAddressBookView::core(), KAddressBookView::fields(), QString::isNull(), and QIconViewItem::nextItem().

void KAddressBookIconView::setSelected QString    uid = QString::null,
bool    selected = true
[virtual, slot]
 

This method must be overloaded in subclasses.

Select (highlight) the addressee matching uid. If uid is equal to QString::null, then all addressees should be selected.

Implements KAddressBookView.

Definition at line 248 of file kaddressbookiconview.cpp.

References QString::isNull(), QIconViewItem::nextItem(), and KAddressBookView::selected().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kaddressbook Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat May 1 11:38:54 2004 by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2003