34 lines
749 B
QML
34 lines
749 B
QML
|
|
import QtQuick
|
|||
|
|
import QtQuick.Layouts
|
|||
|
|
import QtQuick.Controls
|
|||
|
|
import QtQuick.Dialogs
|
|||
|
|
import "./app.js" as App
|
|||
|
|
import "./common"
|
|||
|
|
|
|||
|
|
ListView {
|
|||
|
|
id: root
|
|||
|
|
property var lsBaseName: ""
|
|||
|
|
orientation: ListView.Horizontal
|
|||
|
|
|
|||
|
|
model: ListModel {
|
|||
|
|
id: listModel
|
|||
|
|
}
|
|||
|
|
delegate: ListPanel {
|
|||
|
|
title: model.title
|
|||
|
|
height: parent.height
|
|||
|
|
baseName: model.baseName
|
|||
|
|
}
|
|||
|
|
onLsBaseNameChanged: {
|
|||
|
|
listModel.clear()
|
|||
|
|
var items = _G[lsBaseName]
|
|||
|
|
for (var key in items) {
|
|||
|
|
var handel = items[key]
|
|||
|
|
if (typeof handel !== 'object' || handel === null) {
|
|||
|
|
continue;
|
|||
|
|
}
|
|||
|
|
listModel.append({"title": key, "baseName": lsBaseName})
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|