kaddressbook Library API Documentation

KAddressBookTableView Class Reference

This class is the table view for kaddressbook.Table View. More...

#include <kaddressbooktableview.h>

Inheritance diagram for KAddressBookTableView:

Inheritance graph
[legend]
Collaboration diagram for KAddressBookTableView:

Collaboration graph
[legend]
List of all members.

Public Slots

virtual void reconstructListView ()

Public Member Functions

 KAddressBookTableView (KAB::Core *core, QWidget *parent, const char *name=0)
virtual void refresh (QString uid=QString::null)
virtual QStringList selectedUids ()
virtual void setSelected (QString uid=QString::null, bool selected=false)
virtual KABC::Field * sortField () const
virtual void readConfig (KConfig *config)
virtual void writeConfig (KConfig *config)
virtual QString type () const

Protected Slots

void addresseeSelected ()
void addresseeExecuted (QListViewItem *)
void rmbClicked (KListView *, QListViewItem *, const QPoint &)
void updatePresence (const QString &uid)

Friends

class ContactListView

Detailed Description

This class is the table view for kaddressbook.Table View.

This view is a KListView with multiple columns for the selected fields.

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

Definition at line 61 of file kaddressbooktableview.h.


Member Function Documentation

void KAddressBookTableView::refresh QString  uid = QString::null  )  [virtual]
 

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 220 of file kaddressbooktableview.cpp.

References KAddressBookView::addressees(), KAddressBookView::core(), and KAddressBookView::fields().

QStringList KAddressBookTableView::selectedUids  )  [virtual]
 

Must be overloaded in subclasses.

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

Implements KAddressBookView.

Definition at line 271 of file kaddressbooktableview.cpp.

void KAddressBookTableView::setSelected QString  uid = QString::null,
bool  selected = false
[virtual]
 

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 290 of file kaddressbooktableview.cpp.

KABC::Field * KAddressBookTableView::sortField  )  const [virtual]
 

Returns:
The current sort field.

Implements KAddressBookView.

Definition at line 169 of file kaddressbooktableview.cpp.

References KAddressBookView::fields().

void KAddressBookTableView::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 182 of file kaddressbooktableview.cpp.

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

void KAddressBookTableView::writeConfig KConfig *  config  )  [virtual]
 

Called whenever this view should write the config.

The view should not write out information handled by the application, such as which fields are visible. The view should only write out information specific to itself (i.e.: All information in the ViewConfigWidget)

If overloaded in the subclass, do not forget to call the 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 175 of file kaddressbooktableview.cpp.

References KAddressBookView::writeConfig().

virtual QString KAddressBookTableView::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 79 of file kaddressbooktableview.h.

void KAddressBookTableView::addresseeSelected  )  [protected, slot]
 

Called whenever the user selects an addressee in the list view.

Definition at line 315 of file kaddressbooktableview.cpp.

References KAddressBookView::selected().

void KAddressBookTableView::addresseeExecuted QListViewItem  )  [protected, slot]
 

Called whenever the user executes an addressee.

In terms of the list view, this is probably a double click

Definition at line 339 of file kaddressbooktableview.cpp.

References KAddressBookView::executed().

void KAddressBookTableView::rmbClicked KListView *  ,
QListViewItem ,
const QPoint
[protected, slot]
 

RBM menu called.

Definition at line 357 of file kaddressbooktableview.cpp.

References KAddressBookView::popup().

void KAddressBookTableView::updatePresence const QString uid  )  [protected, slot]
 

Called to update the presence of a single item.

Definition at line 362 of file kaddressbooktableview.cpp.

Referenced by readConfig().


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.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Aug 2 09:54:34 2007 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003