2023-05-05 16:05:44 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
import QtQuick.Window 2.15
|
|
|
|
import QtQuick.Controls 2.15
|
|
|
|
import QtGraphicalEffects 1.15
|
|
|
|
import QtQuick.Layouts 1.15
|
2022-04-07 18:38:47 +00:00
|
|
|
import Qt.labs.settings 1.0
|
2023-05-05 16:05:44 +00:00
|
|
|
import QtQml.Models 2.15
|
|
|
|
import QtMultimedia 5.15
|
2021-05-04 18:31:15 +00:00
|
|
|
|
2024-10-10 12:34:03 +00:00
|
|
|
import StatusQ 0.1
|
2021-05-04 18:31:15 +00:00
|
|
|
import StatusQ.Core 0.1
|
|
|
|
import StatusQ.Core.Theme 0.1
|
2021-05-27 17:06:50 +00:00
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
import StatusQ.Components 0.1
|
|
|
|
import StatusQ.Layout 0.1
|
2021-06-01 10:01:47 +00:00
|
|
|
import StatusQ.Platform 0.1
|
2021-05-04 18:31:15 +00:00
|
|
|
|
2022-07-19 10:29:18 +00:00
|
|
|
import SortFilterProxyModel 0.2
|
|
|
|
|
2022-02-01 15:20:57 +00:00
|
|
|
import "demoapp/data" 1.0
|
|
|
|
|
2021-05-20 06:25:52 +00:00
|
|
|
StatusWindow {
|
2021-05-04 18:31:15 +00:00
|
|
|
id: rootWindow
|
2023-05-05 16:05:44 +00:00
|
|
|
|
|
|
|
width: 1224
|
|
|
|
height: 840
|
|
|
|
|
2021-05-04 18:31:15 +00:00
|
|
|
visible: true
|
2021-05-27 17:06:50 +00:00
|
|
|
title: qsTr("StatusQ Documentation App")
|
2021-05-04 18:31:15 +00:00
|
|
|
|
2021-05-17 10:18:41 +00:00
|
|
|
property ThemePalette lightTheme: StatusLightTheme {}
|
2021-05-27 17:06:50 +00:00
|
|
|
property ThemePalette darkTheme: StatusDarkTheme {}
|
2021-05-17 10:18:41 +00:00
|
|
|
|
2021-05-27 17:06:50 +00:00
|
|
|
readonly property real maxFactor: 2.0
|
|
|
|
readonly property real minFactor: 0.5
|
2021-05-04 18:31:15 +00:00
|
|
|
|
2021-05-27 17:06:50 +00:00
|
|
|
property real factor: 1.0
|
2021-05-17 10:18:41 +00:00
|
|
|
|
2022-02-01 09:11:40 +00:00
|
|
|
QtObject {
|
|
|
|
id: appSectionType
|
|
|
|
readonly property int chat: 0
|
|
|
|
readonly property int community: 1
|
|
|
|
readonly property int wallet: 2
|
|
|
|
readonly property int browser: 3
|
2021-11-26 21:45:42 +00:00
|
|
|
readonly property int nodeManagement: 4
|
|
|
|
readonly property int profileSettings: 5
|
2022-02-01 09:11:40 +00:00
|
|
|
readonly property int apiDocumentation: 100
|
2022-07-19 10:29:18 +00:00
|
|
|
readonly property int examples: 101
|
|
|
|
readonly property int demoApp: 102
|
2023-03-07 16:08:38 +00:00
|
|
|
readonly property int qrScanner: 103
|
2022-02-01 09:11:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function setActiveItem(sectionId) {
|
2022-02-01 15:20:57 +00:00
|
|
|
for (var i = 0; i < Models.mainAppSectionsModel.count; i++) {
|
|
|
|
let item = Models.mainAppSectionsModel.get(i)
|
|
|
|
if (item.sectionId !== sectionId) {
|
|
|
|
Models.mainAppSectionsModel.setProperty(i, "active", false);
|
2022-02-01 09:11:40 +00:00
|
|
|
continue
|
|
|
|
}
|
|
|
|
|
2022-02-01 15:20:57 +00:00
|
|
|
Models.mainAppSectionsModel.setProperty(i, "active", true);
|
2022-02-01 09:11:40 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-09-02 07:25:43 +00:00
|
|
|
StatusMainLayout {
|
2021-05-27 17:06:50 +00:00
|
|
|
id: appLayout
|
|
|
|
anchors.fill: parent
|
|
|
|
|
2022-09-02 07:25:43 +00:00
|
|
|
leftPanel: StatusAppNavBar {
|
2021-05-27 17:06:50 +00:00
|
|
|
height: rootWindow.height
|
2021-06-03 14:14:52 +00:00
|
|
|
|
2022-11-28 11:32:29 +00:00
|
|
|
regularItemsModel: Models.mainAppSectionsModel
|
|
|
|
regularItemDelegate: StatusNavBarTabButton {
|
2022-02-01 09:11:40 +00:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
name: model.icon.length > 0? "" : model.name
|
|
|
|
icon.name: model.icon
|
|
|
|
icon.source: model.image
|
|
|
|
tooltip.text: model.name
|
|
|
|
autoExclusive: true
|
|
|
|
checked: model.active
|
|
|
|
badge.value: model.notificationsCount
|
|
|
|
badge.visible: model.hasNotification
|
|
|
|
badge.border.color: hovered ? Theme.palette.statusBadge.hoverBorderColor : Theme.palette.statusBadge.borderColor
|
|
|
|
badge.border.width: 2
|
|
|
|
onClicked: {
|
|
|
|
stackView.clear()
|
|
|
|
if(model.sectionType === appSectionType.apiDocumentation)
|
|
|
|
{
|
2021-05-27 17:06:50 +00:00
|
|
|
stackView.push(libraryDocumentationCmp)
|
2022-07-19 10:29:18 +00:00
|
|
|
}
|
|
|
|
else if(model.sectionType === appSectionType.examples)
|
|
|
|
{
|
|
|
|
stackView.push(examplesCmp)
|
2021-05-27 17:06:50 +00:00
|
|
|
}
|
2022-02-01 09:11:40 +00:00
|
|
|
else if(model.sectionType === appSectionType.demoApp)
|
|
|
|
{
|
2021-05-31 12:55:01 +00:00
|
|
|
stackView.push(demoAppCmp)
|
|
|
|
}
|
2023-03-07 16:08:38 +00:00
|
|
|
else if (model.sectionType === appSectionType.qrScanner)
|
|
|
|
{
|
|
|
|
stackView.push(qrScannerComponent)
|
|
|
|
}
|
2022-07-19 10:29:18 +00:00
|
|
|
rootWindow.setActiveItem(model.sectionId)
|
2021-05-27 17:06:50 +00:00
|
|
|
}
|
2022-02-01 09:11:40 +00:00
|
|
|
}
|
2022-11-28 11:32:29 +00:00
|
|
|
delegateHeight: 40
|
2021-05-05 07:37:01 +00:00
|
|
|
}
|
2021-05-17 10:18:41 +00:00
|
|
|
|
2022-09-02 07:25:43 +00:00
|
|
|
rightPanel: Item {
|
2021-05-27 17:06:50 +00:00
|
|
|
anchors.fill: parent
|
2022-09-02 07:25:43 +00:00
|
|
|
StackView {
|
|
|
|
id: stackView
|
|
|
|
anchors.fill: parent
|
|
|
|
initialItem: libraryDocumentationCmp
|
|
|
|
}
|
|
|
|
ThemeSwitch {
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.topMargin: 32
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.rightMargin: 32
|
|
|
|
lightThemeEnabled: storeSettings.lightTheme
|
|
|
|
onLightThemeEnabledChanged: {
|
|
|
|
Theme.palette = lightThemeEnabled ? rootWindow.darkTheme : rootWindow.lightTheme
|
|
|
|
storeSettings.lightTheme = lightThemeEnabled
|
|
|
|
}
|
2021-05-04 18:31:15 +00:00
|
|
|
}
|
2021-05-27 17:06:50 +00:00
|
|
|
}
|
2022-09-02 07:25:43 +00:00
|
|
|
|
2021-05-27 17:06:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Component {
|
|
|
|
id: libraryDocumentationCmp
|
|
|
|
|
2022-09-02 07:25:43 +00:00
|
|
|
StatusSectionLayout {
|
2022-01-18 19:54:45 +00:00
|
|
|
id: mainPageView
|
2022-09-02 07:25:43 +00:00
|
|
|
showHeader: false
|
2022-01-18 19:54:45 +00:00
|
|
|
|
2022-04-07 18:38:47 +00:00
|
|
|
function page(name, fillPage) {
|
|
|
|
storeSettings.fillPage = fillPage ? true : false
|
2022-01-18 19:54:45 +00:00
|
|
|
viewLoader.source = Qt.resolvedUrl("./pages/" + name + "Page.qml");
|
|
|
|
}
|
|
|
|
function control(name) {
|
|
|
|
viewLoader.source = Qt.resolvedUrl("./controls/" + name + ".qml");
|
2022-04-07 18:38:47 +00:00
|
|
|
storeSettings.fillPage = false
|
2022-01-18 19:54:45 +00:00
|
|
|
}
|
2021-05-27 17:06:50 +00:00
|
|
|
|
2022-07-14 12:29:14 +00:00
|
|
|
leftPanel: StatusScrollView {
|
2023-05-31 20:58:23 +00:00
|
|
|
id: sectionsScrollView
|
2021-05-27 17:06:50 +00:00
|
|
|
anchors.fill: parent
|
2023-05-31 20:58:23 +00:00
|
|
|
topPadding: 48
|
|
|
|
contentWidth: availableWidth
|
2021-05-27 17:06:50 +00:00
|
|
|
|
2022-07-14 12:29:14 +00:00
|
|
|
Column {
|
|
|
|
id: navigation
|
2023-05-31 20:58:23 +00:00
|
|
|
width: sectionsScrollView.availableWidth
|
2022-07-14 12:29:14 +00:00
|
|
|
spacing: 0
|
2021-05-27 17:06:50 +00:00
|
|
|
|
2022-07-14 12:29:14 +00:00
|
|
|
StatusListSectionHeadline { text: "StatusQ.Core" }
|
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "Icons"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.control(title);
|
|
|
|
}
|
2023-05-31 20:58:23 +00:00
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "ScrollView"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page("StatusScrollView");
|
|
|
|
}
|
feat(Layout): introduce StatusAppNavBar
This commit introduces a new `StatusAppNavBar` component that can be used
to create a Status application's tab bar for dedicated tab sections such as
chat, profile, wallet etc.
The component is build in a way that it support declarative and imperative usage
where necessary.
In its most simple form, a `StatusAppNavBar` comes with a single tab button
for the chat section. Such button has to be of type `StatusNavBarTabButton`:
```qml
import StatusQ.Layout 0.1
StatusAppNavBar {
navBarChatButton: StatusNavBarTabButton {
icon.name: "chat"
badge.value: 33
badge.visible: true
tooltip.text: "Chat"
}
}
```
In addition, it's possible to specify a list of `StatusNavBarTabButton` for
other sections of the application using the `navBarTabButtons` property:
```qml
StatusAppNavBar {
...
navBarTabButtons: [
StatusNavBarTabButton {
icon.name: "wallet"
tooltip.text: "Wallet"
},
StatusNavBarTabButton {
icon.name: "browser"
tooltip.text: "Browser"
},
StatusNavBarTabButton {
icon.name: "status-update"
tooltip.text: "Timeline"
}
]
}
```
Lastly, when desired to render tabs for Status community, which can grow
in size, `StatusAppNavBar` exposes a list via the `navBarCommunityTabButtons`
property that can have a `model` and a `delegate`. The `delegate` should also
be a `StatusNavBarTabButton`:
```qml
StatusAppNavBar {
...
navBarCommunityTabButtons.model: someModel.communities
navBarCommunityTabButtons.delegate: StatusNavBarTabButton {
name: model.name
tooltip.text: model.name
anchors.horizontalCenter: parent.horizontalCenter
}
}
```
The amount of community tab buttons can grow as they need until their dedicated
area becomes scrollable, at which point all `navBarTabButtons` will stick to the
bottom of `StatusAppNavBar`.
Closes #18
2021-05-11 14:25:46 +00:00
|
|
|
|
2022-07-14 12:29:14 +00:00
|
|
|
StatusListSectionHeadline { text: "StatusQ.Layout" }
|
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "Layouts"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.control(title.substring(0, title.length - 1));
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusListSectionHeadline { text: "StatusQ.Controls" }
|
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "Buttons"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.control(title);
|
|
|
|
}
|
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "StatusSwitchTab"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page("StatusTabSwitch");
|
|
|
|
}
|
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "Controls"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.control(title);
|
|
|
|
}
|
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "StatusTabBarButton"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page(title);
|
|
|
|
}
|
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "StatusTabBarIconButton"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page(title);
|
|
|
|
}
|
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "StatusInput"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page(title);
|
|
|
|
}
|
2022-08-01 20:27:39 +00:00
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "StatusTextArea"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page(title);
|
|
|
|
}
|
2022-07-14 12:29:14 +00:00
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "StatusSelect"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page(title);
|
|
|
|
}
|
|
|
|
StatusNavigationListItem {
|
2022-07-30 14:45:22 +00:00
|
|
|
title: "StatusComboBox"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page(title);
|
|
|
|
}
|
2022-07-14 12:29:14 +00:00
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "StatusColorSelector"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page(title);
|
|
|
|
}
|
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "StatusWalletColorButton"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page(title);
|
|
|
|
}
|
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "StatusWalletColorSelect"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page(title);
|
|
|
|
}
|
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "StatusPasswordStrengthIndicator"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page(title);
|
|
|
|
}
|
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "StatusPinInput"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page(title);
|
|
|
|
}
|
|
|
|
StatusListSectionHeadline { text: "StatusQ.Components" }
|
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "StatusAddress"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page(title);
|
|
|
|
}
|
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "List Items"
|
|
|
|
selected: viewLoader.source.toString().includes(title.replace(/\s+/g, ''))
|
|
|
|
onClicked: mainPageView.control(title.replace(/\s+/g, ''));
|
|
|
|
}
|
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "StatusChatInfoToolBar"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page(title);
|
|
|
|
}
|
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "Others"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.control(title);
|
|
|
|
}
|
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "StatusExpandableItem"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page("StatusExpandableSettingsItem");
|
|
|
|
}
|
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "StatusTagSelector"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page(title);
|
|
|
|
}
|
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "StatusToastMessage"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page(title);
|
|
|
|
}
|
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "StatusWizardStepper"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page(title);
|
|
|
|
}
|
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "StatusListPicker"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page(title);
|
|
|
|
}
|
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "StatusCommunityCard"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page(title);
|
|
|
|
}
|
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "StatusCommunityTags"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page(title);
|
|
|
|
}
|
2022-09-14 11:21:59 +00:00
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "StatusChartPanel"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page(title, true);
|
|
|
|
}
|
2022-07-14 12:29:14 +00:00
|
|
|
StatusListSectionHeadline { text: "StatusQ.Popup" }
|
|
|
|
StatusNavigationListItem {
|
2022-12-01 16:58:37 +00:00
|
|
|
title: "StatusMenu"
|
2022-07-14 12:29:14 +00:00
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page(title);
|
|
|
|
}
|
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "StatusModal"
|
|
|
|
selected: viewLoader.source.toString().includes("Popups")
|
|
|
|
onClicked: mainPageView.control("Popups");
|
|
|
|
}
|
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "StatusDialog"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page(title);
|
|
|
|
}
|
|
|
|
StatusListSectionHeadline { text: "StatusQ.Platform" }
|
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "StatusMacNotification"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page(title);
|
|
|
|
}
|
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "StatusColorSelectorGrid"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page(title);
|
|
|
|
}
|
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "StatusImageCropPanel"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page(title, true);
|
|
|
|
}
|
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "StatusColorSpace"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page(title, true);
|
|
|
|
}
|
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "StatusCard"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page(title, true);
|
2021-05-04 18:31:15 +00:00
|
|
|
}
|
2022-12-28 09:45:38 +00:00
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "StatusStepper"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page(title);
|
|
|
|
}
|
2023-01-04 17:21:24 +00:00
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "LoadingStates"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.control(title);
|
|
|
|
}
|
2023-03-14 19:25:43 +00:00
|
|
|
StatusNavigationListItem {
|
|
|
|
title: "StatusPageIndicator"
|
|
|
|
selected: viewLoader.source.toString().includes(title)
|
|
|
|
onClicked: mainPageView.page(title);
|
|
|
|
}
|
2021-05-04 18:31:15 +00:00
|
|
|
}
|
2021-05-27 17:06:50 +00:00
|
|
|
}
|
2021-05-04 18:31:15 +00:00
|
|
|
|
2022-09-02 07:25:43 +00:00
|
|
|
centerPanel: Item {
|
|
|
|
id: centerPanel
|
2021-05-27 17:06:50 +00:00
|
|
|
anchors.fill: parent
|
2022-04-07 18:38:47 +00:00
|
|
|
|
2022-07-14 12:29:14 +00:00
|
|
|
StatusScrollView {
|
2023-05-31 20:58:23 +00:00
|
|
|
id: scrollView
|
2022-04-07 18:38:47 +00:00
|
|
|
visible: !storeSettings.fillPage
|
2023-05-31 20:58:23 +00:00
|
|
|
|
2021-07-08 11:42:08 +00:00
|
|
|
anchors.fill: parent
|
2023-05-31 20:58:23 +00:00
|
|
|
topPadding: 64
|
|
|
|
padding: 20
|
|
|
|
|
|
|
|
contentWidth: viewLoader.width * rootWindow.factor
|
|
|
|
contentHeight: viewLoader.height * rootWindow.factor
|
2021-05-27 17:06:50 +00:00
|
|
|
|
|
|
|
Item {
|
|
|
|
id: pageWrapper
|
2023-05-31 20:58:23 +00:00
|
|
|
|
|
|
|
width: Math.max(scrollView.availableWidth, viewLoader.width)
|
|
|
|
height: Math.max(scrollView.availableHeight, viewLoader.height)
|
2021-05-27 17:06:50 +00:00
|
|
|
scale: rootWindow.factor
|
2022-04-07 18:38:47 +00:00
|
|
|
|
2021-05-27 17:06:50 +00:00
|
|
|
Loader {
|
2022-01-18 19:54:45 +00:00
|
|
|
id: viewLoader
|
2021-05-27 17:06:50 +00:00
|
|
|
anchors.centerIn: parent
|
2023-05-31 20:58:23 +00:00
|
|
|
active: !storeSettings.fillPage
|
2022-04-07 18:38:47 +00:00
|
|
|
source: storeSettings.selected.length === 0 ? mainPageView.control("Icons") : storeSettings.selected
|
2022-01-31 19:55:31 +00:00
|
|
|
onSourceChanged: {
|
2022-04-07 18:38:47 +00:00
|
|
|
storeSettings.selected = viewLoader.source
|
2022-01-31 19:55:31 +00:00
|
|
|
}
|
2021-05-17 10:18:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-05-31 20:58:23 +00:00
|
|
|
|
2022-04-07 18:38:47 +00:00
|
|
|
Loader {
|
|
|
|
active: storeSettings.fillPage
|
|
|
|
anchors.fill: parent
|
|
|
|
anchors.topMargin: 64
|
|
|
|
visible: storeSettings.fillPage
|
|
|
|
clip: true
|
|
|
|
|
|
|
|
source: viewLoader.source
|
|
|
|
}
|
2021-05-04 18:31:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Action {
|
|
|
|
shortcut: "CTRL+="
|
|
|
|
onTriggered: {
|
|
|
|
if (rootWindow.factor < 2.0)
|
|
|
|
rootWindow.factor += 0.2
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Action {
|
|
|
|
shortcut: "CTRL+-"
|
|
|
|
onTriggered: {
|
|
|
|
if (rootWindow.factor > 0.5)
|
|
|
|
rootWindow.factor -= 0.2
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Action {
|
|
|
|
shortcut: "CTRL+0"
|
|
|
|
onTriggered: {
|
|
|
|
rootWindow.factor = 1.0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-07-19 10:29:18 +00:00
|
|
|
Component {
|
|
|
|
id: examplesCmp
|
|
|
|
|
2022-09-02 07:25:43 +00:00
|
|
|
StatusSectionLayout {
|
2022-07-19 10:29:18 +00:00
|
|
|
id: examplesView
|
2022-09-02 07:25:43 +00:00
|
|
|
showHeader: false
|
2022-07-19 10:29:18 +00:00
|
|
|
|
|
|
|
function example(name) {
|
|
|
|
examplesLoader.source = Qt.resolvedUrl("./examples/" + name + ".qml")
|
|
|
|
storeSettings.selectedExample = examplesLoader.source
|
|
|
|
}
|
|
|
|
|
|
|
|
readonly property string defaultExampleSource: example("FilteringSorting")
|
|
|
|
|
|
|
|
leftPanel: StatusScrollView {
|
|
|
|
id: examplesLeftPanel
|
|
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
anchors.topMargin: 48
|
|
|
|
|
2023-05-31 20:58:23 +00:00
|
|
|
contentWidth: availableWidth
|
|
|
|
|
2022-07-19 10:29:18 +00:00
|
|
|
ColumnLayout {
|
|
|
|
width: examplesLeftPanel.availableWidth
|
|
|
|
spacing: 0
|
|
|
|
|
|
|
|
StatusNavigationListItem {
|
|
|
|
Layout.fillWidth: true
|
|
|
|
title: "FilteringSorting"
|
|
|
|
selected: examplesLoader.source.toString().includes(title)
|
|
|
|
onClicked: examplesView.example(title)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-09-02 07:25:43 +00:00
|
|
|
centerPanel: Item {
|
2022-07-19 10:29:18 +00:00
|
|
|
anchors.fill: parent
|
2022-09-02 07:25:43 +00:00
|
|
|
StatusScrollView {
|
|
|
|
id: examplesCenterPanel
|
|
|
|
anchors.fill: parent
|
|
|
|
anchors.margins: 64
|
|
|
|
anchors.topMargin: anchors.margins + 32
|
2022-07-19 10:29:18 +00:00
|
|
|
|
2022-09-02 07:25:43 +00:00
|
|
|
Loader {
|
|
|
|
id: examplesLoader
|
|
|
|
width: examplesCenterPanel.availableWidth
|
|
|
|
source: storeSettings.selectedExample !== "" ? storeSettings.selectedExample : examplesView.defaultExampleSource
|
|
|
|
}
|
2022-07-19 10:29:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-05-31 12:55:01 +00:00
|
|
|
Component {
|
|
|
|
id: demoAppCmp
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
anchors.fill: parent
|
|
|
|
color: Theme.palette.baseColor3
|
2021-08-27 13:21:00 +00:00
|
|
|
|
|
|
|
Row {
|
|
|
|
id: platformSwitch
|
|
|
|
anchors.left: demoApp.left
|
|
|
|
anchors.bottom: demoApp.top
|
|
|
|
anchors.bottomMargin: 20
|
|
|
|
spacing: 2
|
|
|
|
|
|
|
|
Text {
|
|
|
|
text: "OSX"
|
|
|
|
font.pixelSize: 15
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusSwitch {
|
|
|
|
onCheckedChanged: {
|
|
|
|
if (checked) {
|
|
|
|
demoApp.titleStyle = "windows"
|
|
|
|
} else {
|
|
|
|
demoApp.titleStyle = "osx"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Text {
|
|
|
|
text: "Win"
|
|
|
|
font.pixelSize: 15
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
}
|
|
|
|
}
|
2021-05-31 12:55:01 +00:00
|
|
|
DemoApp {
|
|
|
|
id: demoApp
|
2022-02-01 15:28:47 +00:00
|
|
|
anchors.centerIn: parent
|
2021-05-31 12:55:01 +00:00
|
|
|
}
|
|
|
|
DropShadow {
|
|
|
|
anchors.fill: demoApp
|
|
|
|
source: demoApp
|
|
|
|
horizontalOffset: 0
|
|
|
|
verticalOffset: 5
|
|
|
|
radius: 20
|
|
|
|
samples: 20
|
|
|
|
color: "#22000000"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-06-01 10:01:47 +00:00
|
|
|
|
2023-03-07 16:08:38 +00:00
|
|
|
Component {
|
|
|
|
id: qrScannerComponent
|
|
|
|
|
2023-03-30 17:57:18 +00:00
|
|
|
QrCodeScannerPage {
|
2023-03-07 16:08:38 +00:00
|
|
|
anchors.fill: parent
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-06-01 10:01:47 +00:00
|
|
|
StatusMacTrafficLights {
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.margins: 13
|
|
|
|
|
2021-08-27 13:21:00 +00:00
|
|
|
visible: Qt.platform.os == "osx"
|
|
|
|
|
|
|
|
onClose: {
|
|
|
|
rootWindow.close()
|
|
|
|
}
|
|
|
|
|
|
|
|
onMinimised: {
|
|
|
|
rootWindow.showMinimized()
|
|
|
|
}
|
|
|
|
|
|
|
|
onMaximized: {
|
|
|
|
rootWindow.toggleFullScreen()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
StatusWindowsTitleBar {
|
|
|
|
anchors.top: parent.top
|
|
|
|
width: parent.width
|
|
|
|
|
|
|
|
visible: Qt.platform.os == "windows"
|
|
|
|
|
2021-06-01 10:01:47 +00:00
|
|
|
onClose: {
|
|
|
|
rootWindow.close()
|
|
|
|
}
|
|
|
|
|
|
|
|
onMinimised: {
|
|
|
|
rootWindow.showMinimized()
|
|
|
|
}
|
|
|
|
|
|
|
|
onMaximized: {
|
|
|
|
rootWindow.toggleFullScreen()
|
|
|
|
}
|
|
|
|
}
|
2022-04-07 18:38:47 +00:00
|
|
|
|
|
|
|
Settings {
|
|
|
|
id: storeSettings
|
2023-05-05 16:05:44 +00:00
|
|
|
|
|
|
|
property alias x: rootWindow.x
|
|
|
|
property alias y: rootWindow.y
|
|
|
|
property alias width: rootWindow.width
|
|
|
|
property alias height: rootWindow.height
|
|
|
|
|
2022-04-07 18:38:47 +00:00
|
|
|
property string selected: ""
|
2022-07-19 10:29:18 +00:00
|
|
|
property string selectedExample: ""
|
2022-04-07 18:38:47 +00:00
|
|
|
property bool lightTheme: true
|
|
|
|
property bool fillPage: false
|
|
|
|
}
|
2021-05-04 18:31:15 +00:00
|
|
|
}
|