4import QGroundControl.Controls
6// Picks the USB camera's format from the ones it offers. Auto, or a stored format this camera doesn't offer, lets Qt
7// choose: the highest resolution at 30 fps or more.
11 readonly property Fact _format: QGroundControl.settingsManager.videoSettings.uvcCameraFormat
12 readonly property list<string> _formats: QGroundControl.videoManager.uvcCamera.formats
14 label: root._format.label
15 model: [qsTr("Auto")].concat(root._formats)
17 onActivated: (index) => {
18 root._format.rawValue = (index > 0) ? root._formats[index - 1] : ""
21 // Follows the setting and the camera's formats, also after the user picked an entry.
24 property: "currentIndex"
25 value: root._formats.indexOf(root._format.rawValue) + 1