2021-06-14 12:10:36 +00:00
|
|
|
import QtQuick 2.14
|
|
|
|
|
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
import StatusQ.Popups 0.1
|
|
|
|
|
|
|
|
Column {
|
|
|
|
spacing: 20
|
|
|
|
|
|
|
|
StatusButton {
|
|
|
|
text: "Simple modal"
|
|
|
|
onClicked: simpleModal.open()
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:42:19 +00:00
|
|
|
StatusButton {
|
|
|
|
text: "Simple title modal"
|
|
|
|
onClicked: simpleTitleModal.open()
|
|
|
|
}
|
|
|
|
|
2021-06-14 12:10:36 +00:00
|
|
|
StatusButton {
|
|
|
|
text: "Modal with header image"
|
|
|
|
onClicked: headerImageModal.open()
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusButton {
|
|
|
|
text: "Modal with footer buttons"
|
|
|
|
onClicked: footerButtonsModal.open()
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusButton {
|
|
|
|
text: "Modal with header action button"
|
|
|
|
onClicked: headerActionButtonModal.open()
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusButton {
|
|
|
|
text: "Modal with content"
|
|
|
|
onClicked: modalExample.open()
|
|
|
|
}
|
|
|
|
|
2021-07-07 11:54:26 +00:00
|
|
|
StatusButton {
|
|
|
|
text: "Modal with changable content"
|
|
|
|
onClicked: modalWithContentAccess.open()
|
|
|
|
}
|
|
|
|
|
2021-07-20 11:21:34 +00:00
|
|
|
StatusButton {
|
|
|
|
text: "Modal with letter identicon"
|
|
|
|
onClicked: modalWithLetterIdenticon.open()
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusButton {
|
|
|
|
text: "Modal with identicon"
|
|
|
|
onClicked: modalWithIdenticon.open()
|
|
|
|
}
|
|
|
|
|
2021-08-27 12:06:20 +00:00
|
|
|
StatusButton {
|
|
|
|
text: "Modal with long titles"
|
|
|
|
onClicked: modalWithLongTitles.open()
|
|
|
|
}
|
|
|
|
|
2021-09-03 16:29:19 +00:00
|
|
|
StatusButton {
|
|
|
|
text: "Modal with Header Popup Menu"
|
|
|
|
onClicked: modalWithHeaderPopupMenu.open()
|
|
|
|
}
|
|
|
|
|
2021-09-14 12:53:35 +00:00
|
|
|
StatusButton {
|
|
|
|
text: "Spellchecking menu"
|
|
|
|
onClicked: spellMenu.open()
|
|
|
|
}
|
|
|
|
|
2021-06-14 12:10:36 +00:00
|
|
|
StatusModal {
|
|
|
|
id: simpleModal
|
|
|
|
anchors.centerIn: parent
|
|
|
|
header.title: "Some Title"
|
|
|
|
header.subTitle: "Subtitle"
|
|
|
|
}
|
|
|
|
|
2021-09-07 09:42:19 +00:00
|
|
|
StatusModal {
|
|
|
|
id: simpleTitleModal
|
|
|
|
anchors.centerIn: parent
|
|
|
|
header.title: "Some Title"
|
|
|
|
}
|
|
|
|
|
2021-06-14 12:10:36 +00:00
|
|
|
StatusModal {
|
|
|
|
id: headerImageModal
|
|
|
|
anchors.centerIn: parent
|
|
|
|
header.title: "Some Title"
|
|
|
|
header.subTitle: "Subtitle"
|
|
|
|
header.image.source: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg"
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusModal {
|
|
|
|
id: footerButtonsModal
|
|
|
|
anchors.centerIn: parent
|
|
|
|
header.title: "Some Title"
|
|
|
|
header.subTitle: "Subtitle"
|
|
|
|
header.image.source: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg"
|
|
|
|
leftButtons: [
|
|
|
|
StatusRoundButton {
|
|
|
|
icon.name: "arrow-right"
|
|
|
|
rotation: 180
|
|
|
|
}
|
|
|
|
]
|
|
|
|
rightButtons: [
|
|
|
|
StatusButton {
|
|
|
|
text: "Button"
|
|
|
|
},
|
|
|
|
StatusButton {
|
|
|
|
text: "Button"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusModal {
|
|
|
|
id: headerActionButtonModal
|
|
|
|
anchors.centerIn: parent
|
|
|
|
header.title: "Some Title"
|
|
|
|
header.subTitle: "Subtitle"
|
|
|
|
header.image.source: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg"
|
|
|
|
|
|
|
|
headerActionButton: StatusFlatRoundButton {
|
|
|
|
type: StatusFlatRoundButton.Type.Secondary
|
|
|
|
width: 32
|
|
|
|
height: 32
|
|
|
|
|
|
|
|
icon.width: 20
|
|
|
|
icon.height: 20
|
|
|
|
icon.name: "info"
|
|
|
|
}
|
|
|
|
|
|
|
|
leftButtons: [
|
|
|
|
StatusRoundButton {
|
|
|
|
icon.name: "arrow-right"
|
|
|
|
rotation: 180
|
|
|
|
}
|
|
|
|
]
|
|
|
|
rightButtons: [
|
|
|
|
StatusButton {
|
|
|
|
text: "Button"
|
|
|
|
},
|
|
|
|
StatusButton {
|
|
|
|
text: "Button"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusModal {
|
|
|
|
id: modalExample
|
|
|
|
anchors.centerIn: parent
|
|
|
|
header.image.source: "https://pbs.twimg.com/profile_images/1369221718338895873/T_5fny6o_400x400.jpg"
|
|
|
|
header.title: "Header"
|
|
|
|
header.subTitle: "SubTitle"
|
|
|
|
rightButtons: [
|
|
|
|
StatusButton {
|
|
|
|
text: "Button"
|
|
|
|
},
|
|
|
|
StatusButton {
|
|
|
|
text: "Button"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
|
|
|
|
leftButtons: [
|
|
|
|
StatusRoundButton {
|
|
|
|
icon.name: "arrow-right"
|
|
|
|
rotation: 180
|
|
|
|
}
|
|
|
|
]
|
|
|
|
|
2021-09-01 09:18:53 +00:00
|
|
|
contentItem: StatusBaseText {
|
2021-06-14 12:10:36 +00:00
|
|
|
anchors.centerIn: parent
|
|
|
|
text: "Some text content"
|
|
|
|
font.pixelSize: 15
|
|
|
|
color: Theme.palette.directColor1
|
|
|
|
}
|
|
|
|
|
|
|
|
headerActionButton: StatusFlatRoundButton {
|
|
|
|
type: StatusFlatRoundButton.Type.Secondary
|
|
|
|
width: 32
|
|
|
|
height: 32
|
|
|
|
|
|
|
|
icon.width: 20
|
|
|
|
icon.height: 20
|
|
|
|
icon.name: "info"
|
|
|
|
}
|
|
|
|
}
|
2021-07-07 11:54:26 +00:00
|
|
|
|
|
|
|
StatusModal {
|
|
|
|
id: modalWithContentAccess
|
|
|
|
anchors.centerIn: parent
|
|
|
|
header.title: "Header"
|
|
|
|
header.subTitle: "SubTitle"
|
|
|
|
|
2021-09-01 09:18:53 +00:00
|
|
|
contentItem: StatusBaseText {
|
2021-07-07 11:54:26 +00:00
|
|
|
id: text
|
|
|
|
anchors.centerIn: parent
|
|
|
|
text: "Some text content"
|
|
|
|
font.pixelSize: 15
|
|
|
|
color: Theme.palette.directColor1
|
|
|
|
}
|
|
|
|
|
|
|
|
rightButtons: [
|
|
|
|
StatusButton {
|
|
|
|
text: "Change text"
|
|
|
|
onClicked: {
|
2021-09-01 09:18:53 +00:00
|
|
|
modalWithContentAccess.contentItem.text = "Changed!"
|
2021-07-07 11:54:26 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
2021-07-20 11:21:34 +00:00
|
|
|
|
|
|
|
StatusModal {
|
|
|
|
id: modalWithLetterIdenticon
|
|
|
|
anchors.centerIn: parent
|
|
|
|
header.title: "Header"
|
|
|
|
header.subTitle: "SubTitle"
|
|
|
|
header.icon.isLetterIdenticon: true
|
|
|
|
header.icon.background.color: "red"
|
|
|
|
|
2021-09-01 09:18:53 +00:00
|
|
|
contentItem: StatusBaseText {
|
2021-07-20 11:21:34 +00:00
|
|
|
anchors.centerIn: parent
|
|
|
|
text: "Some text content"
|
|
|
|
font.pixelSize: 15
|
|
|
|
color: Theme.palette.directColor1
|
|
|
|
}
|
|
|
|
|
|
|
|
rightButtons: [
|
|
|
|
StatusButton {
|
|
|
|
text: "Change text"
|
|
|
|
onClicked: {
|
2021-09-01 09:18:53 +00:00
|
|
|
modalWithLetterIdenticon.contentItem.text = "Changed!"
|
2021-07-20 11:21:34 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusModal {
|
|
|
|
id: modalWithIdenticon
|
|
|
|
anchors.centerIn: parent
|
|
|
|
header.title: "Header"
|
|
|
|
header.subTitle: "SubTitle"
|
|
|
|
header.image.source: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAlklEQVR4nOzW0QmDQBAG4SSkl7SUQlJGCrElq9F3QdjjVhh/5nv3cFhY9vUIYQiNITSG0Bh
|
|
|
|
CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2ImYgiNITTlTdG1nUZ5a92VITQxITFiJmIIjSE0htAYQrMHAAD//+wwFVpz+yqXAAAAAElFTkSuQmCC"
|
|
|
|
header.image.isIdenticon: true
|
|
|
|
|
2021-09-01 09:18:53 +00:00
|
|
|
contentItem: StatusBaseText {
|
2021-07-20 11:21:34 +00:00
|
|
|
anchors.centerIn: parent
|
|
|
|
text: "Some text content"
|
|
|
|
font.pixelSize: 15
|
|
|
|
color: Theme.palette.directColor1
|
|
|
|
}
|
|
|
|
|
|
|
|
rightButtons: [
|
|
|
|
StatusButton {
|
|
|
|
text: "Change text"
|
|
|
|
onClicked: {
|
2021-09-01 09:18:53 +00:00
|
|
|
modalWithIdenticon.contentItem.text = "Changed!"
|
2021-07-20 11:21:34 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
2021-08-27 12:06:20 +00:00
|
|
|
|
|
|
|
StatusModal {
|
|
|
|
id: modalWithLongTitles
|
|
|
|
anchors.centerIn: parent
|
|
|
|
header.title: "Some super long text here that exceeds the available space"
|
|
|
|
header.subTitle: "Some super long text here that exceeds the available space"
|
2021-08-30 10:32:31 +00:00
|
|
|
header.subTitleElide: Text.ElideMiddle
|
2021-08-27 12:06:20 +00:00
|
|
|
header.image.source: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAlklEQVR4nOzW0QmDQBAG4SSkl7SUQlJGCrElq9F3QdjjVhh/5nv3cFhY9vUIYQiNITSG0Bh
|
|
|
|
CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2ImYgiNITTlTdG1nUZ5a92VITQxITFiJmIIjSE0htAYQrMHAAD//+wwFVpz+yqXAAAAAElFTkSuQmCC"
|
|
|
|
header.image.isIdenticon: true
|
|
|
|
|
2021-09-01 09:18:53 +00:00
|
|
|
contentItem: StatusBaseText {
|
2021-08-27 12:06:20 +00:00
|
|
|
anchors.centerIn: parent
|
|
|
|
text: "Some text content"
|
|
|
|
font.pixelSize: 15
|
|
|
|
color: Theme.palette.directColor1
|
|
|
|
}
|
|
|
|
|
|
|
|
rightButtons: [
|
|
|
|
StatusButton {
|
|
|
|
text: "Change text"
|
|
|
|
onClicked: {
|
2021-09-01 09:18:53 +00:00
|
|
|
modalWithLongTitles.contentItem.text = "Changed!"
|
2021-08-27 12:06:20 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
2021-09-03 16:29:19 +00:00
|
|
|
|
|
|
|
StatusModal {
|
|
|
|
id: modalWithHeaderPopupMenu
|
|
|
|
anchors.centerIn: parent
|
|
|
|
header.title: "helloworld.eth"
|
|
|
|
header.subTitle: "Basic address"
|
|
|
|
header.popupMenu: StatusPopupMenu {
|
|
|
|
id: popupMenu
|
|
|
|
Repeater {
|
|
|
|
model: dummyAccountsModel
|
|
|
|
delegate: Loader {
|
|
|
|
sourceComponent: popupMenu.delegate
|
|
|
|
onLoaded: {
|
|
|
|
item.action.text = model.name
|
|
|
|
item.action.iconSettings.name = model.iconName
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
onMenuItemClicked: {
|
|
|
|
popupMenu.dismiss()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ListModel {
|
|
|
|
id: dummyAccountsModel
|
|
|
|
ListElement{name: "Account 1"; iconName: "filled-account"}
|
|
|
|
ListElement{name: "Account 2"; iconName: "filled-account"}
|
|
|
|
}
|
2021-09-14 12:53:35 +00:00
|
|
|
|
|
|
|
StatusSpellcheckingMenuItems {
|
|
|
|
id: spellMenu
|
|
|
|
anchors.centerIn: parent
|
|
|
|
suggestions: ["suggestion1", "suggestion2", "suggestion3", "suggestion4"]
|
|
|
|
}
|
2021-06-14 12:10:36 +00:00
|
|
|
}
|