QmlDesigner.documentController: adding instance()

Also exposing changeCurrentModelTo() as public API.

Change-Id: I7c9ed3679ef5859b1349f1d1fe3088e78bccc7ad
Reviewed-on: http://codereview.qt.nokia.com/787
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
This commit is contained in:
Thomas Hartmann
2011-06-27 17:46:44 +02:00
parent 88ac3daa7f
commit 386974c943
4 changed files with 35 additions and 1 deletions

View File

@@ -45,6 +45,11 @@ ComponentAction::ComponentAction(ComponentView *componentView)
{
}
void ComponentAction::setCurrentIndex(int i)
{
emit currentIndexChanged(i);
}
QWidget *ComponentAction::createWidget(QWidget *parent)
{
QComboBox *comboBox = new QComboBox(parent);
@@ -52,6 +57,7 @@ QWidget *ComponentAction::createWidget(QWidget *parent)
comboBox->setToolTip(tr("Edit sub components defined in this file"));
comboBox->setModel(m_componentView->standardItemModel());
connect(comboBox, SIGNAL(currentIndexChanged(int)), SLOT(emitCurrentComponentChanged(int)));
connect(this, SIGNAL(currentIndexChanged(int)), comboBox, SLOT(setCurrentIndex(int)));
return comboBox;
}