|
|
|
@ -26,67 +26,6 @@ Item {
@@ -26,67 +26,6 @@ Item {
|
|
|
|
|
|
|
|
|
|
property bool loaded: false |
|
|
|
|
|
|
|
|
|
Component { |
|
|
|
|
id: filtersPopupDialog |
|
|
|
|
|
|
|
|
|
QGCPopupDialog { |
|
|
|
|
title: qsTr("Turn on logging categories") |
|
|
|
|
buttons: StandardButton.Close |
|
|
|
|
|
|
|
|
|
ColumnLayout { |
|
|
|
|
RowLayout { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelHeight / 2 |
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
|
|
|
|
|
QGCLabel { text: qsTr("Search:") } |
|
|
|
|
|
|
|
|
|
QGCTextField { |
|
|
|
|
id: searchText |
|
|
|
|
text: "" |
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
enabled: true |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCButton { |
|
|
|
|
text: qsTr("Clear") |
|
|
|
|
onClicked: searchText.text = "" |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCButton { |
|
|
|
|
text: qsTr("Clear All") |
|
|
|
|
onClicked: categoryRepeater.setAllLogs(false) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Repeater { |
|
|
|
|
id: categoryRepeater |
|
|
|
|
model: QGroundControl.loggingCategories() |
|
|
|
|
|
|
|
|
|
function setAllLogs(value) { |
|
|
|
|
var logCategories = QGroundControl.loggingCategories() |
|
|
|
|
for (var category of logCategories) { |
|
|
|
|
QGroundControl.setCategoryLoggingOn(category, value) |
|
|
|
|
} |
|
|
|
|
QGroundControl.updateLoggingFilterRules() |
|
|
|
|
// Update model for repeater |
|
|
|
|
categoryRepeater.model = undefined |
|
|
|
|
categoryRepeater.model = QGroundControl.loggingCategories() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCCheckBox { |
|
|
|
|
text: modelData |
|
|
|
|
visible: searchText.text ? text.match(`(${searchText.text})`, "i") : true |
|
|
|
|
checked: QGroundControl.categoryLoggingOn(modelData) |
|
|
|
|
onClicked: { |
|
|
|
|
QGroundControl.setCategoryLoggingOn(modelData, checked) |
|
|
|
|
QGroundControl.updateLoggingFilterRules() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Item { |
|
|
|
|
id: panel |
|
|
|
|
anchors.fill: parent |
|
|
|
@ -169,12 +108,12 @@ Item {
@@ -169,12 +108,12 @@ Item {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
id: gstLabel |
|
|
|
|
anchors.left: writeButton.right |
|
|
|
|
anchors.leftMargin: ScreenTools.defaultFontPixelWidth |
|
|
|
|
anchors.baseline: gstCombo.baseline |
|
|
|
|
text: qsTr("GStreamer Debug") |
|
|
|
|
visible: QGroundControl.settingsManager.appSettings.gstDebugLevel.visible |
|
|
|
|
id: gstLabel |
|
|
|
|
anchors.left: writeButton.right |
|
|
|
|
anchors.leftMargin: ScreenTools.defaultFontPixelWidth |
|
|
|
|
anchors.verticalCenter: gstCombo.verticalCenter |
|
|
|
|
text: qsTr("GStreamer Debug Level") |
|
|
|
|
visible: QGroundControl.settingsManager.appSettings.gstDebugLevel.visible |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
FactComboBox { |
|
|
|
@ -182,10 +121,9 @@ Item {
@@ -182,10 +121,9 @@ Item {
|
|
|
|
|
anchors.left: gstLabel.right |
|
|
|
|
anchors.leftMargin: ScreenTools.defaultFontPixelWidth / 2 |
|
|
|
|
anchors.bottom: parent.bottom |
|
|
|
|
width: ScreenTools.defaultFontPixelWidth * 10 |
|
|
|
|
model: ["Disabled", "1", "2", "3", "4", "5", "6", "7", "8"] |
|
|
|
|
fact: QGroundControl.settingsManager.appSettings.gstDebugLevel |
|
|
|
|
visible: QGroundControl.settingsManager.appSettings.gstDebugLevel.visible |
|
|
|
|
sizeToContents: true |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCButton { |
|
|
|
@ -209,7 +147,80 @@ Item {
@@ -209,7 +147,80 @@ Item {
|
|
|
|
|
anchors.bottom: parent.bottom |
|
|
|
|
anchors.right: parent.right |
|
|
|
|
text: qsTr("Set Logging") |
|
|
|
|
onClicked: mainWindow.showPopupDialogFromComponent(filtersPopupDialog) |
|
|
|
|
onClicked: mainWindow.showPopupDialogFromComponent(filtersDialogComponent) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Component { |
|
|
|
|
id: filtersDialogComponent |
|
|
|
|
|
|
|
|
|
QGCPopupDialog { |
|
|
|
|
title: qsTr("Logging categories") |
|
|
|
|
buttons: StandardButton.Close |
|
|
|
|
|
|
|
|
|
ColumnLayout { |
|
|
|
|
RowLayout { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelHeight / 2 |
|
|
|
|
Layout.alignment: Qt.AlignVCenter |
|
|
|
|
Layout.fillHeight: true |
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
text: qsTr("Search:") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCTextField { |
|
|
|
|
id: searchText |
|
|
|
|
text: "" |
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
enabled: true |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCButton { |
|
|
|
|
text: qsTr("Clear") |
|
|
|
|
onClicked: searchText.text = "" |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelHeight / 2 |
|
|
|
|
QGCButton { |
|
|
|
|
text: qsTr("Clear All") |
|
|
|
|
onClicked: categoryRepeater.setAllLogs(false) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Column { |
|
|
|
|
id: categoryColumn |
|
|
|
|
spacing: ScreenTools.defaultFontPixelHeight / 2 |
|
|
|
|
|
|
|
|
|
Repeater { |
|
|
|
|
id: categoryRepeater |
|
|
|
|
model: QGroundControl.loggingCategories() |
|
|
|
|
|
|
|
|
|
function setAllLogs(value) { |
|
|
|
|
var logCategories = QGroundControl.loggingCategories() |
|
|
|
|
for (var category of logCategories) { |
|
|
|
|
QGroundControl.setCategoryLoggingOn(category, value) |
|
|
|
|
} |
|
|
|
|
QGroundControl.updateLoggingFilterRules() |
|
|
|
|
// Update model for repeater |
|
|
|
|
categoryRepeater.model = undefined |
|
|
|
|
categoryRepeater.model = QGroundControl.loggingCategories() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QGCCheckBox { |
|
|
|
|
text: modelData |
|
|
|
|
visible: searchText.text ? text.match(`(${searchText.text})`, "i") : true |
|
|
|
|
checked: QGroundControl.categoryLoggingOn(modelData) |
|
|
|
|
onClicked: { |
|
|
|
|
QGroundControl.setCategoryLoggingOn(modelData, checked) |
|
|
|
|
QGroundControl.updateLoggingFilterRules() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|