2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2021 The Qt Company Ltd.
|
2023-01-04 08:52:22 +01:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
2013-10-22 17:04:40 +02:00
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
import QtQuick 2.15
|
|
|
|
|
import QtQuick.Layouts 1.15
|
2013-10-22 17:04:40 +02:00
|
|
|
import HelperWidgets 2.0
|
2019-06-06 17:36:59 +02:00
|
|
|
import StudioControls 1.0 as StudioControls
|
2021-06-21 16:48:19 +02:00
|
|
|
import StudioTheme 1.0 as StudioTheme
|
2013-10-22 17:04:40 +02:00
|
|
|
|
2019-06-06 17:36:59 +02:00
|
|
|
StudioControls.ComboBox {
|
2021-06-21 16:48:19 +02:00
|
|
|
id: targetComboBox
|
2013-10-22 17:04:40 +02:00
|
|
|
|
|
|
|
|
property string targetName: anchorBackend.topTarget
|
|
|
|
|
|
2019-06-06 17:36:59 +02:00
|
|
|
actionIndicatorVisible: false
|
2021-06-21 16:48:19 +02:00
|
|
|
model: anchorBackend.possibleTargetItems
|
2019-06-06 17:36:59 +02:00
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
onTargetNameChanged: {
|
|
|
|
|
targetComboBox.currentIndex =
|
|
|
|
|
anchorBackend.indexOfPossibleTargetItem(targetComboBox.targetName)
|
|
|
|
|
}
|
2013-10-22 17:04:40 +02:00
|
|
|
|
|
|
|
|
Connections {
|
|
|
|
|
target: anchorBackend
|
2021-06-21 16:48:19 +02:00
|
|
|
function onInvalidated() {
|
2013-10-22 17:04:40 +02:00
|
|
|
targetComboBox.currentIndex =
|
|
|
|
|
anchorBackend.indexOfPossibleTargetItem(targetComboBox.targetName)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|