File indexing completed on 2024-04-28 11:20:36

0001 /*
0002     SPDX-License-Identifier: GPL-2.0-or-later
0003     SPDX-FileCopyrightText: 2013 Filipe Saraiva <filipe@kde.org>
0004 */
0005 
0006 #ifndef _PYTHONCOMPLETIONOBJECT_H
0007 #define _PYTHONCOMPLETIONOBJECT_H
0008 
0009 #include "completionobject.h"
0010 #include "expression.h"
0011 
0012 class PythonSession;
0013 
0014 class PythonCompletionObject : public Cantor::CompletionObject
0015 {
0016   public:
0017     PythonCompletionObject(const QString& cmd, int index, PythonSession* session);
0018     ~PythonCompletionObject() override;
0019 
0020   protected:
0021     bool mayIdentifierContain(QChar c) const override;
0022     bool mayIdentifierBeginWith(QChar c) const override;
0023 
0024   protected Q_SLOTS:
0025     void fetchCompletions() override;
0026     void fetchIdentifierType() override;
0027     void extractCompletions(Cantor::Expression::Status status);
0028     void extractIdentifierType(Cantor::Expression::Status status);
0029 
0030   private:
0031     Cantor::Expression* m_expression;
0032 };
0033 
0034 #endif /* _PYTHONCOMPLETIONOBJECT_H */