kdeconnect-kde/app/qml/PluginItem.qml

40 lines
1 KiB
QML
Raw Normal View History

/*
* SPDX-FileCopyrightText: 2015 Aleix Pol Gonzalez <aleixpol@kde.org>
*
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import org.kde.kirigami as Kirigami
import org.kde.kdeconnect
2019-02-13 17:16:41 +00:00
QtObject
{
property alias pluginName: checker.pluginName
2019-02-13 17:16:41 +00:00
property alias iconName: checker.iconName
property alias loaded: checker.available
property alias device: checker.device
property var interfaceFactory
property var component
2019-02-13 17:16:41 +00:00
property var name
readonly property var checker: PluginChecker {
id: checker
}
property var onClick: () => {
2018-06-08 19:23:03 +01:00
if (component === "" || !interfaceFactory)
return;
var obj = interfaceFactory.create(checker.device.id());
var page = pageStack.push(
Qt.resolvedUrl(component),
{ pluginInterface: obj,
device: checker.device
}
);
obj.parent = page
}
}