Skip to content

Commit

Permalink
zwischenstand
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelscholle committed Sep 30, 2023
1 parent b79080b commit 47d7edc
Show file tree
Hide file tree
Showing 8 changed files with 112 additions and 88 deletions.
5 changes: 5 additions & 0 deletions qml/ui/configpopup/status/ActionsColumn.qml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ Item{

ColumnLayout{
// 2 Rows
anchors.left: parent.left
anchors.leftMargin: 12
anchors.top: parent.top
anchors.topMargin: 12

RowLayout{
id: actions_1
width: parent.width
Expand Down
2 changes: 1 addition & 1 deletion qml/ui/configpopup/status/PanelStatus.qml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Rectangle {

StatusCardsColumn{
width: parent.width
height: 300
height: 250

anchors.leftMargin: 12
anchors.rightMargin: 12
Expand Down
54 changes: 27 additions & 27 deletions qml/ui/configpopup/status/QOpenHDVersionCard.qml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,13 @@ Card {

hasHeader: false

cardBody: ColumnLayout {
cardBody:
ColumnLayout {
anchors.centerIn: parent

Row {
spacing: 12
leftPadding: 18
topPadding: 60

Image {
id: image
Expand All @@ -40,36 +43,33 @@ Card {
id: title
height: 48
color: "#ff3a3a3a"
text: qsTr("QOpenHD-evo-2.5.1-alpha")
text: qsTr("QOpenHD")
font.pixelSize: 36
}
}

RowLayout{
height: 14
width: parent.width
anchors.leftMargin: 18
anchors.rightMargin: 18
Text {
id: qopenhd_version
color: "#ff3a3a3a"
text: qsTr(QOPENHD_GIT_VERSION)
}

Text {
id: license
color: "#ff3a3a3a"
text: qsTr("License: GPLv3")
onLinkActivated: {
Qt.openUrlExternally("https://github.com/OpenHD/QOpenHD/blob/master/LICENSE")
}
}
Text {
id: qopenhd_version
Layout.fillWidth: true
Layout.leftMargin: 75
height: 48
color: "#ff3a3a3a"
text: qsTr(QOPENHD_GIT_VERSION)
font.pixelSize: 12
}
}

Text {
id: qopenhd_commit_hash
color: "#ff3a3a3a"
text: qsTr(QOPENHD_GIT_COMMIT_HASH)
}
Text {
text: qsTr("GPLv3")
height: 60
color: "#ff3a3a3a"
anchors.bottom: parent.bottom
anchors.bottomMargin: -35
anchors.right: parent.right
rightPadding: 12
font.pixelSize: 12
onLinkActivated: {
Qt.openUrlExternally("https://github.com/OpenHD/QOpenHD/blob/master/LICENSE")
}
}
}
22 changes: 16 additions & 6 deletions qml/ui/configpopup/status/StatusCardBodyOpenHD.qml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ColumnLayout {
property string m_version: m_model.openhd_version
property string m_last_ping: m_model.last_ping_result_openhd
property bool m_is_alive: m_model.is_alive
property string m_qopenhd_version: "2.5.0-beta4X"
property string m_qopenhd_version: "2.5.1-alpha"

function get_alive_text(){
return m_is_alive ? "Yes" : "NOT ALIVE !"
Expand Down Expand Up @@ -87,10 +87,12 @@ ColumnLayout {
RowLayout{
Layout.fillWidth: true
Layout.minimumHeight: text_minHeight
spacing: 6
Layout.leftMargin: 12
spacing: 3
Text {
Layout.preferredWidth: left_part_preferred_with
text: qsTr("OHD Version:")
font.bold: true
}
Text {
text: m_version
Expand Down Expand Up @@ -126,10 +128,12 @@ ColumnLayout {
RowLayout{
Layout.fillWidth: true
Layout.minimumHeight: text_minHeight
spacing: 6
Layout.leftMargin: 12
spacing: 3
Text {
Layout.preferredWidth: left_part_preferred_with
text: qsTr("Last Ping:")
font.bold: true
}
Text {
text: m_last_ping
Expand All @@ -138,10 +142,12 @@ ColumnLayout {
RowLayout{
Layout.fillWidth: true
Layout.minimumHeight: text_minHeight
spacing: 6
Layout.leftMargin: 12
spacing: 3
Text {
Layout.preferredWidth: left_part_preferred_with
text: qsTr("Alive: ")
font.bold: true
}
Text {
text: get_alive_text()
Expand All @@ -151,10 +157,12 @@ ColumnLayout {
RowLayout{
Layout.fillWidth: true
Layout.minimumHeight: text_minHeight
spacing: 6
Layout.leftMargin: 12
spacing: 3
Text {
Layout.preferredWidth: left_part_preferred_with
text: qsTr(m_is_ground ? "WB Card(s): " : "WB Card:")
font.bold: true
}
Text {
text: get_cards_text()
Expand Down Expand Up @@ -188,11 +196,13 @@ ColumnLayout {
RowLayout{
Layout.fillWidth: true
Layout.minimumHeight: text_minHeight
spacing: 6
Layout.leftMargin: 12

visible: m_is_ground
Text{
Layout.preferredWidth: left_part_preferred_with
text: "Uplink:"
font.bold: true
}
Text{
text: gnd_uplink_state_text()
Expand Down
1 change: 1 addition & 0 deletions qml/ui/configpopup/status/StatusCardFooterGenericOHDFC.qml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ Item {
ButtonIconWarning{
visible: !get_show_power_actions()
Layout.alignment: Qt.AlignCenter
height:12
onPressed: {
open_warning();
}
Expand Down
108 changes: 57 additions & 51 deletions qml/ui/configpopup/status/StatusCardsColumn.qml
Original file line number Diff line number Diff line change
Expand Up @@ -15,64 +15,70 @@ import "../../elements"
// next to each other
Item {

RowLayout {
width: parent.width
ColumnLayout {
id: ohdCards
width: parent.width - 24
height: parent.height

Card {
id: groundBox
Layout.fillHeight: true
Layout.fillWidth: true
cardName: qsTr("OHD Ground station")

m_style_error: !_ohdSystemGround.is_alive
//m_style_error: false

cardBody: StatusCardBodyOpenHD{
m_is_ground: true
}

hasFooter: true
cardFooter: StatusCardFooterGenericOHDFC{
m_type: 0
}
}

Card {
id: airBox
Layout.fillHeight: true
Layout.fillWidth: true
cardName: qsTr("OHD Air unit")
m_style_error: !_ohdSystemAir.is_alive
//m_style_error: false
cardBody: StatusCardBodyOpenHD{
m_is_ground: false
anchors.centerIn: parent
property int maximumWidth: width

RowLayout {
width: parent.width - 24
height: parent.height
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter

Card {
id: groundBox
Layout.fillHeight: true
Layout.fillWidth: true
Layout.maximumWidth: ohdCards.maximumWidth/3
cardName: qsTr("Ground station")

visible: _ohdSystemGround.is_alive

cardBody: StatusCardBodyOpenHD{
m_is_ground: true
}

hasFooter: true
cardFooter: StatusCardFooterGenericOHDFC{
m_type: 0
}
}

hasFooter: true
cardFooter: StatusCardFooterGenericOHDFC{
m_type: 1
Card {
id: airBox
Layout.fillHeight: true
Layout.fillWidth: true
Layout.maximumWidth: ohdCards.maximumWidth/3
cardName: qsTr("Air unit")
visible: _ohdSystemAir.is_alive
cardBody: StatusCardBodyOpenHD{
m_is_ground: false
}

hasFooter: true
cardFooter: StatusCardFooterGenericOHDFC{
m_type: 1
}
}
}


Card {
id: fcBox
visible: true
Layout.fillHeight: true
Layout.fillWidth: true
cardName: qsTr("Flight Controller")
m_style_error: !_fcMavlinkSystem.is_alive
//m_style_error: false
cardBody: StatusCardBodyFC{
Card {
id: fcBox
Layout.fillHeight: true
Layout.fillWidth: true
cardName: qsTr("Flight Controller")
visible: _fcMavlinkSystem.is_alive
cardBody: StatusCardBodyFC{

}
}

hasFooter: true
cardFooter: StatusCardFooterGenericOHDFC{
m_type: 2
hasFooter: true
cardFooter: StatusCardFooterGenericOHDFC{
m_type: 2
}
}
}
} // end OpenHD air, ground, FC status cards layout

} // end RowLayout
} // end ColumnLayout
}
3 changes: 2 additions & 1 deletion qml/ui/elements/ButtonIconWarning.qml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ import QtQuick.Controls.Material 2.12
Button {
text: "\uf071"
font.family: "Font Awesome 5 Free"
Material.background:Material.Lime
font.pixelSize: 14
Material.background: "#fffc4c"
}
5 changes: 3 additions & 2 deletions qml/ui/elements/Card.qml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Item {
font.bold: true
font.pixelSize: 16
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignLeft
horizontalAlignment: Text.AlignHCenter
anchors.top: parent.top
anchors.left: cardHeaderImage.right
leftPadding: 12
Expand All @@ -84,6 +84,7 @@ Item {
id: cardBodyHolder
anchors.top: cardID.bottom
anchors.topMargin: 6
anchors.leftMargin: 12
//anchors.bottom: cardFooterInner.top
//anchors.bottomMargin: 3
width: parent.width
Expand All @@ -107,7 +108,7 @@ Item {

children: cardFooter
visible: hasFooter
height: 64
height: 52
color: "#f6f6f6"
border.width: 1
border.color: borderColor
Expand Down

0 comments on commit 47d7edc

Please sign in to comment.