#include <eventtypestore.h>
List of all members.
Signals |
void | eventTypeModified (const QString &eventType) |
void | eventTypeUninstalled (const QString &eventType) |
Public Member Functions |
| EventTypeStore (const QString &eventTypesPath, uint maxStoredEventTypes=100) |
bool | eventTypeExists (const QString &eventType) const |
QList< QString > | allKeys (const QString &eventType) const |
bool | contains (const QString &eventType, const QString &key) const |
QString | value (const QString &eventType, const QString &key) const |
Detailed Description
A class that represents a notification event type store. The event type store will store all the event types stored in the given path.
The event type store will limit the number of configuration files it will read. The rationale is to constrain memory usage and startup time in case a huge number of event types are defined by a misbehaving package.
Constructor & Destructor Documentation
EventTypeStore::EventTypeStore |
( |
const QString & |
eventTypesPath, |
|
|
uint |
maxStoredEventTypes = 100 | |
|
) |
| | [explicit] |
Creates a notification event types store to store the notifications event types.
- Parameters:
-
| eventTypesPath | The path where the different event types are defined |
| maxStoredEventTypes | The maximum number of event types to keep in memory |
Member Function Documentation
QList< QString > EventTypeStore::allKeys |
( |
const QString & |
eventType |
) |
const |
Returns all parameter keys for a given event type. If the event type doesn't exist, an empty list is returned.
- Parameters:
-
| eventType | the event type. |
- See also:
- eventTypeExists, contains, value
bool EventTypeStore::contains |
( |
const QString & |
eventType, |
|
|
const QString & |
key | |
|
) |
| | const |
Check if a given parameter key exists in the the configuration for eventType. If the key does exist in the eventType, this method returns true
. If the key does not exist or the eventType does not exist at all, this method returns false
.
- Parameters:
-
| eventType | the event type. |
| key | the parameter key. |
- Returns:
true
if the key exists in the event type, false
otherwise.
- See also:
- eventTypeExists, allKeys, value
bool EventTypeStore::eventTypeExists |
( |
const QString & |
eventType |
) |
const |
Tests if the eventType exists in the system.
- Parameters:
-
| eventType | the event type to check. |
- Returns:
true
if the event type exists, false
otherwise.
void EventTypeStore::eventTypeModified |
( |
const QString & |
eventType |
) |
[signal] |
A signal sent whenever an event type has been modified
- Parameters:
-
| eventType | the event type that was modified |
void EventTypeStore::eventTypeUninstalled |
( |
const QString & |
eventType |
) |
[signal] |
A signal sent whenever an event type has been uninstalled
- Parameters:
-
| eventType | the event type that was removed |
QString EventTypeStore::value |
( |
const QString & |
eventType, |
|
|
const QString & |
key | |
|
) |
| | const |
Returns the value for the given parameter key in the configuration for eventType. If the key does not exist in the eventType or the eventType does not exist at all, this method returns an empty string.
- Parameters:
-
| eventType | the event type. |
| key | the parameter key. |
- Returns:
- the value for the key in the event type.
- See also:
- eventTypeExists, allKeys, contains
The documentation for this class was generated from the following files:
- /home/bifh1/cs2009q3-i386/work/system-ui-1.0.23/src/systemui/notifications/eventtypestore.h
- /home/bifh1/cs2009q3-i386/work/system-ui-1.0.23/src/systemui/notifications/eventtypestore.cpp