Warning, /plasma/libplasma/examples/applets/testcomponents/contents/ui/IconsPage.qml is written in an unsupported language. File is not indexed.
0001 /*
0002 SPDX-FileCopyrightText: 2013 Sebastian Kügler <sebas@kde.org>
0003
0004 SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006
0007 import QtQuick
0008
0009 import org.kde.plasma.core as PlasmaCore
0010 import org.kde.plasma.components as PlasmaComponents
0011 import org.kde.kquickcontrolsaddons as KQuickControlsAddons
0012 import org.kde.kirigami as Kirigami
0013
0014 // IconTab
0015
0016 PlasmaComponents.Page {
0017 id: iconsPage
0018 anchors {
0019 fill: parent
0020 margins: _s
0021 }
0022 Column {
0023 anchors.fill: parent
0024 spacing: _s
0025
0026 Kirigami.Heading {
0027 width: parent.width
0028 elide: Text.ElideRight
0029 level: 1
0030 text: "Icons"
0031 }
0032 PlasmaComponents.Label {
0033 text: "iconSizes.small : " + Kirigami.Units.iconSizes.small +
0034 ", iconSizes.desktop: " + Kirigami.Units.iconSizes.desktop +
0035 ",<br />iconSizes.toolbar: " + Kirigami.Units.iconSizes.toolbar +
0036 ", iconSizes.dialog : " + Kirigami.Units.iconSizes.dialog
0037
0038 }
0039 Flow {
0040 //height: _h
0041 width: parent.width
0042 spacing: _s
0043
0044 Kirigami.Icon {
0045 source: "configure"
0046 width: _h
0047 height: width
0048 }
0049 Kirigami.Icon {
0050 source: "dialog-ok"
0051 width: _h
0052 height: width
0053 }
0054 Kirigami.Icon {
0055 source: "folder-green"
0056 width: _h
0057 height: width
0058 }
0059 Kirigami.Icon {
0060 source: "akonadi"
0061 width: _h
0062 height: width
0063 }
0064 Kirigami.Icon {
0065 source: "clock"
0066 width: _h
0067 height: width
0068 }
0069 KQuickControlsAddons.QIconItem {
0070 icon: "preferences-desktop-icons"
0071 width: _h
0072 height: width
0073 }
0074
0075 }
0076 Kirigami.Heading {
0077 level: 2
0078 text: "ToolTip"
0079 }
0080
0081 Row {
0082 spacing: _s
0083 PlasmaCore.ToolTipArea {
0084 width: childrenRect.width
0085 height: childrenRect.height
0086 icon: "klipper"
0087 mainText: "Fish sighted in the wild, in the wild, a fish was seen."
0088 subText: "A mean-looking grouper swam by."
0089 Kirigami.Icon {
0090 id: akonadiIcon
0091 objectName: "akonadiIcon"
0092 source: "akonadi"
0093 width: height
0094 height: _h
0095 //anchors.horizontalCenter: parent.horizontalCenter
0096 Rectangle { color: "orange"; opacity: 0.3; anchors.fill: parent; }
0097 }
0098 }
0099 PlasmaCore.ToolTipArea {
0100 height: _h
0101 width: height
0102 image: bridgeimage.source
0103 mainText: "Bridge"
0104 subText: "Waalbrug."
0105 Image {
0106 id: bridgeimage
0107 objectName: "bridgeimage"
0108 height: _h
0109 width: height
0110 fillMode: Image.PreserveAspectFit
0111 source: "../images/bridge.jpg"
0112 }
0113 }
0114 PlasmaCore.ToolTipArea {
0115 width: childrenRect.width
0116 height: childrenRect.height
0117 mainItem: PlasmaComponents.Label {
0118 text: "Nijmegen North Beach"
0119 anchors.centerIn: parent
0120 }
0121 Image {
0122 objectName: "surfboardimage"
0123 height: _h
0124 width: height
0125 fillMode: Image.PreserveAspectFit
0126 source: "../images/surfboard.jpg"
0127
0128 //subText: "A surfboard on the beach. <br />The photo shows the Waal river's north beach, \
0129 //across the water from Nijmegen, Netherlands. It was taken during the summer festivals a few years back."
0130 }
0131 }
0132 PlasmaCore.ToolTipArea {
0133 width: childrenRect.width
0134 height: childrenRect.height
0135 mainText: "Tooltip on button"
0136 PlasmaComponents.Button {
0137 id: button
0138 text: "Button"
0139 iconSource: "call-start"
0140 }
0141 }
0142
0143
0144 }
0145 }
0146 }