Changeset View
Changeset View
Standalone View
Standalone View
plugins/contextbrowser/contextbrowser.h
Show All 29 Lines | |||||
30 | #include <QUrl> | 30 | #include <QUrl> | ||
31 | #include <QPointer> | 31 | #include <QPointer> | ||
32 | 32 | | |||
33 | #include <KTextEditor/TextHintInterface> | 33 | #include <KTextEditor/TextHintInterface> | ||
34 | #include <interfaces/iplugin.h> | 34 | #include <interfaces/iplugin.h> | ||
35 | #include <language/duchain/duchainpointer.h> | 35 | #include <language/duchain/duchainpointer.h> | ||
36 | #include <language/duchain/declaration.h> | 36 | #include <language/duchain/declaration.h> | ||
37 | #include <language/duchain/indexedducontext.h> | 37 | #include <language/duchain/indexedducontext.h> | ||
38 | #include <language/duchain/problem.h> | ||||
38 | #include <language/editor/persistentmovingrange.h> | 39 | #include <language/editor/persistentmovingrange.h> | ||
39 | #include <language/interfaces/iquickopen.h> | 40 | #include <language/interfaces/iquickopen.h> | ||
40 | #include <language/editor/documentcursor.h> | 41 | #include <language/editor/documentcursor.h> | ||
41 | 42 | | |||
42 | #include <language/interfaces/icontextbrowser.h> | 43 | #include <language/interfaces/icontextbrowser.h> | ||
43 | 44 | | |||
44 | class QHBoxLayout; | 45 | class QHBoxLayout; | ||
45 | class QMenu; | 46 | class QMenu; | ||
▲ Show 20 Lines • Show All 74 Lines • ▼ Show 20 Line(s) | 97 | { | |||
120 | 121 | | |||
121 | public Q_SLOTS: | 122 | public Q_SLOTS: | ||
122 | void showUsesDelayed(const KDevelop::DeclarationPointer& declaration); | 123 | void showUsesDelayed(const KDevelop::DeclarationPointer& declaration); | ||
123 | void previousContextShortcut(); | 124 | void previousContextShortcut(); | ||
124 | void nextContextShortcut(); | 125 | void nextContextShortcut(); | ||
125 | 126 | | |||
126 | void startDelayedBrowsing(KTextEditor::View* view); | 127 | void startDelayedBrowsing(KTextEditor::View* view); | ||
127 | void stopDelayedBrowsing(); | 128 | void stopDelayedBrowsing(); | ||
129 | void invokeAction(int index); | ||||
128 | 130 | | |||
129 | void previousUseShortcut(); | 131 | void previousUseShortcut(); | ||
130 | void nextUseShortcut(); | 132 | void nextUseShortcut(); | ||
131 | 133 | | |||
132 | void declarationSelectedInUI(const KDevelop::DeclarationPointer& decl); | 134 | void declarationSelectedInUI(const KDevelop::DeclarationPointer& decl); | ||
133 | 135 | | |||
134 | void updateReady(const KDevelop::IndexedString& url, const KDevelop::ReferencedTopDUContext& topContext); | 136 | void updateReady(const KDevelop::IndexedString& url, const KDevelop::ReferencedTopDUContext& topContext); | ||
135 | void textDocumentCreated( KDevelop::IDocument* document ); | 137 | void textDocumentCreated( KDevelop::IDocument* document ); | ||
Show All 29 Lines | 153 | private slots: | |||
165 | void navigateDown(); | 167 | void navigateDown(); | ||
166 | void navigateAccept(); | 168 | void navigateAccept(); | ||
167 | void navigateBack(); | 169 | void navigateBack(); | ||
168 | 170 | | |||
169 | private: | 171 | private: | ||
170 | QWidget* toolbarWidgetForMainWindow(Sublime::MainWindow* window); | 172 | QWidget* toolbarWidgetForMainWindow(Sublime::MainWindow* window); | ||
171 | void createActionsForMainWindow(Sublime::MainWindow* window, QString& xmlFile, | 173 | void createActionsForMainWindow(Sublime::MainWindow* window, QString& xmlFile, | ||
172 | KActionCollection& actions) override; | 174 | KActionCollection& actions) override; | ||
175 | QWidget* navigationWidgetForPosition(KTextEditor::View* view, KTextEditor::Cursor position); | ||||
173 | void switchUse(bool forward); | 176 | void switchUse(bool forward); | ||
174 | void clearMouseHover(); | 177 | void clearMouseHover(); | ||
175 | 178 | | |||
176 | void addHighlight( KTextEditor::View* view, KDevelop::Declaration* decl ); | 179 | void addHighlight( KTextEditor::View* view, KDevelop::Declaration* decl ); | ||
177 | 180 | | |||
178 | /** helper for updateBrowserView(). | 181 | /** helper for updateBrowserView(). | ||
179 | * Tries to find a 'specialLanguageObject' (eg macro) in @p view under cursor @c. | 182 | * Tries to find a 'specialLanguageObject' (eg macro) in @p view under cursor @c. | ||
180 | * If found returns true and sets @p pickedLanguage to the language this object belongs to */ | 183 | * If found returns true and sets @p pickedLanguage to the language this object belongs to */ | ||
Show All 38 Lines | 204 | private: | |||
219 | KDevelop::IndexedDeclaration m_lastHighlightedDeclaration; | 222 | KDevelop::IndexedDeclaration m_lastHighlightedDeclaration; | ||
220 | 223 | | |||
221 | QUrl m_mouseHoverDocument; | 224 | QUrl m_mouseHoverDocument; | ||
222 | KTextEditor::Cursor m_mouseHoverCursor; | 225 | KTextEditor::Cursor m_mouseHoverCursor; | ||
223 | ContextBrowserViewFactory* m_viewFactory; | 226 | ContextBrowserViewFactory* m_viewFactory; | ||
224 | QPointer<QWidget> m_currentToolTip; | 227 | QPointer<QWidget> m_currentToolTip; | ||
225 | QPointer<QWidget> m_currentNavigationWidget; | 228 | QPointer<QWidget> m_currentNavigationWidget; | ||
226 | KDevelop::IndexedDeclaration m_currentToolTipDeclaration; | 229 | KDevelop::IndexedDeclaration m_currentToolTipDeclaration; | ||
230 | KDevelop::Problem::Ptr m_currentToolTipProblem; | ||||
227 | QAction* m_findUses; | 231 | QAction* m_findUses; | ||
228 | 232 | | |||
229 | QPointer<KTextEditor::Document> m_lastInsertionDocument; | 233 | QPointer<KTextEditor::Document> m_lastInsertionDocument; | ||
230 | KTextEditor::Cursor m_lastInsertionPos; | 234 | KTextEditor::Cursor m_lastInsertionPos; | ||
231 | 235 | | |||
232 | // outline toolbar | 236 | // outline toolbar | ||
233 | QPointer<KDevelop::IQuickOpenLine> m_outlineLine; | 237 | QPointer<KDevelop::IQuickOpenLine> m_outlineLine; | ||
234 | QPointer<QHBoxLayout> m_toolbarWidgetLayout; | 238 | QPointer<QHBoxLayout> m_toolbarWidgetLayout; | ||
Show All 37 Lines |