forked from qt-creator/qt-creator
Qml Editor: Modified the file structure outline.
The file structure outline now displays the id and the property values. Task-number: QTCREATORBUG-6209 Change-Id: I33efe20aab71647bc863cff5b5434c47e8d452a4 Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
This commit is contained in:
committed by
Christiaan Janssen
parent
a031d5f686
commit
22e31ceb5b
@@ -75,6 +75,7 @@
|
||||
#include <utils/changeset.h>
|
||||
#include <utils/uncommentselection.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/annotateditemdelegate.h>
|
||||
|
||||
#include <QFileInfo>
|
||||
#include <QSignalMapper>
|
||||
@@ -1070,6 +1071,12 @@ void QmlJSTextEditorWidget::createToolBar(QmlJSEditorEditable *editor)
|
||||
m_outlineCombo->setModel(m_outlineModel);
|
||||
|
||||
QTreeView *treeView = new QTreeView;
|
||||
|
||||
Utils::AnnotatedItemDelegate *itemDelegate = new Utils::AnnotatedItemDelegate(this);
|
||||
itemDelegate->setDelimiter(QLatin1String(" "));
|
||||
itemDelegate->setAnnotationRole(QmlOutlineModel::AnnotationRole);
|
||||
treeView->setItemDelegateForColumn(0, itemDelegate);
|
||||
|
||||
treeView->header()->hide();
|
||||
treeView->setItemsExpandable(false);
|
||||
treeView->setRootIsDecorated(false);
|
||||
|
Reference in New Issue
Block a user