Commit 88ac3daa authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.componentView: allowing setting of node

Change-Id: Ib2f2dd599deb3dcb96e45ed891ce3130c58ac68e
Reviewed-on: http://codereview.qt.nokia.com/786

Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@nokia.com>
parent bf502906
......@@ -51,12 +51,14 @@ class ComponentAction : public QWidgetAction
Q_OBJECT
public:
ComponentAction(ComponentView *componentView);
void setCurrentIndex(int);
protected:
QWidget *createWidget(QWidget *parent);
signals:
void currentComponentChanged(const ModelNode &node);
void currentIndexChanged(int);
private slots:
void emitCurrentComponentChanged(int index);
......
......@@ -105,6 +105,8 @@ public:
ModelNode modelNode(int index) const;
void setComponentNode(const ModelNode &node);
signals:
void componentListChanged(const QStringList &componentList);
......@@ -114,6 +116,7 @@ private: //functions
void searchForComponentAndRemoveFromList(const ModelNode &node);
void appendWholeDocumentAsComponent();
void removeSingleNodeFromList(const ModelNode &node);
int indexForNode(const ModelNode &node);
private:
QStandardItemModel *m_standardItemModel;
......
......@@ -437,6 +437,7 @@ void DesignDocumentController::changeCurrentModelTo(const ModelNode &componentNo
Q_ASSERT(m_d->model);
loadCurrentModel();
m_d->componentView->setComponentNode(componentNode);
}
void DesignDocumentController::loadCurrentModel()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment