Changeset View
Changeset View
Standalone View
Standalone View
src/data/contents/ui/gallery/components/InfoSheet.qml
Show All 22 Lines | |||||
23 | import org.kde.kirigami 2.4 as Kirigami | 23 | import org.kde.kirigami 2.4 as Kirigami | ||
24 | import Data 1.0 | 24 | import Data 1.0 | ||
25 | 25 | | |||
26 | Kirigami.OverlaySheet { | 26 | Kirigami.OverlaySheet { | ||
27 | id: root | 27 | id: root | ||
28 | property Kirigami.Page page | 28 | property Kirigami.Page page | ||
29 | property url higUrl: infoData.higUrl | 29 | property url higUrl: infoData.higUrl | ||
30 | property url sourceUrl: infoData.sourceUrl | 30 | property url sourceUrl: infoData.sourceUrl | ||
31 | property url apiUrl: infoData.apiUrl | ||||
31 | property alias title: titleLabel.text | 32 | property alias title: titleLabel.text | ||
32 | property alias text: mainText.text | 33 | property alias text: mainText.text | ||
33 | property alias component: infoData.component | 34 | property alias component: infoData.component | ||
34 | 35 | | |||
35 | onSheetOpenChanged: page.actions.main.checked = sheetOpen | 36 | onSheetOpenChanged: page.actions.main.checked = sheetOpen | ||
36 | header: Kirigami.Heading { | 37 | header: Kirigami.Heading { | ||
37 | id: titleLabel | 38 | id: titleLabel | ||
38 | 39 | | |||
Show All 14 Lines | 52 | Controls.ToolButton { | |||
53 | enabled: higUrl != "" | 54 | enabled: higUrl != "" | ||
54 | onClicked: Qt.openUrlExternally(higUrl) | 55 | onClicked: Qt.openUrlExternally(higUrl) | ||
55 | } | 56 | } | ||
56 | Controls.ToolButton { | 57 | Controls.ToolButton { | ||
57 | text: qsTr("Source code...") | 58 | text: qsTr("Source code...") | ||
58 | enabled: sourceUrl != "" | 59 | enabled: sourceUrl != "" | ||
59 | onClicked: Qt.openUrlExternally(sourceUrl) | 60 | onClicked: Qt.openUrlExternally(sourceUrl) | ||
60 | } | 61 | } | ||
62 | Controls.ToolButton { | ||||
63 | text: qsTr("API...") | ||||
64 | enabled: apiUrl != "" | ||||
65 | onClicked: Qt.openUrlExternally(apiUrl) | ||||
66 | } | ||||
61 | } | 67 | } | ||
62 | 68 | | |||
63 | Controls.Label { | 69 | Controls.Label { | ||
64 | id: mainText | 70 | id: mainText | ||
65 | text: infoData.text | 71 | text: infoData.text | ||
66 | property int implicitWidth: Kirigami.Units.gridUnit * 25 | 72 | property int implicitWidth: Kirigami.Units.gridUnit * 25 | ||
67 | wrapMode: Text.WordWrap | 73 | wrapMode: Text.WordWrap | ||
68 | } | 74 | } | ||
69 | } | 75 | } |