Changeset View
Changeset View
Standalone View
Standalone View
src/widgets/gcodeeditorwidget.h
Show All 24 Lines | |||||
25 | #include <QTabWidget> | 25 | #include <QTabWidget> | ||
26 | #include <QWidget> | 26 | #include <QWidget> | ||
27 | 27 | | |||
28 | class GCodeEditorWidget : public QWidget | 28 | class GCodeEditorWidget : public QWidget | ||
29 | { | 29 | { | ||
30 | Q_OBJECT | 30 | Q_OBJECT | ||
31 | public: | 31 | public: | ||
32 | explicit GCodeEditorWidget(QWidget *parent = nullptr); | 32 | explicit GCodeEditorWidget(QWidget *parent = nullptr); | ||
33 | ~GCodeEditorWidget() = default; | ||||
33 | void loadFile(const QUrl &file); | 34 | void loadFile(const QUrl &file); | ||
34 | QVector<QUrl> modifiedFiles(); | 35 | QVector<QUrl> modifiedFiles(); | ||
35 | bool saveFile(const QUrl &url); | 36 | bool saveFile(const QUrl &url); | ||
36 | 37 | | |||
37 | private: | 38 | private: | ||
38 | QMap<QUrl, KTextEditor::Document *> urlDoc; | 39 | QMap<QUrl, KTextEditor::Document *> urlDoc; | ||
39 | QMap<QUrl, QWidget *> urlTab; | 40 | QMap<QUrl, QWidget *> urlTab; | ||
40 | KTextEditor::ConfigInterface *m_interface; | 41 | KTextEditor::ConfigInterface *m_interface = nullptr; | ||
41 | KTextEditor::Document *newDoc(const QUrl &file); | 42 | KTextEditor::Document *newDoc(const QUrl &file); | ||
42 | KTextEditor::Editor *m_editor; | 43 | KTextEditor::Editor *m_editor; | ||
43 | KTextEditor::View *newView(KTextEditor::Document *doc); | 44 | KTextEditor::View *newView(KTextEditor::Document *doc); | ||
44 | QTabWidget *m_tabwidget; | 45 | QTabWidget *m_tabwidget; | ||
45 | void closeTab(int index); | 46 | void closeTab(int index); | ||
46 | void currentIndexChanged(int index); | 47 | void currentIndexChanged(int index); | ||
47 | void setupInterface(const KTextEditor::View *view); | 48 | void setupInterface(const KTextEditor::View *view); | ||
48 | void setupTabWidget(); | 49 | void setupTabWidget(); | ||
Show All 10 Lines |