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.
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
Definition at line 21 of file pqConsoleWidget.h.
◆ pqConsoleWidget()
pqConsoleWidget::pqConsoleWidget |
( |
QWidget * |
parent = nullptr | ) |
|
◆ ~pqConsoleWidget()
pqConsoleWidget::~pqConsoleWidget |
( |
| ) |
|
|
override |
◆ 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()
Set a completer for this console widget.
◆ getCursorPosition()
QPoint pqConsoleWidget::getCursorPosition |
( |
| ) |
|
◆ setFontSize()
void pqConsoleWidget::setFontSize |
( |
int |
size | ) |
|
Set the size of the font to use.
Size is measured in points.
◆ executeCommand
void pqConsoleWidget::executeCommand |
( |
const QString & |
Command | ) |
|
|
signal |
Signal emitted whenever the user enters a command.
◆ consoleFocusInEvent
void pqConsoleWidget::consoleFocusInEvent |
( |
| ) |
|
|
signal |
Fired to indicate to the application that the console has focus.
◆ 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.
◆ text
QString pqConsoleWidget::text |
( |
| ) |
|
|
slot |
Get the text in the console.
◆ 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.
◆ takeFocus
void pqConsoleWidget::takeFocus |
( |
| ) |
|
|
slot |
This method can be called to make the internal QTextEdit take focus.
◆ pqImplementation
friend class pqImplementation |
|
friend |
◆ pqConsoleWidgetEventPlayer
The documentation for this class was generated from the following file: