2021-05-06 09:20:50 +00:00
import QtQuick 2.14
2021-05-06 11:10:17 +00:00
import QtQuick . Controls 2.14
2021-05-06 09:20:50 +00:00
import QtQuick . Layouts 1.14
import StatusQ . Core 0.1
import StatusQ . Core . Theme 0.1
import StatusQ . Controls 0.1
2023-02-20 22:05:29 +00:00
2023-02-21 10:58:48 +00:00
ColumnLayout {
spacing: 5
2021-05-06 09:20:50 +00:00
2021-09-29 19:22:23 +00:00
StatusSelectableText {
color: Theme . palette . baseColor1
text: "This is a multiline paragraph that can be selected and copied. A paragraph is a group of words put together to form a group that is usually longer than a sentence. Paragraphs are often made up of several sentences. There are usually between three and eight sentences. Paragraphs can begin with an indentation (about five spaces), or by missing a line out, and then starting again."
font.pixelSize: 15
width: 300
multiline: true
}
StatusSelectableText {
color: Theme . palette . baseColor1
text: "<p>This is a selectable link in rich text format to test <a href='www.google.com'>www.google.com</a></p>"
font.pixelSize: 15
width: 200
}
2021-05-06 09:20:50 +00:00
StatusIconTabButton {
icon.name: "chat"
}
StatusIconTabButton {
2022-07-22 13:42:05 +00:00
icon.source: "qrc:/demoapp/data/profile-image-1.jpeg"
2021-05-06 09:20:50 +00:00
}
2021-05-20 10:14:40 +00:00
StatusIconTabButton {
icon.color: Theme . palette . miscColor9
// This icon source is flawed and demonstrates the fallback case
// when the image source can't be loaded
2022-07-22 13:42:05 +00:00
icon.source: "https://httpstat.us/404"
2021-05-20 10:14:40 +00:00
name: "Pascal"
}
2021-05-06 09:20:50 +00:00
StatusIconTabButton {
name: "#status"
}
2021-05-06 11:10:17 +00:00
Button {
text: "Hover me!"
StatusToolTip {
visible: parent . hovered
2023-03-16 16:43:33 +00:00
text: "http://thelongestlistofthelongeststuffatthelongestdomainnameatlonglast.com%2Fwearejustdoingthistobestupidnowsincethiscangoonforeverandeverandeverbutitstilllookskindaneatinthebrowsereventhoughitsabigwasteoftimeandenergyandhasnorealpointbutwehadtodoitanyways.html&ei=40egUo2MGI3xoATQtIKwDQ&usg=AFQjCNHbBa5Fk4YutdUOj_D8IwpJLu7hGw&sig2=8P4ew1Yie72Ps_OQ-L5cXw&bvm=bv.57155469%2Cd.cGU"
2021-05-06 11:10:17 +00:00
}
StatusToolTip {
visible: parent . hovered
text: "Right"
orientation: StatusToolTip . Orientation . Right
x: parent . width + 16
y: parent . height / 2 - height / 2 + 4
}
StatusToolTip {
visible: parent . hovered
text: "Bottom"
orientation: StatusToolTip . Orientation . Bottom
y: parent . height + 12
}
StatusToolTip {
visible: parent . hovered
text: "Left"
orientation: StatusToolTip . Orientation . Left
x: - parent . width / 2 - 8
y: parent . height / 2 - height / 2 + 4
}
}
2021-05-06 12:47:57 +00:00
StatusNavBarTabButton {
icon.name: "chat"
tooltip.text: "Chat"
}
StatusNavBarTabButton {
name: "#status"
tooltip.text: "Some Channel"
}
StatusNavBarTabButton {
2022-07-22 13:42:05 +00:00
icon.source: "qrc:/demoapp/data/profile-image-1.jpeg"
2021-05-06 12:47:57 +00:00
tooltip.text: "Some Community"
}
StatusNavBarTabButton {
icon.name: "profile"
tooltip.text: "Profile"
badge.value: 0
badge.visible: true
badge.anchors.leftMargin: - 16
}
StatusNavBarTabButton {
icon.name: "chat"
tooltip.text: "Chat"
badge.value: 35
}
StatusNavBarTabButton {
icon.name: "chat"
tooltip.text: "Chat"
badge.value: 100
}
2021-05-20 06:14:18 +00:00
StatusSwitch {
}
2022-09-02 15:59:28 +00:00
StatusSwitch {
text: "Switch with text"
}
2021-05-20 06:45:05 +00:00
StatusRadioButton {
2022-09-02 15:59:28 +00:00
text: "Radio button 1"
checked: true
}
StatusRadioButton {
text: "Radio button 2 (clicking on this text will uncheck the above)"
}
StatusRadioButton {
LayoutMirroring.enabled : true
text: "Radio button 3 (forced right-to-left)"
2021-05-20 06:45:05 +00:00
}
2021-05-20 08:43:01 +00:00
StatusCheckBox { }
2022-08-09 06:07:52 +00:00
StatusCheckBox { checkState: Qt . Checked }
StatusCheckBox { text: "Check me on left side" }
StatusCheckBox { text: "Check me on right side" ; leftSide: false }
2021-05-27 12:41:14 +00:00
StatusChatInfoButton {
title: "Iuri Matias"
subTitle: "Contact"
2022-09-02 15:40:30 +00:00
asset.color: Theme . palette . miscColor7
asset.isImage: true
asset.name: "qrc:/demoapp/data/profile-image-1.jpeg"
2021-05-27 12:41:14 +00:00
type: StatusChatInfoButton . Type . OneToOneChat
muted: true
pinnedMessagesCount: 1
}
2021-08-25 13:14:37 +00:00
Item {
2023-02-21 10:58:48 +00:00
implicitWidth: 140
2021-08-25 13:14:37 +00:00
implicitHeight: 48
StatusChatInfoButton {
title: "Iuri Matias elided"
2022-09-13 13:08:06 +00:00
subTitle: "Very long subtitle should elide as well"
2022-09-02 15:40:30 +00:00
asset.color: Theme . palette . miscColor7
asset.isImage: true
asset.name: "qrc:/demoapp/data/profile-image-1.jpeg"
2021-08-25 13:14:37 +00:00
type: StatusChatInfoButton . Type . OneToOneChat
muted: true
2022-09-13 13:08:06 +00:00
pinnedMessagesCount: 10
2023-02-21 10:58:48 +00:00
width: parent . width
2021-08-25 13:14:37 +00:00
}
}
Item {
implicitWidth: 100
implicitHeight: 48
StatusChatInfoButton {
title: "Iuri Matias big not elided"
subTitle: "Contact"
2022-09-02 15:40:30 +00:00
asset.color: Theme . palette . miscColor7
asset.isImage: true
asset.name: "qrc:/demoapp/data/profile-image-1.jpeg"
2021-08-25 13:14:37 +00:00
type: StatusChatInfoButton . Type . OneToOneChat
muted: true
pinnedMessagesCount: 1
width: 400
}
}
2021-05-27 12:41:14 +00:00
StatusChatInfoButton {
title: "group"
subTitle: "Group Chat"
pinnedMessagesCount: 1
2022-09-02 15:40:30 +00:00
asset.color: Theme . palette . miscColor7
2021-05-27 12:41:14 +00:00
type: StatusChatInfoButton . Type . GroupChat
2023-02-21 10:58:48 +00:00
muted: true
2021-05-27 12:41:14 +00:00
}
StatusChatInfoButton {
title: "community-channel"
subTitle: "Community Chat"
2022-09-02 15:40:30 +00:00
asset.color: Theme . palette . miscColor7
2021-05-27 12:41:14 +00:00
type: StatusChatInfoButton . Type . CommunityChat
}
2021-05-28 10:09:58 +00:00
2022-09-13 13:08:06 +00:00
StatusChatInfoButton {
2023-02-21 10:58:48 +00:00
title: "public-chat-type"
subTitle: "Some very long description text with hover disabled to see how the whole item wraps or elides"
2022-09-13 13:08:06 +00:00
asset.color: Theme . palette . miscColor7
2023-02-21 10:58:48 +00:00
type: StatusChatInfoButton . Type . PublicChat
2022-09-13 13:08:06 +00:00
pinnedMessagesCount: 3
2023-02-21 10:58:48 +00:00
hoverEnabled: false
}
StatusChatInfoButton {
title: "No subtitle and no type"
asset.color: Theme . palette . miscColor7
2022-09-13 13:08:06 +00:00
}
2021-05-28 10:09:58 +00:00
StatusSlider {
width: 360
from: 0
to: 100
value: 40
}
2022-01-14 19:18:57 +00:00
2022-05-25 08:12:50 +00:00
StatusLabeledSlider {
width: 360
model: [ qsTr ( "XS" ) , qsTr ( "S" ) , qsTr ( "M" ) , qsTr ( "L" ) , qsTr ( "XL" ) , qsTr ( "XXL" ) ]
}
StatusLabeledSlider {
width: 360
model: [ qsTr ( "50%" ) , qsTr ( "100%" ) , qsTr ( "150%" ) , qsTr ( "200%" ) ]
}
2022-01-14 19:18:57 +00:00
StatusBanner {
id: banner
width: 360
topPadding: 20
type: StatusBanner . Type . Danger
statusText: "Banner"
}
2022-01-18 18:06:00 +00:00
StatusProgressBar {
2022-05-25 08:12:50 +00:00
id: progressBar
2022-01-18 18:06:00 +00:00
text: "Weak"
value: 0.5
fillColor : Theme . palette . pinColor1
}
2021-05-06 11:10:17 +00:00
}