Changeset View
Changeset View
Standalone View
Standalone View
language/assistant/staticassistantsmanager.h
Show All 20 Lines | |||||
21 | #define KDEVPLATFORM_STATICASSISTANTSMANAGER_H | 21 | #define KDEVPLATFORM_STATICASSISTANTSMANAGER_H | ||
22 | 22 | | |||
23 | #include <QObject> | 23 | #include <QObject> | ||
24 | #include <QPointer> | 24 | #include <QPointer> | ||
25 | 25 | | |||
26 | #include "staticassistant.h" | 26 | #include "staticassistant.h" | ||
27 | 27 | | |||
28 | #include <language/languageexport.h> | 28 | #include <language/languageexport.h> | ||
29 | #include <language/duchain/duchainpointer.h> | ||||
30 | #include <language/duchain/problem.h> | ||||
31 | #include <language/duchain/topducontext.h> | ||||
29 | #include <serialization/indexedstring.h> | 32 | #include <serialization/indexedstring.h> | ||
30 | 33 | | |||
31 | #include <ktexteditor/range.h> | 34 | #include <ktexteditor/range.h> | ||
32 | #include <ktexteditor/cursor.h> | 35 | #include <ktexteditor/cursor.h> | ||
33 | 36 | | |||
34 | class QTimer; | 37 | class QTimer; | ||
35 | 38 | | |||
36 | typedef QPointer<KTextEditor::Document> SafeDocumentPointer; | 39 | typedef QPointer<KTextEditor::Document> SafeDocumentPointer; | ||
Show All 14 Lines | |||||
51 | class KDEVPLATFORMLANGUAGE_EXPORT StaticAssistantsManager : public QObject | 54 | class KDEVPLATFORMLANGUAGE_EXPORT StaticAssistantsManager : public QObject | ||
52 | { | 55 | { | ||
53 | Q_OBJECT | 56 | Q_OBJECT | ||
54 | 57 | | |||
55 | public: | 58 | public: | ||
56 | explicit StaticAssistantsManager(QObject* parent = nullptr); | 59 | explicit StaticAssistantsManager(QObject* parent = nullptr); | ||
57 | ~StaticAssistantsManager() override; | 60 | ~StaticAssistantsManager() override; | ||
58 | 61 | | |||
59 | QExplicitlySharedDataPointer<KDevelop::IAssistant> activeAssistant(); | | |||
60 | | ||||
61 | void registerAssistant(const StaticAssistant::Ptr assistant); | 62 | void registerAssistant(const StaticAssistant::Ptr assistant); | ||
62 | void unregisterAssistant(const StaticAssistant::Ptr assistant); | 63 | void unregisterAssistant(const StaticAssistant::Ptr assistant); | ||
63 | QList<StaticAssistant::Ptr> registeredAssistants() const; | 64 | QVector<StaticAssistant::Ptr> registeredAssistants() const; | ||
64 | 65 | void notifyAssistants(const IndexedString& url, const KDevelop::ReferencedTopDUContext& context); | |||
65 | public slots: | | |||
66 | void hideAssistant(); | | |||
67 | 66 | | |||
68 | signals: | 67 | QVector<KDevelop::Problem::Ptr> problemsForContext(const ReferencedTopDUContext& top); | ||
69 | void activeAssistantChanged(); | | |||
70 | 68 | | |||
71 | private: | 69 | private: | ||
72 | struct Private; | 70 | struct Private; | ||
73 | QScopedPointer<Private> const d; | 71 | QScopedPointer<Private> const d; | ||
74 | Q_PRIVATE_SLOT(d, void eventuallyStartAssistant()) | | |||
75 | }; | 72 | }; | ||
76 | 73 | | |||
77 | } | 74 | } | ||
78 | 75 | | |||
79 | #endif // KDEVPLATFORM_STATICASSISTANTSMANAGER_H | 76 | #endif // KDEVPLATFORM_STATICASSISTANTSMANAGER_H |