Commit d7234b8e authored by Don Gagne's avatar Don Gagne

Use new QGCListView

Shows horizontal/vertical scroll indicators
parent 1c7174f2
...@@ -65,6 +65,7 @@ ...@@ -65,6 +65,7 @@
<file alias="QGroundControl/Controls/QGCFlickableHorizontalIndicator.qml">src/QmlControls/QGCFlickableHorizontalIndicator.qml</file> <file alias="QGroundControl/Controls/QGCFlickableHorizontalIndicator.qml">src/QmlControls/QGCFlickableHorizontalIndicator.qml</file>
<file alias="QGroundControl/Controls/QGCFlickableVerticalIndicator.qml">src/QmlControls/QGCFlickableVerticalIndicator.qml</file> <file alias="QGroundControl/Controls/QGCFlickableVerticalIndicator.qml">src/QmlControls/QGCFlickableVerticalIndicator.qml</file>
<file alias="QGroundControl/Controls/QGCLabel.qml">src/QmlControls/QGCLabel.qml</file> <file alias="QGroundControl/Controls/QGCLabel.qml">src/QmlControls/QGCLabel.qml</file>
<file alias="QGroundControl/Controls/QGCListView.qml">src/QmlControls/QGCListView.qml</file>
<file alias="QGroundControl/Controls/QGCMobileFileDialog.qml">src/QmlControls/QGCMobileFileDialog.qml</file> <file alias="QGroundControl/Controls/QGCMobileFileDialog.qml">src/QmlControls/QGCMobileFileDialog.qml</file>
<file alias="QGroundControl/Controls/QGCMovableItem.qml">src/QmlControls/QGCMovableItem.qml</file> <file alias="QGroundControl/Controls/QGCMovableItem.qml">src/QmlControls/QGCMovableItem.qml</file>
<file alias="QGroundControl/Controls/QGCPipable.qml">src/QmlControls/QGCPipable.qml</file> <file alias="QGroundControl/Controls/QGCPipable.qml">src/QmlControls/QGCPipable.qml</file>
......
...@@ -732,7 +732,7 @@ QGCView { ...@@ -732,7 +732,7 @@ QGCView {
onWheel: wheel.accepted = true onWheel: wheel.accepted = true
} }
ListView { QGCListView {
id: missionItemEditorListView id: missionItemEditorListView
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
...@@ -766,7 +766,7 @@ QGCView { ...@@ -766,7 +766,7 @@ QGCView {
onMoveHomeToMapCenter: _visualItems.get(0).coordinate = editorMap.center onMoveHomeToMapCenter: _visualItems.get(0).coordinate = editorMap.center
} }
} // ListView } // QGCListView
} // Item - Mission Item editor } // Item - Mission Item editor
// GeoFence Editor // GeoFence Editor
......
...@@ -111,7 +111,7 @@ Rectangle { ...@@ -111,7 +111,7 @@ Rectangle {
QGCLabel { text: _azimuthText } QGCLabel { text: _azimuthText }
} }
ListView { QGCListView {
id: statusListView id: statusListView
model: missionItems model: missionItems
highlightMoveDuration: 250 highlightMoveDuration: 250
......
...@@ -96,7 +96,7 @@ QGCView { ...@@ -96,7 +96,7 @@ QGCView {
} }
} }
ListView { QGCListView {
Component.onCompleted: { Component.onCompleted: {
loaded = true loaded = true
} }
......
...@@ -51,7 +51,7 @@ QGCViewDialog { ...@@ -51,7 +51,7 @@ QGCViewDialog {
onActivated: categorySelected(textAt(index)) onActivated: categorySelected(textAt(index))
} }
ListView { QGCListView {
id: commandList id: commandList
anchors.margins: ScreenTools.defaultFontPixelHeight anchors.margins: ScreenTools.defaultFontPixelHeight
anchors.left: parent.left anchors.left: parent.left
...@@ -101,5 +101,5 @@ QGCViewDialog { ...@@ -101,5 +101,5 @@ QGCViewDialog {
} }
} }
} }
} // ListView } // QGCListView
} // QGCViewDialog } // QGCViewDialog
...@@ -180,7 +180,7 @@ QGCView { ...@@ -180,7 +180,7 @@ QGCView {
} }
/// Parameter list /// Parameter list
ListView { QGCListView {
id: editorListView id: editorListView
anchors.leftMargin: ScreenTools.defaultFontPixelWidth anchors.leftMargin: ScreenTools.defaultFontPixelWidth
anchors.left: _searchFilter ? parent.left : groupScroll.right anchors.left: _searchFilter ? parent.left : groupScroll.right
......
import QtQuick 2.5 import QtQuick 2.5
import QGroundControl.Palette 1.0 import QGroundControl.Palette 1.0
import QGroundControl.ScreenTools 1.0
/// QGC version of Flickable control that shows horizontal/vertial scroll indicators
Flickable { Flickable {
id: root id: root
boundsBehavior: Flickable.StopAtBounds boundsBehavior: Flickable.StopAtBounds
......
import QtQuick 2.5
import QGroundControl.Palette 1.0
/// QGC version of ListVIew control that shows horizontal/vertial scroll indicators
ListView {
id: root
boundsBehavior: Flickable.StopAtBounds
property color indicatorColor: qgcPal.text
QGCPalette { id: qgcPal; colorGroupEnabled: enabled }
Component.onCompleted: {
var indicatorComponent = Qt.createComponent("QGCFlickableVerticalIndicator.qml")
indicatorComponent.createObject(root)
indicatorComponent = Qt.createComponent("QGCFlickableHorizontalIndicator.qml")
indicatorComponent.createObject(root)
}
}
...@@ -96,7 +96,7 @@ QGCViewDialog { ...@@ -96,7 +96,7 @@ QGCViewDialog {
anchors.margins: _margins anchors.margins: _margins
anchors.fill: parent anchors.fill: parent
ListView { QGCListView {
anchors.fill: parent anchors.fill: parent
spacing: _margins / 2 spacing: _margins / 2
orientation: ListView.Vertical orientation: ListView.Vertical
......
...@@ -27,6 +27,7 @@ QGCColoredImage 1.0 QGCColoredImage.qml ...@@ -27,6 +27,7 @@ QGCColoredImage 1.0 QGCColoredImage.qml
QGCComboBox 1.0 QGCComboBox.qml QGCComboBox 1.0 QGCComboBox.qml
QGCFlickable 1.0 QGCFlickable.qml QGCFlickable 1.0 QGCFlickable.qml
QGCLabel 1.0 QGCLabel.qml QGCLabel 1.0 QGCLabel.qml
QGCListView 1.0 QGCListView.qml
QGCMobileFileDialog 1.0 QGCMobileFileDialog.qml QGCMobileFileDialog 1.0 QGCMobileFileDialog.qml
QGCMovableItem 1.0 QGCMovableItem.qml QGCMovableItem 1.0 QGCMovableItem.qml
QGCPipable 1.0 QGCPipable.qml QGCPipable 1.0 QGCPipable.qml
......
...@@ -340,7 +340,7 @@ Rectangle { ...@@ -340,7 +340,7 @@ Rectangle {
color: qgcPal.window color: qgcPal.window
border.color: qgcPal.text border.color: qgcPal.text
border.width: 0.5 border.width: 0.5
ListView { QGCListView {
width: ScreenTools.defaultFontPixelWidth * 56 width: ScreenTools.defaultFontPixelWidth * 56
height: ScreenTools.defaultFontPixelHeight * 12 height: ScreenTools.defaultFontPixelHeight * 12
anchors.centerIn: parent anchors.centerIn: parent
......
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