PythonEditorWidget
PythonEditorWidget
Python script editor tab.
#include <PythonEditorWidget.hpp>
Inherits from QWidget
Public Signals
| Name | |
|---|---|
| void | executionFinished() Emitted after script execution (for namespace refresh). |
| void | outputGenerated(QString const & stdout_text, QString const & stderr_text, bool success) Emitted when output should be shown in the console. |
Public Functions
| Name | |
|---|---|
| PythonEditorWidget(std::shared_ptr< PythonWidgetState > state, PythonBridge * bridge, QWidget * parent =[nullptr]) | |
| ~PythonEditorWidget() override | |
| void | runScript() Run the entire script. |
| void | runSelection() Run only the selected text. |
| void | openFile() Open a .py file. |
| void | openFilePath(QString const & path) Open a specific file by path. |
| void | saveFile() Save the current file. |
| void | saveFileAs() Save as a new file. |
| void | updateFontSize(int size) Apply current font size. |
| void | setShowLineNumbers(bool show) Show/hide line numbers. |
| void | loadTemplate(QString const & name) Load a template into the editor. |
Protected Functions
| Name | |
|---|---|
| void | dragEnterEvent(QDragEnterEvent * event) override |
| void | dragMoveEvent(QDragMoveEvent * event) override |
| void | dropEvent(QDropEvent * event) override |
Public Signals Documentation
signal executionFinished
void executionFinished()Emitted after script execution (for namespace refresh).
signal outputGenerated
void outputGenerated(
QString const & stdout_text,
QString const & stderr_text,
bool success
)Emitted when output should be shown in the console.
Public Functions Documentation
function PythonEditorWidget
explicit PythonEditorWidget(
std::shared_ptr< PythonWidgetState > state,
PythonBridge * bridge,
QWidget * parent =nullptr
)function ~PythonEditorWidget
~PythonEditorWidget() overridefunction runScript
void runScript()Run the entire script.
function runSelection
void runSelection()Run only the selected text.
function openFile
void openFile()Open a .py file.
function openFilePath
void openFilePath(
QString const & path
)Open a specific file by path.
function saveFile
void saveFile()Save the current file.
function saveFileAs
void saveFileAs()Save as a new file.
function updateFontSize
void updateFontSize(
int size
)Apply current font size.
function setShowLineNumbers
void setShowLineNumbers(
bool show
)Show/hide line numbers.
function loadTemplate
void loadTemplate(
QString const & name
)Load a template into the editor.
Protected Functions Documentation
function dragEnterEvent
void dragEnterEvent(
QDragEnterEvent * event
) overridefunction dragMoveEvent
void dragMoveEvent(
QDragMoveEvent * event
) overridefunction dropEvent
void dropEvent(
QDropEvent * event
) overrideUpdated on 2026-11-13 at 20:25:40 +0000