You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
645 B
QML
29 lines
645 B
QML
/*
|
|
* SPDX-FileCopyrightText: 2020 George Florea Bănuș <georgefb899@gmail.com>
|
|
*
|
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
|
*/
|
|
|
|
import QtQuick 2.12
|
|
import QtQuick.Controls 2.12
|
|
import QtQml 2.12
|
|
|
|
Instantiator {
|
|
id: root
|
|
|
|
property bool isFirst: true
|
|
property var menu
|
|
|
|
signal subtitleChanged(int id, int index)
|
|
|
|
model: 0
|
|
onObjectAdded: menu.addItem( object )
|
|
onObjectRemoved: menu.removeItem( object )
|
|
delegate: MenuItem {
|
|
checkable: true
|
|
checked: isFirst ? model.isFirstTrack : model.isSecondTrack
|
|
text: model.text
|
|
onTriggered: subtitleChanged(model.id, model.index)
|
|
}
|
|
}
|