From 2fa261c132973bc828440a3d80c770f02cf6aa59 Mon Sep 17 00:00:00 2001 From: Henning Gruendl Date: Fri, 10 Jul 2020 12:08:58 +0200 Subject: [PATCH] QmlDesigner: Move zoom buttons to FormEditorWidget * Move the zoom all and zoom selection button to the FormEditorWidget taskbar * Add zoom in and zoom out actions/buttons * Fix ZoomAction in and out direction * Add update icon font Change-Id: I9addba5652cafa5884450bc633a1e16087aae8dd Reviewed-by: Thomas Hartmann --- .../imports/StudioTheme/InternalConstants.qml | 48 ++++++----- .../imports/StudioTheme/icons.ttf | Bin 12576 -> 13620 bytes .../componentcore/componentcore_constants.h | 8 -- .../componentcore/designeractionmanager.cpp | 21 ----- .../componentcore/modelnodeoperations.cpp | 17 ---- .../componentcore/modelnodeoperations.h | 2 - .../components/componentcore/theme.h | 14 +++- .../components/componentcore/zoomaction.cpp | 8 +- .../components/formeditor/formeditorview.cpp | 13 ++- .../formeditor/formeditorwidget.cpp | 75 +++++++++++++++++- .../components/formeditor/formeditorwidget.h | 5 ++ 11 files changed, 131 insertions(+), 80 deletions(-) diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/InternalConstants.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/InternalConstants.qml index c326cc08f1d..3d17883c544 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/InternalConstants.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/InternalConstants.qml @@ -94,27 +94,33 @@ QtObject { readonly property string fontStyleItalic: "\u0057" readonly property string fontStyleStrikethrough: "\u0058" readonly property string fontStyleUnderline: "\u0059" - readonly property string mergeCells: "\u005A" - readonly property string redo: "\u005B" - readonly property string splitColumns: "\u005C" - readonly property string splitRows: "\u005D" - readonly property string startNode: "\u005E" - readonly property string testIcon: "\u005F" - readonly property string textAlignBottom: "\u0060" - readonly property string textAlignCenter: "\u0061" - readonly property string textAlignLeft: "\u0062" - readonly property string textAlignMiddle: "\u0063" - readonly property string textAlignRight: "\u0064" - readonly property string textAlignTop: "\u0065" - readonly property string textBulletList: "\u0066" - readonly property string textFullJustification: "\u0067" - readonly property string textNumberedList: "\u0068" - readonly property string tickIcon: "\u0069" - readonly property string triState: "\u006A" - readonly property string undo: "\u006B" - readonly property string upDownIcon: "\u006C" - readonly property string upDownSquare2: "\u006D" - readonly property string wildcard: "\u006E" + readonly property string idAliasOff: "\u005A" + readonly property string idAliasOn: "\u005B" + readonly property string mergeCells: "\u005C" + readonly property string redo: "\u005D" + readonly property string splitColumns: "\u005E" + readonly property string splitRows: "\u005F" + readonly property string startNode: "\u0060" + readonly property string testIcon: "\u0061" + readonly property string textAlignBottom: "\u0062" + readonly property string textAlignCenter: "\u0063" + readonly property string textAlignLeft: "\u0064" + readonly property string textAlignMiddle: "\u0065" + readonly property string textAlignRight: "\u0066" + readonly property string textAlignTop: "\u0067" + readonly property string textBulletList: "\u0068" + readonly property string textFullJustification: "\u0069" + readonly property string textNumberedList: "\u006A" + readonly property string tickIcon: "\u006B" + readonly property string triState: "\u006C" + readonly property string undo: "\u006D" + readonly property string upDownIcon: "\u006E" + readonly property string upDownSquare2: "\u006F" + readonly property string wildcard: "\u0070" + readonly property string zoomAll: "\u0071" + readonly property string zoomIn: "\u0072" + readonly property string zoomOut: "\u0073" + readonly property string zoomSelection: "\u0074" readonly property font iconFont: Qt.font({ "family": controlIcons.name, diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/icons.ttf b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioTheme/icons.ttf index 47becb68731714de31a05a18e07c9c60a2f72c93..46a677784ac73630e3e5156da147872031d01bda 100644 GIT binary patch delta 1579 zcmZ3Gv?Z&afsuiMftR6yftew|%`L=tf_u(W1_o0J1_lNh|6qNi$ktR|1_s6m1_p+N zZ8`bLi4&4%J!4>C2JtuKCRP+MEM-{4z`$t1z`&r8mzbN{X>PxrfkAr; z0|V2Ag8bqV)t#I97#Q?Y7#P^rfIY{^z>u@PT_v91<|_j?^9u$B28P>O<~b0W$vkHg zqb+MVLm>mtWGBW*#*)c%80RwgFtAUyVA5viV*ta+NldzoC6gyGwXy{U1&4%&O;%*? zm~6nzHhCp;o#{57AG{8{RlHkx-|+t8liUvDd zN^I=vc8o@1;&O~4Z0u};qKcxrjG|252e-Lv+s+FMpKBXzZ5^zclxrC_&sN)Q=kA^E z?p|K*ZvVdi`^d_}=|s4NF-^TV0T(`_4T(-Q5@u+tt?3nN!Qaz{J2# zk|UUjb;N^zU;lk#PKYz+%&FaMA-j;Po|%E~zdQ4FW+4V41~~>Z1_nkWIYtpa zMr9>+Ms-FtQxiKTCL=pW6Fo*HK1LBSRdaE5b9Hucc5`uab#`@ec5!ocb9QxhrihG< zY3Um>x^w>B)L~SQu}$ygTsJu^Y%+*o^wHLur|IONHBU>^!9h!Fo~DB{i0#BIRG+@# z!iMzde>b%mHL`pC`qFIwI)+VNHzhQ5%DTyGHRow*Izlu!Y0cNta&p!L8N`6f=qQb7coPhz&AxeZCVs5I4=74&% zpz>q1z;F3!J3CM|;z5Zv6$T9k9R?!?GX@(52L=}gF9ttCPEiF12YbD;sWCegiyEt& z8jFI$NmN-8DkcsNH+IZ`LkqWkdi?SQPEM_kj;(s~{Ce{8di;!%VE$Jy7ni3LATb@K zz^|{MprD}7@9*T)q9-p8GC+QllM}<_8|udDCX906a)p6`g+Y?B9m-~95MVqEWwS9z zGI2~c($H1UVA#UI%)rRP$-u&3#25@^voa_!E`+k#7>pRNY;M!wWn?vH&}A^6JWJDp z!(7)~*T}%gU~-IBz+`Q$#>s276d1!NpVL~z!x+FA$QZ;J%oxHLy178xghe7V#W5!{ zvDiN?O|Q5tofpQ<+dN-Cn$eWIDnCEhF((Hk#|2`0=7E@CVgJ$+5L*x=9Gseynp~2Z R50;($$3TJyQAnES0052gpi}?= delta 514 zcmdmzwIHdUfsuiMftR6yftew|%`L>YfATRy1_nbG1_lNh|6qNi$ktSL1_s6m1_p+N z50V!|Nk>EGcXwZVPIh3NYANE zdvxDMiGhJ7fPq1|BO^62MaGIdg@J+L4g&*&Sw==`eInPd|C1OP7)2Nu7*sNHODY7) z+4&e47PU|_mjkY8L{`2_<51H-KgDMApM zDMe@!qb+M7Lm>mlWGBW*#=OaM80Sv5Wzw3Q&!hw5F||%MWNw-4z$`F%D|4OZ9-eQ! z2D}-(WxP{(U-4P+wej8I*Wz#BzayX_a75sRAcLTlV3=T$;E~N4EH5QCN6IbWnmkq8 zNZpiC0qhzE1{MZM#x5wEl|g{<7?jP%Aj!l%`JJ||dKSYL24)6E7ET5h1|!BWD4Uf* zfpH0x&BkEFczv^z4lg6SF@phvE`!PB5M2uvV*_22$^E+5Ca35rG6qg=(_6IJMBjvE VbE|O}BNGF|WC2qN9)#ahgaB$Fd%6Gs diff --git a/src/plugins/qmldesigner/components/componentcore/componentcore_constants.h b/src/plugins/qmldesigner/components/componentcore/componentcore_constants.h index a8db25f4176..806da7f4286 100644 --- a/src/plugins/qmldesigner/components/componentcore/componentcore_constants.h +++ b/src/plugins/qmldesigner/components/componentcore/componentcore_constants.h @@ -83,8 +83,6 @@ const char decreaseIndexOfStackedContainerCommandId[] = "DecreaseIndexOfStackedC const char flowAssignEffectCommandId[] = "AssignFlowEffect"; const char flowAssignCustomEffectCommandId[] = "AssignFlowCustomEffect"; const char addToGroupItemCommandId[] = "AddToGroupItem"; -const char fitRootToScreenCommandId[] = "FitRootToScreen"; -const char fitSelectionToScreenCommandId[] = "FitSelectionToScreen"; const char selectionCategoryDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Selection"); const char flowConnectionCategoryDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Connect"); @@ -157,9 +155,6 @@ const char layoutFillHeightDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContext const char flowAssignEffectDisplayName[] = "Assign FlowEffect "; const char flowAssignCustomEffectDisplayName[] = "Assign Custom FlowEffect "; -const char fitRootToScreenDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Fit root to screen"); -const char fitSelectionToScreenDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Fit selection to screen"); - const char raiseToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Raise selected item."); const char lowerToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Lower selected item."); @@ -178,9 +173,6 @@ const char decreaseIndexOfStackedContainerToolTip[] = QT_TRANSLATE_NOOP("QmlDesi const char addItemToStackedContainerToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Add item to stacked container."); const char addFlowActionToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Add flow action."); -const char fitRootToScreenToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Fit the root element inside the available space."); -const char fitSelectionToScreenToolTip[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Fit the selected elements inside the available space."); - const char editListModelDisplayName[] = QT_TRANSLATE_NOOP("QmlDesignerContextMenu", "Edit List Model..."); diff --git a/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp b/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp index 73abc4ea296..8ccdef7acd2 100644 --- a/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp +++ b/src/plugins/qmldesigner/components/componentcore/designeractionmanager.cpp @@ -883,27 +883,6 @@ void DesignerActionManager::createDefaultDesignerActions() &resetSize, &selectionNotEmptyAndHasWidthOrHeightProperty)); - addDesignerAction(new ModelNodeAction( - fitRootToScreenCommandId, - fitRootToScreenDisplayName, - Utils::Icon({{":/utils/images/fittoview.png", Utils::Theme::IconsBaseColor}}).icon(), - fitRootToScreenToolTip, - genericToolBarCategory, - QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_0), - 182, - &fitRootToScreen)); - - addDesignerAction(new ModelNodeAction( - fitSelectionToScreenCommandId, - fitSelectionToScreenDisplayName, - Utils::Icon({{":/utils/images/fittoview.png", Utils::Theme::IconsBaseColor}}).icon(), - fitSelectionToScreenToolTip, - genericToolBarCategory, - QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_I), - 183, - &fitSelectionToScreen, - &selectionNotEmpty)); - addDesignerAction(new SeperatorDesignerAction(editCategory, 170)); addDesignerAction(new VisiblityModelNodeAction( diff --git a/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp b/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp index da77f26af7e..98148b7bd3f 100644 --- a/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp +++ b/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp @@ -329,23 +329,6 @@ void resetPosition(const SelectionContext &selectionState) }); } -void fitRootToScreen(const SelectionContext &selectionState) -{ - if (!selectionState.view()) - return; - - selectionState.view()->emitCustomNotification(QStringLiteral("fit root to screen")); -} - -void fitSelectionToScreen(const SelectionContext &selectionState) -{ - if (!selectionState.view()) - return; - - selectionState.view()->emitCustomNotification(QStringLiteral("fit selection to screen"), - selectionState.selectedModelNodes()); -} - void goIntoComponentOperation(const SelectionContext &selectionState) { goIntoComponent(selectionState.currentSingleSelectedNode()); diff --git a/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.h b/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.h index 0a8e094a7e1..afd8416bf9f 100644 --- a/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.h +++ b/src/plugins/qmldesigner/components/componentcore/modelnodeoperations.h @@ -49,8 +49,6 @@ void setFillWidth(const SelectionContext &selectionState); void setFillHeight(const SelectionContext &selectionState); void resetSize(const SelectionContext &selectionState); void resetPosition(const SelectionContext &selectionState); -void fitRootToScreen(const SelectionContext &selectionState); -void fitSelectionToScreen(const SelectionContext &selectionState); void goIntoComponentOperation(const SelectionContext &selectionState); void setId(const SelectionContext &selectionState); void resetZ(const SelectionContext &selectionState); diff --git a/src/plugins/qmldesigner/components/componentcore/theme.h b/src/plugins/qmldesigner/components/componentcore/theme.h index 4cc4deb2983..880a1d05caa 100644 --- a/src/plugins/qmldesigner/components/componentcore/theme.h +++ b/src/plugins/qmldesigner/components/componentcore/theme.h @@ -66,19 +66,21 @@ public: alignRight, alignTo, alignTop, - assign, anchorBaseline, anchorBottom, anchorFill, anchorLeft, anchorRight, anchorTop, + animatedProperty, annotationBubble, annotationDecal, + assign, centerHorizontal, centerVertical, - curveEditor, closeCross, + curveDesigner, + curveEditor, decisionNode, deleteColumn, deleteRow, @@ -101,6 +103,8 @@ public: fontStyleItalic, fontStyleStrikethrough, fontStyleUnderline, + idAliasOff, + idAliasOn, mergeCells, redo, splitColumns, @@ -121,7 +125,11 @@ public: undo, upDownIcon, upDownSquare2, - wildcard + wildcard, + zoomAll, + zoomIn, + zoomOut, + zoomSelection }; static Theme *instance(); diff --git a/src/plugins/qmldesigner/components/componentcore/zoomaction.cpp b/src/plugins/qmldesigner/components/componentcore/zoomaction.cpp index 4f1d1c3da90..c59c1ffe836 100644 --- a/src/plugins/qmldesigner/components/componentcore/zoomaction.cpp +++ b/src/plugins/qmldesigner/components/componentcore/zoomaction.cpp @@ -47,14 +47,14 @@ float ZoomAction::zoomLevel() const void ZoomAction::zoomIn() { - if (m_currentComboBoxIndex > 0) - emit indexChanged(m_currentComboBoxIndex - 1); + if (m_currentComboBoxIndex < (m_comboBoxModel->rowCount() - 1)) + emit indexChanged(m_currentComboBoxIndex + 1); } void ZoomAction::zoomOut() { - if (m_currentComboBoxIndex < (m_comboBoxModel->rowCount() - 1)) - emit indexChanged(m_currentComboBoxIndex + 1); + if (m_currentComboBoxIndex > 0) + emit indexChanged(m_currentComboBoxIndex - 1); } void ZoomAction::resetZoomLevel() diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp b/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp index f64b45f3517..6eec3f933c4 100644 --- a/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp +++ b/src/plugins/qmldesigner/components/formeditor/formeditorview.cpp @@ -384,6 +384,11 @@ void FormEditorView::selectedNodesChanged(const QList &selectedNodeLi m_currentTool->setItems(scene()->itemsForQmlItemNodes(toQmlItemNodeListKeppInvalid(selectedNodeList))); m_scene->update(); + + if (selectedNodeList.empty()) + m_formEditorWidget->zoomSelectionAction()->setEnabled(false); + else + m_formEditorWidget->zoomSelectionAction()->setEnabled(true); } void FormEditorView::variantPropertiesChanged(const QList &propertyList, @@ -448,7 +453,7 @@ void FormEditorView::customNotification(const AbstractView * /*view*/, const QSt m_dragTool->clearMoveDelay(); if (identifier == QLatin1String("reset QmlPuppet")) temporaryBlockView(); - if (identifier == QLatin1String("fit root to screen")) { + if (identifier == QLatin1String("zoom all")) { if (QmlItemNode(rootModelNode()).isFlowView()) { QRectF boundingRect; for (QGraphicsItem *item : scene()->items()) { @@ -469,7 +474,7 @@ void FormEditorView::customNotification(const AbstractView * /*view*/, const QSt float zoomLevel = ZoomAction::getClosestZoomLevel(scaleFactor); m_formEditorWidget->zoomAction()->forceZoomLevel(zoomLevel); } - if (identifier == QLatin1String("fit selection to screen")) { + if (identifier == QLatin1String("zoom selection")) { if (nodeList.isEmpty()) return; @@ -485,6 +490,10 @@ void FormEditorView::customNotification(const AbstractView * /*view*/, const QSt float zoomLevel = ZoomAction::getClosestZoomLevel(scaleFactor); m_formEditorWidget->zoomAction()->forceZoomLevel(zoomLevel); } + if (identifier == QLatin1String("zoom in")) + m_formEditorWidget->zoomAction()->zoomIn(); + if (identifier == QLatin1String("zoom out")) + m_formEditorWidget->zoomAction()->zoomOut(); } AbstractFormEditorTool *FormEditorView::currentTool() const diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp b/src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp index 0380db2b081..303c79ea965 100644 --- a/src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp +++ b/src/plugins/qmldesigner/components/formeditor/formeditorwidget.cpp @@ -48,6 +48,7 @@ #include #include +#include #include #include @@ -144,6 +145,46 @@ FormEditorWidget::FormEditorWidget(FormEditorView *view) : upperActions.append(m_backgroundAction.data()); m_toolBox->addRightSideAction(m_backgroundAction.data()); + // Zoom actions + const QString fontName = "qtds_propertyIconFont.ttf"; + QColor buttonColor(Theme::getColor(Theme::QmlDesigner_TabLight)); + const QIcon zoomAllIcon = Utils::StyleHelper::getIconFromIconFont(fontName, + Theme::getIconUnicode(Theme::Icon::zoomAll), + 28, 28, buttonColor); + const QIcon zoomSelectionIcon = Utils::StyleHelper::getIconFromIconFont(fontName, + Theme::getIconUnicode(Theme::Icon::zoomSelection), + 28, 28, buttonColor); + const QIcon zoomInIcon = Utils::StyleHelper::getIconFromIconFont(fontName, + Theme::getIconUnicode(Theme::Icon::zoomIn), + 28, 28, buttonColor); + const QIcon zoomOutIcon = Utils::StyleHelper::getIconFromIconFont(fontName, + Theme::getIconUnicode(Theme::Icon::zoomOut), + 28, 28, buttonColor); + + m_zoomInAction = new QAction(zoomInIcon, tr("Zoom in"), this); + m_zoomInAction->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_Plus)); + connect(m_zoomInAction.data(), &QAction::triggered, this, [this] { + if (!m_formEditorView) + return; + + m_formEditorView->emitCustomNotification(QStringLiteral("zoom in")); + }); + addAction(m_zoomInAction.data()); + upperActions.append(m_zoomInAction.data()); + m_toolBox->addRightSideAction(m_zoomInAction.data()); + + m_zoomOutAction = new QAction(zoomOutIcon, tr("Zoom out"), this); + m_zoomOutAction->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_Minus)); + connect(m_zoomOutAction.data(), &QAction::triggered, this, [this] { + if (!m_formEditorView) + return; + + m_formEditorView->emitCustomNotification(QStringLiteral("zoom out")); + }); + addAction(m_zoomOutAction.data()); + upperActions.append(m_zoomOutAction.data()); + m_toolBox->addRightSideAction(m_zoomOutAction.data()); + m_zoomAction = new ZoomAction(m_toolActionGroup.data()); connect(m_zoomAction.data(), &ZoomAction::zoomLevelChanged, this, &FormEditorWidget::setZoomLevel); @@ -151,6 +192,31 @@ FormEditorWidget::FormEditorWidget(FormEditorView *view) : upperActions.append(m_zoomAction.data()); m_toolBox->addRightSideAction(m_zoomAction.data()); + m_zoomAllAction = new QAction(zoomAllIcon, tr("Zoom screen to fit all content"), this); + m_zoomAllAction->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_0)); + connect(m_zoomAllAction.data(), &QAction::triggered, this, [this] { + if (!m_formEditorView) + return; + + m_formEditorView->emitCustomNotification(QStringLiteral("zoom all")); + }); + addAction(m_zoomAllAction.data()); + upperActions.append(m_zoomAllAction.data()); + m_toolBox->addRightSideAction(m_zoomAllAction.data()); + + m_zoomSelectionAction = new QAction(zoomSelectionIcon, tr("Zoom screen to fit current selection"), this); + m_zoomSelectionAction->setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_I)); + connect(m_zoomSelectionAction.data(), &QAction::triggered, this, [this] { + if (!m_formEditorView) + return; + + m_formEditorView->emitCustomNotification(QStringLiteral("zoom selection"), + m_formEditorView->selectedModelNodes()); + }); + addAction(m_zoomSelectionAction.data()); + upperActions.append(m_zoomSelectionAction.data()); + m_toolBox->addRightSideAction(m_zoomSelectionAction.data()); + m_resetAction = new QAction(Utils::Icons::RESET_TOOLBAR.icon(), tr("Reset View"), this); registerActionAsCommand(m_resetAction, Constants::FORMEDITOR_REFRESH, QKeySequence(Qt::Key_R)); @@ -218,9 +284,9 @@ void FormEditorWidget::wheelEvent(QWheelEvent *event) { if (event->modifiers().testFlag(Qt::ControlModifier)) { if (event->angleDelta().y() > 0) - zoomAction()->zoomOut(); - else zoomAction()->zoomIn(); + else + zoomAction()->zoomOut(); event->accept(); } else { @@ -304,6 +370,11 @@ ZoomAction *FormEditorWidget::zoomAction() const return m_zoomAction.data(); } +QAction *FormEditorWidget::zoomSelectionAction() const +{ + return m_zoomSelectionAction.data(); +} + QAction *FormEditorWidget::resetAction() const { return m_resetAction.data(); diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorwidget.h b/src/plugins/qmldesigner/components/formeditor/formeditorwidget.h index eb01611682f..b2f50de6c0f 100644 --- a/src/plugins/qmldesigner/components/formeditor/formeditorwidget.h +++ b/src/plugins/qmldesigner/components/formeditor/formeditorwidget.h @@ -53,6 +53,7 @@ public: FormEditorWidget(FormEditorView *view); ZoomAction *zoomAction() const; + QAction *zoomSelectionAction() const; QAction *showBoundingRectAction() const; QAction *snappingAction() const; QAction *snappingAndAnchoringAction() const; @@ -112,6 +113,10 @@ private: QPointer m_rootHeightAction; QPointer m_backgroundAction; QPointer m_resetAction; + QPointer m_zoomAllAction; + QPointer m_zoomSelectionAction; + QPointer m_zoomInAction; + QPointer m_zoomOutAction; QPointer m_documentErrorWidget; Core::IContext *m_context = nullptr; };