akonadi
#include <itemmonitor.h>
Classes | |
class | Private |
Public Member Functions | |
ItemMonitor () | |
virtual | ~ItemMonitor () |
Item | item () const |
void | setItem (const Item &item) |
Protected Member Functions | |
ItemFetchScope & | fetchScope () |
virtual void | itemChanged (const Item &item) |
virtual void | itemRemoved () |
void | setFetchScope (const ItemFetchScope &fetchScope) |
Detailed Description
A convenience class to monitor a single item for changes.
This class can be used as a base class for classes that want to show a single item to the user and keep track of status changes of the item without having to using a Monitor object themself.
Example:
Definition at line 82 of file itemmonitor.h.
Constructor & Destructor Documentation
ItemMonitor::ItemMonitor | ( | ) |
Creates a new item monitor.
Definition at line 29 of file itemmonitor.cpp.
|
virtual |
Destroys the item monitor.
Definition at line 34 of file itemmonitor.cpp.
Member Function Documentation
|
protected |
Returns the item fetch scope.
Since this returns a reference it can be used to conveniently modify the current scope in-place, i.e. by calling a method on the returned reference without storing it in a local variable. See the ItemFetchScope documentation for an example.
- Returns
- a reference to the current item fetch scope
- See also
- setFetchScope() for replacing the current item fetch scope
Definition at line 80 of file itemmonitor.cpp.
Item ItemMonitor::item | ( | ) | const |
Returns the currently monitored item.
Definition at line 62 of file itemmonitor.cpp.
|
protectedvirtual |
This method is called whenever the monitored item has changed.
- Parameters
-
item The changed item.
Definition at line 67 of file itemmonitor.cpp.
|
protectedvirtual |
This method is called whenever the monitored item has been removed.
Definition at line 71 of file itemmonitor.cpp.
|
protected |
Sets the item fetch scope.
Controls how much of an item's data is fetched from the server, e.g. whether to fetch the full item payload or only meta data.
- Parameters
-
fetchScope The new scope for item fetch operations.
- See also
- fetchScope()
Definition at line 75 of file itemmonitor.cpp.
void ItemMonitor::setItem | ( | const Item & | item | ) |
Sets the item
that shall be monitored.
Definition at line 39 of file itemmonitor.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:00:29 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.