kaddressbook Library API Documentation

KAddressBookCardView Class Reference

This view uses the CardView class to create a card view. More...

#include <kaddressbookcardview.h>

Inheritance diagram for KAddressBookCardView:

KAddressBookView QWidget List of all members.

Public Slots

void refresh (QString uid=QString::null)
 Must be overloaded in subclasses to refresh the view.

void setSelected (QString uid=QString::null, bool selected=true)
 This method must be overloaded in subclasses.


Public Member Functions

 KAddressBookCardView (KABC::AddressBook *doc, QWidget *parent, const char *name)
virtual QStringList selectedUids ()
 Must be overloaded in subclasses.

virtual QString type () const
 Return the type of the view: Icon, Table, etc.

virtual void readConfig (KConfig *config)
 Called whenever this view should read the config.

virtual void incrementalSearch (const QString &value, KABC::Field *field)
 This method can be overloaded in the subclass to implement incremental searching.


Protected Slots

void addresseeExecuted (CardViewItem *item)
void addresseeSelected ()

Detailed Description

This view uses the CardView class to create a card view.

At some point in the future I think this will be the default view of KAddressBook.

Definition at line 44 of file kaddressbookcardview.h.


Member Function Documentation

QStringList KAddressBookCardView::selectedUids  )  [virtual]
 

Must be overloaded in subclasses.

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

Implements KAddressBookView.

Definition at line 173 of file kaddressbookcardview.cpp.

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

virtual QString KAddressBookCardView::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 54 of file kaddressbookcardview.h.

void KAddressBookCardView::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 152 of file kaddressbookcardview.cpp.

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

void KAddressBookCardView::incrementalSearch const QString value,
KABC::Field *  field
[virtual]
 

This method can be overloaded in the subclass to implement incremental searching.

Incremental searching is where the user types in characters and after each character the selection is updated to select the item (addressee) that matches the search.

For example, if this method is called with value being 'p', the selection should be moved to the first item with the field matching 'p'. If the user then typed 'r', making the value 'pr', the selection should be updated to the first item with the field matching 'pr'. If there is no item matching 'pr', the selection should remain on the last valid match. If the value is empty, select the first item.

Parameters:
value The string value to match.
field The KABC::Field that should be searched

Reimplemented from KAddressBookView.

Definition at line 294 of file kaddressbookcardview.cpp.

References CardViewItem::nextItem().

void KAddressBookCardView::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 192 of file kaddressbookcardview.cpp.

References KAddressBookView::addressBook(), KAddressBookView::addressees(), KAddressBookView::fields(), CardViewItem::nextItem(), and KAddressBookView::selected().

void KAddressBookCardView::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 233 of file kaddressbookcardview.cpp.

References CardViewItem::nextItem().


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