27 #include <ui_PythonEditor.h>
32 #include <QMainWindow>
40 class QFileSystemModel;
48 #define MAX_RECENT_FILES 10
50 class PythonEditor final :
public QMainWindow,
public Ui::PythonEditor
67 bool openFile(
const QString &fileName);
89 #ifndef QT_NO_CLIPBOARD
104 static bool HasRecentFiles();
108 void createActions();
113 void writeSettings();
114 bool loadFile(
const QString &fileName);
115 void prependToRecentFiles(
const QString &fileName);
116 void setRecentFilesVisible(
bool visible);
118 QMdiSubWindow *findChildCodeEditor(
const QString &fileName)
const;
123 QMdiArea *m_mdiArea{
nullptr};
125 QMenu *m_windowMenu{
nullptr};
128 QAction *m_recentFileSeparator{
nullptr};
129 QAction *m_recentFileSubMenuAct{
nullptr};
130 QAction *m_closeAct{
nullptr};
131 QAction *m_closeAllAct{
nullptr};
132 QAction *m_tileAct{
nullptr};
133 QAction *m_cascadeAct{
nullptr};
134 QAction *m_nextAct{
nullptr};
135 QAction *m_previousAct{
nullptr};
136 QAction *m_windowMenuSeparatorAct{
nullptr};
void promptForFileToOpen()
bool eventFilter(QObject *obj, QEvent *e) override
void closeEvent(QCloseEvent *event) override
void updateRecentFileActions()
CodeEditor * createChildCodeEditor()
PythonEditor(PythonInterpreter *interpreter)
void changeEvent(QEvent *e) override
void executionCalled(const std::string &evalStatement, QListWidget *output)
static QString SettingsApplicationName()
bool openFile(const QString &fileName)
void promptForFolderToOpen()
void projectTreeDoubleClicked(const QModelIndex &index)
Main application interface (for plugins)