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
import QtQuick.Controls.Styles 1.2
import QtQuick.Dialogs 1.2
import QGroundControl 1.0
import QGroundControl.Palette 1.0
import QGroundControl.Controls 1.0
import QGroundControl.Controllers 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
anchors.fill: parent
anchors.margins: ScreenTools.defaultFontPixelWidth
color: qgcPal.window
property bool loaded: false
QGCPalette { id: qgcPal }
Connections {
target: debugMessageModel
......@@ -91,9 +130,9 @@ Rectangle {
FileDialog {
id: writeDialog
folder: shortcuts.home
nameFilters: ["Log files (*.txt)", "All Files (*)"]
nameFilters: [qsTr("Log files (*.txt)"), qsTr("All Files (*)")]
selectExisting: false
title: "Select log save file"
title: qsTr("Select log save file")
onAccepted: {
debugMessageModel.writeMessages(fileUrl);
visible = false;
......@@ -112,7 +151,7 @@ Rectangle {
anchors.bottom: parent.bottom
anchors.left: parent.left
onClicked: writeDialog.visible = true
text: "Save App Log"
text: qsTr("Save App Log")
}
BusyIndicator {
......@@ -125,9 +164,10 @@ Rectangle {
QGCButton {
id: followTail
anchors.right: filterButton.left
anchors.rightMargin: ScreenTools.defaultFontPixelWidth
anchors.bottom: parent.bottom
anchors.right: parent.right
text: "Show Latest"
text: qsTr("Show Latest")
checkable: true
checked: true
......@@ -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