Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Cetus.pro
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ TRANSLATIONS_OUT_PATH = $$PWD/$$NAME/translations
include(translation.pri)

DISTFILES += \
Cetus/CoolantControls.qml
Cetus/CoolantControls.qml \
Cetus/StatusBar/FileNameLabel.qml
8 changes: 8 additions & 0 deletions Cetus/ApplicationMenuBar.qml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ MenuBar {
MenuItem { action: showOffsetsAction }
MenuItem { action: showVelocityAction }
MenuItem { action: showDistanceToGoAction }
MenuItem { action: showSpindleSpeedAction }

ToggleSettingAction {
id: showOffsetsAction
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion Cetus/DRO/DroElementBase.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down
9 changes: 9 additions & 0 deletions Cetus/DRO/StyledDroBase.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
27 changes: 21 additions & 6 deletions Cetus/StatusBar/ApplicationStatusBar.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
19 changes: 19 additions & 0 deletions Cetus/StatusBar/FileNameLabel.qml
Original file line number Diff line number Diff line change
@@ -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
}
}
3 changes: 1 addition & 2 deletions Cetus/StatusBar/MachineStatusLabel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
3 changes: 1 addition & 2 deletions Cetus/StatusBar/PositionOffsetLabel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
3 changes: 1 addition & 2 deletions Cetus/StatusBar/ToolStatusLabel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions qml.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,7 @@
<file>Cetus/ConfigurationPanel/RapidrateControl.qml</file>
<file>Cetus/ConfigurationPanel/SpindlerateControl.qml</file>
<file>Cetus/ConfigurationPanel/MaximumVelocityControl.qml</file>
<file>Cetus/ConfigurationPanel/GantryConfigControl.qml</file>
<file>Cetus/StatusBar/FileNameLabel.qml</file>
</qresource>
</RCC>
19 changes: 19 additions & 0 deletions translations/cetus_de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@
<source>E&amp;xit User Interface</source>
<translation>Benutzeroberfläche schli&amp;eßen</translation>
</message>
<message>
<source>Show &amp;spindle speed</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ApplicationStatusBar</name>
Expand Down Expand Up @@ -233,6 +237,17 @@
<translation>Vorschubgeschwindigkeit</translation>
</message>
</context>
<context>
<name>GantryConfigControl</name>
<message>
<source>Left offset:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Right offset:</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MachineStatusLabel</name>
<message>
Expand Down Expand Up @@ -425,6 +440,10 @@
<source>Tool Offsets</source>
<translation>Wekzeug Versatz</translation>
</message>
<message>
<source>S%1</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToggleSettingAction</name>
Expand Down
19 changes: 19 additions & 0 deletions translations/cetus_en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@
<source>E&amp;xit User Interface</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Show &amp;spindle speed</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ApplicationStatusBar</name>
Expand Down Expand Up @@ -156,6 +160,17 @@
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>GantryConfigControl</name>
<message>
<source>Left offset:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Right offset:</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MachineStatusLabel</name>
<message>
Expand Down Expand Up @@ -332,6 +347,10 @@
<source>Tool Offsets</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>S%1</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToolStatusLabel</name>
Expand Down
19 changes: 19 additions & 0 deletions translations/cetus_es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@
<source>About &amp;Cetus</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Show &amp;spindle speed</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AxisControls</name>
Expand Down Expand Up @@ -149,6 +153,17 @@
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>GantryConfigControl</name>
<message>
<source>Left offset:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Right offset:</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MachineStatusLabel</name>
<message>
Expand Down Expand Up @@ -325,6 +340,10 @@
<source>Tool Offsets</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>S%1</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToolStatusLabel</name>
Expand Down
19 changes: 19 additions & 0 deletions translations/cetus_ru.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@
<source>E&amp;xit User Interface</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Show &amp;spindle speed</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ApplicationStatusBar</name>
Expand Down Expand Up @@ -190,6 +194,17 @@
<translation type="unfinished">Переподача</translation>
</message>
</context>
<context>
<name>GantryConfigControl</name>
<message>
<source>Left offset:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Right offset:</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MachineStatusLabel</name>
<message>
Expand Down Expand Up @@ -382,6 +397,10 @@
<source>Tool Offsets</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>S%1</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ToolStatusLabel</name>
Expand Down