* limitations under the License.
*/
import QtQuick 2.6
-import QtQuick.Window 2.1
import QtQuick.Layouts 1.1
import QtQuick.Controls 2.0
import AppModel 1.0
-Window {
- visible: true
- flags: Qt.FramelessWindowHint
+ApplicationWindow {
width: container.width * container.scale
height: container.height * container.scale
id: container
anchors.centerIn: parent
width: 1080
- height: 1487
+ height: 1488
scale: screenInfo.scale_factor()
Image {
height: grid.cellHeight
}
+ Connections {
+ target: homescreenHandler
+ onAppListUpdate: {
+ console.warn("applist update in Launcher.qml")
+ applicationModel.updateApplist(info);
+ }
+ }
+ Connections {
+ target: homescreenHandler
+ onInitAppList: {
+ console.warn("applist init in Launcher.qml")
+ applicationModel.initAppList(data);
+ }
+ }
+
MouseArea {
id: loc
anchors.fill: parent
y: 264
onPressAndHold: currentId = applicationModel.id(newIndex = index)
onReleased: {
+ if(loc.index < 0) {
+ return
+ }
if (currentId === '') {
pid = launcher.launch(applicationModel.id(loc.index))
if (1 < pid) {
+ homescreenHandler.tapShortcut(applicationModel.appid(loc.index))
}
else {
console.warn("app cannot be launched!")
} else {
currentId = ''
}
- homescreenHandler.tapShortcut(applicationModel.appid(loc.index))
}
onPositionChanged: {
if (loc.currentId === '') return