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... | |
pqPythonTextArea * | getCurrentTextArea () 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 |
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.
pqPythonTabWidget::pqPythonTabWidget | ( | QWidget * | parent | ) |
Default constructor.
[in] | parent | the QWidget owning this widget |
pqPythonTextArea* pqPythonTabWidget::getCurrentTextArea | ( | ) | const |
Returns the current displayed pqPythonTextArea.
void pqPythonTabWidget::connectActions | ( | pqPythonEditorActions & | actions | ) |
Connects this class to the actions.
void pqPythonTabWidget::updateActions | ( | pqPythonEditorActions & | actions | ) |
Connects the current pqPythonTextArea to the actions.
bool pqPythonTabWidget::saveOnClose | ( | ) |
Returns true if all opened buffer were saved on the disk.
void pqPythonTabWidget::updateTrace | ( | const QString & | str | ) |
Update the text in the paraview trace tab.
Creates a new one if the tab doesn't exist.
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.
|
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.
void pqPythonTabWidget::loadFile | ( | const QString & | filename | ) |
|
slot |
Add a new empty text area.
|
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.
|
slot |
Request to close the current tab.
|
signal |
Raised when a file has been opened and loaded into the text edit widget.
|
signal |
Raised when a file has been saved successfuly.
|
overrideprotected |
|
overrideprotected |