77 lines
2.4 KiB
QML
77 lines
2.4 KiB
QML
|
/*
|
||
|
* Copyright (C) 2022, KylinSoft Co., Ltd.
|
||
|
*
|
||
|
* This program is free software: you can redistribute it and/or modify
|
||
|
* it under the terms of the GNU General Public License as published by
|
||
|
* the Free Software Foundation, either version 3 of the License, or
|
||
|
* (at your option) any later version.
|
||
|
*
|
||
|
* This program is distributed in the hope that it will be useful,
|
||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
* GNU General Public License for more details.
|
||
|
*
|
||
|
* You should have received a copy of the GNU General Public License
|
||
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||
|
*
|
||
|
*/
|
||
|
|
||
|
import QtQuick 2.0
|
||
|
import org.ukui.menu.extension 1.0
|
||
|
|
||
|
UkuiMenuExtension {
|
||
|
onExtensionDataChanged: {
|
||
|
folderView.model = extensionData.folders
|
||
|
}
|
||
|
|
||
|
Component.onCompleted: {
|
||
|
folderView.model = extensionData.folders
|
||
|
}
|
||
|
|
||
|
Rectangle {
|
||
|
anchors.fill: parent;
|
||
|
color: "green"
|
||
|
|
||
|
ListView {
|
||
|
id: folderView
|
||
|
anchors.fill: parent
|
||
|
delegate: Item {
|
||
|
width: ListView.view.width
|
||
|
height: 150
|
||
|
|
||
|
Column {
|
||
|
anchors.fill: parent
|
||
|
Row {
|
||
|
width: parent.width;
|
||
|
height: 50
|
||
|
Text {
|
||
|
width: 100
|
||
|
height: parent.height
|
||
|
text: "index: " + index
|
||
|
verticalAlignment: Text.AlignVCenter
|
||
|
horizontalAlignment: Text.AlignHCenter
|
||
|
}
|
||
|
|
||
|
Text {
|
||
|
width: 200
|
||
|
height: parent.height
|
||
|
text: "name: " + modelData.name
|
||
|
verticalAlignment: Text.AlignVCenter
|
||
|
horizontalAlignment: Text.AlignHCenter
|
||
|
}
|
||
|
}
|
||
|
|
||
|
Text {
|
||
|
width: parent.width;
|
||
|
height: 100
|
||
|
text: "name: " + modelData.apps
|
||
|
verticalAlignment: Text.AlignVCenter
|
||
|
horizontalAlignment: Text.AlignLeft
|
||
|
wrapMode: Text.WordWrap
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|