Warning, /plasma/libplasma/tests/tooltip.qml is written in an unsupported language. File is not indexed.

0001 /*
0002     SPDX-FileCopyrightText: 2014 David Edmundson <davidedmundson@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 
0011 Rectangle {
0012     color: "white"
0013     width: 600
0014     height: 800
0015 
0016     Column {
0017         anchors.centerIn: parent
0018         spacing: 4
0019 
0020         PlasmaCore.ToolTipArea {
0021             width: 300
0022             height: 50
0023 
0024             mainText: "This is some really really really really long text that should be truncated"
0025             subText: "subtext"
0026 
0027             Rectangle {
0028                 color: "red"
0029                 anchors.fill: parent
0030             }
0031 
0032             Text {
0033                 anchors.fill: parent
0034                 text: "long tooltip"
0035             }
0036 
0037         }
0038 
0039         PlasmaCore.ToolTipArea {
0040             width: 300
0041             height: 50
0042 
0043             mainText: "A"
0044             subText: "B"
0045 
0046             Rectangle {
0047                 color: "red"
0048                 anchors.fill: parent
0049             }
0050 
0051             Text {
0052                 anchors.fill: parent
0053                 text: "short tooltip"
0054             }
0055         }
0056 
0057         PlasmaCore.ToolTipArea {
0058             width: 300
0059             height: 50
0060 
0061             mainText: "A"
0062             subText: "Lorem ipsum dolor sit amet, consectetur adipiscing spaghetti italiano random cheesecake blah blah"
0063 
0064             Rectangle {
0065                 color: "red"
0066                 anchors.fill: parent
0067             }
0068 
0069             Text {
0070                 anchors.fill: parent
0071                 text: "long subtext"
0072             }
0073         }
0074 
0075         PlasmaCore.ToolTipArea {
0076             width: 300
0077             height: 50
0078 
0079             active: false
0080 
0081             mainText: "A"
0082             subText: "B"
0083 
0084             Rectangle {
0085                 color: "red"
0086                 anchors.fill: parent
0087             }
0088 
0089             Text {
0090                 anchors.fill: parent
0091                 text: "tooltip exists but inactive"
0092             }
0093         }
0094 
0095         PlasmaCore.ToolTipArea {
0096             width: 300
0097             height: 50
0098 
0099             icon: "document-edit"
0100             mainText: "A title"
0101             subText: "A subtext"
0102 
0103             Rectangle {
0104                 color: "red"
0105                 anchors.fill: parent
0106             }
0107 
0108             Text {
0109                 anchors.fill: parent
0110                 text: "with icon"
0111             }
0112         }
0113 
0114         PlasmaCore.ToolTipArea {
0115             width: 300
0116             height: 50
0117 
0118             image: "/usr/share/icons/oxygen/128x128/devices/multimedia-player.png"
0119             mainText: "A title"
0120             subText: "A subtext"
0121 
0122             Rectangle {
0123                 color: "red"
0124                 anchors.fill: parent
0125             }
0126 
0127             Text {
0128                 anchors.fill: parent
0129                 text: "with image"
0130             }
0131         }
0132 
0133         PlasmaCore.ToolTipArea {
0134             width: 300
0135             height: 50
0136 
0137             icon: "kde"
0138             mainText: "Notifications"
0139             subText: "Display notifications and jobs"
0140 
0141             Rectangle {
0142                 color: "red"
0143                 anchors.fill: parent
0144             }
0145 
0146             Text {
0147                 anchors.fill: parent
0148                 text: "Notification applet tooltip"
0149             }
0150         }
0151 
0152     }
0153 }
0154