summaryrefslogtreecommitdiff
path: root/src/plugins/qmljseditor/qmljseditor.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/qmljseditor/qmljseditor.h')
-rw-r--r--src/plugins/qmljseditor/qmljseditor.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/plugins/qmljseditor/qmljseditor.h b/src/plugins/qmljseditor/qmljseditor.h
index 0239050713..49910dbf54 100644
--- a/src/plugins/qmljseditor/qmljseditor.h
+++ b/src/plugins/qmljseditor/qmljseditor.h
@@ -35,6 +35,7 @@
#include <texteditor/basetexteditor.h>
#include <QtCore/QWaitCondition>
+#include <QtCore/QModelIndex>
#include <QtCore/QMutex>
#include <QtCore/QThread>
@@ -58,6 +59,7 @@ class Highlighter;
namespace Internal {
class QmlJSTextEditor;
+class QmlOutlineModel;
class QmlJSEditorEditable : public TextEditor::BaseTextEditorEditable
{
@@ -214,12 +216,15 @@ public:
int documentRevision() const;
bool isOutdated() const;
+ QmlOutlineModel *outlineModel() const;
+ QModelIndex outlineModelIndex() const;
+
public slots:
void followSymbolUnderCursor();
virtual void setFontSettings(const TextEditor::FontSettings &);
signals:
- void semanticInfoUpdated(const QmlJSEditor::Internal::SemanticInfo &semanticInfo);
+ void outlineModelIndexChanged(const QModelIndex &index);
private slots:
void onDocumentUpdated(QmlJS::Document::Ptr doc);
@@ -266,6 +271,7 @@ private:
QString wordUnderCursor() const;
SemanticHighlighter::Source currentSource(bool force = false);
+ QModelIndex indexForPosition(unsigned cursorPosition, const QModelIndex &rootIndex = QModelIndex()) const;
const Core::Context m_context;
@@ -273,6 +279,8 @@ private:
QTimer *m_updateUsesTimer;
QTimer *m_semanticRehighlightTimer;
QComboBox *m_methodCombo;
+ QmlOutlineModel *m_outlineModel;
+ QModelIndex m_outlineModelIndex;
QmlJS::ModelManagerInterface *m_modelManager;
QTextCharFormat m_occurrencesFormat;
QTextCharFormat m_occurrencesUnusedFormat;