Skip to content
Snippets Groups Projects
Commit 7fac110d authored by Kai Koehne's avatar Kai Koehne
Browse files

QmlOutline: Move QmlOutlineTreeView into it's own file

parent 7a1c1a37
No related branches found
No related tags found
No related merge requests found
...@@ -27,7 +27,8 @@ HEADERS += \ ...@@ -27,7 +27,8 @@ HEADERS += \
qmljsoutline.h \ qmljsoutline.h \
qmloutlinemodel.h \ qmloutlinemodel.h \
qmltaskmanager.h \ qmltaskmanager.h \
qmljseditorcodeformatter.h qmljseditorcodeformatter.h \
qmljsoutlinetreeview.h
SOURCES += \ SOURCES += \
qmljscodecompletion.cpp \ qmljscodecompletion.cpp \
...@@ -48,7 +49,8 @@ SOURCES += \ ...@@ -48,7 +49,8 @@ SOURCES += \
qmloutlinemodel.cpp \ qmloutlinemodel.cpp \
qmltaskmanager.cpp \ qmltaskmanager.cpp \
qmljsquickfixes.cpp \ qmljsquickfixes.cpp \
qmljseditorcodeformatter.cpp qmljseditorcodeformatter.cpp \
qmljsoutlinetreeview.cpp
RESOURCES += qmljseditor.qrc RESOURCES += qmljseditor.qrc
OTHER_FILES += QmlJSEditor.pluginspec QmlJSEditor.mimetypes.xml OTHER_FILES += QmlJSEditor.pluginspec QmlJSEditor.mimetypes.xml
#include "qmljsoutline.h" #include "qmljsoutline.h"
#include "qmloutlinemodel.h" #include "qmloutlinemodel.h"
#include "qmljsoutlinetreeview.h"
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <coreplugin/ifile.h> #include <coreplugin/ifile.h>
...@@ -19,18 +20,6 @@ enum { ...@@ -19,18 +20,6 @@ enum {
namespace QmlJSEditor { namespace QmlJSEditor {
namespace Internal { namespace Internal {
QmlJSOutlineTreeView::QmlJSOutlineTreeView(QWidget *parent) :
Utils::NavigationTreeView(parent)
{
// see also CppOutlineTreeView
setFocusPolicy(Qt::NoFocus);
setExpandsOnDoubleClick(false);
setDragEnabled(true);
viewport()->setAcceptDrops(true);
setDropIndicatorShown(true);
setDragDropMode(InternalMove);
}
QmlJSOutlineFilterModel::QmlJSOutlineFilterModel(QObject *parent) : QmlJSOutlineFilterModel::QmlJSOutlineFilterModel(QObject *parent) :
QSortFilterProxyModel(parent) QSortFilterProxyModel(parent)
......
...@@ -3,10 +3,8 @@ ...@@ -3,10 +3,8 @@
#include "qmljseditor.h" #include "qmljseditor.h"
#include <utils/navigationtreeview.h>
#include <texteditor/ioutlinewidget.h> #include <texteditor/ioutlinewidget.h>
#include <QtGui/QTreeView>
#include <QtGui/QSortFilterProxyModel> #include <QtGui/QSortFilterProxyModel>
namespace Core { namespace Core {
...@@ -20,12 +18,7 @@ class Editor; ...@@ -20,12 +18,7 @@ class Editor;
namespace QmlJSEditor { namespace QmlJSEditor {
namespace Internal { namespace Internal {
class QmlJSOutlineTreeView : public Utils::NavigationTreeView class QmlJSOutlineTreeView;
{
Q_OBJECT
public:
QmlJSOutlineTreeView(QWidget *parent = 0);
};
class QmlJSOutlineFilterModel : public QSortFilterProxyModel class QmlJSOutlineFilterModel : public QSortFilterProxyModel
{ {
......
#include "qmljsoutlinetreeview.h"
namespace QmlJSEditor {
namespace Internal {
QmlJSOutlineTreeView::QmlJSOutlineTreeView(QWidget *parent) :
Utils::NavigationTreeView(parent)
{
// see also CppOutlineTreeView
setFocusPolicy(Qt::NoFocus);
setExpandsOnDoubleClick(false);
setDragEnabled(true);
viewport()->setAcceptDrops(true);
setDropIndicatorShown(true);
setDragDropMode(InternalMove);
}
} // namespace Internal
} // namespace QmlJSEditor
#ifndef QMLJSOUTLINETREEVIEW_H
#define QMLJSOUTLINETREEVIEW_H
#include <utils/navigationtreeview.h>
namespace QmlJSEditor {
namespace Internal {
class QmlJSOutlineTreeView : public Utils::NavigationTreeView
{
Q_OBJECT
public:
QmlJSOutlineTreeView(QWidget *parent = 0);
};
} // namespace Internal
} // namespace QmlJSEditor
#endif // QMLJSOUTLINETREEVIEW_H
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment