forked from qt-creator/qt-creator
QmlDesigner: Global Annotations Editor
Task: QDS-1904 Change-Id: I92682b235f9c69dd7069172807954f0a99a946b0 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -431,6 +431,19 @@ void DesignModeWidget::setup()
|
||||
m_dockManager->openWorkspace(workspaceComboBox->currentText());
|
||||
});
|
||||
|
||||
const QIcon gaIcon = Utils::StyleHelper::getIconFromIconFont(fontName,
|
||||
Theme::getIconUnicode(Theme::Icon::annotationBubble), 36, 36);
|
||||
toolBar->addAction(gaIcon, tr("Edit global annotation for current file."), [&](){
|
||||
ModelNode node = currentDesignDocument()->rewriterView()->rootModelNode();
|
||||
|
||||
if (node.isValid()) {
|
||||
m_globalAnnotationEditor.setModelNode(node);
|
||||
m_globalAnnotationEditor.showWidget();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
viewManager().enableWidgets();
|
||||
readSettings();
|
||||
show();
|
||||
|
||||
Reference in New Issue
Block a user