Public Slots | Signals | Public Member Functions | Protected Member Functions | Properties | Friends | List of all members
pqOutputWidget Class Reference

widget to show Qt and VTK messages. More...

#include <pqOutputWidget.h>

Inherits QWidget.

Public Slots

bool displayMessage (const QString &message, QtMsgType type=QtInfoMsg)
 Display a message in the widget. More...
 
void alwaysOpenForNewMessages (bool val)
 Always open the messages window for every new message unless it is docked. More...
 
void showFullMessages (bool val)
 Show full messages instead of grouped messages. More...
 
void copyToClipboard ()
 Copy output text to the clipboard. More...
 
void saveToFile ()
 Saves output text to a file. More...
 
void clear ()
 Clears the console. More...
 
void showEvent (QShowEvent *event) override
 Record the first ever show event. More...
 

Signals

void messageDisplayed (const QString &message, int type)
 Signal fired any time a message is displayed. More...
 

Public Member Functions

 pqOutputWidget (QWidget *parent=nullptr, Qt::WindowFlags f=Qt::WindowFlags())
 
 ~pqOutputWidget () override
 
void suppress (const QStringList &substrs)
 Add substrings to match with message to determine whether they should be suppressed. More...
 
bool shouldOpenForNewMessages ()
 Get the state of the 'Always open for new messages' checkbox. More...
 
void setSettingsKey (const QString &key)
 Set the settings key that will be used to restore/save the state for the "Show full messages" button. More...
 
const QString & settingsKey () const
 Set the settings key that will be used to restore/save the state for the "Show full messages" button. More...
 
void setFontSize (int fontSize)
 Set/get the font size in points for the output console text. More...
 

Protected Member Functions

virtual bool suppress (const QString &message, QtMsgType type)
 Returns true if the message must be suppressed/ignored. More...
 
virtual QString extractSummary (const QString &message, QtMsgType type)
 Extract a summary string from the message and returns that. More...
 

Properties

QString settingsKey
 

Friends

class OutputWidgetInternals::OutputWindow
 

Detailed Description

widget to show Qt and VTK messages.

pqOutputWidget is QWidget subclass that can capture and show messages generated by Qt as well as VTK. On instantiation, it installs handlers to handle Qt and VTK messages.

Definition at line 78 of file pqOutputWidget.h.

Constructor & Destructor Documentation

◆ pqOutputWidget()

pqOutputWidget::pqOutputWidget ( QWidget *  parent = nullptr,
Qt::WindowFlags  f = Qt::WindowFlags() 
)

◆ ~pqOutputWidget()

pqOutputWidget::~pqOutputWidget ( )
override

Member Function Documentation

◆ suppress() [1/2]

void pqOutputWidget::suppress ( const QStringList &  substrs)

Add substrings to match with message to determine whether they should be suppressed.

◆ setSettingsKey()

void pqOutputWidget::setSettingsKey ( const QString &  key)

Set the settings key that will be used to restore/save the state for the "Show full messages" button.

By default "pqOutputWidget" will be used.

◆ settingsKey()

const QString& pqOutputWidget::settingsKey ( ) const

Set the settings key that will be used to restore/save the state for the "Show full messages" button.

By default "pqOutputWidget" will be used.

◆ setFontSize()

void pqOutputWidget::setFontSize ( int  fontSize)

Set/get the font size in points for the output console text.

◆ shouldOpenForNewMessages()

bool pqOutputWidget::shouldOpenForNewMessages ( )

Get the state of the 'Always open for new messages' checkbox.

◆ displayMessage

bool pqOutputWidget::displayMessage ( const QString &  message,
QtMsgType  type = QtInfoMsg 
)
slot

Display a message in the widget.

There's generally no need to use this since one can have the same effect by triggering the message through Qt or VTK message notification mechanisms.

Returns
true if the message was displayed, otherwise false.

◆ alwaysOpenForNewMessages

void pqOutputWidget::alwaysOpenForNewMessages ( bool  val)
slot

Always open the messages window for every new message unless it is docked.

◆ showFullMessages

void pqOutputWidget::showFullMessages ( bool  val)
slot

Show full messages instead of grouped messages.

◆ copyToClipboard

void pqOutputWidget::copyToClipboard ( )
slot

Copy output text to the clipboard.

◆ saveToFile

void pqOutputWidget::saveToFile ( )
slot

Saves output text to a file.

◆ clear

void pqOutputWidget::clear ( )
slot

Clears the console.

◆ showEvent

void pqOutputWidget::showEvent ( QShowEvent *  event)
overrideslot

Record the first ever show event.

◆ messageDisplayed

void pqOutputWidget::messageDisplayed ( const QString &  message,
int  type 
)
signal

Signal fired any time a message is displayed.

◆ suppress() [2/2]

virtual bool pqOutputWidget::suppress ( const QString &  message,
QtMsgType  type 
)
protectedvirtual

Returns true if the message must be suppressed/ignored.

◆ extractSummary()

virtual QString pqOutputWidget::extractSummary ( const QString &  message,
QtMsgType  type 
)
protectedvirtual

Extract a summary string from the message and returns that.

Friends And Related Function Documentation

◆ OutputWidgetInternals::OutputWindow

friend class OutputWidgetInternals::OutputWindow
friend

Definition at line 177 of file pqOutputWidget.h.

Property Documentation

◆ settingsKey

QString pqOutputWidget::settingsKey
readwrite

Definition at line 82 of file pqOutputWidget.h.


The documentation for this class was generated from the following file: