widget to show Qt and VTK messages. More...
#include <pqOutputWidget.h>
Inherits QObject.
Signals | |
void | message (QtMsgType type, const QString &msg) |
void | showMessage (QString msg, QtMsgType type) |
Public Member Functions | |
MessageHandler (QObject *parent=nullptr) | |
Static Public Member Functions | |
static void | install (pqOutputWidget *widget) |
This function can be used to install a message handler for Qt that forwards all messages generated by Qt to the vtkOutputWindow instance obtained by vtkOutputWindow::GetInstance(). More... | |
static void | handler (QtMsgType type, const QMessageLogContext &, const QString &msg) |
This is the function installed with Qt. More... | |
static void | handlerVTK (QtMsgType type, const QString &msg) |
This function is used for VTK messages that don't have QMessageLogContext. More... | |
widget to show Qt and VTK messages.
This utility class allows us to install a Qt message handler. We are using a signal/slot to ensure that the messages are written on the main thread.
This utility class also helps us support VTK messages coming from different threads.
N.B. This is really a internal class however has to be exported so it can be used inside a message handler function inside Qt.
Definition at line 34 of file pqOutputWidget.h.
MessageHandler::MessageHandler | ( | QObject * | parent = nullptr | ) |
|
static |
This function can be used to install a message handler for Qt that forwards all messages generated by Qt to the vtkOutputWindow instance obtained by vtkOutputWindow::GetInstance().
Thus, this is quick way to forward all Qt messages to be forwarded to VTK for output using the same mechanisms setup for handling VTK messages.
|
static |
This is the function installed with Qt.
|
static |
This function is used for VTK messages that don't have QMessageLogContext.
|
signal |
|
signal |