summaryrefslogtreecommitdiffstats
path: root/examples/multimedia/video/recorder/StyleParameter.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/multimedia/video/recorder/StyleParameter.qml')
-rw-r--r--examples/multimedia/video/recorder/StyleParameter.qml42
1 files changed, 42 insertions, 0 deletions
diff --git a/examples/multimedia/video/recorder/StyleParameter.qml b/examples/multimedia/video/recorder/StyleParameter.qml
new file mode 100644
index 000000000..3a7573b92
--- /dev/null
+++ b/examples/multimedia/video/recorder/StyleParameter.qml
@@ -0,0 +1,42 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+
+Row {
+ id: root
+ spacing: Style.intraSpacing
+
+ property alias label: label.text
+ property alias model: comboBox.model
+ property alias currentIndex: comboBox.currentIndex
+ property alias currentValue: comboBox.currentValue
+ property bool enabled: true
+ signal activated(var currentValue)
+
+ Text {
+ id: label
+ height: Style.height
+ width: Style.widthShort
+ horizontalAlignment: Text.AlignRight
+ verticalAlignment: Text.AlignVCenter
+ color: root.enabled ? palette.text : palette.mid
+ font.pointSize: Style.fontSize
+ }
+
+ ComboBox {
+ id: comboBox
+ height: Style.height
+ width: Style.widthLong
+ enabled: root.enabled
+
+ displayText: currentText
+ textRole: "text"
+ valueRole: "value"
+ font.pointSize: Style.fontSize
+
+ background: StyleRectangle { anchors.fill: parent }
+ onActivated: root.activated(currentValue)
+ }
+}