QmlDesigner: enable F2 to go into a component

Change-Id: I23b298b184a9a17e19206db6086fce073b12a592
Reviewed-on: http://codereview.qt.nokia.com/1876
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
This commit is contained in:
Thomas Hartmann
2011-07-20 12:32:06 +02:00
parent 02cd2c7103
commit 5e87539d14
8 changed files with 58 additions and 12 deletions

View File

@@ -212,7 +212,9 @@ DesignModeWidget::DesignModeWidget(QWidget *parent) :
m_hideSidebarsAction = new QAction(tr("Toggle Full Screen"), this);
connect(m_hideSidebarsAction, SIGNAL(triggered()), this, SLOT(toggleSidebars()));
m_restoreDefaultViewAction = new QAction(tr("&Restore Default View"), this);
m_goIntoComponentAction = new QAction(tr("&Go into Component"), this);
connect(m_restoreDefaultViewAction, SIGNAL(triggered()), SLOT(restoreDefaultView()));
connect(m_goIntoComponentAction, SIGNAL(triggered()), SLOT(goIntoComponent()));
m_toggleLeftSidebarAction = new QAction(tr("Toggle &Left Sidebar"), this);
connect(m_toggleLeftSidebarAction, SIGNAL(triggered()), SLOT(toggleLeftSidebar()));
m_toggleRightSidebarAction = new QAction(tr("Toggle &Right Sidebar"), this);
@@ -410,6 +412,11 @@ QAction *DesignModeWidget::restoreDefaultViewAction() const
return m_restoreDefaultViewAction;
}
QAction *DesignModeWidget::goIntoComponentAction() const
{
return m_goIntoComponentAction;
}
void DesignModeWidget::readSettings()
{
QSettings *settings = Core::ICore::instance()->settings();
@@ -500,6 +507,11 @@ void DesignModeWidget::redoAvailable(bool isAvailable)
}
}
void DesignModeWidget::goIntoComponent()
{
if (m_currentDesignDocumentController)
m_currentDesignDocumentController->goIntoComponent();
}
void DesignModeWidget::enable()
{