summaryrefslogtreecommitdiffstats
path: root/objects/cppeditor.h
blob: 84df3af880533c85fa480a8a4ccda6b40b17e024 (plain)
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
31
32
33
34
35
36
37
38
39
40
41
#ifndef SCRIPTING_INTERNAL_CPPEDITOR_H
#define SCRIPTING_INTERNAL_CPPEDITOR_H

#include "basetexteditor.h"
#include <cppeditor/cppeditor.h>

//namespace CppEditor {
//    namespace Internal {
//      class CppEditorWidget;
//    }
//};

namespace Scripting {
namespace Internal {

class CppFunction;
class CppClass;

class CppEditor : public BaseTextEditor
{
    Q_OBJECT
    Q_PROPERTY( CppFunction* currentFunction READ currentFunction )

public:
    explicit CppEditor(QObject *parent = 0);

public slots:
    void switchDeclarationDefinition();
    CppFunction* functionAt(int line, int column) const;
    CppFunction* currentFunction() const;
    CppClass *classAt(int line, int column) const;
    CppClass *currentClass() const;

protected:
    void waitForInitialized();
};

} // namespace Internal
} // namespace Scripting

#endif // SCRIPTING_INTERNAL_CPPEDITOR_H