Unverified Commit b16a3a1f authored by brad112358's avatar brad112358 Committed by GitHub

Allow use of AutoConnect and HighLatency options for most link types. (#9117)

* Allow use of AutoConnect and HighLatency options for most link types.

* Remove isAutoConnectAllowed and isHighLatencyAllowed methods and assocated Q_PROPERTYs from LinkConfiguration class.  Allow user to configure these properties on all link types.
parent 633d9eb1
......@@ -30,11 +30,9 @@ public:
Q_PROPERTY(LinkType linkType READ type CONSTANT)
Q_PROPERTY(bool dynamic READ isDynamic WRITE setDynamic NOTIFY dynamicChanged)
Q_PROPERTY(bool autoConnect READ isAutoConnect WRITE setAutoConnect NOTIFY autoConnectChanged)
Q_PROPERTY(bool autoConnectAllowed READ isAutoConnectAllowed CONSTANT)
Q_PROPERTY(QString settingsURL READ settingsURL CONSTANT)
Q_PROPERTY(QString settingsTitle READ settingsTitle CONSTANT)
Q_PROPERTY(bool highLatency READ isHighLatency WRITE setHighLatency NOTIFY highLatencyChanged)
Q_PROPERTY(bool highLatencyAllowed READ isHighLatencyAllowed CONSTANT)
// Property accessors
......@@ -90,20 +88,6 @@ public:
/// Virtual Methods
/*!
*
* Is Auto Connect allowed for this type?
* @return True if this type can be set as an Auto Connect configuration
*/
virtual bool isAutoConnectAllowed() { return false; }
/*!
*
* Is High Latency allowed for this type?
* @return True if this type can be set as an High Latency configuration
*/
virtual bool isHighLatencyAllowed() { return false; }
/*!
* @brief Connection type
*
......
......@@ -76,7 +76,6 @@ public:
/// From LinkConfiguration
LinkType type () { return LinkConfiguration::TypeSerial; }
void copyFrom (LinkConfiguration* source);
bool isHighLatencyAllowed () { return true; }
void loadSettings (QSettings& settings, const QString& root);
void saveSettings (QSettings& settings, const QString& root);
void updateSettings ();
......
......@@ -52,7 +52,6 @@ public:
//LinkConfiguration overrides
LinkType type (void) override { return LinkConfiguration::TypeTcp; }
void copyFrom (LinkConfiguration* source) override;
bool isHighLatencyAllowed(void) override { return true; }
void loadSettings (QSettings& settings, const QString& root) override;
void saveSettings (QSettings& settings, const QString& root) override;
QString settingsURL (void) override { return "TcpSettings.qml"; }
......
......@@ -75,8 +75,6 @@ public:
void copyFrom (LinkConfiguration* source) override;
void loadSettings (QSettings& settings, const QString& root) override;
void saveSettings (QSettings& settings, const QString& root) override;
bool isAutoConnectAllowed (void) override { return true; }
bool isHighLatencyAllowed (void) override { return true; }
QString settingsURL (void) override { return "UdpSettings.qml"; }
QString settingsTitle (void) override { return tr("UDP Link Settings"); }
......
......@@ -300,7 +300,6 @@ Rectangle {
QGCCheckBox {
text: qsTr("Automatically Connect on Start")
checked: false
enabled: editConfig ? editConfig.autoConnectAllowed : false
onCheckedChanged: {
if(editConfig) {
editConfig.autoConnect = checked
......@@ -314,7 +313,6 @@ Rectangle {
QGCCheckBox {
text: qsTr("High Latency")
checked: false
enabled: editConfig ? editConfig.highLatencyAllowed : false
onCheckedChanged: {
if(editConfig) {
editConfig.highLatency = checked
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment