mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-11 08:29:03 +08:00
ViewOrientationControls now use actions
This prevents code duplication CURA-5395
This commit is contained in:
parent
0bc8a67a37
commit
8b7c95da35
@ -101,7 +101,7 @@ Item
|
||||
Action
|
||||
{
|
||||
id: redoAction;
|
||||
text: catalog.i18nc("@action:inmenu menubar:edit","&Redo");
|
||||
text: catalog.i18nc("@action:inmenu menubar:edit", "&Redo");
|
||||
iconName: "edit-redo";
|
||||
shortcut: StandardKey.Redo;
|
||||
onTriggered: UM.OperationStack.redo();
|
||||
@ -110,65 +110,65 @@ Item
|
||||
|
||||
Action
|
||||
{
|
||||
id: quitAction;
|
||||
text: catalog.i18nc("@action:inmenu menubar:file","&Quit");
|
||||
iconName: "application-exit";
|
||||
shortcut: StandardKey.Quit;
|
||||
id: quitAction
|
||||
text: catalog.i18nc("@action:inmenu menubar:file","&Quit")
|
||||
iconName: "application-exit"
|
||||
shortcut: StandardKey.Quit
|
||||
}
|
||||
|
||||
Action
|
||||
{
|
||||
id: view3DCameraAction;
|
||||
text: catalog.i18nc("@action:inmenu menubar:view","3D View");
|
||||
onTriggered: UM.Controller.rotateView("3d", 0);
|
||||
id: view3DCameraAction
|
||||
text: catalog.i18nc("@action:inmenu menubar:view", "3D View")
|
||||
onTriggered: UM.Controller.rotateView("3d", 0)
|
||||
}
|
||||
|
||||
Action
|
||||
{
|
||||
id: viewFrontCameraAction;
|
||||
text: catalog.i18nc("@action:inmenu menubar:view","Front View");
|
||||
onTriggered: UM.Controller.rotateView("home", 0);
|
||||
id: viewFrontCameraAction
|
||||
text: catalog.i18nc("@action:inmenu menubar:view", "Front View")
|
||||
onTriggered: UM.Controller.rotateView("home", 0)
|
||||
}
|
||||
|
||||
Action
|
||||
{
|
||||
id: viewTopCameraAction;
|
||||
text: catalog.i18nc("@action:inmenu menubar:view","Top View");
|
||||
onTriggered: UM.Controller.rotateView("y", 90);
|
||||
id: viewTopCameraAction
|
||||
text: catalog.i18nc("@action:inmenu menubar:view", "Top View")
|
||||
onTriggered: UM.Controller.rotateView("y", 90)
|
||||
}
|
||||
|
||||
Action
|
||||
{
|
||||
id: viewLeftSideCameraAction;
|
||||
text: catalog.i18nc("@action:inmenu menubar:view","Left Side View");
|
||||
onTriggered: UM.Controller.rotateView("x", 90);
|
||||
id: viewLeftSideCameraAction
|
||||
text: catalog.i18nc("@action:inmenu menubar:view", "Left Side View")
|
||||
onTriggered: UM.Controller.rotateView("x", 90)
|
||||
}
|
||||
|
||||
Action
|
||||
{
|
||||
id: viewRightSideCameraAction;
|
||||
text: catalog.i18nc("@action:inmenu menubar:view","Right Side View");
|
||||
onTriggered: UM.Controller.rotateView("x", -90);
|
||||
id: viewRightSideCameraAction
|
||||
text: catalog.i18nc("@action:inmenu menubar:view", "Right Side View")
|
||||
onTriggered: UM.Controller.rotateView("x", -90)
|
||||
}
|
||||
|
||||
Action
|
||||
{
|
||||
id: preferencesAction;
|
||||
text: catalog.i18nc("@action:inmenu","Configure Cura...");
|
||||
iconName: "configure";
|
||||
id: preferencesAction
|
||||
text: catalog.i18nc("@action:inmenu", "Configure Cura...")
|
||||
iconName: "configure"
|
||||
}
|
||||
|
||||
Action
|
||||
{
|
||||
id: addMachineAction;
|
||||
text: catalog.i18nc("@action:inmenu menubar:printer","&Add Printer...");
|
||||
id: addMachineAction
|
||||
text: catalog.i18nc("@action:inmenu menubar:printer", "&Add Printer...")
|
||||
}
|
||||
|
||||
Action
|
||||
{
|
||||
id: settingsAction;
|
||||
text: catalog.i18nc("@action:inmenu menubar:printer","Manage Pr&inters...");
|
||||
iconName: "configure";
|
||||
id: settingsAction
|
||||
text: catalog.i18nc("@action:inmenu menubar:printer", "Manage Pr&inters...")
|
||||
iconName: "configure"
|
||||
}
|
||||
|
||||
Action
|
||||
|
@ -6,7 +6,7 @@ import QtQuick.Controls 1.1
|
||||
import QtQuick.Controls.Styles 1.1
|
||||
|
||||
import UM 1.4 as UM
|
||||
|
||||
import Cura 1.1 as Cura
|
||||
// A row of buttons that control the view direction
|
||||
Row
|
||||
{
|
||||
@ -19,30 +19,30 @@ Row
|
||||
ViewOrientationButton
|
||||
{
|
||||
iconSource: UM.Theme.getIcon("view_3d")
|
||||
onClicked: UM.Controller.rotateView("3d", 0)
|
||||
onClicked: Cura.Actions.view3DCamera.trigger()
|
||||
}
|
||||
|
||||
ViewOrientationButton
|
||||
{
|
||||
iconSource: UM.Theme.getIcon("view_front")
|
||||
onClicked: UM.Controller.rotateView("home", 0)
|
||||
onClicked: Cura.Actions.viewFrontCamera.trigger()
|
||||
}
|
||||
|
||||
ViewOrientationButton
|
||||
{
|
||||
iconSource: UM.Theme.getIcon("view_top")
|
||||
onClicked: UM.Controller.rotateView("y", 90)
|
||||
onClicked: Cura.Actions.viewTopCamera.trigger()
|
||||
}
|
||||
|
||||
ViewOrientationButton
|
||||
{
|
||||
iconSource: UM.Theme.getIcon("view_left")
|
||||
onClicked: UM.Controller.rotateView("x", 90)
|
||||
onClicked: Cura.Actions.viewLeftSideCamera.trigger()
|
||||
}
|
||||
|
||||
ViewOrientationButton
|
||||
{
|
||||
iconSource: UM.Theme.getIcon("view_right")
|
||||
onClicked: UM.Controller.rotateView("x", -90)
|
||||
onClicked: Cura.Actions.viewRightSideCamera.trigger()
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user