2023-02-06 17:15:51 +01:00
|
|
|
// Copyright (C) 2023 The Qt Company Ltd.
|
2023-01-23 11:59:10 +01:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
|
|
|
|
|
2023-02-06 17:15:51 +01:00
|
|
|
import QtQuick
|
|
|
|
|
import QtQuick.Controls
|
|
|
|
|
import StudioControls 1.0 as StudioControls
|
2023-01-23 11:59:10 +01:00
|
|
|
import StudioTheme 1.0 as StudioTheme
|
2023-01-25 19:38:35 +01:00
|
|
|
import "../toolbar"
|
2023-05-12 14:40:23 +02:00
|
|
|
import HelperWidgets 2.0
|
2023-01-25 19:38:35 +01:00
|
|
|
|
|
|
|
|
import ToolBar 1.0
|
2023-01-23 11:59:10 +01:00
|
|
|
|
|
|
|
|
Item {
|
|
|
|
|
id: toolbarContainer
|
|
|
|
|
|
2023-02-02 14:15:54 +01:00
|
|
|
height: 41
|
|
|
|
|
width: 4048
|
2023-01-23 11:59:10 +01:00
|
|
|
|
2023-01-25 19:38:35 +01:00
|
|
|
ToolBarBackend {
|
|
|
|
|
id: backend
|
|
|
|
|
}
|
|
|
|
|
|
2023-01-23 11:59:10 +01:00
|
|
|
Rectangle {
|
2023-02-02 14:15:54 +01:00
|
|
|
color: StudioTheme.Values.themeStatusbarBackground
|
2023-01-23 11:59:10 +01:00
|
|
|
anchors.fill: parent
|
2023-02-06 17:15:51 +01:00
|
|
|
|
2023-02-02 14:15:54 +01:00
|
|
|
Row {
|
|
|
|
|
anchors.fill: parent
|
2023-02-06 17:15:51 +01:00
|
|
|
anchors.topMargin: 3
|
|
|
|
|
anchors.leftMargin: 4
|
2023-02-02 14:15:54 +01:00
|
|
|
spacing: 29
|
2023-02-06 17:15:51 +01:00
|
|
|
|
2023-02-02 14:15:54 +01:00
|
|
|
ToolbarButton {
|
|
|
|
|
id: settingButton
|
|
|
|
|
style: StudioTheme.Values.statusbarButtonStyle
|
|
|
|
|
buttonIcon: StudioTheme.Constants.settings_medium
|
2023-10-30 16:22:57 +01:00
|
|
|
checkable: true
|
|
|
|
|
checkedInverted: true
|
|
|
|
|
checked: backend.isInSessionMode
|
|
|
|
|
onClicked: settingButton.checked ? backend.triggerProjectSettings() : backend.triggerModeChange()
|
|
|
|
|
enabled: backend.projectOpened
|
2023-05-12 14:40:23 +02:00
|
|
|
tooltip: qsTr("Set runtime configuration for the project.")
|
2023-02-02 14:15:54 +01:00
|
|
|
}
|
2023-01-23 11:59:10 +01:00
|
|
|
|
2023-02-02 14:15:54 +01:00
|
|
|
Text {
|
2023-02-06 17:15:51 +01:00
|
|
|
height: StudioTheme.Values.statusbarButtonStyle.controlSize.height
|
2023-02-02 14:15:54 +01:00
|
|
|
color: StudioTheme.Values.themeTextColor
|
2023-02-06 17:15:51 +01:00
|
|
|
text: qsTr("Kit")
|
2023-02-02 14:15:54 +01:00
|
|
|
font.pixelSize: StudioTheme.Values.baseFontSize
|
|
|
|
|
horizontalAlignment: Text.AlignRight
|
|
|
|
|
verticalAlignment: Text.AlignVCenter
|
|
|
|
|
elide: Text.ElideRight
|
2023-05-12 14:40:23 +02:00
|
|
|
ToolTipArea {
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
tooltip: qsTr("Choose a predefined kit for the runtime configuration of the project.")
|
|
|
|
|
}
|
2023-01-25 19:38:35 +01:00
|
|
|
}
|
|
|
|
|
|
2023-02-06 17:15:51 +01:00
|
|
|
StudioControls.TopLevelComboBox {
|
2023-02-02 14:15:54 +01:00
|
|
|
id: kits
|
|
|
|
|
style: StudioTheme.Values.statusbarControlStyle
|
2023-02-06 17:15:51 +01:00
|
|
|
width: 160
|
2023-02-03 16:46:12 +01:00
|
|
|
model: backend.kits
|
|
|
|
|
onActivated: backend.setCurrentKit(kits.currentIndex)
|
2023-02-02 14:15:54 +01:00
|
|
|
openUpwards: true
|
2023-11-24 16:22:24 +01:00
|
|
|
enabled: (backend.isInDesignMode || (backend.isInEditMode && backend.projectOpened))
|
|
|
|
|
&& backend.isQt6 && !backend.isMCUs
|
2023-02-03 16:46:12 +01:00
|
|
|
property int kitIndex: backend.currentKit
|
|
|
|
|
onKitIndexChanged: kits.currentIndex = backend.currentKit
|
2023-02-02 14:15:54 +01:00
|
|
|
}
|
2023-01-25 19:38:35 +01:00
|
|
|
|
2023-02-02 14:15:54 +01:00
|
|
|
Text {
|
2023-02-06 17:15:51 +01:00
|
|
|
height: StudioTheme.Values.statusbarButtonStyle.controlSize.height
|
2023-02-02 14:15:54 +01:00
|
|
|
color: StudioTheme.Values.themeTextColor
|
2023-02-06 17:15:51 +01:00
|
|
|
text: qsTr("Style")
|
2023-02-02 14:15:54 +01:00
|
|
|
font.pixelSize: StudioTheme.Values.baseFontSize
|
|
|
|
|
horizontalAlignment: Text.AlignRight
|
|
|
|
|
verticalAlignment: Text.AlignVCenter
|
|
|
|
|
elide: Text.ElideRight
|
2023-05-12 14:40:23 +02:00
|
|
|
ToolTipArea {
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
tooltip: qsTr("Choose a style for the Qt Quick Controls of the project.")
|
|
|
|
|
}
|
2023-01-25 19:38:35 +01:00
|
|
|
}
|
|
|
|
|
|
2023-02-06 17:15:51 +01:00
|
|
|
StudioControls.TopLevelComboBox {
|
2023-02-02 14:15:54 +01:00
|
|
|
id: styles
|
|
|
|
|
style: StudioTheme.Values.statusbarControlStyle
|
|
|
|
|
width: 160
|
|
|
|
|
model: backend.styles
|
|
|
|
|
onActivated: backend.setCurrentStyle(styles.currentIndex)
|
|
|
|
|
openUpwards: true
|
2023-11-02 15:12:16 +01:00
|
|
|
enabled: backend.isInDesignMode && !backend.isMCUs
|
2023-03-17 14:25:40 +01:00
|
|
|
property int currentStyleIndex: backend.currentStyle
|
2023-11-02 15:12:16 +01:00
|
|
|
onCurrentStyleIndexChanged: styles.currentIndex = backend.currentStyle
|
2023-02-02 14:15:54 +01:00
|
|
|
}
|
2023-01-25 19:38:35 +01:00
|
|
|
}
|
2023-01-23 11:59:10 +01:00
|
|
|
}
|
|
|
|
|
}
|