ParaView
Public Slots | Signals | Public Member Functions | Friends | List of all members
pqConsoleWidget Class Reference

Qt widget that provides an interactive console - you can send text to the console by calling printString() and receive user input by connecting to the executeCommand() slot. More...

#include <pqConsoleWidget.h>

Inherits QWidget.

Public Slots

void printString (const QString &Text)
 Writes the supplied text to the console. More...
 
void printCommand (const QString &cmd)
 Updates the current command. More...
 
void clear ()
 Clears the contents of the console. More...
 
void prompt (const QString &text)
 Puts out an input accepting prompt. More...
 
void insertCompletion (const QString &text)
 Inserts the given completion string at the cursor. More...
 

Signals

void executeCommand (const QString &Command)
 Signal emitted whenever the user enters a command. More...
 

Public Member Functions

 pqConsoleWidget (QWidget *Parent)
 
virtual ~pqConsoleWidget ()
 
QTextCharFormat getFormat ()
 Returns the current formatting that will be used by printString. More...
 
void setFormat (const QTextCharFormat &Format)
 Sets formatting that will be used by printString. More...
 
void setCompleter (pqConsoleWidgetCompleter *completer)
 Set a completer for this console widget. More...
 
QPoint getCursorPosition ()
 

Friends

class pqImplementation
 
class pqConsoleWidgetEventPlayer
 

Detailed Description

Qt widget that provides an interactive console - you can send text to the console by calling printString() and receive user input by connecting to the executeCommand() slot.

See also
pqPythonShell, pqOutputWindow

Definition at line 51 of file pqConsoleWidget.h.

Constructor & Destructor Documentation

◆ pqConsoleWidget()

pqConsoleWidget::pqConsoleWidget ( QWidget *  Parent)

◆ ~pqConsoleWidget()

virtual pqConsoleWidget::~pqConsoleWidget ( )
virtual

Member Function Documentation

◆ getFormat()

QTextCharFormat pqConsoleWidget::getFormat ( )

Returns the current formatting that will be used by printString.

◆ setFormat()

void pqConsoleWidget::setFormat ( const QTextCharFormat &  Format)

Sets formatting that will be used by printString.

◆ setCompleter()

void pqConsoleWidget::setCompleter ( pqConsoleWidgetCompleter completer)

Set a completer for this console widget.

◆ getCursorPosition()

QPoint pqConsoleWidget::getCursorPosition ( )

◆ executeCommand

void pqConsoleWidget::executeCommand ( const QString &  Command)
signal

Signal emitted whenever the user enters a command.

◆ printString

void pqConsoleWidget::printString ( const QString &  Text)
slot

Writes the supplied text to the console.

◆ printCommand

void pqConsoleWidget::printCommand ( const QString &  cmd)
slot

Updates the current command.

Unlike printString, this will affect the current command being typed.

◆ clear

void pqConsoleWidget::clear ( )
slot

Clears the contents of the console.

◆ prompt

void pqConsoleWidget::prompt ( const QString &  text)
slot

Puts out an input accepting prompt.

It is recommended that one uses prompt instead of printString() to print an input prompt since this call ensures that the prompt is shown on a new line.

◆ insertCompletion

void pqConsoleWidget::insertCompletion ( const QString &  text)
slot

Inserts the given completion string at the cursor.

This will replace the current word that the cursor is touching with the given text. Determines the word using QTextCursor::StartOfWord, EndOfWord.

Friends And Related Function Documentation

◆ pqImplementation

friend class pqImplementation
friend

Definition at line 121 of file pqConsoleWidget.h.

◆ pqConsoleWidgetEventPlayer

friend class pqConsoleWidgetEventPlayer
friend

Definition at line 123 of file pqConsoleWidget.h.


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