Skip to content

Commit

Permalink
several small ui fixes and improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelscholle committed Jul 22, 2024
1 parent 3c35ca1 commit 93d43dd
Show file tree
Hide file tree
Showing 17 changed files with 194 additions and 109 deletions.
1 change: 1 addition & 0 deletions qml/checks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"enabled":true,"categories":{}}
8 changes: 0 additions & 8 deletions qml/ui/configpopup/credits/Credits.qml
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,6 @@ Rectangle {
color: "black"
anchors.horizontalCenter: parent.horizontalCenter
}
Text {
text: "raphaelscholle"
font.bold: true
font.pixelSize: settings.qopenhd_general_font_pixel_size*0.7
color: "grey"
anchors.horizontalCenter: parent.horizontalCenter
}

Image {
id: ee1
visible: true
Expand Down
6 changes: 3 additions & 3 deletions qml/ui/configpopup/openhd_settings/PopupScanChannels.qml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ PopupBigGeneric{

ListModel{
id: model_chann_to_scan
ListElement {title: "OpenHD [1-5] only (fast)"; value: 0}
ListElement {title: "All 2.4G channels (slow)"; value: 1}
ListElement {title: "All 5.8G channels (slow)"; value: 2}
ListElement {title: "OpenHD [1-7] only"; value: 0}
ListElement {title: "All 2.4G channels"; value: 1}
ListElement {title: "All 5.8G channels"; value: 2}
}

ColumnLayout{
Expand Down
2 changes: 1 addition & 1 deletion qml/ui/configpopup/qopenhd_settings/AppDevSettingsView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ ScrollView {
width: parent.width
Text {
id: simplePopupHackText
text: "This will erase all your QOpenHD settings (Layout of OSD elements, ...) and is irreversible, continue only if you know what you're doing!"
text: "Do you really want to erase all your QOpenHD settings?"
width: parent.width-24
height:parent.height
leftPadding: 12
Expand Down
36 changes: 21 additions & 15 deletions qml/ui/elements/RestartQOpenHDMessageBox.qml
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,31 @@ Card {
cardName: qsTr("QOpenHD")
cardNameColor: "black"
visible: _restartqopenhdmessagebox.visible
cardBody: Column {
height: 200
width: 320
Text {
id: text
text: _restartqopenhdmessagebox.text
width: parent.width-24
height:parent.height
leftPadding: 12
rightPadding: 12
font.pixelSize: 14
wrapMode: Text.WordWrap
Rectangle {
width: parent.width-24
height: parent.height-75
color: "transparent"
anchors.centerIn: parent

Column {
anchors.fill: parent

Text {
id: text
text: _restartqopenhdmessagebox.text
width: parent.width - 24
height: parent.height
font.pixelSize: 14
wrapMode: Text.WordWrap
}
}
}
hasFooter: true
cardFooter: Item {
anchors.fill: parent
anchors.leftMargin: 12
Button {
width: 140
width: 120
height: 48
anchors.right: parent.right
anchors.rightMargin: 12
Expand All @@ -46,15 +52,15 @@ Card {
font.capitalization: Font.MixedCase
Material.accent: Material.Grey
highlighted: true
text: qsTr("Restart now")
text: qsTr("Restart")
onPressed: {
_restartqopenhdmessagebox.hide_element()
// Let service restart
_qopenhd.quit_qopenhd();
}
}
Button {
width: 140
width: 120
height: 48
anchors.left: parent.left
anchors.rightMargin: 12
Expand Down
3 changes: 2 additions & 1 deletion qml/ui/sidebar/InfoElement2.qml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import "../elements"
RowLayout {
property string override_text_left: "TODO"
property string override_text_right: "TODO"
property string override_color_right: "#fff"

Text {
width: 150
Expand All @@ -29,7 +30,7 @@ RowLayout {
text: override_text_right
font.pixelSize: 14
font.family: "AvantGarde-Medium"
color: "#ffffff"
color: override_color_right
smooth: true

}
Expand Down
2 changes: 1 addition & 1 deletion qml/ui/sidebar/MappedMavlinkChoices.qml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Item {
id: elements_model_air_recording
ListElement {value: 0; verbose:"ALWAYS\nOFF"}
ListElement {value: 1; verbose:"ALWAYS\nON"}
ListElement {value: 2; verbose:"AUTO\n(WHEN ARMED)"}
ListElement {value: 2; verbose:"AUTO\n(WHEN ARMED)"}
}
ListModel{
id: elements_model_hotspot
Expand Down
2 changes: 1 addition & 1 deletion qml/ui/sidebar/MavlinkChoiceElement.qml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ BaseJoyEditElement{
id: elements_model_air_recording
ListElement {value: 0; verbose:"ALWAYS\nOFF"}
ListElement {value: 1; verbose:"ALWAYS\nON"}
ListElement {value: 2; verbose:"AUTO\n(WHEN ARMED)"}
ListElement {value: 2; verbose:"AUTO\n(WHEN ARMED)"}
}
ListModel{
id: elements_model_hotspot
Expand Down
2 changes: 1 addition & 1 deletion qml/ui/sidebar/Panel1Link.qml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ SideBarBasePanel{
}
MavlinkChoiceElement2{
id: edit_rate_element
m_title: "Rate (BW)"
m_title: "Bandwith"
m_param_id: mPARAM_ID_RATE
m_settings_model: _ohdSystemAirSettingsModel
onGoto_previous: {
Expand Down
2 changes: 1 addition & 1 deletion qml/ui/sidebar/Panel2Video.qml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ SideBarBasePanel{
}
MavlinkChoiceElement2{
id: rotation_flip
m_title: "ROTATION/FLIP"
m_title: "Rotation"
m_param_id: "ROTATION_FLIP"
m_settings_model: _airCameraSettingsModel
onGoto_previous: {
Expand Down
8 changes: 4 additions & 4 deletions qml/ui/sidebar/Panel3Camera.qml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ SideBarBasePanel{
spacing: 5
MavlinkChoiceElement2{
id: brightness
m_title: "BRIGHTNESS"
m_title: "Brightness"
m_param_id: "BRIGHTNESS"
m_settings_model: _airCameraSettingsModel
onGoto_previous: {
Expand All @@ -36,7 +36,7 @@ SideBarBasePanel{
}
MavlinkChoiceElement2{
id: saturation
m_title: "SATURATION"
m_title: "Saturation"
m_param_id: "SATURATION"
m_settings_model: _airCameraSettingsModel
onGoto_previous: {
Expand All @@ -48,7 +48,7 @@ SideBarBasePanel{
}
MavlinkChoiceElement2{
id: contrast
m_title: "CONTRAST"
m_title: "Contrast"
m_param_id: "CONTRAST"
m_settings_model: _airCameraSettingsModel
onGoto_previous: {
Expand All @@ -60,7 +60,7 @@ SideBarBasePanel{
}
MavlinkChoiceElement2{
id: sharpness
m_title: "SHARPNESS"
m_title: "Sharpness"
m_param_id: "SHARPNESS"
m_settings_model: _airCameraSettingsModel
onGoto_previous: {
Expand Down
64 changes: 40 additions & 24 deletions qml/ui/sidebar/Panel4Recording.qml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import OpenHD 1.0

import "../elements"

SideBarBasePanel{
SideBarBasePanel {
override_title: "Air recording"

function takeover_control(){
Expand All @@ -20,35 +20,51 @@ SideBarBasePanel{

Column {
anchors.top: parent.top
anchors.topMargin: secondaryUiHeight/8
anchors.topMargin: secondaryUiHeight / 8
spacing: 5

MavlinkChoiceElement2{
id: recording_mode
m_title: "RECORDING MODE"
m_param_id: "AIR_RECORDING_E"
m_settings_model: _airCameraSettingsModel
onGoto_previous: {
sidebar.regain_control_on_sidebar_stack()
}
onGoto_next: {
// Do nothing
Rectangle {
color: "transparent"
height: recording_mode.height
width: recording_mode.width
MavlinkChoiceElement2 {
id: recording_mode
anchors.centerIn: parent
anchors.leftMargin: 40
m_title: "Recording"
m_param_id: "AIR_RECORDING_E"
m_settings_model: _airCameraSettingsModel
onGoto_previous: {
sidebar.regain_control_on_sidebar_stack()
}
onGoto_next: {
// Do nothing
}
}
}
Text{
text: {
var tmp="CAM1 AIR RECORDING:";
if(!_ohdSystemAir.is_alive){
return tmp+" N/A";
Rectangle {
color: "#171d25"
height: recording_mode.height
width: recording_mode.width
Text {
anchors.centerIn: parent
anchors.leftMargin: 40
text: {
var tmp = " Status";
if (!_ohdSystemAir.is_alive) {
return tmp + " disabled ";
}
return tmp + _cameraStreamModelPrimary.camera_recording_mode_to_string(_cameraStreamModelPrimary.air_recording_active)
}
return tmp+_cameraStreamModelPrimary.camera_recording_mode_to_string(_cameraStreamModelPrimary.air_recording_active)
font.pixelSize: 18
color: "white"
smooth: true
}
font.pixelSize: 14
font.family: "AvantGarde-Medium"
color: "#ffffff"
smooth: true
}

Rectangle {
color: secondaryUiColor
height: recording_mode.height+120
width: recording_mode.width
}
}

}
58 changes: 41 additions & 17 deletions qml/ui/sidebar/Panel5RC.qml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ SideBarBasePanel{
property int m_control_throttle: settings.control_widget_use_fc_channels ? _rcchannelsmodelfc.control_throttle : _rcchannelsmodelground.control_throttle

Column {
id: rcpanel
anchors.top: parent.top
anchors.topMargin: secondaryUiHeight/8
anchors.topMargin: secondaryUiHeight / 8
spacing: 5


MavlinkChoiceElement2{
MavlinkChoiceElement2 {
id: joy_rc_enable
m_title: "JOY RC"
m_param_id: "ENABLE_JOY_RC";
m_title: "Joystick"
m_param_id: "ENABLE_JOY_RC"
m_settings_model: _ohdSystemGroundSettings
onGoto_previous: {
sidebar.regain_control_on_sidebar_stack()
Expand All @@ -41,17 +41,41 @@ SideBarBasePanel{
sidebar.regain_control_on_sidebar_stack()
}
}
RCChannelView{
override_channel_index: 0
}
RCChannelView{
override_channel_index: 1
}
RCChannelView{
override_channel_index: 2
}
RCChannelView{
override_channel_index: 3

Rectangle {
color: "transparent"
height: 260
width: 320

Rectangle {
id: innerRectangle
color: "transparent"
width: parent.width - 25
height: parent.height-75
anchors.centerIn: parent

Column {
anchors.fill: parent
spacing: 5

RCChannelView {
override_channel_index: 0
height: 50
}
RCChannelView {
override_channel_index: 1
height: 50
}
RCChannelView {
override_channel_index: 2
height: 50
}
RCChannelView {
override_channel_index: 3
height: 50
}
}
}
}
}
}
}
4 changes: 2 additions & 2 deletions qml/ui/sidebar/Panel6Misc.qml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ SideBarBasePanel{
spacing: 5
MavlinkChoiceElement2{
id: air_wifi_hs
m_title: "AIR WIFI HS"
m_title: "Air Hotspot"
m_param_id: "WIFI_HOTSPOT_E"
m_settings_model: _ohdSystemAirSettingsModel
onGoto_previous: {
Expand All @@ -36,7 +36,7 @@ SideBarBasePanel{
}
MavlinkChoiceElement2{
id: gnd_wifi_hs
m_title: "GND WIFI HS"
m_title: "Ground Hotspot"
m_param_id: "WIFI_HOTSPOT_E"
m_settings_model: _ohdSystemGroundSettings
onGoto_previous: {
Expand Down
Loading

0 comments on commit 93d43dd

Please sign in to comment.