mirror of
https://github.com/iDescriptor/iDescriptor.git
synced 2026-06-21 19:35:49 +08:00
refactor(DeviceTab.qml): enhance SidebarTabButton with title and udid properties
This commit is contained in:
@@ -3,6 +3,8 @@ import QtQuick.Controls 2.15
|
|||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts 1.15
|
||||||
import iDescriptor 1.0
|
import iDescriptor 1.0
|
||||||
import "." as App
|
import "." as App
|
||||||
|
// FIXME: this will fail on Linux and macOS
|
||||||
|
import "./windows"
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
@@ -32,11 +34,13 @@ Item {
|
|||||||
Layout.preferredWidth: 200
|
Layout.preferredWidth: 200
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
readonly property string deviceUdid: model.udid
|
readonly property string deviceUdid: model.udid
|
||||||
|
readonly property var info: model.info
|
||||||
SidebarTabButton {
|
SidebarTabButton {
|
||||||
id : button
|
id : button
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
currentSection: root.currentSection
|
currentSection: root.currentSection
|
||||||
|
title: info.product_type
|
||||||
|
udid : info["UniqueDeviceID"]
|
||||||
onSectionChanged: {
|
onSectionChanged: {
|
||||||
if (root.currentSection !== sectionIndex)
|
if (root.currentSection !== sectionIndex)
|
||||||
root.currentSection = sectionIndex
|
root.currentSection = sectionIndex
|
||||||
|
|||||||
Reference in New Issue
Block a user