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
73 changes: 69 additions & 4 deletions resources/BaselineTabComponents/BaselinePlot.qml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import "../Constants"
import "../SolutionPlotCommon/SolutionPlotLoop.js" as SolutionPlotLoop
import QtCharts 2.15
import QtGraphicalEffects 1.15
import QtQuick 2.15
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.15
Expand Down Expand Up @@ -62,11 +63,27 @@ Item {
ButtonGroup.group: baselineButtonGroup
Layout.preferredWidth: Constants.baselinePlot.navBarButtonWidth
Layout.preferredHeight: Constants.commonChart.buttonHeight
text: "| |"
ToolTip.visible: hovered
ToolTip.text: "Pause"
checkable: true
onClicked: data_model.baseline_plot([baselineButtonGroup.buttons[2].checked, baselineButtonGroup.buttons[1].pressed, baselineButtonGroup.buttons[0].pressed])

Image {
id: baselinePauseImage

anchors.centerIn: parent
width: Constants.baselinePlot.buttonSvgHeight
height: Constants.baselinePlot.buttonSvgHeight
source: Constants.icons.pauseButtonUrl
visible: false
}

ColorOverlay {
anchors.fill: baselinePauseImage
source: baselinePauseImage
color: !baselinePauseButton.checked ? "dimgrey" : "crimson"
}

}

