23 changed files with 649 additions and 305 deletions
@ -1,35 +1,39 @@
@@ -1,35 +1,39 @@
|
||||
import QtQuick 2.2 |
||||
import QtQuick.Controls 1.2 |
||||
import QtQuick.Controls.Styles 1.2 |
||||
|
||||
import QGroundControl.FactSystem 1.0 |
||||
import QGroundControl.FactControls 1.0 |
||||
import QGroundControl.Controls 1.0 |
||||
import QGroundControl.Controllers 1.0 |
||||
|
||||
Column { |
||||
Fact { id: sysIdFact; name: "MAV_SYS_ID" } |
||||
Fact { id: sysAutoStartFact; name: "SYS_AUTOSTART" } |
||||
FactPanel { |
||||
id: panel |
||||
anchors.fill: parent |
||||
|
||||
property bool autoStartSet: sysAutoStartFact.value != 0 |
||||
AirframeComponentController { id: controller; factPanel: panel } |
||||
|
||||
anchors.fill: parent |
||||
anchors.margins: 8 |
||||
Fact { id: sysIdFact; name: "MAV_SYS_ID"; onFactMissing: showMissingFactOverlay(name) } |
||||
Fact { id: sysAutoStartFact; name: "SYS_AUTOSTART"; onFactMissing: showMissingFactOverlay(name) } |
||||
|
||||
AirframeComponentController { id: controller } |
||||
property bool autoStartSet: sysAutoStartFact.value != 0 |
||||
|
||||
VehicleSummaryRow { |
||||
labelText: "System ID:" |
||||
valueText: sysIdFact.valueString |
||||
} |
||||
Column { |
||||
anchors.fill: parent |
||||
anchors.margins: 8 |
||||
|
||||
VehicleSummaryRow { |
||||
labelText: "Airframe type:" |
||||
valueText: autoStartSet ? controller.currentAirframeType : "Setup required" |
||||
} |
||||
VehicleSummaryRow { |
||||
labelText: "System ID:" |
||||
valueText: sysIdFact.valueString |
||||
} |
||||
|
||||
VehicleSummaryRow { |
||||
labelText: "Airframe type:" |
||||
valueText: autoStartSet ? controller.currentAirframeType : "Setup required" |
||||
} |
||||
|
||||
VehicleSummaryRow { |
||||
labelText: "Vehicle:" |
||||
valueText: autoStartSet ? controller.currentVehicleName : "Setup required" |
||||
VehicleSummaryRow { |
||||
labelText: "Vehicle:" |
||||
valueText: autoStartSet ? controller.currentVehicleName : "Setup required" |
||||
} |
||||
} |
||||
} |
||||
} |
@ -1,36 +1,40 @@
@@ -1,36 +1,40 @@
|
||||
import QtQuick 2.2 |
||||
import QtQuick.Controls 1.2 |
||||
import QtQuick.Controls.Styles 1.2 |
||||
|
||||
import QGroundControl.FactSystem 1.0 |
||||
import QGroundControl.FactControls 1.0 |
||||
import QGroundControl.Controls 1.0 |
||||
|
||||
Column { |
||||
Fact { id: modeSwFact; name: "RC_MAP_MODE_SW" } |
||||
Fact { id: posCtlSwFact; name: "RC_MAP_POSCTL_SW" } |
||||
Fact { id: loiterSwFact; name: "RC_MAP_LOITER_SW" } |
||||
Fact { id: returnSwFact; name: "RC_MAP_RETURN_SW" } |
||||
FactPanel { |
||||
anchors.fill: parent |
||||
|
||||
anchors.fill: parent |
||||
anchors.margins: 8 |
||||
Fact { id: modeSwFact; name: "RC_MAP_MODE_SW"; onFactMissing: showMissingFactOverlay(name) } |
||||
Fact { id: posCtlSwFact; name: "RC_MAP_POSCTL_SW"; onFactMissing: showMissingFactOverlay(name) } |
||||
Fact { id: loiterSwFact; name: "RC_MAP_LOITER_SW"; onFactMissing: showMissingFactOverlay(name) } |
||||
Fact { id: returnSwFact; name: "RC_MAP_RETURN_SW"; onFactMissing: showMissingFactOverlay(name) } |
||||
|
||||
VehicleSummaryRow { |
||||
labelText: "Mode switch:" |
||||
valueText: modeSwFact.value == 0 ? "Setup required" : modeSwFact.valueString |
||||
} |
||||
Column { |
||||
anchors.fill: parent |
||||
anchors.margins: 8 |
||||
|
||||
VehicleSummaryRow { |
||||
labelText: "Position Ctl switch:" |
||||
valueText: posCtlSwFact.value == 0 ? "Disabled" : posCtlSwFact.valueString |
||||
} |
||||
VehicleSummaryRow { |
||||
labelText: "Mode switch:" |
||||
valueText: modeSwFact.value == 0 ? "Setup required" : modeSwFact.valueString |
||||
} |
||||
|
||||
VehicleSummaryRow { |
||||
labelText: "Loiter switch:" |
||||
valueText: loiterSwFact.value == 0 ? "Disabled" : loiterSwFact.valueString |
||||
} |
||||
VehicleSummaryRow { |
||||
labelText: "Position Ctl switch:" |
||||
valueText: posCtlSwFact.value == 0 ? "Disabled" : posCtlSwFact.valueString |
||||
} |
||||
|
||||
VehicleSummaryRow { |
||||
labelText: "Loiter switch:" |
||||
valueText: loiterSwFact.value == 0 ? "Disabled" : loiterSwFact.valueString |
||||
} |
||||
|
||||
VehicleSummaryRow { |
||||
labelText: "Return switch:" |
||||
valueText: returnSwFact.value == 0 ? "Disabled" : returnSwFact.valueString |
||||
VehicleSummaryRow { |
||||
labelText: "Return switch:" |
||||
valueText: returnSwFact.value == 0 ? "Disabled" : returnSwFact.valueString |
||||
} |
||||
} |
||||
} |
||||
|
@ -1,54 +1,58 @@
@@ -1,54 +1,58 @@
|
||||
import QtQuick 2.2 |
||||
import QtQuick.Controls 1.2 |
||||
import QtQuick.Controls.Styles 1.2 |
||||
|
||||
import QGroundControl.FactSystem 1.0 |
||||
import QGroundControl.FactControls 1.0 |
||||
import QGroundControl.Controls 1.0 |
||||
|
||||
Column { |
||||
Fact { id: mapRollFact; name: "RC_MAP_ROLL" } |
||||
Fact { id: mapPitchFact; name: "RC_MAP_PITCH" } |
||||
Fact { id: mapYawFact; name: "RC_MAP_YAW" } |
||||
Fact { id: mapThrottleFact; name: "RC_MAP_THROTTLE" } |
||||
Fact { id: mapFlapsFact; name: "RC_MAP_FLAPS" } |
||||
Fact { id: mapAux1Fact; name: "RC_MAP_AUX1" } |
||||
Fact { id: mapAux2Fact; name: "RC_MAP_AUX2" } |
||||
|
||||
anchors.fill: parent |
||||
anchors.margins: 8 |
||||
|
||||
VehicleSummaryRow { |
||||
labelText: "Roll:" |
||||
valueText: mapRollFact.value == 0 ? "Setup required" : mapRollFact.valueString |
||||
} |
||||
|
||||
VehicleSummaryRow { |
||||
labelText: "Pitch:" |
||||
valueText: mapPitchFact.value == 0 ? "Setup required" : mapPitchFact.valueString |
||||
} |
||||
|
||||
VehicleSummaryRow { |
||||
labelText: "Yaw:" |
||||
valueText: mapYawFact.value == 0 ? "Setup required" : mapYawFact.valueString |
||||
} |
||||
|
||||
VehicleSummaryRow { |
||||
labelText: "Throttle:" |
||||
valueText: mapThrottleFact.value == 0 ? "Setup required" : mapThrottleFact.valueString |
||||
} |
||||
|
||||
VehicleSummaryRow { |
||||
labelText: "Flaps:" |
||||
valueText: mapFlapsFact.value == 0 ? "Disabled" : mapFlapsFact.valueString |
||||
} |
||||
|
||||
VehicleSummaryRow { |
||||
labelText: "Aux1:" |
||||
valueText: mapAux1Fact.value == 0 ? "Disabled" : mapAux1Fact.valueString |
||||
} |
||||
|
||||
VehicleSummaryRow { |
||||
labelText: "Aux2:" |
||||
valueText: mapAux2Fact.value == 0 ? "Disabled" : mapAux2Fact.valueString |
||||
FactPanel { |
||||
anchors.fill: parent |
||||
|
||||
Fact { id: mapRollFact; name: "RC_MAP_ROLL"; onFactMissing: showMissingFactOverlay(name) } |
||||
Fact { id: mapPitchFact; name: "RC_MAP_PITCH"; onFactMissing: showMissingFactOverlay(name) } |
||||
Fact { id: mapYawFact; name: "RC_MAP_YAW"; onFactMissing: showMissingFactOverlay(name) } |
||||
Fact { id: mapThrottleFact; name: "RC_MAP_THROTTLE"; onFactMissing: showMissingFactOverlay(name) } |
||||
Fact { id: mapFlapsFact; name: "RC_MAP_FLAPS"; onFactMissing: showMissingFactOverlay(name) } |
||||
Fact { id: mapAux1Fact; name: "RC_MAP_AUX1"; onFactMissing: showMissingFactOverlay(name) } |
||||
Fact { id: mapAux2Fact; name: "RC_MAP_AUX2"; onFactMissing: showMissingFactOverlay(name) } |
||||
|
||||
Column { |
||||
anchors.fill: parent |
||||
anchors.margins: 8 |
||||
|
||||
VehicleSummaryRow { |
||||
labelText: "Roll:" |
||||
valueText: mapRollFact.value == 0 ? "Setup required" : mapRollFact.valueString |
||||
} |
||||
|
||||
VehicleSummaryRow { |
||||
labelText: "Pitch:" |
||||
valueText: mapPitchFact.value == 0 ? "Setup required" : mapPitchFact.valueString |
||||
} |
||||
|
||||
VehicleSummaryRow { |
||||
labelText: "Yaw:" |
||||
valueText: mapYawFact.value == 0 ? "Setup required" : mapYawFact.valueString |
||||
} |
||||
|
||||
VehicleSummaryRow { |
||||
labelText: "Throttle:" |
||||
valueText: mapThrottleFact.value == 0 ? "Setup required" : mapThrottleFact.valueString |
||||
} |
||||
|
||||
VehicleSummaryRow { |
||||
labelText: "Flaps:" |
||||
valueText: mapFlapsFact.value == 0 ? "Disabled" : mapFlapsFact.valueString |
||||
} |
||||
|
||||
VehicleSummaryRow { |
||||
labelText: "Aux1:" |
||||
valueText: mapAux1Fact.value == 0 ? "Disabled" : mapAux1Fact.valueString |
||||
} |
||||
|
||||
VehicleSummaryRow { |
||||
labelText: "Aux2:" |
||||
valueText: mapAux2Fact.value == 0 ? "Disabled" : mapAux2Fact.valueString |
||||
} |
||||
} |
||||
} |
||||
|
@ -1,43 +1,46 @@
@@ -1,43 +1,46 @@
|
||||
import QtQuick 2.2 |
||||
import QtQuick.Controls 1.2 |
||||
import QtQuick.Controls.Styles 1.2 |
||||
|
||||
import QGroundControl.FactSystem 1.0 |
||||
import QGroundControl.FactControls 1.0 |
||||
import QGroundControl.Controls 1.0 |
||||
|
||||
Column { |
||||
Fact { id: returnAltFact; name: "RTL_RETURN_ALT" } |
||||
Fact { id: descendAltFact; name: "RTL_DESCEND_ALT" } |
||||
Fact { id: landDelayFact; name: "RTL_LAND_DELAY" } |
||||
Fact { id: commDLLossFact; name: "COM_DL_LOSS_EN" } |
||||
Fact { id: commRCLossFact; name: "COM_RC_LOSS_T" } |
||||
|
||||
anchors.fill: parent |
||||
anchors.margins: 8 |
||||
|
||||
VehicleSummaryRow { |
||||
labelText: "RTL min alt:" |
||||
valueText: returnAltFact.valueString |
||||
} |
||||
|
||||
VehicleSummaryRow { |
||||
labelText: "RTL home alt:" |
||||
valueText: descendAltFact.valueString |
||||
} |
||||
|
||||
VehicleSummaryRow { |
||||
labelText: "RTL loiter delay:" |
||||
valueText: landDelayFact.value < 0 ? "Disabled" : landDelayFact.valueString |
||||
} |
||||
|
||||
VehicleSummaryRow { |
||||
labelText: "Telemetry loss RTL:" |
||||
valueText: commDLLossFact.value != -1 ? "Disabled" : commDLLossFact.valueString |
||||
} |
||||
|
||||
VehicleSummaryRow { |
||||
labelText: "RC loss RTL (seconds):" |
||||
valueText: commRCLossFact.valueString |
||||
FactPanel { |
||||
anchors.fill: parent |
||||
|
||||
Fact { id: returnAltFact; name: "RTL_RETURN_ALT"; onFactMissing: showMissingFactOverlay(name) } |
||||
Fact { id: descendAltFact; name: "RTL_DESCEND_ALT"; onFactMissing: showMissingFactOverlay(name) } |
||||
Fact { id: landDelayFact; name: "RTL_LAND_DELAY"; onFactMissing: showMissingFactOverlay(name) } |
||||
Fact { id: commDLLossFact; name: "COM_DL_LOSS_EN"; onFactMissing: showMissingFactOverlay(name) } |
||||
Fact { id: commRCLossFact; name: "COM_RC_LOSS_T"; onFactMissing: showMissingFactOverlay(name) } |
||||
|
||||
Column { |
||||
anchors.fill: parent |
||||
anchors.margins: 8 |
||||
|
||||
VehicleSummaryRow { |
||||
labelText: "RTL min alt:" |
||||
valueText: returnAltFact.valueString |
||||
} |
||||
|
||||
VehicleSummaryRow { |
||||
labelText: "RTL home alt:" |
||||
valueText: descendAltFact.valueString |
||||
} |
||||
|
||||
VehicleSummaryRow { |
||||
labelText: "RTL loiter delay:" |
||||
valueText: landDelayFact.value < 0 ? "Disabled" : landDelayFact.valueString |
||||
} |
||||
|
||||
VehicleSummaryRow { |
||||
labelText: "Telemetry loss RTL:" |
||||
valueText: commDLLossFact.value != -1 ? "Disabled" : commDLLossFact.valueString |
||||
} |
||||
|
||||
VehicleSummaryRow { |
||||
labelText: "RC loss RTL (seconds):" |
||||
valueText: commRCLossFact.valueString |
||||
} |
||||
} |
||||
} |
||||
|
@ -1,40 +1,44 @@
@@ -1,40 +1,44 @@
|
||||
import QtQuick 2.2 |
||||
import QtQuick.Controls 1.2 |
||||
import QtQuick.Controls.Styles 1.2 |
||||
|
||||
import QGroundControl.FactSystem 1.0 |
||||
import QGroundControl.FactControls 1.0 |
||||
import QGroundControl.Controls 1.0 |
||||
|
||||
/* |
||||
IMPORTANT NOTE: Any changes made here must also be made to SensorsComponentSummary.qml |
||||
*/ |
||||
|
||||
Column { |
||||
Fact { id: mag0IdFact; name: "CAL_MAG0_ID" } |
||||
Fact { id: gyro0IdFact; name: "CAL_GYRO0_ID" } |
||||
Fact { id: accel0IdFact; name: "CAL_ACC0_ID" } |
||||
Fact { id: dPressOffFact; name: "SENS_DPRES_OFF" } |
||||
|
||||
anchors.fill: parent |
||||
anchors.margins: 8 |
||||
|
||||
VehicleSummaryRow { |
||||
labelText: "Compass:" |
||||
valueText: mag0IdFact.value == 0 ? "Setup required" : "Ready" |
||||
} |
||||
|
||||
VehicleSummaryRow { |
||||
labelText: "Gyro:" |
||||
valueText: gyro0IdFact.value == 0 ? "Setup required" : "Ready" |
||||
} |
||||
|
||||
VehicleSummaryRow { |
||||
labelText: "Accelerometer:" |
||||
valueText: accel0IdFact.value == 0 ? "Setup required" : "Ready" |
||||
} |
||||
|
||||
VehicleSummaryRow { |
||||
labelText: "Airspeed:" |
||||
valueText: dPressOffFact.value == 0 ? "Setup required" : "Ready" |
||||
FactPanel { |
||||
anchors.fill: parent |
||||
|
||||
Fact { id: mag0IdFact; name: "CAL_MAG0_ID"; onFactMissing: showMissingFactOverlay(name) } |
||||
Fact { id: gyro0IdFact; name: "CAL_GYRO0_ID"; onFactMissing: showMissingFactOverlay(name) } |
||||
Fact { id: accel0IdFact; name: "CAL_ACC0_ID"; onFactMissing: showMissingFactOverlay(name) } |
||||
Fact { id: dPressOffFact; name: "SENS_DPRES_OFF"; onFactMissing: showMissingFactOverlay(name) } |
||||
|
||||
Column { |
||||
anchors.fill: parent |
||||
anchors.margins: 8 |
||||
|
||||
VehicleSummaryRow { |
||||
labelText: "Compass:" |
||||
valueText: mag0IdFact.value == 0 ? "Setup required" : "Ready" |
||||
} |
||||
|
||||
VehicleSummaryRow { |
||||
labelText: "Gyro:" |
||||
valueText: gyro0IdFact.value == 0 ? "Setup required" : "Ready" |
||||
} |
||||
|
||||
VehicleSummaryRow { |
||||
labelText: "Accelerometer:" |
||||
valueText: accel0IdFact.value == 0 ? "Setup required" : "Ready" |
||||
} |
||||
|
||||
VehicleSummaryRow { |
||||
labelText: "Airspeed:" |
||||
valueText: dPressOffFact.value == 0 ? "Setup required" : "Ready" |
||||
} |
||||
} |
||||
} |
||||
|
@ -0,0 +1,61 @@
@@ -0,0 +1,61 @@
|
||||
/*===================================================================== |
||||
|
||||
QGroundControl Open Source Ground Control Station |
||||
|
||||
(c) 2009 - 2015 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org> |
||||
|
||||
This file is part of the QGROUNDCONTROL project |
||||
|
||||
QGROUNDCONTROL is free software: you can redistribute it and/or modify |
||||
it under the terms of the GNU General Public License as published by |
||||
the Free Software Foundation, either version 3 of the License, or |
||||
(at your option) any later version. |
||||
|
||||
QGROUNDCONTROL is distributed in the hope that it will be useful, |
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
GNU General Public License for more details. |
||||
|
||||
You should have received a copy of the GNU General Public License |
||||
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>. |
||||
|
||||
======================================================================*/ |
||||
|
||||
/// @file |
||||
/// @author Don Gagne <don@thegagnes.com> |
||||
|
||||
import QtQuick 2.3 |
||||
import QtQuick.Controls 1.3 |
||||
|
||||
import QGroundControl.FactSystem 1.0 |
||||
import QGroundControl.Controls 1.0 |
||||
import QGroundControl.Palette 1.0 |
||||
|
||||
Item { |
||||
property string __missingFacts: "" |
||||
|
||||
function showMissingFactOverlay(missingFactName) { |
||||
if (__missingFacts.length != 0) { |
||||
__missingFacts = __missingFacts.concat(", ") |
||||
} |
||||
__missingFacts = __missingFacts.concat(missingFactName) |
||||
__missingFactOverlay.visible = true |
||||
} |
||||
|
||||
Rectangle { |
||||
QGCPalette { id: __qgcPal; colorGroupEnabled: true } |
||||
|
||||
id: __missingFactOverlay |
||||
anchors.fill: parent |
||||
z: 9999 |
||||
visible: false |
||||
color: __qgcPal.window |
||||
opacity: 0.85 |
||||
|
||||
QGCLabel { |
||||
anchors.fill: parent |
||||
wrapMode: Text.WordWrap |
||||
text: "Fact(s) missing: " + __missingFacts |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,108 @@
@@ -0,0 +1,108 @@
|
||||
/*=====================================================================
|
||||
|
||||
QGroundControl Open Source Ground Control Station |
||||
|
||||
(c) 2009 - 2014 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
|
||||
|
||||
This file is part of the QGROUNDCONTROL project |
||||
|
||||
QGROUNDCONTROL is free software: you can redistribute it and/or modify |
||||
it under the terms of the GNU General Public License as published by |
||||
the Free Software Foundation, either version 3 of the License, or |
||||
(at your option) any later version. |
||||
|
||||
QGROUNDCONTROL is distributed in the hope that it will be useful, |
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
GNU General Public License for more details. |
||||
|
||||
You should have received a copy of the GNU General Public License |
||||
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
======================================================================*/ |
||||
|
||||
#include "FactPanelController.h" |
||||
#include "UASManager.h" |
||||
#include "AutoPilotPluginManager.h" |
||||
#include "QGCMessageBox.h" |
||||
|
||||
/// @file
|
||||
/// @author Don Gagne <don@thegagnes.com>
|
||||
|
||||
FactPanelController::FactPanelController(void) : |
||||
_autopilot(NULL), |
||||
_factPanel(NULL) |
||||
{ |
||||
UASInterface* uas = UASManager::instance()->getActiveUAS(); |
||||
Q_ASSERT(uas); |
||||
|
||||
_autopilot = AutoPilotPluginManager::instance()->getInstanceForAutoPilotPlugin(uas); |
||||
Q_ASSERT(_autopilot); |
||||
Q_ASSERT(_autopilot->pluginReady()); |
||||
|
||||
// Do a delayed check for the _factPanel finally being set correctly from Qml
|
||||
QTimer::singleShot(1000, this, &FactPanelController::_checkForMissingFactPanel); |
||||
} |
||||
|
||||
QQuickItem* FactPanelController::factPanel(void) |
||||
{ |
||||
return _factPanel; |
||||
} |
||||
|
||||
void FactPanelController::setFactPanel(QQuickItem* panel) |
||||
{ |
||||
// Once we finally have the _factPanel member set send any
|
||||
// missing fact notices that were waiting to go out
|
||||
|
||||
_factPanel = panel; |
||||
foreach (QString missingFact, _delayedMissingFacts) { |
||||
_notifyPanelMissingFact(missingFact); |
||||
} |
||||
_delayedMissingFacts.clear(); |
||||
} |
||||
|
||||
void FactPanelController::_notifyPanelMissingFact(const QString& missingFact) |
||||
{ |
||||
QVariant returnedValue; |
||||
|
||||
QMetaObject::invokeMethod(_factPanel, |
||||
"showMissingFactOverlay", |
||||
Q_RETURN_ARG(QVariant, returnedValue), |
||||
Q_ARG(QVariant, missingFact)); |
||||
} |
||||
|
||||
void FactPanelController::_reportMissingFact(const QString& missingFact) |
||||
{ |
||||
qgcApp()->reportMissingFact(missingFact); |
||||
|
||||
// If missing facts a reported from the constructor of a derived class we
|
||||
// will not have access to _factPanel yet. Just record list of missing facts
|
||||
// in that case instead of notify. Once _factPanel is available they will be
|
||||
// send out for real.
|
||||
if (_factPanel) { |
||||
_notifyPanelMissingFact(missingFact); |
||||
} else { |
||||
_delayedMissingFacts += missingFact; |
||||
} |
||||
} |
||||
|
||||
bool FactPanelController::_allFactsExists(QStringList factList) |
||||
{ |
||||
bool noMissingFacts = true; |
||||
|
||||
foreach (QString fact, factList) { |
||||
if (!_autopilot->parameterExists(fact)) { |
||||
_reportMissingFact(fact); |
||||
noMissingFacts = false; |
||||
} |
||||
} |
||||
|
||||
return noMissingFacts; |
||||
} |
||||
|
||||
void FactPanelController::_checkForMissingFactPanel(void) |
||||
{ |
||||
if (!_factPanel) { |
||||
QGCMessageBox::critical("Incorrect FactPanel Qml implementation", "FactPanelController used without passing in factPanel. This could lead to non-functioning user interface being displayed."); |
||||
} |
||||
} |
@ -0,0 +1,71 @@
@@ -0,0 +1,71 @@
|
||||
/*=====================================================================
|
||||
|
||||
QGroundControl Open Source Ground Control Station |
||||
|
||||
(c) 2009 - 2014 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
|
||||
|
||||
This file is part of the QGROUNDCONTROL project |
||||
|
||||
QGROUNDCONTROL is free software: you can redistribute it and/or modify |
||||
it under the terms of the GNU General Public License as published by |
||||
the Free Software Foundation, either version 3 of the License, or |
||||
(at your option) any later version. |
||||
|
||||
QGROUNDCONTROL is distributed in the hope that it will be useful, |
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
GNU General Public License for more details. |
||||
|
||||
You should have received a copy of the GNU General Public License |
||||
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
======================================================================*/ |
||||
|
||||
#ifndef FactPanelController_H |
||||
#define FactPanelController_H |
||||
|
||||
/// @file
|
||||
/// @author Don Gagne <don@thegagnes.com>
|
||||
|
||||
#include <QObject> |
||||
#include <QQuickItem> |
||||
|
||||
#include "UASInterface.h" |
||||
#include "AutoPilotPlugin.h" |
||||
#include "UASManagerInterface.h" |
||||
|
||||
/// FactPanelController is used in combination with the FactPanel Qml control for handling
|
||||
/// missing Facts from C++ code.
|
||||
class FactPanelController : public QObject |
||||
{ |
||||
Q_OBJECT |
||||
|
||||
public: |
||||
FactPanelController(void); |
||||
|
||||
Q_PROPERTY(QQuickItem* factPanel READ factPanel WRITE setFactPanel) |
||||
|
||||
QQuickItem* factPanel(void); |
||||
void setFactPanel(QQuickItem* panel); |
||||
|
||||
protected: |
||||
/// Checks for existence of the specified facts
|
||||
/// @return true: all facts exists, false: facts missing and reported
|
||||
bool _allFactsExists(QStringList factList); |
||||
|
||||
/// Report a missing fact to the FactPanel Qml element
|
||||
void _reportMissingFact(const QString& missingFact); |
||||
|
||||
AutoPilotPlugin* _autopilot; |
||||
|
||||
private slots: |
||||
void _checkForMissingFactPanel(void); |
||||
|
||||
private: |
||||
void _notifyPanelMissingFact(const QString& missingFact); |
||||
|
||||
QQuickItem* _factPanel; |
||||
QStringList _delayedMissingFacts; |
||||
}; |
||||
|
||||
#endif |
@ -1,5 +1,6 @@
@@ -1,5 +1,6 @@
|
||||
Module QGroundControl.FactControls |
||||
|
||||
FactPanel 1.0 FactPanel.qml |
||||
FactLabel 1.0 FactLabel.qml |
||||
FactTextField 1.0 FactTextField.qml |
||||
FactCheckBox 1.0 FactCheckBox.qml |
||||
|
Loading…
Reference in new issue