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
|
2022-06-14 05:37:08 +00:00
|
|
|
import StatusQ.Components 0.1
|
|
|
|
import StatusQ.Core.Utils 0.1
|
2021-06-14 12:10:36 +00:00
|
|
|
|
|
|
|
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-10-13 10:44:32 +00:00
|
|
|
StatusButton {
|
|
|
|
text: "Modal with editable identicon"
|
|
|
|
onClicked: modalWithEditableIdenticon.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-11-29 18:23:40 +00:00
|
|
|
StatusButton {
|
|
|
|
text: "Modal with Editable Title"
|
|
|
|
onClicked: editTitleModal.open()
|
|
|
|
}
|
|
|
|
|
2022-03-25 09:50:53 +00:00
|
|
|
StatusButton {
|
|
|
|
text: "Modal with Advanced Header/Footer"
|
|
|
|
onClicked: advancedHeaderFooterModal.open()
|
|
|
|
}
|
|
|
|
|
2022-06-14 05:37:08 +00:00
|
|
|
|
|
|
|
StatusButton {
|
|
|
|
text: "Modal with Floating header Buttons"
|
|
|
|
onClicked: floatingHeaderModal.open()
|
|
|
|
}
|
|
|
|
|
2021-06-14 12:10:36 +00:00
|
|
|
StatusModal {
|
|
|
|
id: simpleModal
|
|
|
|
anchors.centerIn: parent
|
2023-05-23 12:46:16 +00:00
|
|
|
headerSettings.title: "Some Title"
|
|
|
|
headerSettings.subTitle: "Subtitle"
|
2021-06-14 12:10:36 +00:00
|
|
|
}
|
|
|
|
|
2021-09-07 09:42:19 +00:00
|
|
|
StatusModal {
|
|
|
|
id: simpleTitleModal
|
|
|
|
anchors.centerIn: parent
|
2023-05-23 12:46:16 +00:00
|
|
|
headerSettings.title: "Some Title"
|
2021-09-07 09:42:19 +00:00
|
|
|
}
|
|
|
|
|
2021-06-14 12:10:36 +00:00
|
|
|
StatusModal {
|
|
|
|
id: headerImageModal
|
|
|
|
anchors.centerIn: parent
|
2023-05-23 12:46:16 +00:00
|
|
|
headerSettings.title: "Some Title"
|
|
|
|
headerSettings.subTitle: "Subtitle"
|
|
|
|
headerSettings.asset.isImage: true
|
|
|
|
headerSettings.asset.name: "qrc:/demoapp/data/profile-image-1.jpeg"
|
2021-06-14 12:10:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
StatusModal {
|
|
|
|
id: footerButtonsModal
|
|
|
|
anchors.centerIn: parent
|
2023-05-23 12:46:16 +00:00
|
|
|
headerSettings.title: "Some Title"
|
|
|
|
headerSettings.subTitle: "Subtitle"
|
|
|
|
headerSettings.asset.isImage: true
|
|
|
|
headerSettings.asset.name: "qrc:/demoapp/data/profile-image-1.jpeg"
|
2021-06-14 12:10:36 +00:00
|
|
|
leftButtons: [
|
2022-08-02 10:40:18 +00:00
|
|
|
StatusBackButton { }
|
2021-06-14 12:10:36 +00:00
|
|
|
]
|
|
|
|
rightButtons: [
|
|
|
|
StatusButton {
|
|
|
|
text: "Button"
|
|
|
|
},
|
|
|
|
StatusButton {
|
|
|
|
text: "Button"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusModal {
|
|
|
|
id: headerActionButtonModal
|
|
|
|
anchors.centerIn: parent
|
2023-05-23 12:46:16 +00:00
|
|
|
headerSettings.title: "Some Title"
|
|
|
|
headerSettings.subTitle: "Subtitle"
|
|
|
|
headerSettings.asset.isImage: true
|
|
|
|
headerSettings.asset.name: "qrc:/demoapp/data/profile-image-1.jpeg"
|
2021-06-14 12:10:36 +00:00
|
|
|
|
|
|
|
headerActionButton: StatusFlatRoundButton {
|
|
|
|
type: StatusFlatRoundButton.Type.Secondary
|
|
|
|
width: 32
|
|
|
|
height: 32
|
|
|
|
|
|
|
|
icon.width: 20
|
|
|
|
icon.height: 20
|
|
|
|
icon.name: "info"
|
|
|
|
}
|
|
|
|
|
|
|
|
leftButtons: [
|
2022-08-02 10:40:18 +00:00
|
|
|
StatusBackButton { }
|
2021-06-14 12:10:36 +00:00
|
|
|
]
|
|
|
|
rightButtons: [
|
|
|
|
StatusButton {
|
|
|
|
text: "Button"
|
|
|
|
},
|
|
|
|
StatusButton {
|
|
|
|
text: "Button"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusModal {
|
|
|
|
id: modalExample
|
|
|
|
anchors.centerIn: parent
|
2023-05-23 12:46:16 +00:00
|
|
|
headerSettings.asset.isImage: true
|
|
|
|
headerSettings.asset.name: "qrc:/demoapp/data/profile-image-1.jpeg"
|
|
|
|
headerSettings.title: "Header"
|
|
|
|
headerSettings.subTitle: "SubTitle"
|
2021-06-14 12:10:36 +00:00
|
|
|
rightButtons: [
|
|
|
|
StatusButton {
|
|
|
|
text: "Button"
|
|
|
|
},
|
|
|
|
StatusButton {
|
|
|
|
text: "Button"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
|
|
|
|
leftButtons: [
|
2022-08-02 10:40:18 +00:00
|
|
|
StatusBackButton { }
|
2021-06-14 12:10:36 +00:00
|
|
|
]
|
|
|
|
|
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
|
2023-05-23 12:46:16 +00:00
|
|
|
headerSettings.title: "Header"
|
|
|
|
headerSettings.subTitle: "SubTitle"
|
2021-07-07 11:54:26 +00:00
|
|
|
|
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
|
2023-05-23 12:46:16 +00:00
|
|
|
headerSettings.title: "Header"
|
|
|
|
headerSettings.subTitle: "SubTitle"
|
|
|
|
headerSettings.asset.isLetterIdenticon: true
|
|
|
|
headerSettings.asset.bgColor: "red"
|
2021-07-20 11:21:34 +00:00
|
|
|
|
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
|
2023-05-23 12:46:16 +00:00
|
|
|
headerSettings.title: "Header"
|
|
|
|
headerSettings.subTitle: "SubTitle"
|
|
|
|
headerSettings.asset.name: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAlklEQVR4nOzW0QmDQBAG4SSkl7SUQlJGCrElq9F3QdjjVhh/5nv3cFhY9vUIYQiNITSG0BhCExPynn1gWf9bx498P7/
|
2022-09-02 15:40:30 +00:00
|
|
|
nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2ImYgiNITTlTdG1nUZ5a92VITQxITFiJmIIjSE0htAYQrMHAAD//+wwFVpz+yqXAAAAAElFTkSuQmCC"
|
2023-05-23 12:46:16 +00:00
|
|
|
headerSettings.asset.imgIsIdenticon: true
|
2021-07-20 11:21:34 +00:00
|
|
|
|
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
|
|
|
|
2021-10-13 10:44:32 +00:00
|
|
|
StatusModal {
|
|
|
|
id: modalWithEditableIdenticon
|
|
|
|
anchors.centerIn: parent
|
2023-05-23 12:46:16 +00:00
|
|
|
headerSettings.title: "Header"
|
|
|
|
headerSettings.subTitle: "SubTitle"
|
|
|
|
headerSettings.headerImageEditable: true
|
|
|
|
headerSettings.asset.name: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAlklEQVR4nOzW0QmDQBAG4SSkl7SUQlJGCrElq9F3QdjjVhh/5nv3cFhY9vUIYQiNITSG0BhCExPynn1gWf9bx498P7/
|
2022-09-02 15:40:30 +00:00
|
|
|
nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2ImYgiNITTlTdG1nUZ5a92VITQxITFiJmIIjSE0htAYQrMHAAD//+wwFVpz+yqXAAAAAElFTkSuQmCC"
|
2023-05-23 12:46:16 +00:00
|
|
|
headerSettings.asset.imgIsIdenticon: true
|
2021-10-13 10:44:32 +00:00
|
|
|
|
|
|
|
contentItem: StatusBaseText {
|
|
|
|
anchors.centerIn: parent
|
|
|
|
text: "Some text content"
|
|
|
|
font.pixelSize: 15
|
|
|
|
color: Theme.palette.directColor1
|
|
|
|
}
|
|
|
|
|
|
|
|
rightButtons: [
|
|
|
|
StatusButton {
|
|
|
|
text: "Change text"
|
|
|
|
onClicked: {
|
|
|
|
modalWithIdenticon.contentItem.text = "Changed!"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2021-08-27 12:06:20 +00:00
|
|
|
StatusModal {
|
|
|
|
id: modalWithLongTitles
|
|
|
|
anchors.centerIn: parent
|
2023-05-23 12:46:16 +00:00
|
|
|
headerSettings.title: "Some super long text here that exceeds the available space"
|
|
|
|
headerSettings.subTitle: "Some super long text here that exceeds the available space"
|
|
|
|
headerSettings.subTitleElide: Text.ElideMiddle
|
|
|
|
headerSettings.asset.name: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAlklEQVR4nOzW0QmDQBAG4SSkl7SUQlJGCrElq9F3QdjjVhh/5nv3cFhY9vUIYQiNITSG0BhCExPynn1gWf9bx498P7/
|
2022-09-02 15:40:30 +00:00
|
|
|
nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2ImYgiNITTlTdG1nUZ5a92VITQxITFiJmIIjSE0htAYQrMHAAD//+wwFVpz+yqXAAAAAElFTkSuQmCC"
|
2023-05-23 12:46:16 +00:00
|
|
|
headerSettings.asset.imgIsIdenticon: true
|
2021-08-27 12:06:20 +00:00
|
|
|
|
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
|
2023-05-23 12:46:16 +00:00
|
|
|
headerSettings.title: "helloworld.eth"
|
|
|
|
headerSettings.subTitle: "Basic address"
|
|
|
|
headerSettings.popupMenu: StatusMenu {
|
2021-09-03 16:29:19 +00:00
|
|
|
id: popupMenu
|
2022-12-01 16:58:37 +00:00
|
|
|
|
|
|
|
StatusMenuInstantiator {
|
2021-09-03 16:29:19 +00:00
|
|
|
model: dummyAccountsModel
|
2022-12-01 16:58:37 +00:00
|
|
|
menu: popupMenu
|
|
|
|
delegate: StatusAction {
|
|
|
|
text: model.name
|
|
|
|
assetSettings.name: model.iconName
|
|
|
|
onTriggered: {
|
|
|
|
popupMenu.dismiss()
|
2021-09-03 16:29:19 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-11-29 18:23:40 +00:00
|
|
|
StatusModal {
|
|
|
|
id: editTitleModal
|
|
|
|
anchors.centerIn: parent
|
2023-05-23 12:46:16 +00:00
|
|
|
headerSettings.title: "This title can be edited"
|
|
|
|
headerSettings.editable: true
|
2021-11-29 18:23:40 +00:00
|
|
|
}
|
|
|
|
|
2022-03-25 09:50:53 +00:00
|
|
|
StatusModal {
|
|
|
|
id: advancedHeaderFooterModal
|
|
|
|
anchors.centerIn: parent
|
|
|
|
showHeader: false
|
|
|
|
showFooter: false
|
|
|
|
showAdvancedHeader: true
|
|
|
|
showAdvancedFooter: true
|
|
|
|
height: 200
|
|
|
|
advancedHeaderComponent: Rectangle {
|
|
|
|
width: parent.width
|
|
|
|
height: 50
|
|
|
|
color: Theme.palette.baseColor1
|
|
|
|
border.width: 1
|
|
|
|
StatusBaseText {
|
|
|
|
anchors.centerIn: parent
|
|
|
|
text: "Add any header here"
|
|
|
|
font.pixelSize: 15
|
|
|
|
color: Theme.palette.directColor1
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
advancedFooterComponent: Rectangle {
|
|
|
|
width: parent.width
|
|
|
|
height: 50
|
|
|
|
color: Theme.palette.baseColor1
|
|
|
|
border.width: 1
|
|
|
|
StatusBaseText {
|
|
|
|
anchors.centerIn: parent
|
|
|
|
text: "Add any footer here"
|
|
|
|
font.pixelSize: 15
|
|
|
|
color: Theme.palette.directColor1
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-09-03 16:29:19 +00:00
|
|
|
ListModel {
|
|
|
|
id: dummyAccountsModel
|
2022-12-01 16:58:37 +00:00
|
|
|
ListElement{name: "Account 1"; iconName: "filled-account"; emoji: "🥑" }
|
|
|
|
ListElement{name: "Account 2"; iconName: "filled-account"; emoji: "🚀" }
|
2022-06-14 05:37:08 +00:00
|
|
|
ListElement{name: "Account 3"; iconName: "filled-account"}
|
|
|
|
ListElement{name: "Account 4"; iconName: "filled-account"}
|
|
|
|
ListElement{name: "Account 5"; iconName: "filled-account"}
|
|
|
|
ListElement{name: "Account 6"; iconName: "filled-account"}
|
|
|
|
ListElement{name: "Account 7"; iconName: "filled-account"}
|
2021-09-03 16:29:19 +00:00
|
|
|
}
|
2021-06-14 12:10:36 +00:00
|
|
|
}
|