diff --git a/Cetus.pro b/Cetus.pro index 2abb83c..8830bda 100644 --- a/Cetus.pro +++ b/Cetus.pro @@ -35,4 +35,5 @@ TRANSLATIONS_OUT_PATH = $$PWD/$$NAME/translations include(translation.pri) DISTFILES += \ - Cetus/CoolantControls.qml + Cetus/CoolantControls.qml \ + Cetus/StatusBar/FileNameLabel.qml diff --git a/Cetus/ApplicationMenuBar.qml b/Cetus/ApplicationMenuBar.qml index 36855b7..e49ef92 100644 --- a/Cetus/ApplicationMenuBar.qml +++ b/Cetus/ApplicationMenuBar.qml @@ -80,6 +80,7 @@ MenuBar { MenuItem { action: showOffsetsAction } MenuItem { action: showVelocityAction } MenuItem { action: showDistanceToGoAction } + MenuItem { action: showSpindleSpeedAction } ToggleSettingAction { id: showOffsetsAction @@ -102,6 +103,13 @@ MenuBar { text: qsTr("Show &distance to go") } + ToggleSettingAction { + id: showSpindleSpeedAction + groupName: "dro" + valueName: "showSpindleSpeed" + text: qsTr("Show &spindle speed") + } + ToggleSettingAction { id: enablePreviewAction groupName: "preview" diff --git a/Cetus/DRO/DroElementBase.qml b/Cetus/DRO/DroElementBase.qml index 7f06fab..e7c062e 100644 --- a/Cetus/DRO/DroElementBase.qml +++ b/Cetus/DRO/DroElementBase.qml @@ -40,7 +40,7 @@ Item { Text { id: axisTitleText anchors.centerIn: parent - font.pixelSize: text.length < 3 ? 50 : 35 + font.pixelSize: text.length == 1 ? 50 : 33 text: root.axisName } } diff --git a/Cetus/DRO/StyledDroBase.qml b/Cetus/DRO/StyledDroBase.qml index 5054a3d..e670368 100644 --- a/Cetus/DRO/StyledDroBase.qml +++ b/Cetus/DRO/StyledDroBase.qml @@ -80,6 +80,15 @@ AbstractDigitalReadOut { list.push(item); } + if (root.spindleSpeedVisible) { + item = {}; + item.name = qsTr("S%1").arg(root.spindleDirection === 1 ? "⟳" : (root.spindleDirection === -1 ? "⟲" : "")); + item.color = "lightyellow"; + item.value = root.spindleSpeed; + item.secondValue = 0.0; + list.push(item); + } + return list; } } diff --git a/Cetus/StatusBar/ApplicationStatusBar.qml b/Cetus/StatusBar/ApplicationStatusBar.qml index 6202e36..fb05d43 100644 --- a/Cetus/StatusBar/ApplicationStatusBar.qml +++ b/Cetus/StatusBar/ApplicationStatusBar.qml @@ -10,19 +10,34 @@ StatusBar { RowLayout { anchors.fill: parent - MachineStatusLabel {} + MachineStatusLabel { + Layout.fillHeight: true + Layout.minimumWidth: parent.width * 0.15 + } + Spacer {} - ToolStatusLabel {} + + ToolStatusLabel { + Layout.fillHeight: true + Layout.minimumWidth: parent.width * 0.2 + } + Spacer {} - PositionOffsetLabel {} + + PositionOffsetLabel { + Layout.fillHeight: true + Layout.minimumWidth: parent.width * 0.15 + } + Spacer {} + Item { Layout.fillWidth: true } Spacer {} - ApplicationProgressBar { + + FileNameLabel { Layout.fillHeight: true - Layout.preferredWidth: parent.width * 0.3 - anchors.margins: 5 + Layout.minimumWidth: parent.width * 0.15 } } } diff --git a/Cetus/StatusBar/FileNameLabel.qml b/Cetus/StatusBar/FileNameLabel.qml new file mode 100644 index 0000000..2e9647e --- /dev/null +++ b/Cetus/StatusBar/FileNameLabel.qml @@ -0,0 +1,19 @@ +import QtQuick 2.0 +import QtQuick.Controls 1.2 +import QtQuick.Layouts 1.1 +import Machinekit.Application 1.0 + +Label { + id: root + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + elide: Text.ElideRight + + readonly property string __fileName: object.file.remoteFilePath ? object.file.remoteFilePath.split('/').reverse()[0] : "" + + text: __fileName + + ApplicationObject { + id: object + } +} diff --git a/Cetus/StatusBar/MachineStatusLabel.qml b/Cetus/StatusBar/MachineStatusLabel.qml index 17ed3e3..a408209 100644 --- a/Cetus/StatusBar/MachineStatusLabel.qml +++ b/Cetus/StatusBar/MachineStatusLabel.qml @@ -4,8 +4,7 @@ import QtQuick.Layouts 1.1 import Machinekit.Application 1.0 Label { - Layout.fillHeight: true - Layout.minimumWidth: parent.width * 0.15 + id: root verticalAlignment: Text.AlignVCenter text: { if (applicationCore.status.synced) { diff --git a/Cetus/StatusBar/PositionOffsetLabel.qml b/Cetus/StatusBar/PositionOffsetLabel.qml index f0ac8ce..b2ed54e 100644 --- a/Cetus/StatusBar/PositionOffsetLabel.qml +++ b/Cetus/StatusBar/PositionOffsetLabel.qml @@ -4,8 +4,7 @@ import QtQuick.Layouts 1.1 import Machinekit.Application 1.0 Label { - Layout.fillHeight: true - Layout.minimumWidth: parent.width * 0.15 + id: root verticalAlignment: Text.AlignVCenter text: qsTr("Position: ") + textFunction() diff --git a/Cetus/StatusBar/ToolStatusLabel.qml b/Cetus/StatusBar/ToolStatusLabel.qml index f4b64db..a4ad8dc 100644 --- a/Cetus/StatusBar/ToolStatusLabel.qml +++ b/Cetus/StatusBar/ToolStatusLabel.qml @@ -4,8 +4,7 @@ import QtQuick.Layouts 1.1 import Machinekit.Application 1.0 Label { - Layout.fillHeight: true - Layout.minimumWidth: parent.width * 0.2 + id: root verticalAlignment: Text.AlignVCenter text: d.valid ? qsTr("Tool %1, offset: %2, diameter: %3") .arg(d.toolId) diff --git a/qml.qrc b/qml.qrc index ac439b9..18cf982 100644 --- a/qml.qrc +++ b/qml.qrc @@ -39,5 +39,7 @@ Cetus/ConfigurationPanel/RapidrateControl.qml Cetus/ConfigurationPanel/SpindlerateControl.qml Cetus/ConfigurationPanel/MaximumVelocityControl.qml + Cetus/ConfigurationPanel/GantryConfigControl.qml + Cetus/StatusBar/FileNameLabel.qml diff --git a/translations/cetus_de.ts b/translations/cetus_de.ts index 194c322..184a9ed 100644 --- a/translations/cetus_de.ts +++ b/translations/cetus_de.ts @@ -114,6 +114,10 @@ E&xit User Interface Benutzeroberfläche schli&eßen + + Show &spindle speed + + ApplicationStatusBar @@ -233,6 +237,17 @@ Vorschubgeschwindigkeit + + GantryConfigControl + + Left offset: + + + + Right offset: + + + MachineStatusLabel @@ -425,6 +440,10 @@ Tool Offsets Wekzeug Versatz + + S%1 + + ToggleSettingAction diff --git a/translations/cetus_en.ts b/translations/cetus_en.ts index 9944a06..9499898 100644 --- a/translations/cetus_en.ts +++ b/translations/cetus_en.ts @@ -94,6 +94,10 @@ E&xit User Interface + + Show &spindle speed + + ApplicationStatusBar @@ -156,6 +160,17 @@ + + GantryConfigControl + + Left offset: + + + + Right offset: + + + MachineStatusLabel @@ -332,6 +347,10 @@ Tool Offsets + + S%1 + + ToolStatusLabel diff --git a/translations/cetus_es.ts b/translations/cetus_es.ts index d5f231a..d513450 100644 --- a/translations/cetus_es.ts +++ b/translations/cetus_es.ts @@ -94,6 +94,10 @@ About &Cetus + + Show &spindle speed + + AxisControls @@ -149,6 +153,17 @@ + + GantryConfigControl + + Left offset: + + + + Right offset: + + + MachineStatusLabel @@ -325,6 +340,10 @@ Tool Offsets + + S%1 + + ToolStatusLabel diff --git a/translations/cetus_ru.ts b/translations/cetus_ru.ts index b916875..33215c0 100644 --- a/translations/cetus_ru.ts +++ b/translations/cetus_ru.ts @@ -102,6 +102,10 @@ E&xit User Interface + + Show &spindle speed + + ApplicationStatusBar @@ -190,6 +194,17 @@ Переподача + + GantryConfigControl + + Left offset: + + + + Right offset: + + + MachineStatusLabel @@ -382,6 +397,10 @@ Tool Offsets + + S%1 + + ToolStatusLabel