|
|
@ -120,75 +120,95 @@ Rectangle { |
|
|
|
id: row1 |
|
|
|
id: row1 |
|
|
|
height: cellHeight |
|
|
|
height: cellHeight |
|
|
|
anchors.left: parent.left |
|
|
|
anchors.left: parent.left |
|
|
|
spacing: cellSpacerSize |
|
|
|
spacing: 4 |
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
anchors.leftMargin: 10 |
|
|
|
anchors.leftMargin: 10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Row { |
|
|
|
|
|
|
|
id: row11 |
|
|
|
|
|
|
|
height: cellHeight |
|
|
|
|
|
|
|
spacing: -12 |
|
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Connections { |
|
|
|
|
|
|
|
target: mainToolBar |
|
|
|
|
|
|
|
onRepaintRequestedChanged: { |
|
|
|
|
|
|
|
setupButton.repaintChevron = true; |
|
|
|
|
|
|
|
planButton.repaintChevron = true; |
|
|
|
|
|
|
|
flyButton.repaintChevron = true; |
|
|
|
|
|
|
|
analyzeButton.repaintChevron = true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ExclusiveGroup { id: mainActionGroup } |
|
|
|
ExclusiveGroup { id: mainActionGroup } |
|
|
|
|
|
|
|
|
|
|
|
QGCButton { |
|
|
|
QGCToolBarButton { |
|
|
|
id: setupButton |
|
|
|
id: setupButton |
|
|
|
width: 90 |
|
|
|
width: 90 |
|
|
|
height: cellHeight |
|
|
|
height: cellHeight |
|
|
|
exclusiveGroup: mainActionGroup |
|
|
|
exclusiveGroup: mainActionGroup |
|
|
|
text: qsTr("1. Setup") |
|
|
|
text: qsTr("Setup") |
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
checked: (mainToolBar.currentView === MainToolBar.ViewSetup) |
|
|
|
checked: (mainToolBar.currentView === MainToolBar.ViewSetup) |
|
|
|
onClicked: { |
|
|
|
onClicked: { |
|
|
|
mainToolBar.onSetupView(); |
|
|
|
mainToolBar.onSetupView(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
z: 1000 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
QGCButton { |
|
|
|
QGCToolBarButton { |
|
|
|
id: planButton |
|
|
|
id: planButton |
|
|
|
width: 90 |
|
|
|
width: 90 |
|
|
|
height: cellHeight |
|
|
|
height: cellHeight |
|
|
|
exclusiveGroup: mainActionGroup |
|
|
|
exclusiveGroup: mainActionGroup |
|
|
|
text: qsTr("2. Plan") |
|
|
|
text: qsTr("Plan") |
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
checked: (mainToolBar.currentView === MainToolBar.ViewPlan) |
|
|
|
checked: (mainToolBar.currentView === MainToolBar.ViewPlan) |
|
|
|
onClicked: { |
|
|
|
onClicked: { |
|
|
|
mainToolBar.onPlanView(); |
|
|
|
mainToolBar.onPlanView(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
z: 900 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
QGCButton { |
|
|
|
QGCToolBarButton { |
|
|
|
id: flyButton |
|
|
|
id: flyButton |
|
|
|
width: 90 |
|
|
|
width: 90 |
|
|
|
height: cellHeight |
|
|
|
height: cellHeight |
|
|
|
exclusiveGroup: mainActionGroup |
|
|
|
exclusiveGroup: mainActionGroup |
|
|
|
text: qsTr("3. Fly") |
|
|
|
text: qsTr("Fly") |
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
checked: (mainToolBar.currentView === MainToolBar.ViewFly) |
|
|
|
checked: (mainToolBar.currentView === MainToolBar.ViewFly) |
|
|
|
onClicked: { |
|
|
|
onClicked: { |
|
|
|
mainToolBar.onFlyView(); |
|
|
|
mainToolBar.onFlyView(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
z: 800 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
QGCButton { |
|
|
|
QGCToolBarButton { |
|
|
|
id: analyzeButton |
|
|
|
id: analyzeButton |
|
|
|
width: 90 |
|
|
|
width: 90 |
|
|
|
height: cellHeight |
|
|
|
height: cellHeight |
|
|
|
exclusiveGroup: mainActionGroup |
|
|
|
exclusiveGroup: mainActionGroup |
|
|
|
text: qsTr("4. Analyze") |
|
|
|
text: qsTr("Analyze") |
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
checked: (mainToolBar.currentView === MainToolBar.ViewAnalyze) |
|
|
|
checked: (mainToolBar.currentView === MainToolBar.ViewAnalyze) |
|
|
|
onClicked: { |
|
|
|
onClicked: { |
|
|
|
mainToolBar.onAnalyzeView(); |
|
|
|
mainToolBar.onAnalyzeView(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
z: 700 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Rectangle { |
|
|
|
|
|
|
|
width: 4 |
|
|
|
|
|
|
|
height: cellHeight |
|
|
|
|
|
|
|
color: "#00000000" |
|
|
|
|
|
|
|
border.color: "#00000000" |
|
|
|
|
|
|
|
border.width: 0 |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Row { |
|
|
|
|
|
|
|
id: row12 |
|
|
|
|
|
|
|
height: cellHeight |
|
|
|
|
|
|
|
spacing: cellSpacerSize |
|
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
|
|
|
|
|
|
|
|
Rectangle { |
|
|
|
Rectangle { |
|
|
|
id: messages |
|
|
|
id: messages |
|
|
|
width: (mainToolBar.newMessageCount > 99) ? 70 : 60 |
|
|
|
width: (mainToolBar.messageCount > 99) ? 70 : 60 |
|
|
|
height: cellHeight |
|
|
|
height: cellHeight |
|
|
|
visible: (mainToolBar.connectionCount > 0) && (mainToolBar.showMessages) |
|
|
|
visible: (mainToolBar.connectionCount > 0) && (mainToolBar.showMessages) |
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
@ -215,7 +235,7 @@ Rectangle { |
|
|
|
width: messages.width - messageIcon.width |
|
|
|
width: messages.width - messageIcon.width |
|
|
|
Text { |
|
|
|
Text { |
|
|
|
id: messageText |
|
|
|
id: messageText |
|
|
|
text: (mainToolBar.newMessageCount > 0) ? mainToolBar.newMessageCount : '' |
|
|
|
text: (mainToolBar.messageCount > 0) ? mainToolBar.messageCount : '' |
|
|
|
font.pointSize: 14 * dpiFactor |
|
|
|
font.pointSize: 14 * dpiFactor |
|
|
|
font.weight: Font.DemiBold |
|
|
|
font.weight: Font.DemiBold |
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
@ -253,12 +273,10 @@ Rectangle { |
|
|
|
mouseOffTimer.start(); |
|
|
|
mouseOffTimer.start(); |
|
|
|
} |
|
|
|
} |
|
|
|
onClicked: { |
|
|
|
onClicked: { |
|
|
|
if(mainToolBar.messageCount > 0) { |
|
|
|
|
|
|
|
var p = mapToItem(toolBarHolder, mouseX, mouseY); |
|
|
|
var p = mapToItem(toolBarHolder, mouseX, mouseY); |
|
|
|
mainToolBar.onEnterMessageArea(p.x, p.y); |
|
|
|
mainToolBar.onEnterMessageArea(p.x, p.y); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -322,7 +340,7 @@ Rectangle { |
|
|
|
height: cellHeight |
|
|
|
height: cellHeight |
|
|
|
visible: showMavStatus() && (mainToolBar.showBattery) |
|
|
|
visible: showMavStatus() && (mainToolBar.showBattery) |
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
color: (mainToolBar.batteryPercent > 40.0 || mainToolBar.batteryPercent < 0.01) ? colorGreen : colorRed |
|
|
|
color: (mainToolBar.batteryPercent > 40.0 || mainToolBar.batteryPercent < 0.01) ? colorBlue : colorRed |
|
|
|
radius: cellRadius |
|
|
|
radius: cellRadius |
|
|
|
border.color: "#00000000" |
|
|
|
border.color: "#00000000" |
|
|
|
border.width: 0 |
|
|
|
border.width: 0 |
|
|
@ -372,7 +390,7 @@ Rectangle { |
|
|
|
font.pointSize: 12 * dpiFactor |
|
|
|
font.pointSize: 12 * dpiFactor |
|
|
|
font.weight: Font.DemiBold |
|
|
|
font.weight: Font.DemiBold |
|
|
|
anchors.centerIn: parent |
|
|
|
anchors.centerIn: parent |
|
|
|
color: (mainToolBar.systemArmed) ? colorRed : colorGreenText |
|
|
|
color: (mainToolBar.systemArmed) ? colorRed : colorGreen |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -391,7 +409,7 @@ Rectangle { |
|
|
|
font.pointSize: 12 * dpiFactor |
|
|
|
font.pointSize: 12 * dpiFactor |
|
|
|
font.weight: Font.DemiBold |
|
|
|
font.weight: Font.DemiBold |
|
|
|
anchors.centerIn: parent |
|
|
|
anchors.centerIn: parent |
|
|
|
color: (mainToolBar.currentState === "STANDBY") ? colorGreenText : colorRed |
|
|
|
color: (mainToolBar.currentState === "STANDBY") ? colorGreen : colorRed |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -438,6 +456,7 @@ Rectangle { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Row { |
|
|
|
Row { |
|
|
|
id: row2 |
|
|
|
id: row2 |
|
|
@ -451,7 +470,6 @@ Rectangle { |
|
|
|
QGCComboBox { |
|
|
|
QGCComboBox { |
|
|
|
id: configList |
|
|
|
id: configList |
|
|
|
width: 200 |
|
|
|
width: 200 |
|
|
|
height: cellHeight |
|
|
|
|
|
|
|
visible: (mainToolBar.connectionCount === 0 && mainToolBar.configList.length > 0) |
|
|
|
visible: (mainToolBar.connectionCount === 0 && mainToolBar.configList.length > 0) |
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
model: mainToolBar.configList |
|
|
|
model: mainToolBar.configList |
|
|
@ -470,7 +488,6 @@ Rectangle { |
|
|
|
QGCButton { |
|
|
|
QGCButton { |
|
|
|
id: connectButton |
|
|
|
id: connectButton |
|
|
|
width: 100 |
|
|
|
width: 100 |
|
|
|
height: cellHeight |
|
|
|
|
|
|
|
visible: (mainToolBar.connectionCount === 0 || mainToolBar.connectionCount === 1) |
|
|
|
visible: (mainToolBar.connectionCount === 0 || mainToolBar.connectionCount === 1) |
|
|
|
text: (mainToolBar.configList.length > 0) ? (mainToolBar.connectionCount === 0) ? qsTr("Connect") : qsTr("Disconnect") : qsTr("Add Link") |
|
|
|
text: (mainToolBar.configList.length > 0) ? (mainToolBar.connectionCount === 0) ? qsTr("Connect") : qsTr("Disconnect") : qsTr("Add Link") |
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
@ -497,7 +514,6 @@ Rectangle { |
|
|
|
QGCButton { |
|
|
|
QGCButton { |
|
|
|
id: multidisconnectButton |
|
|
|
id: multidisconnectButton |
|
|
|
width: 100 |
|
|
|
width: 100 |
|
|
|
height: cellHeight |
|
|
|
|
|
|
|
text: qsTr("Disconnect") |
|
|
|
text: qsTr("Disconnect") |
|
|
|
visible: (mainToolBar.connectionCount > 1) |
|
|
|
visible: (mainToolBar.connectionCount > 1) |
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|