![]() |
CTK
0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
|
#include <Libs/PluginFramework/service/log/ctkLogReaderService.h>
Public Member Functions | |
| virtual bool | connectLogListener (const QObject *receiver, const char *slot)=0 |
| virtual QList< ctkLogEntryPtr > | getLog ()=0 |
| virtual | ~ctkLogReaderService () |
Provides methods to retrieve ctkLogEntry objects from the log.
There are three ways to retrieve ctkLogEntry objects:
ctkLogEntry objects is to register a ctkLogListener object with the service registry whose ctkLogListener::logged() method will be called for each entry added to the log. This way you do not need to retrieve any service object to express an interest in log entries. ctkLogReaderService by using connectLogListener(). ctkLogEntry objects, the getLog() method can be called which will return a QList of all ctkLogEntry objects in the log. Definition at line 54 of file ctkLogReaderService.h.
|
inlinevirtual |
Definition at line 56 of file ctkLogReaderService.h.
|
pure virtual |
Subscribes to ctkLogEntry objects.
This method connects a Qt slot with the Log Reader Service. The slot must take a ctkLogEntryPtr as the only argument and will be called for each ctkLogEntry object placed into the log.
When a plugin which connects a Qt slot is stopped, the Log Reader Service must disconnect all of the plugin's connected slots.
If the same slot from the same object is already connected, this method does nothing.
| receiver | The object to connect to. |
| slot | The name of the slot to be connected. |
true if the connection was successfull; false otherwise.
|
pure virtual |
Returns a QList of all ctkLogEntry objects in the log.
Each element of the QList is a ctkLogEntry object, ordered with the most recent entry first. Whether the list is of all ctkLogEntry objects since the Log Service was started or some recent past is implementation-specific. Also implementation-specific is whether informational and debug ctkLogEntry objects are included in the list.
ctkLogEntry objects in the log.