Skip to content

Commit

Permalink
minor usability changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphael committed Dec 10, 2023
1 parent 68477a9 commit e3d48aa
Show file tree
Hide file tree
Showing 2 changed files with 126 additions and 127 deletions.
249 changes: 124 additions & 125 deletions qml/ui/configpopup/dev/AppDeveloperStatsPanel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -33,155 +33,154 @@ Rectangle {
ret += "GSTREAMER_QMLGLSINK:" + yes_or_no_as_string(QOPENHD_ENABLE_GSTREAMER_QMLGLSINK) + ", "
return ret;
}

ScrollView{
TabBar {
// This screen doesn't tab, but we use the tab bar element for a consistent style
id: selectItemInStackLayoutBar
width: parent.width
height: parent.height
anchors.centerIn: parent
contentHeight: main_column_layout.height
contentWidth: main_column_layout.width
//ScrollBar.vertical.policy: ScrollBar.AlwaysOn
ScrollBar.vertical.interactive: true
TabButton {
text: qsTr("Developer Menu")
}
}
Rectangle{
ScrollView{
width: parent.width
height: parent.height-(selectItemInStackLayoutBar.height*2)
anchors.centerIn: parent
contentHeight: main_column_layout.height
contentWidth: main_column_layout.width
//ScrollBar.vertical.policy: ScrollBar.AlwaysOn
ScrollBar.vertical.interactive: true


ColumnLayout {
id: main_column_layout
Layout.fillWidth: true
Layout.minimumHeight: 30
spacing: 6
anchors.top: parent.top
anchors.left: parent.left
anchors.margins: 10
Text{
text: qsTr("QOpenHD version:" + _qopenhd.version_string)
Layout.leftMargin: 12
}
Text {
id: test5
text: qsTr("FEATURES: " + get_features_string())
Layout.leftMargin: 12
}
Text {
id: test6
text: qsTr("Screen resolution: " + _qrenderstats.screen_width_height_str+" ADJ:"+_qrenderstats.display_width_height_str)
Layout.leftMargin: 12
}
Text {
id: test7
text: qsTr("Window resolution: " + _qrenderstats.window_width+"x"+_qrenderstats.window_height)
Layout.leftMargin: 12
}
Text {
id: test8
text: qsTr("You're running on: " + Qt.platform.os)
Layout.leftMargin: 12
}
Text {
id: test1
text: qsTr("Art Horizon mavlink update rate:" + _fcMavlinkSystem.curr_update_rate_mavlink_message_attitude + " Hz")
Layout.leftMargin: 12
}
Text {
id: tele_in
text: qsTr("Tele in" + _mavlinkTelemetry.telemetry_pps_in + " pps")
Layout.leftMargin: 12
}
// air
Text {
id: test2
text: qsTr("video0 FEC encode: " + _cameraStreamModelPrimary.curr_fec_encode_time_avg_min_max)
Layout.leftMargin: 12
}
Text {
id: testX
text: qsTr("video0 TX delay: " + _cameraStreamModelPrimary.curr_time_until_tx_min_max_avg)
Layout.leftMargin: 12
}
Text {
id: test4
text: qsTr("video0 FEC block length: " + _cameraStreamModelPrimary.curr_fec_block_length_min_max_avg)
Layout.leftMargin: 12
}
// ground
Text {
id: test3
text: qsTr("video0 FEC decode: " + _cameraStreamModelPrimary.curr_fec_decode_time_avg_min_max)
Layout.leftMargin: 12
}
Button {
height: 24
text: "Restart local OHD service"
onClicked: {
_qopenhd.restart_local_oenhd_service()
ColumnLayout {
id: main_column_layout
Layout.fillWidth: true
Layout.minimumHeight: 30
spacing: 6
anchors.top: parent.top
anchors.left: parent.left
anchors.margins: 10
Text{
text: qsTr("QOpenHD version: " + _qopenhd.version_string + " for " + Qt.platform.os)
Layout.leftMargin: 12
}
}
Button {
id: local_ip_button
height: 24
text: "Show local IP"
onClicked: {
var text = _qopenhd.show_local_ip()
local_ip_button.text = text
Text {
id: test5
text: qsTr("FEATURES: " + get_features_string())
Layout.leftMargin: 12
}
}
Button {
id: exp_set_rates
height: 24
text: "Set Tele rates"
onClicked: {
_mavlinkTelemetry.re_apply_rates()
Text {
id: test6
text: qsTr("Resolution: " +" Screen "+ _qrenderstats.screen_width_height_str+" ADJ:"+_qrenderstats.display_width_height_str + " Window: "+ _qrenderstats.window_width+"x"+_qrenderstats.window_height)
Layout.leftMargin: 12
}
Text {
id: test1
text: qsTr("Art Horizon mavlink update rate:" + _fcMavlinkSystem.curr_update_rate_mavlink_message_attitude + " Hz")
Layout.leftMargin: 12
}
Text {
id: tele_in
text: qsTr("Tele in" + _mavlinkTelemetry.telemetry_pps_in + " pps")
Layout.leftMargin: 12
}
// air
Text {
id: test2
text: qsTr("video0 FEC encode: " + _cameraStreamModelPrimary.curr_fec_encode_time_avg_min_max)
Layout.leftMargin: 12
}
Text {
id: testX
text: qsTr("video0 TX delay: " + _cameraStreamModelPrimary.curr_time_until_tx_min_max_avg)
Layout.leftMargin: 12
}
Text {
id: test4
text: qsTr("video0 FEC block length: " + _cameraStreamModelPrimary.curr_fec_block_length_min_max_avg)
Layout.leftMargin: 12
}
// ground
Text {
id: test3
text: qsTr("video0 FEC decode: " + _cameraStreamModelPrimary.curr_fec_decode_time_avg_min_max)
Layout.leftMargin: 12
}
}

RowLayout {
width: parent.width
height: 200
visible: _qopenhd.is_linux()
Button {
text: "Sysctl start openhd"
height: 24
text: "Restart local OHD service"
onClicked: {
_qopenhd.sysctl_openhd(0);
_qopenhd.restart_local_oenhd_service()
}
}
Button {
text: "Sysctl stop openhd"
id: local_ip_button
height: 24
text: "Show local IP"
onClicked: {
_qopenhd.sysctl_openhd(1);
var text = _qopenhd.show_local_ip()
local_ip_button.text = text
}
}
Button {
text: "Sysctl enable openhd"
id: exp_set_rates
height: 24
text: "Set Tele rates"
onClicked: {
_qopenhd.sysctl_openhd(2);
_mavlinkTelemetry.re_apply_rates()
}
}
Button {
text: "Sysctl disable openhd"
onClicked: {
_qopenhd.sysctl_openhd(3);

RowLayout {
width: parent.width
height: 200
visible: _qopenhd.is_linux()
Button {
text: "Start openhd"
onClicked: {
_qopenhd.sysctl_openhd(0);
}
}
Button {
text: "Stop openhd"
onClicked: {
_qopenhd.sysctl_openhd(1);
}
}
Button {
text: "Enable openhd"
onClicked: {
_qopenhd.sysctl_openhd(2);
}
}
Button {
text: "Disable openhd"
onClicked: {
_qopenhd.sysctl_openhd(3);
}
}
}
}

RowLayout {
width: parent.width
RowLayout {
width: parent.width

Button {
font.capitalization: Font.MixedCase
text: qsTr("DEV-Restart QOpenHD")
onPressed: {
qopenhdservicedialoque.open_dialoque(0)
Button {
font.capitalization: Font.MixedCase
text: qsTr("DEV-Restart QOpenHD")
onPressed: {
qopenhdservicedialoque.open_dialoque(0)
}
}
}
Button {
font.capitalization: Font.MixedCase
text: qsTr("DEV-Cancel QOpenHD")
onPressed: {
qopenhdservicedialoque.open_dialoque(1)
Button {
font.capitalization: Font.MixedCase
text: qsTr("DEV-Cancel QOpenHD")
onPressed: {
qopenhdservicedialoque.open_dialoque(1)
}
}
Item {
// Padding
}
}
Item {
// Padding
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions qml/ui/configpopup/log/LogMessagesView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ Rectangle{
//color: "#FF0000"
//color: "#D0A197"
//color: "#808080"
color: "white"
radius: 10
color: "#333c4c"

height: 28
width: baseLogMessagesView.width //parent.width for some reason we cannot just use parent.width here
Expand All @@ -70,6 +69,7 @@ Rectangle{
verticalAlignment: Text.AlignVCenter
height: parent.height
opacity: 1.0
color:"white"
font.pixelSize: settings.qopenhd_general_font_pixel_size
}
}
Expand Down

0 comments on commit e3d48aa

Please sign in to comment.