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> | ||
35 | #include <QModelIndex> | 36 | #include <QModelIndex> | ||
36 | #include <QMenu> | 37 | #include <QMenu> | ||
37 | #include <QSpacerItem> | 38 | #include <QSpacerItem> | ||
38 | 39 | | |||
39 | #include <array> | 40 | #include <array> | ||
40 | 41 | | |||
41 | #include "katetextrange.h" | 42 | #include "katetextrange.h" | ||
42 | #include "katetextfolding.h" | 43 | #include "katetextfolding.h" | ||
43 | #include "katerenderer.h" | 44 | #include "katerenderer.h" | ||
44 | 45 | | |||
45 | namespace KTextEditor | 46 | namespace KTextEditor | ||
46 | { | 47 | { | ||
47 | class AnnotationModel; | 48 | class AnnotationModel; | ||
48 | class Message; | 49 | class Message; | ||
50 | class InlineNoteProvider; | ||||
49 | } | 51 | } | ||
50 | 52 | | |||
51 | namespace KTextEditor { class DocumentPrivate; } | 53 | namespace KTextEditor { class DocumentPrivate; } | ||
52 | class KateBookmarks; | 54 | class KateBookmarks; | ||
53 | class KateViewConfig; | 55 | class KateViewConfig; | ||
54 | class KateRenderer; | 56 | class KateRenderer; | ||
55 | class KateSpellCheckDialog; | 57 | class KateSpellCheckDialog; | ||
56 | class KateCompletionWidget; | 58 | class KateCompletionWidget; | ||
Show All 22 Lines | |||||
79 | 81 | | |||
80 | // | 82 | // | ||
81 | // Kate KTextEditor::View class ;) | 83 | // Kate KTextEditor::View class ;) | ||
82 | // | 84 | // | ||
83 | class KTEXTEDITOR_EXPORT ViewPrivate : public KTextEditor::View, | 85 | class KTEXTEDITOR_EXPORT ViewPrivate : public KTextEditor::View, | ||
84 | public KTextEditor::TextHintInterface, | 86 | public KTextEditor::TextHintInterface, | ||
85 | public KTextEditor::CodeCompletionInterface, | 87 | public KTextEditor::CodeCompletionInterface, | ||
86 | public KTextEditor::ConfigInterface, | 88 | public KTextEditor::ConfigInterface, | ||
89 | public KTextEditor::InlineNoteInterface, | ||||
87 | public KTextEditor::AnnotationViewInterface | 90 | public KTextEditor::AnnotationViewInterface | ||
88 | { | 91 | { | ||
89 | Q_OBJECT | 92 | Q_OBJECT | ||
90 | Q_INTERFACES(KTextEditor::TextHintInterface) | 93 | Q_INTERFACES(KTextEditor::TextHintInterface) | ||
91 | Q_INTERFACES(KTextEditor::ConfigInterface) | 94 | Q_INTERFACES(KTextEditor::ConfigInterface) | ||
92 | Q_INTERFACES(KTextEditor::CodeCompletionInterface) | 95 | Q_INTERFACES(KTextEditor::CodeCompletionInterface) | ||
93 | Q_INTERFACES(KTextEditor::AnnotationViewInterface) | 96 | Q_INTERFACES(KTextEditor::AnnotationViewInterface) | ||
97 | Q_INTERFACES(KTextEditor::InlineNoteInterface) | ||||
94 | 98 | | |||
95 | friend class KTextEditor::View; | 99 | friend class KTextEditor::View; | ||
96 | friend class ::KateViewInternal; | 100 | friend class ::KateViewInternal; | ||
97 | friend class ::KateIconBorder; | 101 | friend class ::KateIconBorder; | ||
98 | friend class ::KateTextPreview; | 102 | friend class ::KateTextPreview; | ||
99 | 103 | | |||
100 | public: | 104 | public: | ||
101 | ViewPrivate (KTextEditor::DocumentPrivate *doc, QWidget *parent, KTextEditor::MainWindow *mainWindow = nullptr); | 105 | ViewPrivate (KTextEditor::DocumentPrivate *doc, QWidget *parent, KTextEditor::MainWindow *mainWindow = nullptr); | ||
▲ Show 20 Lines • Show All 144 Lines • ▼ Show 20 Line(s) | |||||
246 | 250 | | |||
247 | public: | 251 | public: | ||
248 | bool dynWordWrap() const | 252 | bool dynWordWrap() const | ||
249 | { | 253 | { | ||
250 | return m_hasWrap; | 254 | return m_hasWrap; | ||
251 | } | 255 | } | ||
252 | 256 | | |||
253 | // | 257 | // | ||
258 | // Inline Notes Interface | ||||
259 | // | ||||
260 | public: | ||||
261 | void registerInlineNoteProvider(KTextEditor::InlineNoteProvider *provider) Q_DECL_OVERRIDE; | ||||
262 | void unregisterInlineNoteProvider(KTextEditor::InlineNoteProvider *provider) Q_DECL_OVERRIDE; | ||||
263 | QRect inlineNoteRect(const KTextEditor::InlineNote& note) const; | ||||
264 | | ||||
265 | QVarLengthArray<KTextEditor::InlineNote, 8> inlineNotes(int line) const; | ||||
266 | | ||||
267 | private: | ||||
268 | QVector<KTextEditor::InlineNoteProvider *> m_inlineNoteProviders; | ||||
269 | | ||||
270 | private Q_SLOTS: | ||||
271 | void inlineNotesReset(); | ||||
272 | void inlineNotesLineChanged(int line); | ||||
273 | | ||||
274 | // | ||||
254 | // KTextEditor::SelectionInterface stuff | 275 | // KTextEditor::SelectionInterface stuff | ||
255 | // | 276 | // | ||
256 | public Q_SLOTS: | 277 | public Q_SLOTS: | ||
257 | bool setSelection(const KTextEditor::Range &selection) override; | 278 | bool setSelection(const KTextEditor::Range &selection) override; | ||
258 | 279 | | |||
259 | bool removeSelection() override | 280 | bool removeSelection() override | ||
260 | { | 281 | { | ||
261 | return clearSelection(); | 282 | return clearSelection(); | ||
▲ Show 20 Lines • Show All 736 Lines • Show Last 20 Lines |