File: missingincludeitem.h

package info (click to toggle)
kdevelop-python 24.12.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 12,640 kB
  • sloc: python: 183,048; cpp: 18,798; xml: 140; sh: 14; makefile: 9
file content (30 lines) | stat: -rw-r--r-- 927 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
    SPDX-FileCopyrightText: 2013 Sven Brauch <svenbrauch@googlemail.com>

    SPDX-License-Identifier: GPL-2.0-or-later
*/

#ifndef PYTHON_MISSINGINCLUDEITEM_H
#define PYTHON_MISSINGINCLUDEITEM_H

#include "navigation/navigationwidget.h"
#include <language/codecompletion/codecompletionitem.h>

namespace Python {

/// Class for adding an import. Will figure out where to add it by itself.
class MissingIncludeItem : public KDevelop::CompletionTreeItem {
public:
    MissingIncludeItem(const QString& insertText, const QString& matchText, const QString& removeComponents=QString());
    void execute(KTextEditor::View* view, const KTextEditor::Range& word) override;
    QVariant data(const QModelIndex& index, int role, const KDevelop::CodeCompletionModel* model) const override;

private:
    const QString m_text;
    const QString m_matchText;
    const QString m_removeComponents;
};

}

#endif // MISSINGINCLUDEITEM_H