2021-01-14 13:19:58 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Controls 2.13
|
|
|
|
import QtQuick.Layouts 1.13
|
|
|
|
import QtGraphicalEffects 1.13
|
2021-09-28 15:04:06 +00:00
|
|
|
|
|
|
|
import utils 1.0
|
2021-10-14 10:24:37 +00:00
|
|
|
import "../"
|
2021-10-14 13:09:35 +00:00
|
|
|
import "../panels"
|
2021-10-14 10:24:37 +00:00
|
|
|
import "../controls"
|
2021-01-14 13:19:58 +00:00
|
|
|
|
2021-10-14 10:24:37 +00:00
|
|
|
// TODO: replace with StatusQ component
|
2021-01-14 13:19:58 +00:00
|
|
|
Item {
|
|
|
|
property string name
|
|
|
|
property string description
|
2021-03-25 19:37:55 +00:00
|
|
|
property alias tooltipUnder: copyToClipboardBtn.tooltipUnder
|
2022-01-28 08:19:49 +00:00
|
|
|
property var store
|
2021-01-14 13:19:58 +00:00
|
|
|
|
|
|
|
id: root
|
|
|
|
width: parent.width
|
|
|
|
height: name.height
|
|
|
|
|
|
|
|
StyledText {
|
|
|
|
id: name
|
|
|
|
text: root.name
|
|
|
|
font.pixelSize: 15
|
|
|
|
}
|
|
|
|
|
|
|
|
StyledText {
|
|
|
|
id: description
|
|
|
|
visible: !!root.description
|
|
|
|
text: root.description
|
|
|
|
elide: Text.ElideRight
|
|
|
|
font.pixelSize: 15
|
|
|
|
horizontalAlignment: Text.AlignRight
|
|
|
|
color: Style.current.secondaryText
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.rightMargin: Style.current.smallPadding
|
|
|
|
anchors.verticalCenter: name.verticalCenter
|
|
|
|
|
|
|
|
CopyToClipBoardButton {
|
|
|
|
id: copyToClipboardBtn
|
|
|
|
textToCopy: root.description
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
anchors.left: parent.right
|
|
|
|
anchors.leftMargin: Style.current.smallPadding
|
2022-01-28 08:19:49 +00:00
|
|
|
store: root.store
|
2021-01-14 13:19:58 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|