import QtQuick 2.1 import QtQuick.Controls 2.0 as QQC2 import org.kde.kirigami 2.4 as Kirigami import Qt.labs.settings 1.0 import "qrc:js/functions.js" as ManifoldJS Kirigami.ScrollablePage { title: "Macros, have fun!" //Kirigami.Theme.colorSet: Kirigami.Theme.Complementary Settings { id: settings property string phab_url: "https://phabricator.example.com" property string api_token: "api-aaaaaaaaaaaaaaaaaaaaaaaaaaaa" } // Handle refreshing supportsRefreshing: true onRefreshingChanged: { if (refreshing) { model.clear(); ManifoldJS.refreshMacroPage(settings.phab_url, settings.api_token); refreshing = false; } } //Page contents... ListView { id: taskList model: ListModel { id: model } anchors.fill: parent delegate: Kirigami.SwipeListItem { id: myDelegate QQC2.Label { text: title elide: Text.ElideRight } actions: [ Kirigami.Action { //iconName: "internet-web-browser" //iconSource: "qrc:/org/kde/kirigami/icons/internet-web-browser.svg" iconSource: "qrc:/org/kde/kirigami/icons/go-next.svg" // Weirdly stuck in black and white outline, so //iconColor: transparent onTriggered: Qt.openUrlExternally(link) } ] } Component.onCompleted: { ManifoldJS.refreshMacroPage(settings.phab_url, settings.api_token, "alphabetical"); } } }