Changeset View
Changeset View
Standalone View
Standalone View
src/view/kateview.h
Show All 18 Lines | 1 | /* This file is part of the KDE libraries | |||
---|---|---|---|---|---|
19 | Boston, MA 02110-1301, USA. | 19 | Boston, MA 02110-1301, USA. | ||
20 | */ | 20 | */ | ||
21 | 21 | | |||
22 | #ifndef kate_view_h | 22 | #ifndef kate_view_h | ||
23 | #define kate_view_h | 23 | #define kate_view_h | ||
24 | 24 | | |||
25 | #include <ktexteditor/view.h> | 25 | #include <ktexteditor/view.h> | ||
26 | #include <ktexteditor/texthintinterface.h> | 26 | #include <ktexteditor/texthintinterface.h> | ||
27 | #include <ktexteditor/inlinenoteinterface.h> | ||||
27 | #include <ktexteditor/markinterface.h> | 28 | #include <ktexteditor/markinterface.h> | ||
28 | #include <ktexteditor/codecompletioninterface.h> | 29 | #include <ktexteditor/codecompletioninterface.h> | ||
29 | #include <ktexteditor/configinterface.h> | 30 | #include <ktexteditor/configinterface.h> | ||
30 | #include <ktexteditor/annotationinterface.h> | 31 | #include <ktexteditor/annotationinterface.h> | ||
31 | #include <ktexteditor/mainwindow.h> | 32 | #include <ktexteditor/mainwindow.h> | ||
32 | 33 | | |||
33 | #include <QPointer> | 34 | #include <QPointer> | ||
34 | #include <QScopedPointer> | 35 | #include <QScopedPointer> | ||
▲ Show 20 Lines • Show All 44 Lines • ▼ Show 20 Line(s) | |||||
79 | 80 | | |||
80 | // | 81 | // | ||
81 | // Kate KTextEditor::View class ;) | 82 | // Kate KTextEditor::View class ;) | ||
82 | // | 83 | // | ||
83 | class KTEXTEDITOR_EXPORT ViewPrivate : public KTextEditor::View, | 84 | class KTEXTEDITOR_EXPORT ViewPrivate : public KTextEditor::View, | ||
84 | public KTextEditor::TextHintInterface, | 85 | public KTextEditor::TextHintInterface, | ||
85 | public KTextEditor::CodeCompletionInterface, | 86 | public KTextEditor::CodeCompletionInterface, | ||
86 | public KTextEditor::ConfigInterface, | 87 | public KTextEditor::ConfigInterface, | ||
88 | public KTextEditor::InlineNoteInterface, | ||||
87 | public KTextEditor::AnnotationViewInterface | 89 | public KTextEditor::AnnotationViewInterface | ||
88 | { | 90 | { | ||
89 | Q_OBJECT | 91 | Q_OBJECT | ||
90 | Q_INTERFACES(KTextEditor::TextHintInterface) | 92 | Q_INTERFACES(KTextEditor::TextHintInterface) | ||
91 | Q_INTERFACES(KTextEditor::ConfigInterface) | 93 | Q_INTERFACES(KTextEditor::ConfigInterface) | ||
92 | Q_INTERFACES(KTextEditor::CodeCompletionInterface) | 94 | Q_INTERFACES(KTextEditor::CodeCompletionInterface) | ||
93 | Q_INTERFACES(KTextEditor::AnnotationViewInterface) | 95 | Q_INTERFACES(KTextEditor::AnnotationViewInterface) | ||
96 | Q_INTERFACES(KTextEditor::InlineNoteInterface) | ||||
94 | 97 | | |||
95 | friend class KTextEditor::View; | 98 | friend class KTextEditor::View; | ||
96 | friend class ::KateViewInternal; | 99 | friend class ::KateViewInternal; | ||
97 | friend class ::KateIconBorder; | 100 | friend class ::KateIconBorder; | ||
98 | friend class ::KateTextPreview; | 101 | friend class ::KateTextPreview; | ||
99 | 102 | | |||
100 | public: | 103 | public: | ||
101 | ViewPrivate (KTextEditor::DocumentPrivate *doc, QWidget *parent, KTextEditor::MainWindow *mainWindow = nullptr); | 104 | ViewPrivate (KTextEditor::DocumentPrivate *doc, QWidget *parent, KTextEditor::MainWindow *mainWindow = nullptr); | ||
▲ Show 20 Lines • Show All 144 Lines • ▼ Show 20 Line(s) | |||||
246 | 249 | | |||
247 | public: | 250 | public: | ||
248 | bool dynWordWrap() const | 251 | bool dynWordWrap() const | ||
249 | { | 252 | { | ||
250 | return m_hasWrap; | 253 | return m_hasWrap; | ||
251 | } | 254 | } | ||
252 | 255 | | |||
253 | // | 256 | // | ||
257 | // Inline Notes Interface | ||||
258 | // | ||||
259 | public: | ||||
260 | void registerInlineNoteProvider(KTextEditor::InlineNoteProvider *provider) Q_DECL_OVERRIDE; | ||||
261 | void unregisterInlineNoteProvider(KTextEditor::InlineNoteProvider *provider) Q_DECL_OVERRIDE; | ||||
262 | | ||||
263 | QVarLengthArray<KTextEditor::InlineNote, 8> inlineNotes(int line) const; | ||||
264 | | ||||
265 | private: | ||||
266 | QVector<KTextEditor::InlineNoteProvider *> m_inlineNoteProviders; | ||||
267 | | ||||
268 | private Q_SLOTS: | ||||
269 | void inlineNotesReset(); | ||||
270 | void inlineNotesLineChanged(int line); | ||||
271 | | ||||
272 | // | ||||
254 | // KTextEditor::SelectionInterface stuff | 273 | // KTextEditor::SelectionInterface stuff | ||
255 | // | 274 | // | ||
256 | public Q_SLOTS: | 275 | public Q_SLOTS: | ||
257 | bool setSelection(const KTextEditor::Range &selection) override; | 276 | bool setSelection(const KTextEditor::Range &selection) override; | ||
258 | 277 | | |||
259 | bool removeSelection() override | 278 | bool removeSelection() override | ||
260 | { | 279 | { | ||
261 | return clearSelection(); | 280 | return clearSelection(); | ||
▲ Show 20 Lines • Show All 736 Lines • Show Last 20 Lines |