Button {
Expand All @@ -76,9 +93,25 @@ Item {
ButtonGroup.group: baselineButtonGroup
Layout.preferredWidth: Constants.baselinePlot.navBarButtonWidth
Layout.preferredHeight: Constants.commonChart.buttonHeight
text: " X "
ToolTip.visible: hovered
ToolTip.text: "Clear"

Image {
id: baselineClearImage

anchors.centerIn: parent
width: Constants.baselinePlot.buttonSvgHeight
height: Constants.baselinePlot.buttonSvgHeight
source: Constants.icons.clearButtonUrl
visible: false
}

ColorOverlay {
anchors.fill: baselineClearImage
source: baselineClearImage
color: !baselineClearButton.checked ? "dimgrey" : "crimson"
}

}

Button {
Expand All @@ -96,11 +129,27 @@ Item {
}
Layout.preferredWidth: Constants.baselinePlot.navBarButtonWidth
Layout.preferredHeight: Constants.commonChart.buttonHeight
text: "[ ]"
ToolTip.visible: hovered
ToolTip.text: "Zoom All"
checkable: true
checked: true

Image {
id: baselineZoomAllImage

anchors.centerIn: parent
width: Constants.baselinePlot.buttonSvgHeight
height: Constants.baselinePlot.buttonSvgHeight
source: Constants.icons.zoomAllButtonUrl
visible: false
}

ColorOverlay {
anchors.fill: baselineZoomAllImage
source: baselineZoomAllImage
color: !baselineZoomAllButton.checked ? "dimgrey" : "crimson"
}

}

Button {
Expand All @@ -119,10 +168,26 @@ Item {
}
Layout.preferredWidth: Constants.baselinePlot.navBarButtonWidth
Layout.preferredHeight: Constants.commonChart.buttonHeight
text: "(><)"
ToolTip.visible: hovered
ToolTip.text: "Center On Solution"
checkable: true

Image {
id: centerButtonImage

anchors.centerIn: parent
width: Constants.baselinePlot.buttonSvgHeight
height: Constants.baselinePlot.buttonSvgHeight
source: Constants.icons.centerOnButtonUrl
visible: false
}

ColorOverlay {
anchors.fill: centerButtonImage
source: centerButtonImage
color: !baselineCenterButton.checked ? "dimgrey" : "crimson"
}

}

Button {
Expand Down
6 changes: 6 additions & 0 deletions resources/Constants/Constants.qml
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ QtObject {
}

baselinePlot: QtObject {
readonly property int buttonSvgHeight: 15
readonly property int navBarMargin: 10
readonly property int navBarSpacing: 0
readonly property real navBarButtonWidth: 40
Expand All @@ -352,6 +353,7 @@ QtObject {
}

solutionPosition: QtObject {
readonly property int buttonSvgHeight: 15
readonly property int navBarMargin: 10
readonly property int navBarSpacing: 0
readonly property real navBarButtonProportionOfParent: 0.11
Expand Down Expand Up @@ -501,6 +503,10 @@ QtObject {
readonly property string importPath: "images/fontawesome/file-import.svg"
readonly property string warningPath: "images/fontawesome/exclamation-triangle.svg"
readonly property string connectButtonPath: "images/fontawesome/power-off-solid.svg"
readonly property string pauseButtonUrl: "qrc:///pause.svg"
readonly property string centerOnButtonUrl: "qrc:///center-on.svg"
readonly property string clearButtonUrl: "qrc:///clear.svg"
readonly property string zoomAllButtonUrl: "qrc:///zoom-all.svg"
}

}
18 changes: 17 additions & 1 deletion resources/NavBar.qml
Original file line number Diff line number Diff line change
Expand Up @@ -241,11 +241,27 @@ Rectangle {

Layout.preferredWidth: Constants.navBar.connectionPauseWidth
Layout.preferredHeight: Constants.navBar.buttonHeight
text: "| |"
ToolTip.visible: hovered
ToolTip.text: !checked ? "Pause" : "Unpause"
checkable: true
onClicked: data_model.pause(checked)

Image {
id: connectionPauseImage

anchors.centerIn: parent
width: Constants.navBar.buttonSvgHeight
height: Constants.navBar.buttonSvgHeight
source: Constants.icons.pauseButtonUrl
visible: false
}

ColorOverlay {
anchors.fill: connectionPauseImage
source: connectionPauseImage
color: !connectionPauseButton.checked ? "dimgrey" : "crimson"
}

}

Button {
Expand Down
73 changes: 69 additions & 4 deletions resources/SolutionTabComponents/SolutionPositionTab.qml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import "../Constants"
import "../SolutionPlotCommon/SolutionPlotLoop.js" as SolutionPlotLoop
import QtCharts 2.15
import QtGraphicalEffects 1.15
import QtQuick 2.15
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.15
Expand Down Expand Up @@ -65,11 +66,27 @@ Item {
ButtonGroup.group: solutionButtonGroup
Layout.preferredWidth: parent.width * Constants.solutionPosition.navBarButtonProportionOfParent
Layout.preferredHeight: Constants.commonChart.buttonHeight
text: "| |"
ToolTip.visible: hovered
ToolTip.text: "Pause"
checkable: true
onClicked: data_model.solution_position([solutionButtonGroup.buttons[1].checked, solutionButtonGroup.buttons[0].pressed])

Image {
id: solutionPauseImage

anchors.centerIn: parent
width: Constants.solutionPosition.buttonSvgHeight
height: Constants.solutionPosition.buttonSvgHeight
source: Constants.icons.pauseButtonUrl
visible: false
}

ColorOverlay {
anchors.fill: solutionPauseImage
source: solutionPauseImage
color: !solutionPauseButton.checked ? "dimgrey" : "crimson"
}

}

Button {
Expand All @@ -78,10 +95,26 @@ Item {
ButtonGroup.group: solutionButtonGroup
Layout.preferredWidth: parent.width * Constants.solutionPosition.navBarButtonProportionOfParent
Layout.preferredHeight: Constants.commonChart.buttonHeight
text: " X "
ToolTip.visible: hovered
ToolTip.text: "Clear"
onPressed: data_model.solution_position([solutionButtonGroup.buttons[1].checked, solutionButtonGroup.buttons[0].pressed])

Image {
id: solutionClearImage

anchors.centerIn: parent
width: Constants.solutionPosition.buttonSvgHeight
height: Constants.solutionPosition.buttonSvgHeight
source: Constants.icons.clearButtonUrl
visible: false
}

ColorOverlay {
anchors.fill: solutionClearImage
source: solutionClearImage
color: !solutionClearButton.checked ? "dimgrey" : "crimson"
}

}

Button {
Expand All @@ -99,11 +132,27 @@ Item {
}
Layout.preferredWidth: parent.width * Constants.solutionPosition.navBarButtonProportionOfParent
Layout.preferredHeight: Constants.commonChart.buttonHeight
text: "[ ]"
ToolTip.visible: hovered
ToolTip.text: "Zoom All"
checkable: true
checked: true

Image {
id: solutionZoomAllImage

anchors.centerIn: parent
width: Constants.solutionPosition.buttonSvgHeight
height: Constants.solutionPosition.buttonSvgHeight
source: Constants.icons.zoomAllButtonUrl
visible: false
}

ColorOverlay {
anchors.fill: solutionZoomAllImage
source: solutionZoomAllImage
color: !solutionZoomAllButton.checked ? "dimgrey" : "crimson"
}

}

Button {
Expand All @@ -122,10 +171,26 @@ Item {
}
Layout.preferredWidth: parent.width * Constants.solutionPosition.navBarButtonProportionOfParent
Layout.preferredHeight: Constants.commonChart.buttonHeight
text: "(><)"
ToolTip.visible: hovered
ToolTip.text: "Center On Solution"
checkable: true

Image {
id: centerButtonImage

anchors.centerIn: parent
width: Constants.solutionPosition.buttonSvgHeight
height: Constants.solutionPosition.buttonSvgHeight
source: Constants.icons.centerOnButtonUrl
visible: false
}

ColorOverlay {
anchors.fill: centerButtonImage
source: centerButtonImage
color: !solutionCenterButton.checked ? "dimgrey" : "crimson"
}

}

Text {
Expand Down
5 changes: 4 additions & 1 deletion resources/console_resources.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@
<file>images/fontawesome/bars-solid.svg</file>
<file>images/fontawesome/play-solid.svg</file>
<file>images/fontawesome/power-off-solid.svg</file>
<file>images/fontawesome/pause-solid.svg</file>
<file alias="pause.svg">images/iconic/media-pause.svg</file>
<file alias="center-on.svg">images/fontawesome/crosshairs-solid.svg</file>
<file alias="clear.svg">images/fontawesome/eraser-solid.svg</file>
<file alias="zoom-all.svg">images/fontawesome/expand-solid.svg</file>
<file>images/fontawesome/folder-open-regular.svg</file>
<file>images/fontawesome/folder-solid.svg</file>
<file>images/fontawesome/square-solid.svg</file>
Expand Down
1 change: 1 addition & 0 deletions resources/images/fontawesome/crosshairs-solid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions resources/images/fontawesome/eraser-solid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions resources/images/fontawesome/expand-solid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions resources/images/fontawesome/pause-circle-regular.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions resources/images/iconic/media-pause.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.