Warning, file /kdevelop/kdev-python/duchain/assistants/missingincludeassistant.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* 0002 SPDX-FileCopyrightText: 2013 Sven Brauch <svenbrauch@gmail.com> 0003 0004 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0005 */ 0006 0007 #ifndef PYTHON_MISSINGINCLUDEASSISTANT_H 0008 #define PYTHON_MISSINGINCLUDEASSISTANT_H 0009 0010 #include <interfaces/iassistant.h> 0011 #include <serialization/indexedstring.h> 0012 #include <language/duchain/problem.h> 0013 0014 #include <QObject> 0015 #include <QExplicitlySharedDataPointer> 0016 0017 namespace Python { 0018 0019 // TODO: add data class with own identity so it gets restored correctly 0020 class MissingIncludeProblem : public KDevelop::Problem { 0021 public: 0022 MissingIncludeProblem(const QString& moduleName, KDevelop::IndexedString currentDocument); 0023 QExplicitlySharedDataPointer<KDevelop::IAssistant> solutionAssistant() const override; 0024 0025 private: 0026 QString m_moduleName; 0027 KDevelop::IndexedString m_currentDocument; 0028 }; 0029 0030 class DocumentationGeneratorAction : public KDevelop::IAssistantAction 0031 { 0032 Q_OBJECT 0033 public: 0034 DocumentationGeneratorAction(const QString& module, const KDevelop::IndexedString& document); 0035 QString description() const override; 0036 0037 public slots: 0038 void execute() override; 0039 0040 private: 0041 const QString module; 0042 const KDevelop::IndexedString document; 0043 }; 0044 0045 class MissingIncludeAssistant : public KDevelop::IAssistant 0046 { 0047 Q_OBJECT 0048 public: 0049 MissingIncludeAssistant(const QString& module, const KDevelop::IndexedString& document); 0050 void createActions() override; 0051 private: 0052 const QString module; 0053 const KDevelop::IndexedString document; 0054 }; 0055 0056 } 0057 0058 #endif // PYTHON_MISSINGINCLUDEASSISTANT_H