Changeset View
Changeset View
Standalone View
Standalone View
kwrite/kwrite.h
Context not available. | |||||
37 | class ResourceInstance; | 37 | class ResourceInstance; | ||
---|---|---|---|---|---|
38 | } | 38 | } | ||
39 | 39 | | |||
40 | namespace KTextEditor { | | |||
41 | class Application; | | |||
42 | } | | |||
43 | | ||||
44 | class KToggleAction; | 40 | class KToggleAction; | ||
45 | class KRecentFilesAction; | 41 | class KRecentFilesAction; | ||
46 | class KSqueezedTextLabel; | 42 | class KSqueezedTextLabel; | ||
43 | class KWriteApplication; | ||||
47 | 44 | | |||
48 | class KWrite : public KParts::MainWindow | 45 | class KWrite : public KParts::MainWindow | ||
49 | { | 46 | { | ||
50 | Q_OBJECT | 47 | Q_OBJECT | ||
51 | 48 | | |||
52 | public: | 49 | public: | ||
53 | KWrite(KTextEditor::Document * = nullptr); | 50 | KWrite(KTextEditor::Document * = nullptr, KWriteApplication *app = nullptr); | ||
54 | ~KWrite() override; | 51 | ~KWrite() override; | ||
55 | 52 | | |||
56 | void loadURL(const QUrl &url); | 53 | void loadURL(const QUrl &url); | ||
Context not available. | |||||
59 | return m_view; | 56 | return m_view; | ||
60 | } | 57 | } | ||
61 | 58 | | |||
62 | static bool noWindows() { | | |||
63 | return winList.isEmpty(); | | |||
64 | } | | |||
65 | | ||||
66 | private: | 59 | private: | ||
67 | void setupActions(); | 60 | void setupActions(); | ||
68 | 61 | | |||
Context not available. | |||||
117 | //session management | 110 | //session management | ||
118 | public: | 111 | public: | ||
119 | void restore(KConfig *, int); | 112 | void restore(KConfig *, int); | ||
120 | static void restore(); | | |||
121 | 113 | | |||
122 | private: | 114 | private: | ||
123 | void readProperties(const KConfigGroup &) override; | 115 | void readProperties(const KConfigGroup &) override; | ||
Context not available. | |||||
133 | KToggleAction *m_paShowStatusBar; | 125 | KToggleAction *m_paShowStatusBar; | ||
134 | QAction *m_closeAction; | 126 | QAction *m_closeAction; | ||
135 | KActivities::ResourceInstance *m_activityResource; | 127 | KActivities::ResourceInstance *m_activityResource; | ||
136 | 128 | KWriteApplication *m_app; | |||
137 | static QList<KTextEditor::Document *> docList; | | |||
138 | static QList<KWrite *> winList; | | |||
139 | KTextEditor::Application *m_application; | | |||
140 | 129 | | |||
141 | public Q_SLOTS: | 130 | public Q_SLOTS: | ||
142 | void documentNameChanged(); | 131 | void documentNameChanged(); | ||
143 | 132 | | |||
144 | /** | | |||
145 | * KTextEditor::Application extensions | | |||
146 | */ | | |||
147 | bool quit(); | | |||
148 | QList<KTextEditor::Document *> documents() { return docList; } | | |||
149 | | ||||
150 | protected: | 133 | protected: | ||
151 | /** | 134 | /** | ||
152 | * Event filter for QApplication to handle mac os like file open | 135 | * Event filter for QApplication to handle mac os like file open | ||
Context not available. | |||||
155 | }; | 138 | }; | ||
156 | 139 | | |||
157 | #endif | 140 | #endif | ||
158 | | ||||
Context not available. |