yxdy aa9180d289
Some checks failed
Gallery App Build / Windows (push) Has been cancelled
Gallery App Build / macOS (push) Has been cancelled
Gallery App Build / Ubuntu (push) Has been cancelled
fix: 修改样式
2025-02-19 09:20:59 +08:00

182 lines
5.8 KiB
QML

import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import FluentUI.Controls
import FluentUI.impl
Item {
id: control
signal clickButton(var item)
anchors.topMargin: 0
anchors.leftMargin: 10
Rectangle{
anchors.fill: parent
color: '#272727'
Menu {
id:menu
width: 140
title: qsTr("File")
Action { text: qsTr("New...")}
Action { text: qsTr("Open...") }
Action { text: qsTr("Save") }
MenuSeparator { }
MenuItem{
text: qsTr("Quit")
}
MenuItem{
text: qsTr("Search")
icon.name: FluentIcons.graph_Zoom
icon.width: 14
icon.height: 14
}
Action {
text: qsTr("Disable")
enabled:false
}
MenuSeparator { }
Action { text: qsTr("Check");checkable: true;checked: true}
Menu{
width: 140
title: qsTr("Save As...")
Action { text: qsTr("Doc") }
Action { text: qsTr("PDF") }
}
}
RowLayout {
width: parent.width
height: parent.height
spacing: 5
IconButton{
icon.name: FluentIcons.graph_GlobalNavButton
icon.width: 16
icon.height: 16
topPadding: 10 //bottomPadding
Layout.leftMargin: 5
Layout.preferredHeight: 30
Layout.preferredWidth: 30
onClicked: {
console.log("click")
menu.popup()
}
}
Rectangle{
Layout.minimumWidth: parent.width / 3
Layout.preferredHeight: parent.height
Layout.leftMargin: 10
color: "transparent"
Breadcrumb {
id: breadCrumb
items: [{title: "充换电"}, {title: "耳字壕充换电站规划"}]
width: parent.width
anchors.verticalCenter: parent.verticalCenter
onClickItem: (model)=>{
showSuccess(model.title)
}
}
}
Rectangle{
Layout.fillWidth: true
Layout.fillHeight: true
color: "transparent"
RowLayout{
anchors.top: parent.top
anchors.bottom: parent.bottom
spacing: 10
ToggleButton{
// FluentIcons.graph_GripperResize FluentIcons.graph_Stop
}
ToggleButton{
Layout.fillWidth: false
text: "点"
onClicked: {
control.clickButton("StartAddPoint")
}
}
// ToggleButton{
// Layout.fillWidth: false
// text: "线"
// onClicked: {
// control.clickButton("StartAddPoint")
// }
// }
ToggleButton{
Layout.fillWidth: false
text: "曲线"
onClicked: {
control.clickButton("StartCurve")
}
}
ToggleButton{
Layout.fillWidth: false
text: "面"
onClicked: {
control.clickButton("StartAddPoly")
}
}
ToggleButton{
Layout.fillWidth: false
text: "三角"
onClicked: {
control.clickButton("StartTriangle")
}
}
ToggleButton{
Layout.fillWidth: false
text: "圆"
onClicked: {
control.clickButton("StartCircle")
}
}
ToggleButton{
Layout.fillWidth: false
text: "椭圆"
onClicked: {
control.clickButton("StartEllipse")
}
}
ToggleButton{
Layout.fillWidth: false
text: "自由线"
onClicked: {
control.clickButton("StartFreeLine")
}
}
ToggleButton{
Layout.fillWidth: false
text: "自由面"
onClicked: {
control.clickButton("StartFreeSurface")
}
}
}
}
Rectangle{
Layout.preferredWidth: 100
Layout.preferredHeight: 30
color: "transparent"
// Button{
// text: "运输仿真"
// highlighted: true
// onClicked: {
// WindowRouter.go("/sim",{type:"WindowType.Standard"})
// }
// }
}
}
}
}