ctkConsoleWidget Class Reference

#include <Libs/Widgets/ctkConsoleWidget.h>

Collaboration diagram for ctkConsoleWidget:
Collaboration graph
[legend]

List of all members.

Public Slots

void clear ()
 Clears the contents of the console.
void insertCompletion (const QString &text)
void printCommand (const QString &cmd)
void printString (const QString &Text)
 Writes the supplied text to the console.
void prompt (const QString &text)

Signals

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

Public Member Functions

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

Friends

class pqImplementation

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 72 of file ctkConsoleWidget.h.


Constructor & Destructor Documentation

ctkConsoleWidget::ctkConsoleWidget ( QWidget *  Parent  ) 

Definition at line 408 of file ctkConsoleWidget.cpp.

ctkConsoleWidget::~ctkConsoleWidget (  )  [virtual]

Definition at line 418 of file ctkConsoleWidget.cpp.


Member Function Documentation

void ctkConsoleWidget::clear (  )  [slot]

Clears the contents of the console.

Definition at line 499 of file ctkConsoleWidget.cpp.

void ctkConsoleWidget::executeCommand ( const QString &  Command  )  [signal]

Signal emitted whenever the user enters a command.

QTextCharFormat ctkConsoleWidget::getFormat (  ) 

Returns the current formatting that will be used by printString.

Definition at line 424 of file ctkConsoleWidget.cpp.

void ctkConsoleWidget::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.

Definition at line 442 of file ctkConsoleWidget.cpp.

void ctkConsoleWidget::printCommand ( const QString &  cmd  )  [slot]

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

Definition at line 471 of file ctkConsoleWidget.cpp.

void ctkConsoleWidget::printString ( const QString &  Text  )  [slot]

Writes the supplied text to the console.

Definition at line 462 of file ctkConsoleWidget.cpp.

void ctkConsoleWidget::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.

Definition at line 478 of file ctkConsoleWidget.cpp.

void ctkConsoleWidget::setCompleter ( ctkConsoleWidgetCompleter completer  ) 

Set a completer for this console widget.

Definition at line 436 of file ctkConsoleWidget.cpp.

void ctkConsoleWidget::setFormat ( const QTextCharFormat &  Format  ) 

Sets formatting that will be used by printString.

Definition at line 430 of file ctkConsoleWidget.cpp.


Friends And Related Function Documentation

friend class pqImplementation [friend]

Definition at line 123 of file ctkConsoleWidget.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated on 21 May 2010 for CTK by  doxygen 1.6.1