kaddressbook
KAddressBookIconView Class Reference
#include <kaddressbookiconview.h>
Detailed Description
This is an example kaddressbook view that is implemented using K3IconView.This view is not the most useful view, but it displays how simple implementing a new view can be.
Definition at line 45 of file kaddressbookiconview.h.
Public Slots | |
| void | refresh (const QString &uid=QString()) |
| virtual void | setFirstSelected (bool selected=true) |
| void | setSelected (const QString &uid=QString(), bool selected=true) |
Public Member Functions | |
| KAddressBookIconView (KAB::Core *core, QWidget *parent) | |
| virtual void | readConfig (KConfigGroup &config) |
| void | scrollDown () |
| void | scrollUp () |
| virtual QStringList | selectedUids () |
| virtual KABC::Field * | sortField () const |
| virtual QString | type () const |
| virtual | ~KAddressBookIconView () |
Protected Slots | |
| void | addresseeExecuted (Q3IconViewItem *item) |
| void | addresseeSelected () |
| void | rmbClicked (Q3IconViewItem *, const QPoint &) |
Constructor & Destructor Documentation
Definition at line 138 of file kaddressbookiconview.cpp.
| KAddressBookIconView::~KAddressBookIconView | ( | ) | [virtual] |
Definition at line 162 of file kaddressbookiconview.cpp.
Member Function Documentation
| void KAddressBookIconView::addresseeExecuted | ( | Q3IconViewItem * | item | ) | [protected, slot] |
Definition at line 271 of file kaddressbookiconview.cpp.
| void KAddressBookIconView::addresseeSelected | ( | ) | [protected, slot] |
Definition at line 279 of file kaddressbookiconview.cpp.
| void KAddressBookIconView::readConfig | ( | KConfigGroup & | 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 172 of file kaddressbookiconview.cpp.
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 204 of file kaddressbookiconview.cpp.
| void KAddressBookIconView::rmbClicked | ( | Q3IconViewItem * | , | |
| const QPoint & | point | |||
| ) | [protected, slot] |
Definition at line 299 of file kaddressbookiconview.cpp.
| void KAddressBookIconView::scrollDown | ( | ) | [virtual] |
| void KAddressBookIconView::scrollUp | ( | ) | [virtual] |
| 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 187 of file kaddressbookiconview.cpp.
| void KAddressBookIconView::setFirstSelected | ( | bool | selected = true |
) | [virtual, slot] |
Selects the first contact in the view.
Implements KAddressBookView.
Definition at line 263 of file kaddressbookiconview.cpp.
| void KAddressBookIconView::setSelected | ( | const QString & | uid = QString(), |
|
| bool | selected = true | |||
| ) | [virtual, slot] |
This method must be overloaded in subclasses.
Select (highlight) the addressee matching uid. If uid is equal to QString(), then all addressees should be selected.
Implements KAddressBookView.
Definition at line 242 of file kaddressbookiconview.cpp.
| KABC::Field * KAddressBookIconView::sortField | ( | ) | const [virtual] |
- Returns:
- The current sort field.
Implements KAddressBookView.
Definition at line 166 of file kaddressbookiconview.cpp.
| 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 54 of file kaddressbookiconview.h.
The documentation for this class was generated from the following files:
KDE 4.1 API Reference