pynoto / src / PythonCode / IPythonCode.h

#ifndef _IPYTHON_H_
#define _IPYTHON_H_
#include <QObject>

namespace PythonCode {

class IPythonCode: public QObject
{
    Q_OBJECT
public:
    enum Severity {
        CodeStyle = 1,
        Warning,
        Error,
        Suggestion
    };

    enum CompletitionType{
        Function = 1,
        Module,
        Class,
        Instance
    };
    struct Completition{
        CompletitionType type;
        QString name;
        QString scope;
    };

    struct ErrorItem {
        int line;
        Severity severity;
        QString message;
    };

    virtual ~IPythonCode(){}
public:
    virtual void init(const QString& interpret, const QString& projectPath, const QString& mainScript, const QString& projectFile) = 0;
    virtual void codeComplit(const QString& fileName, const QString& cnt, int pos) = 0;
    virtual void errorList(const QString& fileName, const QString & content) = 0;
    virtual void close() = 0;
signals:
    void systemError(const QString& logString);
    void errors(const QString& fileName, const QList<ErrorItem>& items);
    void complitition(const QString& fileName, int pos, const QString& word, const QList<Completition>& items);
};

}

#endif
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.