26 #include <QtCore/qglobal.h>
30 #include <QInputDialog>
39 , resetDefaults_flag(false)
40 , saveMetadata_flag(false)
44 metadata_editor.setupUi(
this);
50 metadata_editor.bnApplyMetadata->setVisible(
false);
64 connect(metadata_editor.bnApplyMetadata, &QAbstractButton::clicked,
this,
65 &MetadataDialog::saveApplyMetadata);
66 connect(metadata_editor.bnSaveMetadata, &QAbstractButton::clicked,
this,
67 &MetadataDialog::saveApplyMetadata);
68 connect(metadata_editor.bnCancel, &QAbstractButton::clicked,
this,
69 &MetadataDialog::cancelChanges);
70 connect(metadata_editor.bnResetToDefaults, &QAbstractButton::clicked,
this,
71 &MetadataDialog::resetMetadataToDefaults);
82 void MetadataDialog::saveApplyMetadata()
85 if (QObject::sender() == metadata_editor.bnSaveMetadata)
86 saveMetadata_flag =
true;
87 else if (QObject::sender() == metadata_editor.bnApplyMetadata)
88 saveMetadata_flag =
false;
103 int currentFlightIdx = metadata_editor.cmbFlightTelemetryMode->currentIndex();
104 int currentGCSIdx = metadata_editor.cmbGCSTelemetryMode->currentIndex();
117 void MetadataDialog::cancelChanges()
122 void MetadataDialog::resetMetadataToDefaults()
124 resetDefaults_flag =
true;
131 void MetadataDialog::fillWidgets()
141 metadata_editor.cmbFlightTelemetryMode->setCurrentIndex(
142 metadata_editor.cmbFlightTelemetryMode->findData(accessType));
146 metadata_editor.cmbGCSTelemetryMode->setCurrentIndex(
147 metadata_editor.cmbGCSTelemetryMode->findData(accessType));
static void SetFlightTelemetryAcked(Metadata &meta, quint8 val)
static UpdateMode GetFlightTelemetryUpdateMode(const Metadata &meta)
static void SetFlightAccess(Metadata &meta, AccessMode mode)
Core plugin system that manages the plugins, their life cycle and their registered objects...
static void SetGcsTelemetryAcked(Metadata &meta, quint8 val)
static UpdateMode GetGcsTelemetryUpdateMode(const Metadata &meta)
static quint8 GetFlightTelemetryAcked(const Metadata &meta)
static void SetGcsAccess(Metadata &meta, AccessMode mode)
static void SetFlightTelemetryUpdateMode(Metadata &meta, UpdateMode val)
MetadataDialog(UAVObject::Metadata mdata, QWidget *parent=nullptr)
static AccessMode GetFlightAccess(const Metadata &meta)
static void SetGcsTelemetryUpdateMode(Metadata &meta, UpdateMode val)
bool useExpertMode() const
static quint8 GetGcsTelemetryAcked(const Metadata &meta)
static AccessMode GetGcsAccess(const Metadata &meta)