1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232
|
// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: LGPL-3.0-or-later
import QtQuick 2.0
import QtQuick.Layouts 1.11
import QtQuick.Window 2.11
import org.deepin.dtk 1.0
import ".."
Column {
id: control
Label {
width: parent.width
wrapMode: Text.WordWrap
text: "通知类控件, 包括系统通知、应用内通知、角标等形式。"
horizontalAlignment: Qt.AlignHCenter
}
spacing: 10
Flow {
spacing: 10
width: parent.width
ImageCell {
imageScale: 0.5
source: "qrc:/assets/system-notification/Temporary-SimpleInfo-Light-1.png"
onClicked: DTK.sendSystemMessage("相册", "已成功导入825张照片到相册", "music")
}
ImageCell {
imageScale: 0.5
source: "qrc:/assets/system-notification/Temporary-SimpleInfo-Light-3.png"
onClicked: DTK.sendSystemMessage("相册", "已成功导入825张照片到相册", "music", ["_action", "关闭"])
}
Item { width: parent.width; height: 1}
ImageCell {
imageScale: 0.5
source: "qrc:/assets/system-notification/Temporary-SimpleInfo-Light-2.png"
onClicked: DTK.sendSystemMessage("解压缩", "压缩文件“XXXXXXXX.zip”解压失败!", "music")
}
ImageCell {
imageScale: 0.5
source: "qrc:/assets/system-notification/Temporary-SimpleInfo-Light-4.png"
onClicked: DTK.sendSystemMessage("解压缩", "压缩文件“XXXXXXXX.zip”解压失败!", "music", ["_action", "关闭"])
}
Item { width: parent.width; height: 1}
ImageCell {
imageScale: 0.5
source: "qrc:/assets/system-notification/Temporary-MultiInfo-Light-5.png"
onClicked: DTK.sendSystemMessage("舒乐", "大家好,V23设计已经进行了一段时间,附件里包含部分V23设计图,简要向大家汇报一下", "music")
}
ImageCell {
imageScale: 0.5
source: "qrc:/assets/system-notification/Temporary-MultiInfo-Light-7.png"
onClicked: DTK.sendSystemMessage("舒乐", "大家好,V23设计已经进行了一段时间,附件里包含部分V23设计图,简要向大家汇报一下", "music", ["_action", "回复", "_select", "已读"])
}
Item { width: parent.width; height: 1}
ImageCell {
imageScale: 0.5
source: "qrc:/assets/system-notification/Temporary-MultiInfo-Light-6.png"
onClicked: DTK.sendSystemMessage("舒乐", "Copyright 2014-2019 Adobe (http://www.adobe.com/), with Reserved FontName 'Source'. Source is a trademark of Adobe in the United States and/or other countries."
, "music")
}
ImageCell {
imageScale: 0.5
source: "qrc:/assets/system-notification/Temporary-MultiInfo-Light-8.png"
onClicked: DTK.sendSystemMessage("舒乐", "Copyright 2014-2019 Adobe (http://www.adobe.com/), with Reserved FontName 'Source'. Source is a trademark of Adobe in the United States and/or other countries."
, "music", ["_action", "回复", "_select", "已读"])
}
Item { width: parent.width; height: 1}
ImageCell {
imageScale: 0.5
source: "qrc:/assets/system-notification/Interactive-SimpleInfo-Light-9.png"
onClicked: DTK.sendSystemMessage("相册", "发送文件“UOS桌面操作系统使用说明书.pdf ”等3个文件给您,是否接收?"
, "music", ["_action", "拒绝", "_select", "接收"])
}
ImageCell {
imageScale: 0.5
source: "qrc:/assets/system-notification/Interactive-SimpleInfo-Light-11.png"
onClicked: DTK.sendSystemMessage("相册", "发送文件“UOS桌面操作系统使用说明书.pdf ”等3个文件给您,是否接收?"
, "music", ["_action", "拒绝", "_select", "接收"])
}
Item { width: parent.width; height: 1}
ImageCell {
imageScale: 0.5
source: "qrc:/assets/system-notification/Interactive-SimpleInfo-Light-10.png"
onClicked: DTK.sendSystemMessage("相册", "已成功导入825张照片到相册", "music")
}
ImageCell {
source: "qrc:/assets/popup/nointeractive.svg"
onClicked: {
DTK.sendMessage(control, "成功添加到"校园名谣"", "checked")
}
}
ImageCell {
source: "qrc:/assets/popup/interactive.svg"
onClicked: DTK.sendMessage(Window.window, floatingMsgCom, {
content: "磁盘中的原文件已被修改,是否重新载入?",
iconName: "music"
}, -1)
}
Component {
id: floatingMsgCom
FloatingMessage {
id: floatMsg
contentItem: RowLayout {
anchors.fill: parent
spacing: 0
Label {
Layout.fillHeight: true
Layout.fillWidth: true
text: floatMsg.message.content
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignLeft
elide: Text.ElideRight
maximumLineCount: 1
font: DTK.fontManager.t6
}
Button {
text: "重新载入"
font: DTK.fontManager.t6
Layout.alignment: Qt.AlignVCenter
Layout.preferredWidth: 92
Layout.preferredHeight: 28
}
}
}
}
Item {width: parent.width; height: 1}
Row {
spacing: 150
Loader {
sourceComponent: appBadgeCom
property int number: 1
property string appName: "deepin-app-store"
}
Loader {
sourceComponent: appBadgeCom
property int number: 99
property string appName: "deepin-browser"
}
Loader {
sourceComponent: appBadgeCom
property int number: 100
property string appName: "deepin-editor"
}
Loader {
sourceComponent: appBadgeCom
property int number: 1000
property string appName: "deepin-diskmanager"
}
Component {
id: appBadgeCom
QtIcon {
name: appName
sourceSize {
width: 128
height: width
}
Label {
height: 20
width: Math.max(20, implicitWidth)
z: DTK.AboveOrder
anchors {
right: parent.right
rightMargin: 4
top: parent.top
topMargin: 4
}
topPadding: 5
rightPadding: 7
leftPadding: 7
text: {
if (number >= 0 && number < 100) {
return number
} else if (number >= 100 && number < 1000) {
return number + "+"
}
return "!"
}
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
font: DTK.fontManager.t5
color: palette.window
background: Rectangle {
implicitHeight: 20
implicitWidth: 20
radius: 10
BoxShadow {
anchors.fill: parent
shadowBlur: 3
shadowOffsetY: 2
shadowColor: Qt.rgba(255, 113, 113, 0.3)
cornerRadius: 0
}
gradient: Gradient {
GradientStop { position: 0.0; color: "#ff674a" }
GradientStop { position: 1.0; color: "#ec5783" }
}
}
}
}
}
}
Item {width: parent.width; height: 1}
}
}
|