![]() |
Home · All Classes · Main Classes · Grouped Classes · Modules · Functions | ![]() |
The QAbstractMessageHandler class provides a callback interface for receiving messages. More...
#include <QAbstractMessageHandler>
Inherits QObject.
Note: All the functions in this class are thread-safe.
This class was introduced in Qt 4.4.
The QAbstractMessageHandler class provides a callback interface for receiving messages.
QAbstractMessageHandler is an abstract base class that provides an interface for receiving messages. Typically one subclass QAbstractMessageHandler and implement the handleMessage() function and subsequently pass a pointer to the code that generates the messages.
The user of QAbstractMessageHandler calls message(). message() forwards the arguments on to handleMessage() which the sub-class has implemented, and while doing so seralizes the calls. This means QAbstractMessageHandler is thread safe.
QAbstractMessageHandler isn't tied to a particular use case. This means that the interpretation of the arguments passed to message(), depends on the context in which it is used, and must therefore be specified in that context.
Constructs a QAbstractMessageHandler.
The argument parent is sent to the QObject's constructor.
Destructs this QAbstractMessageHandler.
This function is re-implemented by the sub-class. It's called by message() and receives its arguments, type, description, identifier and sourceLocation from message() unmodified.
Sends a message to this message handler.
How type and description, its format and content, are interpreted must be defined by the context in which this message handler is used. identifier is a URI that identifies the message, and therefore is the key to how the other arguments should be interpreted.
sourceLocation identifies where the message was generated.
Since identifier is globally unique, messages from arbitrary sources can safely be identified.
It is the caller's responsibility to guarantee that identifier is a valid QUrl, or a default constructed QUrl.
This function unconditionally calls handleMessage().
Copyright © 2007 Trolltech | Trademarks | Qt 4.4.0-tp1 |