Public Slots | Signals | Public Member Functions | Protected Member Functions | List of all members
pqPythonTabWidget Class Reference

Encapsulates the multitab python editor. More...

#include <pqPythonTabWidget.h>

Inherits QTabWidget.

Public Slots

void createNewEmptyTab ()
 Add a new empty text area. More...
 
void addNewTextArea (const QString &filename, vtkTypeUInt32 location=0x10)
 Loads the content of the file into the current tab if it's empty and not linked to another QText. More...
 
void closeCurrentTab ()
 Request to close the current tab. More...
 

Signals

void fileOpened (const QString &)
 Raised when a file has been opened and loaded into the text edit widget. More...
 
void fileSaved (const QString &)
 Raised when a file has been saved successfuly. More...
 

Public Member Functions

 pqPythonTabWidget (QWidget *parent)
 Default constructor. More...
 
pqPythonTextAreagetCurrentTextArea () const
 Returns the current displayed pqPythonTextArea. More...
 
void connectActions (pqPythonEditorActions &actions)
 Connects this class to the actions. More...
 
void updateActions (pqPythonEditorActions &actions)
 Connects the current pqPythonTextArea to the actions. More...
 
bool saveOnClose ()
 Returns true if all opened buffer were saved on the disk. More...
 
void updateTrace (const QString &str)
 Update the text in the paraview trace tab. More...
 
void stopTrace (const QString &str)
 Update the text in the paraview python trace tab and converts it into a unamed script. More...
 
template<typename T >
void linkTo (T *)
 Link the input QTextEdit to one of the tab of the editor. More...
 
void loadFile (const QString &filename)
 

Protected Member Functions

void keyPressEvent (QKeyEvent *keyEvent) override
 
void mousePressEvent (QMouseEvent *mouseEvent) override
 

Detailed Description

Encapsulates the multitab python editor.

Provides a QWidget with multiple QTextArea to edit python scripts in paraview. The widget handles automatic saving, syntax highlighting and undo/redo features within each tab.

Definition at line 28 of file pqPythonTabWidget.h.

Constructor & Destructor Documentation

◆ pqPythonTabWidget()

pqPythonTabWidget::pqPythonTabWidget ( QWidget *  parent)

Default constructor.

Parameters
[in]parentthe QWidget owning this widget

Member Function Documentation

◆ getCurrentTextArea()

pqPythonTextArea* pqPythonTabWidget::getCurrentTextArea ( ) const

Returns the current displayed pqPythonTextArea.

◆ connectActions()

void pqPythonTabWidget::connectActions ( pqPythonEditorActions actions)

Connects this class to the actions.

◆ updateActions()

void pqPythonTabWidget::updateActions ( pqPythonEditorActions actions)

Connects the current pqPythonTextArea to the actions.

◆ saveOnClose()

bool pqPythonTabWidget::saveOnClose ( )

Returns true if all opened buffer were saved on the disk.

◆ updateTrace()

void pqPythonTabWidget::updateTrace ( const QString &  str)

Update the text in the paraview trace tab.

Creates a new one if the tab doesn't exist.

◆ stopTrace()

void pqPythonTabWidget::stopTrace ( const QString &  str)

Update the text in the paraview python trace tab and converts it into a unamed script.

If no tab exists, creates a new one.

◆ linkTo()

template<typename T >
void pqPythonTabWidget::linkTo ( T *  )
inline

Link the input QTextEdit to one of the tab of the editor.

If this objects is already linked within the editor, switch to that tab otherwise creates a new one

Definition at line 82 of file pqPythonTabWidget.h.

◆ loadFile()

void pqPythonTabWidget::loadFile ( const QString &  filename)

◆ createNewEmptyTab

void pqPythonTabWidget::createNewEmptyTab ( )
slot

Add a new empty text area.

◆ addNewTextArea

void pqPythonTabWidget::addNewTextArea ( const QString &  filename,
vtkTypeUInt32  location = 0x10 
)
slot

Loads the content of the file into the current tab if it's empty and not linked to another QText.

Otherwise adds a new tab.

◆ closeCurrentTab

void pqPythonTabWidget::closeCurrentTab ( )
slot

Request to close the current tab.

◆ fileOpened

void pqPythonTabWidget::fileOpened ( const QString &  )
signal

Raised when a file has been opened and loaded into the text edit widget.

◆ fileSaved

void pqPythonTabWidget::fileSaved ( const QString &  )
signal

Raised when a file has been saved successfuly.

◆ keyPressEvent()

void pqPythonTabWidget::keyPressEvent ( QKeyEvent *  keyEvent)
overrideprotected

◆ mousePressEvent()

void pqPythonTabWidget::mousePressEvent ( QMouseEvent *  mouseEvent)
overrideprotected

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