3#include <QtCore/QSettings>
4#include <QtCore/QString>
5#include <QtQmlIntegration/QtQmlIntegration>
16 Q_MOC_INCLUDE(
"LinkInterface.h")
32 QString
name()
const {
return _name; }
36 void setLink(
const std::shared_ptr<LinkInterface>
link);
50 void setForwarding(
bool forwarding =
true) { _forwarding = forwarding; };
72#ifndef QGC_NO_SERIAL_LINK
93 virtual
void loadSettings(QSettings &settings, const QString &root) = 0;
98 virtual
void saveSettings(QSettings &settings, const QString &root) const = 0;
116 static QString
settingsRoot() {
return QStringLiteral(
"LinkConfigurations"); }
130 bool _dynamic =
false;
131 bool _forwarding =
false;
132 bool _autoConnect =
false;
133 bool _highLatency =
false;
std::shared_ptr< LinkConfiguration > SharedLinkConfigurationPtr
std::weak_ptr< LinkConfiguration > WeakLinkConfigurationPtr
Interface holding link specific settings.
std::weak_ptr< LinkInterface > _link
Link currently using this configuration (if any)
@ TypeBluetooth
Bluetooth Link.
virtual void loadSettings(QSettings &settings, const QString &root)=0
virtual LinkType type() const =0
static LinkConfiguration * duplicateSettings(const LinkConfiguration *source)
virtual void copyFrom(const LinkConfiguration *source)
bool isAutoConnect() const
void setDynamic(bool dynamic=true)
Set if this is this a dynamic configuration. (decided at runtime)
virtual QString settingsURL() const =0
Settings URL, Pure virtual method providing the URL for the (QML) settings dialog.
virtual void saveSettings(QSettings &settings, const QString &root) const =0
void setHighLatency(bool hl=false)
Set if this is this an High Latency configuration.
static LinkConfiguration * createSettings(int type, const QString &name)
void setForwarding(bool forwarding=true)
Set if this is this a forwarding link configuration. (decided at runtime)
static QString settingsRoot()
LinkInterface * link() const
void autoConnectChanged()
void highLatencyChanged()
void nameChanged(const QString &name)
void setName(const QString &name)
virtual ~LinkConfiguration()
virtual QString settingsTitle() const =0
Settings Title, Pure virtual method providing the Title for the (QML) settings dialog.
void setLink(const std::shared_ptr< LinkInterface > link)
bool isForwarding() const
bool isHighLatency() const
virtual void setAutoConnect(bool autoc=true)
Set if this is this an Auto Connect configuration.
The link interface defines the interface for all links used to communicate with the ground station ap...