2020-06-17 19:18:31 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Controls 2.13
|
|
|
|
import QtQuick.Layouts 1.13
|
2020-05-27 20:57:36 +00:00
|
|
|
import "../../../../imports"
|
2020-06-19 18:06:58 +00:00
|
|
|
import "../../../../shared"
|
2020-07-21 21:03:22 +00:00
|
|
|
import "./components"
|
|
|
|
import "./constants.js" as ProfileConstants
|
2020-05-27 20:57:36 +00:00
|
|
|
|
2020-07-21 21:03:22 +00:00
|
|
|
ScrollView {
|
|
|
|
property int profileCurrentIndex: ProfileConstants.PROFILE
|
2020-05-27 20:57:36 +00:00
|
|
|
readonly property int btnheight: 42
|
2020-06-25 16:58:21 +00:00
|
|
|
readonly property int w: 340
|
2020-10-21 14:45:28 +00:00
|
|
|
property var changeProfileSection: function (sectionId) {
|
|
|
|
profileCurrentIndex = sectionId
|
|
|
|
}
|
2020-05-27 20:57:36 +00:00
|
|
|
|
2020-07-21 21:03:22 +00:00
|
|
|
id: profileMenu
|
|
|
|
|
|
|
|
Column {
|
|
|
|
anchors.fill: parent
|
|
|
|
spacing: 8
|
|
|
|
|
|
|
|
Repeater {
|
2021-03-14 16:05:18 +00:00
|
|
|
model: ProfileConstants.mainMenuButtons
|
|
|
|
delegate: MenuButton {
|
|
|
|
menuItemId: modelData.id
|
|
|
|
text: modelData .text
|
|
|
|
source: "../../../img/profile/" + modelData.filename
|
|
|
|
active: profileMenu.profileCurrentIndex === modelData.id
|
|
|
|
Layout.fillWidth: true
|
|
|
|
width: profileMenu.width
|
|
|
|
onClicked: function () {
|
|
|
|
profileMenu.profileCurrentIndex = modelData.id
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
StyledText {
|
|
|
|
topPadding: 10
|
|
|
|
leftPadding: 20
|
|
|
|
text: "Settings"
|
|
|
|
color: Style.current.secondaryText
|
|
|
|
}
|
|
|
|
|
|
|
|
Repeater {
|
|
|
|
model: ProfileConstants.settingsMenuButtons
|
|
|
|
delegate: MenuButton {
|
|
|
|
menuItemId: modelData.id
|
|
|
|
text: modelData .text
|
|
|
|
source: "../../../img/profile/" + modelData.filename
|
|
|
|
active: profileMenu.profileCurrentIndex === modelData.id
|
|
|
|
Layout.fillWidth: true
|
|
|
|
width: profileMenu.width
|
|
|
|
onClicked: function () {
|
|
|
|
profileMenu.profileCurrentIndex = modelData.id
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
StyledText {
|
|
|
|
text: " "
|
|
|
|
}
|
|
|
|
|
|
|
|
Repeater {
|
|
|
|
model: ProfileConstants.extraMenuButtons
|
2020-07-21 21:03:22 +00:00
|
|
|
delegate: MenuButton {
|
2020-10-26 20:20:31 +00:00
|
|
|
menuItemId: modelData.id
|
2020-07-21 21:03:22 +00:00
|
|
|
text: modelData .text
|
2020-08-28 19:09:00 +00:00
|
|
|
source: "../../../img/profile/" + modelData.filename
|
2020-07-21 21:03:22 +00:00
|
|
|
active: profileMenu.profileCurrentIndex === modelData.id
|
|
|
|
Layout.fillWidth: true
|
2021-02-04 19:41:30 +00:00
|
|
|
width: profileMenu.width
|
2020-07-21 21:03:22 +00:00
|
|
|
onClicked: function () {
|
|
|
|
profileMenu.profileCurrentIndex = modelData.id
|
2020-06-17 20:33:44 +00:00
|
|
|
}
|
2020-05-27 20:57:36 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-05-27 21:28:25 +00:00
|
|
|
}
|
2020-07-21 21:03:22 +00:00
|
|
|
|
|
|
|
/*##^##
|
|
|
|
Designer {
|
|
|
|
D{i:0;formeditorColor:"#ffffff";height:500;width:340}
|
|
|
|
}
|
|
|
|
##^##*/
|