Changeset View
Changeset View
Standalone View
Standalone View
plugins/contextbrowser/browsemanager.h
Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Line(s) | 44 | class EditorViewWatcher : public QObject { | |||
---|---|---|---|---|---|
45 | Q_OBJECT | 45 | Q_OBJECT | ||
46 | public: | 46 | public: | ||
47 | explicit EditorViewWatcher(QObject* parent = nullptr); | 47 | explicit EditorViewWatcher(QObject* parent = nullptr); | ||
48 | QList<KTextEditor::View*> allViews(); | 48 | QList<KTextEditor::View*> allViews(); | ||
49 | private: | 49 | private: | ||
50 | ///Called for every added view. Reimplement this to catch them. | 50 | ///Called for every added view. Reimplement this to catch them. | ||
51 | virtual void viewAdded(KTextEditor::View*); | 51 | virtual void viewAdded(KTextEditor::View*); | ||
52 | 52 | | |||
53 | private slots: | 53 | private Q_SLOTS: | ||
54 | void viewDestroyed(QObject* view); | 54 | void viewDestroyed(QObject* view); | ||
55 | void viewCreated(KTextEditor::Document*, KTextEditor::View*); | 55 | void viewCreated(KTextEditor::Document*, KTextEditor::View*); | ||
56 | void documentCreated( KDevelop::IDocument* document ); | 56 | void documentCreated( KDevelop::IDocument* document ); | ||
57 | private: | 57 | private: | ||
58 | void addViewInternal(KTextEditor::View* view); | 58 | void addViewInternal(KTextEditor::View* view); | ||
59 | QList<KTextEditor::View*> m_views; | 59 | QList<KTextEditor::View*> m_views; | ||
60 | }; | 60 | }; | ||
61 | 61 | | |||
Show All 22 Lines | 80 | public: | |||
84 | 84 | | |||
85 | ///Installs/uninstalls the event-filter | 85 | ///Installs/uninstalls the event-filter | ||
86 | void applyEventFilter(QWidget* object, bool install); | 86 | void applyEventFilter(QWidget* object, bool install); | ||
87 | Q_SIGNALS: | 87 | Q_SIGNALS: | ||
88 | ///Emitted when browsing was started using the magic-modifier | 88 | ///Emitted when browsing was started using the magic-modifier | ||
89 | void startDelayedBrowsing(KTextEditor::View* view); | 89 | void startDelayedBrowsing(KTextEditor::View* view); | ||
90 | void stopDelayedBrowsing(); | 90 | void stopDelayedBrowsing(); | ||
91 | void invokeAction(int index); | 91 | void invokeAction(int index); | ||
92 | public slots: | 92 | public Q_SLOTS: | ||
93 | ///Enabled/disables the browsing mode | 93 | ///Enabled/disables the browsing mode | ||
94 | void setBrowsing(bool); | 94 | void setBrowsing(bool); | ||
95 | private slots: | 95 | private Q_SLOTS: | ||
96 | void eventuallyStartDelayedBrowsing(); | 96 | void eventuallyStartDelayedBrowsing(); | ||
97 | private: | 97 | private: | ||
98 | struct JumpLocation | 98 | struct JumpLocation | ||
99 | { | 99 | { | ||
100 | QUrl url; | 100 | QUrl url; | ||
101 | KTextEditor::Cursor cursor; | 101 | KTextEditor::Cursor cursor; | ||
102 | 102 | | |||
103 | bool isValid() const { return url.isValid() && cursor.isValid(); } | 103 | bool isValid() const { return url.isValid() && cursor.isValid(); } | ||
Show All 19 Lines |