Qml&Js: properties/methods/enums inspection

.. of builtIn qml and cpp code over "Inspect API For Element Under
Cursor" action.

Change-Id: I70d5bec2933b682295c5242248a2b0f95dba4e76
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
This commit is contained in:
Nikita Baryshnikov
2015-01-08 22:43:39 +03:00
parent 24e3445a35
commit 12dffc6590
6 changed files with 222 additions and 37 deletions

View File

@@ -158,6 +158,15 @@ bool QmlJSEditorPlugin::initialize(const QStringList & /*arguments*/, QString *e
connect(m_reformatFileAction, SIGNAL(triggered()), this, SLOT(reformatFile()));
qmlToolsMenu->addAction(cmd);
QAction *inspectElementAction = new QAction(tr("Inspect API for Element Under Cursor"), this);
cmd = ActionManager::registerAction(inspectElementAction,
Id(Constants::INSPECT_ELEMENT_UNDER_CURSOR), context);
connect(inspectElementAction, &QAction::triggered, [] {
if (auto widget = qobject_cast<QmlJSEditorWidget *>(EditorManager::currentEditor()->widget()))
widget->inspectElementUnderCursor();
});
qmlToolsMenu->addAction(cmd);
QAction *showQuickToolbar = new QAction(tr("Show Qt Quick Toolbar"), this);
cmd = ActionManager::registerAction(showQuickToolbar, Constants::SHOW_QT_QUICK_HELPER, context);
cmd->setDefaultKeySequence(UseMacShortcuts ? QKeySequence(Qt::META + Qt::ALT + Qt::Key_Space)