2021-06-02 10:41:31 +00:00
|
|
|
import QtQuick 2.14
|
|
|
|
import QtQuick.Layouts 1.14
|
|
|
|
import QtQuick.Controls 2.13
|
|
|
|
|
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
import StatusQ.Popups 0.1
|
|
|
|
|
|
|
|
GridLayout {
|
|
|
|
columns: 1
|
|
|
|
columnSpacing: 5
|
|
|
|
rowSpacing: 5
|
|
|
|
|
|
|
|
StatusButton {
|
|
|
|
text: "Simple"
|
|
|
|
onClicked: simpleMenu.popup()
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusButton {
|
|
|
|
text: "Complex"
|
|
|
|
onClicked: complexMenu.popup()
|
|
|
|
}
|
|
|
|
|
2021-07-21 13:09:11 +00:00
|
|
|
|
|
|
|
StatusButton {
|
|
|
|
text: "Menu with custom images and icons"
|
|
|
|
onClicked: customMenu.popup()
|
|
|
|
}
|
|
|
|
|
2022-07-12 09:05:12 +00:00
|
|
|
StatusButton {
|
|
|
|
text: "Menu with custom font settings"
|
|
|
|
onClicked: differentFontMenu.popup()
|
|
|
|
}
|
|
|
|
|
2021-07-21 13:09:11 +00:00
|
|
|
|
2021-06-02 10:41:31 +00:00
|
|
|
StatusPopupMenu {
|
|
|
|
id: simpleMenu
|
|
|
|
StatusMenuItem {
|
|
|
|
text: "One"
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusMenuItem {
|
|
|
|
text: "Two"
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusMenuItem {
|
|
|
|
text: "Three"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusPopupMenu {
|
|
|
|
id: complexMenu
|
2021-07-23 16:28:16 +00:00
|
|
|
subMenuItemIcons: [{ icon: 'info' }]
|
2021-07-21 13:09:11 +00:00
|
|
|
|
2021-06-02 10:41:31 +00:00
|
|
|
StatusMenuItem {
|
|
|
|
text: "One"
|
2022-09-02 15:40:30 +00:00
|
|
|
assetSettings.name: "info"
|
2021-06-02 10:41:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
StatusMenuSeparator {}
|
|
|
|
|
|
|
|
StatusMenuItem {
|
|
|
|
text: "Two"
|
2022-09-02 15:40:30 +00:00
|
|
|
assetSettings.name: "info"
|
2021-06-02 10:41:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
StatusMenuItem {
|
|
|
|
text: "Three"
|
2022-09-02 15:40:30 +00:00
|
|
|
assetSettings.name: "info"
|
2021-06-02 10:41:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
StatusPopupMenu {
|
|
|
|
title: "Four"
|
|
|
|
StatusMenuItem {
|
|
|
|
text: "One"
|
2022-09-02 15:40:30 +00:00
|
|
|
assetSettings.name: "info"
|
2021-06-02 10:41:31 +00:00
|
|
|
}
|
|
|
|
StatusMenuItem {
|
|
|
|
text: "Three"
|
2022-09-02 15:40:30 +00:00
|
|
|
assetSettings.name: "info"
|
2021-07-21 13:09:11 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusPopupMenu {
|
|
|
|
id: customMenu
|
|
|
|
|
|
|
|
subMenuItemIcons: [
|
2021-07-23 16:28:16 +00:00
|
|
|
{ icon: "chat" },
|
2021-07-21 13:09:11 +00:00
|
|
|
{
|
2022-07-22 13:42:05 +00:00
|
|
|
source: "qrc:/demoapp/data/profile-image-1.jpeg"
|
2021-07-21 13:09:11 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
isLetterIdenticon: true,
|
|
|
|
color: "red"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
|
|
|
|
StatusMenuItem {
|
|
|
|
text: "Anywhere"
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusMenuSeparator {}
|
|
|
|
|
|
|
|
StatusPopupMenu {
|
|
|
|
title: "Chat"
|
|
|
|
|
|
|
|
StatusMenuItem {
|
|
|
|
text: "vitalik.eth"
|
2022-09-02 15:40:30 +00:00
|
|
|
assetSettings.isImage: true
|
|
|
|
assetSettings.name: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAlklEQVR4nOzW0QmDQBAG4SSkl7SUQlJGCrElq9F3QdjjVhh/5nv3cFhY9vUIYQiNITSG0Bh
|
2021-07-21 13:09:11 +00:00
|
|
|
CExPynn1gWf9bx498P7/nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2ImYgiNITTlTdG1nUZ5a92VITQxITFiJmIIjSE0htAYQrMHAAD//+wwFVpz+yqXAAAAAElFTkSuQmCC"
|
2022-09-02 15:40:30 +00:00
|
|
|
assetSettings.imgIsIdenticon: true
|
2021-07-21 13:09:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
StatusMenuItem {
|
|
|
|
text: "Pascal"
|
2022-09-02 15:40:30 +00:00
|
|
|
assetSettings.isImage: true
|
|
|
|
assetSettings.name: "qrc:/demoapp/data/profile-image-1.jpeg"
|
2021-07-21 13:09:11 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusPopupMenu {
|
|
|
|
title: "Cryptokitties"
|
|
|
|
|
|
|
|
StatusMenuItem {
|
|
|
|
text: "welcome"
|
2022-09-02 15:40:30 +00:00
|
|
|
assetSettings.name: "channel"
|
|
|
|
assetSettings.color: Theme.palette.directColor1
|
2021-07-21 13:09:11 +00:00
|
|
|
}
|
|
|
|
StatusMenuItem {
|
|
|
|
text: "support"
|
2022-09-02 15:40:30 +00:00
|
|
|
assetSettings.name: "channel"
|
|
|
|
assetSettings.color: Theme.palette.directColor1
|
2021-07-21 13:09:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
StatusMenuHeadline { text: "Public" }
|
|
|
|
|
|
|
|
StatusMenuItem {
|
|
|
|
text: "news"
|
2022-09-02 15:40:30 +00:00
|
|
|
assetSettings.name: "channel"
|
|
|
|
assetSettings.color: Theme.palette.directColor1
|
2021-07-21 13:09:11 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusPopupMenu {
|
|
|
|
title: "Another community"
|
|
|
|
|
|
|
|
StatusMenuItem {
|
|
|
|
text: "welcome"
|
2022-09-02 15:40:30 +00:00
|
|
|
assetSettings.isLetterIdenticon: true
|
|
|
|
assetSettings.bgColor: "red"
|
2021-06-02 10:41:31 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-07-12 09:05:12 +00:00
|
|
|
|
|
|
|
StatusPopupMenu {
|
|
|
|
id: differentFontMenu
|
|
|
|
StatusMenuItem {
|
|
|
|
text: "Bold"
|
|
|
|
fontSettings.bold: true
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusMenuItem {
|
|
|
|
text: "Italic"
|
|
|
|
fontSettings.italic: true
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusMenuItem {
|
|
|
|
text: "16px"
|
|
|
|
fontSettings.pixelSize: 16
|
|
|
|
}
|
|
|
|
}
|
2021-06-02 10:41:31 +00:00
|
|
|
}
|