Gui: avoid code duplication in PythonEditor

This commit is contained in:
Benjamin Bræstrup Sayoc
2025-03-01 14:59:04 +01:00
parent 3f9ad28acf
commit 2ebb951bb1
3 changed files with 32 additions and 38 deletions

View File

@@ -139,6 +139,12 @@ public:
explicit PythonTextEditor(QWidget *parent = nullptr);
~PythonTextEditor() override;
public Q_SLOTS:
/** Inserts \a str at the beginning of each selected line or the current line if
* nothing is selected
*/
void prepend(const QString& str);
protected:
void keyPressEvent(QKeyEvent *) override;
};