Commit 7f1d60e3 authored by Don Gagne's avatar Don Gagne

Remove X to close since it conflicts with QGCViewDialogs

parent b8d25964
...@@ -26,21 +26,60 @@ import QtQuick.Controls 1.2 ...@@ -26,21 +26,60 @@ import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.2 import QtQuick.Controls.Styles 1.2
import QtQuick.Dialogs 1.2 import QtQuick.Dialogs 1.2
import QGroundControl 1.0
import QGroundControl.Palette 1.0 import QGroundControl.Palette 1.0
import QGroundControl.Controls 1.0 import QGroundControl.Controls 1.0
import QGroundControl.Controllers 1.0 import QGroundControl.Controllers 1.0
import QGroundControl.ScreenTools 1.0 import QGroundControl.ScreenTools 1.0
Rectangle { QGCView {
id: qgcView
viewPanel: panel
property bool loaded: false
QGCPalette { id: qgcPal; colorGroupEnabled: panel.enabled }
Component {
id: filtersDialogComponent
QGCViewDialog {
QGCFlickable {
anchors.fill: parent
contentHeight: categoryColumn.height
clip: true
Column {
id: categoryColumn
spacing: ScreenTools.defaultFontPixelHeight / 2
Repeater {
model: QGroundControl.loggingCategories()
QGCCheckBox {
text: modelData
checked: QGroundControl.categoryLoggingOn(modelData)
onClicked: {
QGroundControl.setCategoryLoggingOn(modelData, checked)
QGroundControl.updateLoggingFilterRules()
}
}
}
}
}
} // QGCViewDialog
} // Component - filtersDialogComponent
QGCViewPanel {
id: panel
anchors.fill: parent
Rectangle {
id: logwindow id: logwindow
anchors.fill: parent anchors.fill: parent
anchors.margins: ScreenTools.defaultFontPixelWidth anchors.margins: ScreenTools.defaultFontPixelWidth
color: qgcPal.window color: qgcPal.window
property bool loaded: false
QGCPalette { id: qgcPal }
Connections { Connections {
target: debugMessageModel target: debugMessageModel
...@@ -91,9 +130,9 @@ Rectangle { ...@@ -91,9 +130,9 @@ Rectangle {
FileDialog { FileDialog {
id: writeDialog id: writeDialog
folder: shortcuts.home folder: shortcuts.home
nameFilters: ["Log files (*.txt)", "All Files (*)"] nameFilters: [qsTr("Log files (*.txt)"), qsTr("All Files (*)")]
selectExisting: false selectExisting: false
title: "Select log save file" title: qsTr("Select log save file")
onAccepted: { onAccepted: {
debugMessageModel.writeMessages(fileUrl); debugMessageModel.writeMessages(fileUrl);
visible = false; visible = false;
...@@ -112,7 +151,7 @@ Rectangle { ...@@ -112,7 +151,7 @@ Rectangle {
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
anchors.left: parent.left anchors.left: parent.left
onClicked: writeDialog.visible = true onClicked: writeDialog.visible = true
text: "Save App Log" text: qsTr("Save App Log")
} }
BusyIndicator { BusyIndicator {
...@@ -125,9 +164,10 @@ Rectangle { ...@@ -125,9 +164,10 @@ Rectangle {
QGCButton { QGCButton {
id: followTail id: followTail
anchors.right: filterButton.left
anchors.rightMargin: ScreenTools.defaultFontPixelWidth
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
anchors.right: parent.right text: qsTr("Show Latest")
text: "Show Latest"
checkable: true checkable: true
checked: true checked: true
...@@ -137,4 +177,15 @@ Rectangle { ...@@ -137,4 +177,15 @@ Rectangle {
} }
} }
} }
}
QGCButton {
id: filterButton
anchors.bottom: parent.bottom
anchors.right: parent.right
text: qsTr("Set logging")
onClicked: showDialog(filtersDialogComponent, qsTr("Turn on logging categories"), qgcView.showDialogDefaultWidth, StandardButton.Close)
}
}
} // QGCViewPanel
} // QGCView
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment