-
Notifications
You must be signed in to change notification settings - Fork 2
Create INS Fusion Tab [CPP-372] #177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
d7d4c64
2ff575a
282597b
e5a42db
f7d4db3
3509a6f
8ce1332
754568d
4154140
b7dd7be
4186596
aaf5d4e
c904687
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| import "../Constants" | ||
| import QtCharts 2.3 | ||
| import QtQuick 2.6 | ||
| import QtQuick.Controls 2.12 | ||
| import QtQuick.Layouts 1.15 | ||
| import SwiftConsole 1.0 | ||
|
|
||
| Item { | ||
| id: advancedInsTab | ||
|
|
||
| width: parent.width | ||
| height: parent.height | ||
|
|
||
| ColumnLayout { | ||
| anchors.centerIn: parent | ||
jungleraptor marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| FusionStatusFlags { | ||
| } | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I really don't like that across the app, you guys don't specify the anchors or sizing of components where you use them. I'll put another comment in FusionStatusFlags talking about it. Ok - so for sizing here, this is in a so, add the following: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
What is the impact of doing things this way? Perhaps we should capture this as a clean-up task through-out the QML code. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When you make a .qml component, typically it is to be used as a reusable component to be used in more than one place (or at least, with the potential to use in more than one place). You don't know what the parent is going to be - it could be a Layout, where setting explicit widths and heights doesn't make sense. If it happened to be paired with another component in a ColumnLayout, for instance, then setting the width and height to parent.width and parent.height makes no sense, and would make the second item in the ColumnLayout not show properly. It would also not be clear when you used it that that was the problem - since you wouldn't be looking at the component that set those (in this case |
||
|
|
||
| } | ||
|
|
||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,171 +16,169 @@ Item { | |
| property string last_nhc: "UNKNOWN" | ||
| property string last_zerovel: "UNKNOWN" | ||
|
|
||
| width: parent.width | ||
| height: parent.height | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see you removed the sizing of the Item* here, but didn't add any sizing to it where it's used in AdvancedInsTab.qml.
|
||
| Component.onCompleted: { | ||
| } | ||
|
|
||
| FusionStatusFlagsData { | ||
| id: fusionStatusFlagsData | ||
| } | ||
|
|
||
| ColumnLayout { | ||
| id: fusionStatusFlagsArea | ||
| GroupBox { | ||
| anchors.centerIn: parent | ||
|
|
||
| width: parent.width | ||
| height: parent.height | ||
| GridLayout { | ||
| id: fusionStatusFlagsArea | ||
|
|
||
| RowLayout { | ||
| id: insStatusRow | ||
|
|
||
| visible: false | ||
| Layout.fillWidth: true | ||
| Layout.preferredHeight: Constants.advancedImu.urlBarHeight | ||
| Layout.alignment: Qt.AlignBottom | ||
| columns: 2 | ||
|
|
||
| Label { | ||
| text: Constants.advancedImu.insStatusLabels[0] | ||
| font.pointSize: Constants.fusionStatusFlags.labelFontSize | ||
| } | ||
|
|
||
| UnknownStatus { | ||
| id: gnssposUnknown | ||
|
|
||
| Layout.preferredWidth: Constants.advancedImu.insStatusImageWidth | ||
| Layout.preferredWidth: Constants.fusionStatusFlags.fusionStatusWidth | ||
| } | ||
|
|
||
| WarningStatus { | ||
| id: gnssposWarning | ||
|
|
||
| visible: false | ||
| Layout.preferredWidth: Constants.advancedImu.insStatusImageWidth | ||
| Layout.preferredWidth: Constants.fusionStatusFlags.fusionStatusWidth | ||
| } | ||
|
|
||
| OkStatus { | ||
| id: gnssposOk | ||
|
|
||
| visible: false | ||
| Layout.preferredWidth: Constants.advancedImu.insStatusImageWidth | ||
| Layout.preferredWidth: Constants.fusionStatusFlags.fusionStatusWidth | ||
| } | ||
|
|
||
| Label { | ||
| text: Constants.advancedImu.insStatusLabels[1] | ||
| font.pointSize: Constants.fusionStatusFlags.labelFontSize | ||
| } | ||
|
|
||
| UnknownStatus { | ||
| id: gnssvelUnknown | ||
|
|
||
| Layout.preferredWidth: Constants.advancedImu.insStatusImageWidth | ||
| Layout.preferredWidth: Constants.fusionStatusFlags.fusionStatusWidth | ||
| } | ||
|
|
||
| WarningStatus { | ||
| id: gnssvelWarning | ||
|
|
||
| visible: false | ||
| Layout.preferredWidth: Constants.advancedImu.insStatusImageWidth | ||
| Layout.preferredWidth: Constants.fusionStatusFlags.fusionStatusWidth | ||
| } | ||
|
|
||
| OkStatus { | ||
| id: gnssvelOk | ||
|
|
||
| visible: false | ||
| Layout.preferredWidth: Constants.advancedImu.insStatusImageWidth | ||
| Layout.preferredWidth: Constants.fusionStatusFlags.fusionStatusWidth | ||
| } | ||
|
|
||
| Label { | ||
| text: Constants.advancedImu.insStatusLabels[2] | ||
| font.pointSize: Constants.fusionStatusFlags.labelFontSize | ||
| } | ||
|
|
||
| UnknownStatus { | ||
| id: wheelticksUnknown | ||
|
|
||
| Layout.preferredWidth: Constants.advancedImu.insStatusImageWidth | ||
| Layout.preferredWidth: Constants.fusionStatusFlags.fusionStatusWidth | ||
| } | ||
|
|
||
| WarningStatus { | ||
| id: wheelticksWarning | ||
|
|
||
| visible: false | ||
| Layout.preferredWidth: Constants.advancedImu.insStatusImageWidth | ||
| Layout.preferredWidth: Constants.fusionStatusFlags.fusionStatusWidth | ||
| } | ||
|
|
||
| OkStatus { | ||
| id: wheelticksOk | ||
|
|
||
| visible: false | ||
| Layout.preferredWidth: Constants.advancedImu.insStatusImageWidth | ||
| Layout.preferredWidth: Constants.fusionStatusFlags.fusionStatusWidth | ||
| } | ||
|
|
||
| Label { | ||
| text: Constants.advancedImu.insStatusLabels[3] | ||
| font.pointSize: Constants.fusionStatusFlags.labelFontSize | ||
| } | ||
|
|
||
| UnknownStatus { | ||
| id: speedUnknown | ||
|
|
||
| Layout.preferredWidth: Constants.advancedImu.insStatusImageWidth | ||
| Layout.preferredWidth: Constants.fusionStatusFlags.fusionStatusWidth | ||
| } | ||
|
|
||
| WarningStatus { | ||
| id: speedWarning | ||
|
|
||
| visible: false | ||
| Layout.preferredWidth: Constants.advancedImu.insStatusImageWidth | ||
| Layout.preferredWidth: Constants.fusionStatusFlags.fusionStatusWidth | ||
| } | ||
|
|
||
| OkStatus { | ||
| id: speedOk | ||
|
|
||
| visible: false | ||
| Layout.preferredWidth: Constants.advancedImu.insStatusImageWidth | ||
| Layout.preferredWidth: Constants.fusionStatusFlags.fusionStatusWidth | ||
| } | ||
|
|
||
| Label { | ||
| text: Constants.advancedImu.insStatusLabels[4] | ||
| font.pointSize: Constants.fusionStatusFlags.labelFontSize | ||
| } | ||
|
|
||
| UnknownStatus { | ||
| id: nhcUnknown | ||
|
|
||
| Layout.preferredWidth: Constants.advancedImu.insStatusImageWidth | ||
| Layout.preferredWidth: Constants.fusionStatusFlags.fusionStatusWidth | ||
| } | ||
|
|
||
| WarningStatus { | ||
| id: nhcWarning | ||
|
|
||
| visible: false | ||
| Layout.preferredWidth: Constants.advancedImu.insStatusImageWidth | ||
| Layout.preferredWidth: Constants.fusionStatusFlags.fusionStatusWidth | ||
| } | ||
|
|
||
| OkStatus { | ||
| id: nhcOk | ||
|
|
||
| visible: false | ||
| Layout.preferredWidth: Constants.advancedImu.insStatusImageWidth | ||
| Layout.preferredWidth: Constants.fusionStatusFlags.fusionStatusWidth | ||
| } | ||
|
|
||
| Label { | ||
| text: Constants.advancedImu.insStatusLabels[5] | ||
| font.pointSize: Constants.fusionStatusFlags.labelFontSize | ||
| } | ||
|
|
||
| UnknownStatus { | ||
| id: zerovelUnknown | ||
|
|
||
| Layout.preferredWidth: Constants.advancedImu.insStatusImageWidth | ||
| Layout.preferredWidth: Constants.fusionStatusFlags.fusionStatusWidth | ||
| } | ||
|
|
||
| WarningStatus { | ||
| id: zerovelWarning | ||
|
|
||
| visible: false | ||
| Layout.preferredWidth: Constants.advancedImu.insStatusImageWidth | ||
| Layout.preferredWidth: Constants.fusionStatusFlags.fusionStatusWidth | ||
| } | ||
|
|
||
| OkStatus { | ||
| id: zerovelOk | ||
|
|
||
| visible: false | ||
| Layout.preferredWidth: Constants.advancedImu.insStatusImageWidth | ||
| Layout.preferredWidth: Constants.fusionStatusFlags.fusionStatusWidth | ||
| } | ||
|
|
||
| Item { | ||
|
|
@@ -199,7 +197,7 @@ Item { | |
| if (!fusionStatusFlagsData.gnsspos) | ||
| return ; | ||
|
|
||
| insStatusRow.visible = true; | ||
| fusionStatusFlagsArea.visible = true; | ||
| var gnsspos = fusionStatusFlagsData.gnsspos; | ||
| if (gnsspos != last_gnsspos) { | ||
| if (gnsspos == "UNKNOWN") { | ||
|
|
@@ -307,6 +305,11 @@ Item { | |
|
|
||
| } | ||
|
|
||
| label: Label { | ||
jungleraptor marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| text: Constants.fusionStatusFlags.title | ||
| font.pointSize: Constants.fusionStatusFlags.titleFontSize | ||
| } | ||
|
|
||
| } | ||
|
|
||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm but this is in a StackLayout... nothing else should be showing but one of the items in this list...