mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-04-04 18:48:34 -04:00
APRS feature: Make settings assignments atomic. Part of #1329
This commit is contained in:
parent
387863fde4
commit
6a3c4d8312
@ -160,7 +160,11 @@ void AFCWorker::applySettings(const AFCSettings& settings, const QList<QString>&
|
||||
}
|
||||
}
|
||||
|
||||
m_settings = settings;
|
||||
if (force) {
|
||||
m_settings = settings;
|
||||
} else {
|
||||
m_settings.applySettings(settingsKeys, settings);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -102,7 +102,7 @@ void APRS::start()
|
||||
m_thread->start();
|
||||
m_state = StRunning;
|
||||
|
||||
APRSWorker::MsgConfigureAPRSWorker *msg = APRSWorker::MsgConfigureAPRSWorker::create(m_settings, true);
|
||||
APRSWorker::MsgConfigureAPRSWorker *msg = APRSWorker::MsgConfigureAPRSWorker::create(m_settings, QList<QString>(), true);
|
||||
m_worker->getInputMessageQueue()->push(msg);
|
||||
}
|
||||
|
||||
@ -125,7 +125,7 @@ bool APRS::handleMessage(const Message& cmd)
|
||||
{
|
||||
MsgConfigureAPRS& cfg = (MsgConfigureAPRS&) cmd;
|
||||
qDebug() << "APRS::handleMessage: MsgConfigureAPRS";
|
||||
applySettings(cfg.getSettings(), cfg.getForce());
|
||||
applySettings(cfg.getSettings(), cfg.getSettingsKeys(), cfg.getForce());
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -178,65 +178,48 @@ bool APRS::deserialize(const QByteArray& data)
|
||||
{
|
||||
if (m_settings.deserialize(data))
|
||||
{
|
||||
MsgConfigureAPRS *msg = MsgConfigureAPRS::create(m_settings, true);
|
||||
MsgConfigureAPRS *msg = MsgConfigureAPRS::create(m_settings, QList<QString>(), true);
|
||||
m_inputMessageQueue.push(msg);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_settings.resetToDefaults();
|
||||
MsgConfigureAPRS *msg = MsgConfigureAPRS::create(m_settings, true);
|
||||
MsgConfigureAPRS *msg = MsgConfigureAPRS::create(m_settings, QList<QString>(), true);
|
||||
m_inputMessageQueue.push(msg);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void APRS::applySettings(const APRSSettings& settings, bool force)
|
||||
void APRS::applySettings(const APRSSettings& settings, const QList<QString>& settingsKeys, bool force)
|
||||
{
|
||||
qDebug() << "APRS::applySettings:"
|
||||
<< " m_igateEnabled: " << settings.m_igateEnabled
|
||||
<< " m_title: " << settings.m_title
|
||||
<< " m_rgbColor: " << settings.m_rgbColor
|
||||
<< " m_useReverseAPI: " << settings.m_useReverseAPI
|
||||
<< " m_reverseAPIAddress: " << settings.m_reverseAPIAddress
|
||||
<< " m_reverseAPIPort: " << settings.m_reverseAPIPort
|
||||
<< " m_reverseAPIFeatureSetIndex: " << settings.m_reverseAPIFeatureSetIndex
|
||||
<< " m_reverseAPIFeatureIndex: " << settings.m_reverseAPIFeatureIndex
|
||||
<< " force: " << force;
|
||||
qDebug() << "APRS::applySettings:" << settings.getDebugString(settingsKeys, force) << " force: " << force;
|
||||
|
||||
QList<QString> reverseAPIKeys;
|
||||
|
||||
if ((m_settings.m_igateEnabled != settings.m_igateEnabled) || force)
|
||||
if (settingsKeys.contains("igateEnabled") || force)
|
||||
{
|
||||
if (settings.m_igateEnabled)
|
||||
start();
|
||||
else
|
||||
stop();
|
||||
reverseAPIKeys.append("igateEnabled");
|
||||
}
|
||||
|
||||
if ((m_settings.m_title != settings.m_title) || force) {
|
||||
reverseAPIKeys.append("title");
|
||||
}
|
||||
if ((m_settings.m_rgbColor != settings.m_rgbColor) || force) {
|
||||
reverseAPIKeys.append("rgbColor");
|
||||
}
|
||||
|
||||
APRSWorker::MsgConfigureAPRSWorker *msg = APRSWorker::MsgConfigureAPRSWorker::create(
|
||||
settings, force
|
||||
settings, settingsKeys, force
|
||||
);
|
||||
|
||||
if (m_worker) {
|
||||
m_worker->getInputMessageQueue()->push(msg);
|
||||
}
|
||||
|
||||
if (settings.m_useReverseAPI)
|
||||
if (settingsKeys.contains("useReverseAPI"))
|
||||
{
|
||||
bool fullUpdate = ((m_settings.m_useReverseAPI != settings.m_useReverseAPI) && settings.m_useReverseAPI) ||
|
||||
(m_settings.m_reverseAPIAddress != settings.m_reverseAPIAddress) ||
|
||||
(m_settings.m_reverseAPIPort != settings.m_reverseAPIPort) ||
|
||||
(m_settings.m_reverseAPIFeatureSetIndex != settings.m_reverseAPIFeatureSetIndex) ||
|
||||
(m_settings.m_reverseAPIFeatureIndex != settings.m_reverseAPIFeatureIndex);
|
||||
webapiReverseSendSettings(reverseAPIKeys, settings, fullUpdate || force);
|
||||
bool fullUpdate = (settingsKeys.contains("useReverseAPI") && settings.m_useReverseAPI) ||
|
||||
settingsKeys.contains("reverseAPIAddress") ||
|
||||
settingsKeys.contains("reverseAPIPort") ||
|
||||
settingsKeys.contains("reverseAPIFeatureSetIndex") ||
|
||||
settingsKeys.contains("m_reverseAPIFeatureIndex");
|
||||
webapiReverseSendSettings(settingsKeys, settings, fullUpdate || force);
|
||||
}
|
||||
|
||||
m_settings = settings;
|
||||
@ -276,13 +259,13 @@ int APRS::webapiSettingsPutPatch(
|
||||
APRSSettings settings = m_settings;
|
||||
webapiUpdateFeatureSettings(settings, featureSettingsKeys, response);
|
||||
|
||||
MsgConfigureAPRS *msg = MsgConfigureAPRS::create(settings, force);
|
||||
MsgConfigureAPRS *msg = MsgConfigureAPRS::create(settings, featureSettingsKeys, force);
|
||||
m_inputMessageQueue.push(msg);
|
||||
|
||||
qDebug("APRS::webapiSettingsPutPatch: forward to GUI: %p", m_guiMessageQueue);
|
||||
if (m_guiMessageQueue) // forward to GUI if any
|
||||
{
|
||||
MsgConfigureAPRS *msgToGUI = MsgConfigureAPRS::create(settings, force);
|
||||
MsgConfigureAPRS *msgToGUI = MsgConfigureAPRS::create(settings, featureSettingsKeys, force);
|
||||
m_guiMessageQueue->push(msgToGUI);
|
||||
}
|
||||
|
||||
@ -335,6 +318,137 @@ void APRS::webapiFormatFeatureSettings(
|
||||
}
|
||||
}
|
||||
|
||||
// 1
|
||||
if (!response.getAprsSettings()->getPacketsTableColumnIndexes()) {
|
||||
response.getAprsSettings()->setPacketsTableColumnIndexes(new QList<int>());
|
||||
}
|
||||
|
||||
response.getAprsSettings()->getPacketsTableColumnIndexes()->clear();
|
||||
|
||||
for (int i = 0; i < APRS_PACKETS_TABLE_COLUMNS; i++) {
|
||||
response.getAprsSettings()->getPacketsTableColumnIndexes()->push_back(settings.m_packetsTableColumnIndexes[i]);
|
||||
}
|
||||
|
||||
// 2
|
||||
if (!response.getAprsSettings()->getPacketsTableColumnSizes()) {
|
||||
response.getAprsSettings()->setPacketsTableColumnSizes(new QList<int>());
|
||||
}
|
||||
|
||||
response.getAprsSettings()->getPacketsTableColumnSizes()->clear();
|
||||
|
||||
for (int i = 0; i < APRS_PACKETS_TABLE_COLUMNS; i++) {
|
||||
response.getAprsSettings()->getPacketsTableColumnSizes()->push_back(settings.m_packetsTableColumnSizes[i]);
|
||||
}
|
||||
|
||||
// 3
|
||||
if (!response.getAprsSettings()->getWeatherTableColumnIndexes()) {
|
||||
response.getAprsSettings()->setWeatherTableColumnIndexes(new QList<int>());
|
||||
}
|
||||
|
||||
response.getAprsSettings()->getWeatherTableColumnIndexes()->clear();
|
||||
|
||||
for (int i = 0; i < APRS_WEATHER_TABLE_COLUMNS; i++) {
|
||||
response.getAprsSettings()->getWeatherTableColumnIndexes()->push_back(settings.m_weatherTableColumnIndexes[i]);
|
||||
}
|
||||
|
||||
// 4
|
||||
if (!response.getAprsSettings()->getWeatherTableColumnSizes()) {
|
||||
response.getAprsSettings()->setWeatherTableColumnSizes(new QList<int>());
|
||||
}
|
||||
|
||||
response.getAprsSettings()->getWeatherTableColumnSizes()->clear();
|
||||
|
||||
for (int i = 0; i < APRS_WEATHER_TABLE_COLUMNS; i++) {
|
||||
response.getAprsSettings()->getWeatherTableColumnSizes()->push_back(settings.m_weatherTableColumnSizes[i]);
|
||||
}
|
||||
|
||||
// 5
|
||||
if (!response.getAprsSettings()->getStatusTableColumnIndexes()) {
|
||||
response.getAprsSettings()->setStatusTableColumnIndexes(new QList<int>());
|
||||
}
|
||||
|
||||
response.getAprsSettings()->getStatusTableColumnIndexes()->clear();
|
||||
|
||||
for (int i = 0; i < APRS_STATUS_TABLE_COLUMNS; i++) {
|
||||
response.getAprsSettings()->getStatusTableColumnIndexes()->push_back(settings.m_statusTableColumnIndexes[i]);
|
||||
}
|
||||
|
||||
// 6
|
||||
if (!response.getAprsSettings()->getStatusTableColumnSizes()) {
|
||||
response.getAprsSettings()->setStatusTableColumnSizes(new QList<int>());
|
||||
}
|
||||
|
||||
response.getAprsSettings()->getStatusTableColumnSizes()->clear();
|
||||
|
||||
for (int i = 0; i < APRS_STATUS_TABLE_COLUMNS; i++) {
|
||||
response.getAprsSettings()->getStatusTableColumnSizes()->push_back(settings.m_statusTableColumnSizes[i]);
|
||||
}
|
||||
|
||||
// 7
|
||||
if (!response.getAprsSettings()->getMessagesTableColumnIndexes()) {
|
||||
response.getAprsSettings()->setMessagesTableColumnIndexes(new QList<int>());
|
||||
}
|
||||
|
||||
response.getAprsSettings()->getMessagesTableColumnIndexes()->clear();
|
||||
|
||||
for (int i = 0; i < APRS_MESSAGES_TABLE_COLUMNS; i++) {
|
||||
response.getAprsSettings()->getMessagesTableColumnIndexes()->push_back(settings.m_messagesTableColumnIndexes[i]);
|
||||
}
|
||||
|
||||
// 8
|
||||
if (!response.getAprsSettings()->getMessagesTableColumnSizes()) {
|
||||
response.getAprsSettings()->setMessagesTableColumnSizes(new QList<int>());
|
||||
}
|
||||
|
||||
response.getAprsSettings()->getMessagesTableColumnSizes()->clear();
|
||||
|
||||
for (int i = 0; i < APRS_MESSAGES_TABLE_COLUMNS; i++) {
|
||||
response.getAprsSettings()->getMessagesTableColumnSizes()->push_back(settings.m_messagesTableColumnSizes[i]);
|
||||
}
|
||||
|
||||
// 9
|
||||
if (!response.getAprsSettings()->getTelemetryTableColumnIndexes()) {
|
||||
response.getAprsSettings()->setTelemetryTableColumnIndexes(new QList<int>());
|
||||
}
|
||||
|
||||
response.getAprsSettings()->getTelemetryTableColumnIndexes()->clear();
|
||||
|
||||
for (int i = 0; i < APRS_TELEMETRY_TABLE_COLUMNS; i++) {
|
||||
response.getAprsSettings()->getTelemetryTableColumnIndexes()->push_back(settings.m_telemetryTableColumnIndexes[i]);
|
||||
}
|
||||
|
||||
// 10
|
||||
if (!response.getAprsSettings()->getTelemetryTableColumnSizes()) {
|
||||
response.getAprsSettings()->setTelemetryTableColumnSizes(new QList<int>());
|
||||
}
|
||||
|
||||
response.getAprsSettings()->getTelemetryTableColumnSizes()->clear();
|
||||
|
||||
for (int i = 0; i < APRS_TELEMETRY_TABLE_COLUMNS; i++) {
|
||||
response.getAprsSettings()->getTelemetryTableColumnSizes()->push_back(settings.m_telemetryTableColumnSizes[i]);
|
||||
}
|
||||
|
||||
// 11
|
||||
if (!response.getAprsSettings()->getMotionTableColumnIndexes()) {
|
||||
response.getAprsSettings()->setMotionTableColumnIndexes(new QList<int>());
|
||||
}
|
||||
|
||||
response.getAprsSettings()->getMotionTableColumnIndexes()->clear();
|
||||
|
||||
for (int i = 0; i < APRS_MOTION_TABLE_COLUMNS; i++) {
|
||||
response.getAprsSettings()->getMotionTableColumnIndexes()->push_back(settings.m_motionTableColumnIndexes[i]);
|
||||
}
|
||||
|
||||
// 12
|
||||
if (!response.getAprsSettings()->getMotionTableColumnSizes()) {
|
||||
response.getAprsSettings()->setMotionTableColumnSizes(new QList<int>());
|
||||
}
|
||||
|
||||
response.getAprsSettings()->getMotionTableColumnSizes()->clear();
|
||||
|
||||
for (int i = 0; i < APRS_MOTION_TABLE_COLUMNS; i++) {
|
||||
response.getAprsSettings()->getMotionTableColumnSizes()->push_back(settings.m_motionTableColumnSizes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void APRS::webapiUpdateFeatureSettings(
|
||||
@ -381,9 +495,129 @@ void APRS::webapiUpdateFeatureSettings(
|
||||
if (settings.m_rollupState && featureSettingsKeys.contains("rollupState")) {
|
||||
settings.m_rollupState->updateFrom(featureSettingsKeys, response.getAprsSettings()->getRollupState());
|
||||
}
|
||||
|
||||
// 1
|
||||
if (featureSettingsKeys.contains("packetsTableColumnIndexes"))
|
||||
{
|
||||
const QList<int> *indexes = response.getAprsSettings()->getPacketsTableColumnIndexes();
|
||||
|
||||
for (int i = 0; i < APRS_PACKETS_TABLE_COLUMNS; i++) {
|
||||
settings.m_packetsTableColumnIndexes[i] = (*indexes)[i];
|
||||
}
|
||||
}
|
||||
|
||||
// 2
|
||||
if (featureSettingsKeys.contains("packetsTableColumnSizes"))
|
||||
{
|
||||
const QList<int> *indexes = response.getAprsSettings()->getPacketsTableColumnSizes();
|
||||
|
||||
for (int i = 0; i < APRS_PACKETS_TABLE_COLUMNS; i++) {
|
||||
settings.m_packetsTableColumnSizes[i] = (*indexes)[i];
|
||||
}
|
||||
}
|
||||
|
||||
// 3
|
||||
if (featureSettingsKeys.contains("weatherTableColumnIndexes"))
|
||||
{
|
||||
const QList<int> *indexes = response.getAprsSettings()->getWeatherTableColumnIndexes();
|
||||
|
||||
for (int i = 0; i < APRS_WEATHER_TABLE_COLUMNS; i++) {
|
||||
settings.m_weatherTableColumnIndexes[i] = (*indexes)[i];
|
||||
}
|
||||
}
|
||||
|
||||
// 4
|
||||
if (featureSettingsKeys.contains("packetsTableColumnIndexes"))
|
||||
{
|
||||
const QList<int> *indexes = response.getAprsSettings()->getWeatherTableColumnSizes();
|
||||
|
||||
for (int i = 0; i < APRS_WEATHER_TABLE_COLUMNS; i++) {
|
||||
settings.m_weatherTableColumnSizes[i] = (*indexes)[i];
|
||||
}
|
||||
}
|
||||
|
||||
// 5
|
||||
if (featureSettingsKeys.contains("statusTableColumnIndexes"))
|
||||
{
|
||||
const QList<int> *indexes = response.getAprsSettings()->getStatusTableColumnIndexes();
|
||||
|
||||
for (int i = 0; i < APRS_STATUS_TABLE_COLUMNS; i++) {
|
||||
settings.m_statusTableColumnIndexes[i] = (*indexes)[i];
|
||||
}
|
||||
}
|
||||
|
||||
// 6
|
||||
if (featureSettingsKeys.contains("statusTableColumnSizes"))
|
||||
{
|
||||
const QList<int> *indexes = response.getAprsSettings()->getStatusTableColumnSizes();
|
||||
|
||||
for (int i = 0; i < APRS_STATUS_TABLE_COLUMNS; i++) {
|
||||
settings.m_statusTableColumnSizes[i] = (*indexes)[i];
|
||||
}
|
||||
}
|
||||
|
||||
// 7
|
||||
if (featureSettingsKeys.contains("messagesTableColumnIndexes"))
|
||||
{
|
||||
const QList<int> *indexes = response.getAprsSettings()->getMessagesTableColumnIndexes();
|
||||
|
||||
for (int i = 0; i < APRS_MESSAGES_TABLE_COLUMNS; i++) {
|
||||
settings.m_messagesTableColumnIndexes[i] = (*indexes)[i];
|
||||
}
|
||||
}
|
||||
|
||||
// 8
|
||||
if (featureSettingsKeys.contains("messagesTableColumnSizes"))
|
||||
{
|
||||
const QList<int> *indexes = response.getAprsSettings()->getMessagesTableColumnSizes();
|
||||
|
||||
for (int i = 0; i < APRS_MESSAGES_TABLE_COLUMNS; i++) {
|
||||
settings.m_messagesTableColumnSizes[i] = (*indexes)[i];
|
||||
}
|
||||
}
|
||||
|
||||
// 9
|
||||
if (featureSettingsKeys.contains("telemetryTableColumnIndexes"))
|
||||
{
|
||||
const QList<int> *indexes = response.getAprsSettings()->getTelemetryTableColumnIndexes();
|
||||
|
||||
for (int i = 0; i < APRS_TELEMETRY_TABLE_COLUMNS; i++) {
|
||||
settings.m_telemetryTableColumnIndexes[i] = (*indexes)[i];
|
||||
}
|
||||
}
|
||||
|
||||
// 10
|
||||
if (featureSettingsKeys.contains("telemetryTableColumnSizes"))
|
||||
{
|
||||
const QList<int> *indexes = response.getAprsSettings()->getTelemetryTableColumnSizes();
|
||||
|
||||
for (int i = 0; i < APRS_TELEMETRY_TABLE_COLUMNS; i++) {
|
||||
settings.m_telemetryTableColumnSizes[i] = (*indexes)[i];
|
||||
}
|
||||
}
|
||||
|
||||
// 11
|
||||
if (featureSettingsKeys.contains("motionTableColumnIndexes"))
|
||||
{
|
||||
const QList<int> *indexes = response.getAprsSettings()->getMotionTableColumnIndexes();
|
||||
|
||||
for (int i = 0; i < APRS_MOTION_TABLE_COLUMNS; i++) {
|
||||
settings.m_motionTableColumnIndexes[i] = (*indexes)[i];
|
||||
}
|
||||
}
|
||||
|
||||
// 12
|
||||
if (featureSettingsKeys.contains("motionTableColumnSizes"))
|
||||
{
|
||||
const QList<int> *indexes = response.getAprsSettings()->getMotionTableColumnSizes();
|
||||
|
||||
for (int i = 0; i < APRS_MOTION_TABLE_COLUMNS; i++) {
|
||||
settings.m_motionTableColumnSizes[i] = (*indexes)[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void APRS::webapiReverseSendSettings(QList<QString>& featureSettingsKeys, const APRSSettings& settings, bool force)
|
||||
void APRS::webapiReverseSendSettings(const QList<QString>& featureSettingsKeys, const APRSSettings& settings, bool force)
|
||||
{
|
||||
SWGSDRangel::SWGFeatureSettings *swgFeatureSettings = new SWGSDRangel::SWGFeatureSettings();
|
||||
// swgFeatureSettings->setOriginatorFeatureIndex(getIndexInDeviceSet());
|
||||
@ -416,6 +650,174 @@ void APRS::webapiReverseSendSettings(QList<QString>& featureSettingsKeys, const
|
||||
swgAPRSSettings->setRgbColor(settings.m_rgbColor);
|
||||
}
|
||||
|
||||
// 1
|
||||
if (featureSettingsKeys.contains("packetsTableColumnIndexes"))
|
||||
{
|
||||
if (!swgAPRSSettings->getPacketsTableColumnIndexes()) {
|
||||
swgAPRSSettings->setPacketsTableColumnIndexes(new QList<int>());
|
||||
}
|
||||
|
||||
swgAPRSSettings->getPacketsTableColumnIndexes()->clear();
|
||||
|
||||
for (int i = 0; i < APRS_PACKETS_TABLE_COLUMNS; i++) {
|
||||
swgAPRSSettings->getPacketsTableColumnIndexes()->push_back(settings.m_packetsTableColumnIndexes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
// 2
|
||||
if (featureSettingsKeys.contains("packetsTableColumnSizes"))
|
||||
{
|
||||
if (!swgAPRSSettings->getPacketsTableColumnSizes()) {
|
||||
swgAPRSSettings->setPacketsTableColumnSizes(new QList<int>());
|
||||
}
|
||||
|
||||
swgAPRSSettings->getPacketsTableColumnSizes()->clear();
|
||||
|
||||
for (int i = 0; i < APRS_PACKETS_TABLE_COLUMNS; i++) {
|
||||
swgAPRSSettings->getPacketsTableColumnSizes()->push_back(settings.m_packetsTableColumnSizes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
// 3
|
||||
if (featureSettingsKeys.contains("weatherTableColumnIndexes"))
|
||||
{
|
||||
if (!swgAPRSSettings->getWeatherTableColumnIndexes()) {
|
||||
swgAPRSSettings->setWeatherTableColumnIndexes(new QList<int>());
|
||||
}
|
||||
|
||||
swgAPRSSettings->getWeatherTableColumnIndexes()->clear();
|
||||
|
||||
for (int i = 0; i < APRS_WEATHER_TABLE_COLUMNS; i++) {
|
||||
swgAPRSSettings->getWeatherTableColumnIndexes()->push_back(settings.m_weatherTableColumnIndexes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
// 4
|
||||
if (featureSettingsKeys.contains("weatherTableColumnSizes"))
|
||||
{
|
||||
if (!swgAPRSSettings->getWeatherTableColumnSizes()) {
|
||||
swgAPRSSettings->setWeatherTableColumnSizes(new QList<int>());
|
||||
}
|
||||
|
||||
swgAPRSSettings->getWeatherTableColumnSizes()->clear();
|
||||
|
||||
for (int i = 0; i < APRS_WEATHER_TABLE_COLUMNS; i++) {
|
||||
swgAPRSSettings->getWeatherTableColumnSizes()->push_back(settings.m_weatherTableColumnSizes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
// 5
|
||||
if (featureSettingsKeys.contains("statusTableColumnIndexes"))
|
||||
{
|
||||
if (!swgAPRSSettings->getStatusTableColumnIndexes()) {
|
||||
swgAPRSSettings->setStatusTableColumnIndexes(new QList<int>());
|
||||
}
|
||||
|
||||
swgAPRSSettings->getStatusTableColumnIndexes()->clear();
|
||||
|
||||
for (int i = 0; i < APRS_STATUS_TABLE_COLUMNS; i++) {
|
||||
swgAPRSSettings->getStatusTableColumnIndexes()->push_back(settings.m_statusTableColumnIndexes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
// 6
|
||||
if (featureSettingsKeys.contains("statusTableColumnSizes"))
|
||||
{
|
||||
if (!swgAPRSSettings->getStatusTableColumnSizes()) {
|
||||
swgAPRSSettings->setStatusTableColumnSizes(new QList<int>());
|
||||
}
|
||||
|
||||
swgAPRSSettings->getStatusTableColumnSizes()->clear();
|
||||
|
||||
for (int i = 0; i < APRS_STATUS_TABLE_COLUMNS; i++) {
|
||||
swgAPRSSettings->getStatusTableColumnSizes()->push_back(settings.m_statusTableColumnSizes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
// 7
|
||||
if (featureSettingsKeys.contains("messagesTableColumnIndexes"))
|
||||
{
|
||||
if (!swgAPRSSettings->getMessagesTableColumnIndexes()) {
|
||||
swgAPRSSettings->setMessagesTableColumnIndexes(new QList<int>());
|
||||
}
|
||||
|
||||
swgAPRSSettings->getStatusTableColumnSizes()->clear();
|
||||
|
||||
for (int i = 0; i < APRS_MESSAGES_TABLE_COLUMNS; i++) {
|
||||
swgAPRSSettings->getMessagesTableColumnIndexes()->push_back(settings.m_messagesTableColumnIndexes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
// 8
|
||||
if (featureSettingsKeys.contains("messagesTableColumnSizes"))
|
||||
{
|
||||
if (!swgAPRSSettings->getMessagesTableColumnSizes()) {
|
||||
swgAPRSSettings->setMessagesTableColumnSizes(new QList<int>());
|
||||
}
|
||||
|
||||
swgAPRSSettings->getMessagesTableColumnSizes()->clear();
|
||||
|
||||
for (int i = 0; i < APRS_MESSAGES_TABLE_COLUMNS; i++) {
|
||||
swgAPRSSettings->getMessagesTableColumnSizes()->push_back(settings.m_messagesTableColumnSizes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
// 9
|
||||
if (featureSettingsKeys.contains("telemetryTableColumnIndexes"))
|
||||
{
|
||||
if (!swgAPRSSettings->getTelemetryTableColumnIndexes()) {
|
||||
swgAPRSSettings->setTelemetryTableColumnIndexes(new QList<int>());
|
||||
}
|
||||
|
||||
swgAPRSSettings->getTelemetryTableColumnIndexes()->clear();
|
||||
|
||||
for (int i = 0; i < APRS_TELEMETRY_TABLE_COLUMNS; i++) {
|
||||
swgAPRSSettings->getTelemetryTableColumnIndexes()->push_back(settings.m_telemetryTableColumnIndexes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
// 10
|
||||
if (featureSettingsKeys.contains("telemetryTableColumnSizes"))
|
||||
{
|
||||
if (!swgAPRSSettings->getTelemetryTableColumnSizes()) {
|
||||
swgAPRSSettings->setTelemetryTableColumnSizes(new QList<int>());
|
||||
}
|
||||
|
||||
swgAPRSSettings->getTelemetryTableColumnSizes()->clear();
|
||||
|
||||
for (int i = 0; i < APRS_TELEMETRY_TABLE_COLUMNS; i++) {
|
||||
swgAPRSSettings->getTelemetryTableColumnSizes()->push_back(settings.m_telemetryTableColumnSizes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
// 11
|
||||
if (featureSettingsKeys.contains("motionTableColumnIndexes"))
|
||||
{
|
||||
if (!swgAPRSSettings->getMotionTableColumnIndexes()) {
|
||||
swgAPRSSettings->setMotionTableColumnIndexes(new QList<int>());
|
||||
}
|
||||
|
||||
swgAPRSSettings->getMotionTableColumnIndexes()->clear();
|
||||
|
||||
for (int i = 0; i < APRS_MOTION_TABLE_COLUMNS; i++) {
|
||||
swgAPRSSettings->getMotionTableColumnIndexes()->push_back(settings.m_motionTableColumnIndexes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
// 12
|
||||
if (featureSettingsKeys.contains("motionTableColumnSizes"))
|
||||
{
|
||||
if (!swgAPRSSettings->getMotionTableColumnSizes()) {
|
||||
swgAPRSSettings->setMotionTableColumnSizes(new QList<int>());
|
||||
}
|
||||
|
||||
swgAPRSSettings->getMotionTableColumnSizes()->clear();
|
||||
|
||||
for (int i = 0; i < APRS_MOTION_TABLE_COLUMNS; i++) {
|
||||
swgAPRSSettings->getMotionTableColumnSizes()->push_back(settings.m_motionTableColumnSizes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
QString channelSettingsURL = QString("http://%1:%2/sdrangel/featureset/%3/feature/%4/settings")
|
||||
.arg(settings.m_reverseAPIAddress)
|
||||
.arg(settings.m_reverseAPIPort)
|
||||
|
@ -46,19 +46,22 @@ public:
|
||||
|
||||
public:
|
||||
const APRSSettings& getSettings() const { return m_settings; }
|
||||
const QList<QString>& getSettingsKeys() const { return m_settingsKeys; }
|
||||
bool getForce() const { return m_force; }
|
||||
|
||||
static MsgConfigureAPRS* create(const APRSSettings& settings, bool force) {
|
||||
return new MsgConfigureAPRS(settings, force);
|
||||
static MsgConfigureAPRS* create(const APRSSettings& settings, const QList<QString>& settingsKeys, bool force) {
|
||||
return new MsgConfigureAPRS(settings, settingsKeys, force);
|
||||
}
|
||||
|
||||
private:
|
||||
APRSSettings m_settings;
|
||||
QList<QString> m_settingsKeys;
|
||||
bool m_force;
|
||||
|
||||
MsgConfigureAPRS(const APRSSettings& settings, bool force) :
|
||||
MsgConfigureAPRS(const APRSSettings& settings, const QList<QString>& settingsKeys, bool force) :
|
||||
Message(),
|
||||
m_settings(settings),
|
||||
m_settingsKeys(settingsKeys),
|
||||
m_force(force)
|
||||
{ }
|
||||
};
|
||||
@ -163,8 +166,8 @@ private:
|
||||
|
||||
void start();
|
||||
void stop();
|
||||
void applySettings(const APRSSettings& settings, bool force = false);
|
||||
void webapiReverseSendSettings(QList<QString>& featureSettingsKeys, const APRSSettings& settings, bool force);
|
||||
void applySettings(const APRSSettings& settings, const QList<QString>& settingsKeys, bool force = false);
|
||||
void webapiReverseSendSettings(const QList<QString>& featureSettingsKeys, const APRSSettings& settings, bool force);
|
||||
void scanAvailableChannels();
|
||||
void notifyUpdateChannels();
|
||||
|
||||
|
@ -150,7 +150,13 @@ bool APRSGUI::handleMessage(const Message& message)
|
||||
{
|
||||
qDebug("APRSGUI::handleMessage: APRS::MsgConfigureAPRS");
|
||||
const APRS::MsgConfigureAPRS& cfg = (APRS::MsgConfigureAPRS&) message;
|
||||
m_settings = cfg.getSettings();
|
||||
|
||||
if (cfg.getForce()) {
|
||||
m_settings = cfg.getSettings();
|
||||
} else {
|
||||
m_settings.applySettings(cfg.getSettingsKeys(), cfg.getSettings());
|
||||
}
|
||||
|
||||
qDebug() << m_settings.m_igateCallsign;
|
||||
blockApplySettings(true);
|
||||
displaySettings();
|
||||
@ -704,6 +710,14 @@ void APRSGUI::onMenuDialogCalled(const QPoint &p)
|
||||
setTitle(m_settings.m_title);
|
||||
setTitleColor(m_settings.m_rgbColor);
|
||||
|
||||
m_settingsKeys.append("title");
|
||||
m_settingsKeys.append("rgbColor");
|
||||
m_settingsKeys.append("useReverseAPI");
|
||||
m_settingsKeys.append("reverseAPIAddress");
|
||||
m_settingsKeys.append("reverseAPIPort");
|
||||
m_settingsKeys.append("reverseAPIFeatureSetIndex");
|
||||
m_settingsKeys.append("reverseAPIFeatureIndex");
|
||||
|
||||
applySettings();
|
||||
}
|
||||
|
||||
@ -998,6 +1012,7 @@ void APRSGUI::addPacketToGUI(APRSStation *station, APRSPacket *aprs)
|
||||
void APRSGUI::on_stationFilter_currentIndexChanged(int index)
|
||||
{
|
||||
m_settings.m_stationFilter = static_cast<APRSSettings::StationFilter>(index);
|
||||
m_settingsKeys.append("stationFilter");
|
||||
applySettings();
|
||||
filterStations();
|
||||
}
|
||||
@ -1085,6 +1100,7 @@ void APRSGUI::on_filterAddressee_editingFinished()
|
||||
{
|
||||
m_settings.m_filterAddressee = ui->filterAddressee->text();
|
||||
filterMessages();
|
||||
m_settingsKeys.append("filterAddressee");
|
||||
applySettings();
|
||||
}
|
||||
|
||||
@ -1559,9 +1575,11 @@ void APRSGUI::applySettings(bool force)
|
||||
{
|
||||
if (m_doApplySettings)
|
||||
{
|
||||
APRS::MsgConfigureAPRS* message = APRS::MsgConfigureAPRS::create(m_settings, force);
|
||||
APRS::MsgConfigureAPRS* message = APRS::MsgConfigureAPRS::create(m_settings, m_settingsKeys, force);
|
||||
m_aprs->getInputMessageQueue()->push(message);
|
||||
}
|
||||
|
||||
m_settingsKeys.clear();
|
||||
}
|
||||
|
||||
void APRSGUI::resizeTable()
|
||||
@ -2000,9 +2018,20 @@ int APRSGUI::convertRainfall(int rainfall)
|
||||
void APRSGUI::on_displaySettings_clicked()
|
||||
{
|
||||
APRSSettingsDialog dialog(&m_settings);
|
||||
|
||||
if (dialog.exec() == QDialog::Accepted)
|
||||
{
|
||||
setUnits();
|
||||
|
||||
m_settingsKeys.append("igateServer");
|
||||
m_settingsKeys.append("igateCallsign");
|
||||
m_settingsKeys.append("igatePasscode");
|
||||
m_settingsKeys.append("igateFilter");
|
||||
m_settingsKeys.append("altitudeUnits");
|
||||
m_settingsKeys.append("speedUnits");
|
||||
m_settingsKeys.append("temperatureUnits");
|
||||
m_settingsKeys.append("rainfallUnits");
|
||||
|
||||
applySettings();
|
||||
}
|
||||
}
|
||||
@ -2010,6 +2039,7 @@ void APRSGUI::on_displaySettings_clicked()
|
||||
void APRSGUI::on_igate_toggled(bool checked)
|
||||
{
|
||||
m_settings.m_igateEnabled = checked;
|
||||
m_settingsKeys.append("igateEnabled");
|
||||
applySettings();
|
||||
}
|
||||
|
||||
|
@ -120,6 +120,7 @@ private:
|
||||
PluginAPI* m_pluginAPI;
|
||||
FeatureUISet* m_featureUISet;
|
||||
APRSSettings m_settings;
|
||||
QList<QString> m_settingsKeys;
|
||||
RollupState m_rollupState;
|
||||
bool m_doApplySettings;
|
||||
QList<APRSSettings::AvailableChannel> m_availableChannels;
|
||||
|
@ -264,3 +264,255 @@ bool APRSSettings::deserialize(const QByteArray& data)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void APRSSettings::applySettings(const QStringList& settingsKeys, const APRSSettings& settings)
|
||||
{
|
||||
if (settingsKeys.contains("igateServer")) {
|
||||
m_igateServer = settings.m_igateServer;
|
||||
}
|
||||
if (settingsKeys.contains("igatePort")) {
|
||||
m_igatePort = settings.m_igatePort;
|
||||
}
|
||||
if (settingsKeys.contains("igateCallsign")) {
|
||||
m_igateCallsign = settings.m_igateCallsign;
|
||||
}
|
||||
if (settingsKeys.contains("igatePasscode")) {
|
||||
m_igatePasscode = settings.m_igatePasscode;
|
||||
}
|
||||
if (settingsKeys.contains("igateFilter")) {
|
||||
m_igateFilter = settings.m_igateFilter;
|
||||
}
|
||||
if (settingsKeys.contains("igateEnabled")) {
|
||||
m_igateEnabled = settings.m_igateEnabled;
|
||||
}
|
||||
if (settingsKeys.contains("stationFilter")) {
|
||||
m_stationFilter = settings.m_stationFilter;
|
||||
}
|
||||
if (settingsKeys.contains("filterAddressee")) {
|
||||
m_filterAddressee = settings.m_filterAddressee;
|
||||
}
|
||||
if (settingsKeys.contains("altitudeUnits")) {
|
||||
m_altitudeUnits = settings.m_altitudeUnits;
|
||||
}
|
||||
if (settingsKeys.contains("speedUnits")) {
|
||||
m_speedUnits = settings.m_speedUnits;
|
||||
}
|
||||
if (settingsKeys.contains("temperatureUnits")) {
|
||||
m_temperatureUnits = settings.m_temperatureUnits;
|
||||
}
|
||||
if (settingsKeys.contains("rainfallUnits")) {
|
||||
m_rainfallUnits = settings.m_rainfallUnits;
|
||||
}
|
||||
if (settingsKeys.contains("title")) {
|
||||
m_title = settings.m_title;
|
||||
}
|
||||
if (settingsKeys.contains("rgbColor")) {
|
||||
m_rgbColor = settings.m_rgbColor;
|
||||
}
|
||||
if (settingsKeys.contains("useReverseAPI")) {
|
||||
m_useReverseAPI = settings.m_useReverseAPI;
|
||||
}
|
||||
if (settingsKeys.contains("reverseAPIAddress")) {
|
||||
m_reverseAPIAddress = settings.m_reverseAPIAddress;
|
||||
}
|
||||
if (settingsKeys.contains("reverseAPIPort")) {
|
||||
m_reverseAPIPort = settings.m_reverseAPIPort;
|
||||
}
|
||||
if (settingsKeys.contains("reverseAPIFeatureSetIndex")) {
|
||||
m_reverseAPIFeatureSetIndex = settings.m_reverseAPIFeatureSetIndex;
|
||||
}
|
||||
if (settingsKeys.contains("reverseAPIFeatureIndex")) {
|
||||
m_reverseAPIFeatureIndex = settings.m_reverseAPIFeatureIndex;
|
||||
}
|
||||
if (settingsKeys.contains("workspaceIndex")) {
|
||||
m_workspaceIndex = settings.m_workspaceIndex;
|
||||
}
|
||||
}
|
||||
|
||||
QString APRSSettings::getDebugString(const QStringList& settingsKeys, bool force) const
|
||||
{
|
||||
std::ostringstream ostr;
|
||||
|
||||
if (settingsKeys.contains("igateServer") || force) {
|
||||
ostr << " m_igateServer: " << m_igateServer.toStdString();
|
||||
}
|
||||
if (settingsKeys.contains("igatePort") || force) {
|
||||
ostr << " m_igatePort: " << m_igatePort;
|
||||
}
|
||||
if (settingsKeys.contains("igateCallsign") || force) {
|
||||
ostr << " m_igateCallsign: " << m_igateCallsign.toStdString();
|
||||
}
|
||||
if (settingsKeys.contains("igatePasscode") || force) {
|
||||
ostr << " m_igatePasscode: " << m_igatePasscode.toStdString();
|
||||
}
|
||||
if (settingsKeys.contains("igateFilter") || force) {
|
||||
ostr << " m_igateFilter: " << m_igateFilter.toStdString();
|
||||
}
|
||||
if (settingsKeys.contains("igateEnabled") || force) {
|
||||
ostr << " m_igateEnabled: " << m_igateEnabled;
|
||||
}
|
||||
if (settingsKeys.contains("stationFilter") || force) {
|
||||
ostr << " m_stationFilter: " << m_stationFilter;
|
||||
}
|
||||
if (settingsKeys.contains("filterAddressee") || force) {
|
||||
ostr << " m_filterAddressee: " << m_filterAddressee.toStdString();
|
||||
}
|
||||
if (settingsKeys.contains("altitudeUnits") || force) {
|
||||
ostr << " m_altitudeUnits: " << m_altitudeUnits;
|
||||
}
|
||||
if (settingsKeys.contains("speedUnits") || force) {
|
||||
ostr << " m_speedUnits: " << m_speedUnits;
|
||||
}
|
||||
if (settingsKeys.contains("temperatureUnits") || force) {
|
||||
ostr << " m_temperatureUnits: " << m_temperatureUnits;
|
||||
}
|
||||
if (settingsKeys.contains("rainfallUnits") || force) {
|
||||
ostr << " m_rainfallUnits: " << m_rainfallUnits;
|
||||
}
|
||||
if (settingsKeys.contains("title") || force) {
|
||||
ostr << " m_title: " << m_title.toStdString();
|
||||
}
|
||||
if (settingsKeys.contains("rgbColor") || force) {
|
||||
ostr << " m_rgbColor: " << m_rgbColor;
|
||||
}
|
||||
if (settingsKeys.contains("useReverseAPI") || force) {
|
||||
ostr << " m_useReverseAPI: " << m_useReverseAPI;
|
||||
}
|
||||
if (settingsKeys.contains("reverseAPIAddress") || force) {
|
||||
ostr << " m_reverseAPIAddress: " << m_reverseAPIAddress.toStdString();
|
||||
}
|
||||
if (settingsKeys.contains("reverseAPIPort") || force) {
|
||||
ostr << " m_reverseAPIPort: " << m_reverseAPIPort;
|
||||
}
|
||||
if (settingsKeys.contains("reverseAPIFeatureSetIndex") || force) {
|
||||
ostr << " m_reverseAPIFeatureSetIndex: " << m_reverseAPIFeatureSetIndex;
|
||||
}
|
||||
if (settingsKeys.contains("reverseAPIFeatureIndex") || force) {
|
||||
ostr << " m_reverseAPIFeatureIndex: " << m_reverseAPIFeatureIndex;
|
||||
}
|
||||
if (settingsKeys.contains("workspaceIndex") || force) {
|
||||
ostr << " m_workspaceIndex: " << m_workspaceIndex;
|
||||
}
|
||||
|
||||
// 1
|
||||
if (settingsKeys.contains("packetsTableColumnIndexes"))
|
||||
{
|
||||
ostr << "m_packetsTableColumnIndexes:";
|
||||
|
||||
for (int i = 0; i < APRS_PACKETS_TABLE_COLUMNS; i++) {
|
||||
ostr << " " << m_packetsTableColumnIndexes[i];
|
||||
}
|
||||
}
|
||||
|
||||
// 2
|
||||
if (settingsKeys.contains("packetsTableColumnSizes"))
|
||||
{
|
||||
ostr << "m_packetsTableColumnSizes:";
|
||||
|
||||
for (int i = 0; i < APRS_PACKETS_TABLE_COLUMNS; i++) {
|
||||
ostr << " " << m_packetsTableColumnSizes[i];
|
||||
}
|
||||
}
|
||||
|
||||
// 3
|
||||
if (settingsKeys.contains("weatherTableColumnIndexes"))
|
||||
{
|
||||
ostr << "m_weatherTableColumnIndexes:";
|
||||
|
||||
for (int i = 0; i < APRS_WEATHER_TABLE_COLUMNS; i++) {
|
||||
ostr << " " << m_weatherTableColumnIndexes[i];
|
||||
}
|
||||
}
|
||||
|
||||
// 4
|
||||
if (settingsKeys.contains("weatherTableColumnSizes"))
|
||||
{
|
||||
ostr << "m_weatherTableColumnSizes:";
|
||||
|
||||
for (int i = 0; i < APRS_WEATHER_TABLE_COLUMNS; i++) {
|
||||
ostr << " " << m_weatherTableColumnSizes[i];
|
||||
}
|
||||
}
|
||||
|
||||
// 5
|
||||
if (settingsKeys.contains("statusTableColumnIndexes"))
|
||||
{
|
||||
ostr << "m_statusTableColumnIndexes:";
|
||||
|
||||
for (int i = 0; i < APRS_STATUS_TABLE_COLUMNS; i++) {
|
||||
ostr << " " << m_statusTableColumnIndexes[i];
|
||||
}
|
||||
}
|
||||
|
||||
// 6
|
||||
if (settingsKeys.contains("statusTableColumnSizes"))
|
||||
{
|
||||
ostr << "m_statusTableColumnSizes:";
|
||||
|
||||
for (int i = 0; i < APRS_STATUS_TABLE_COLUMNS; i++) {
|
||||
ostr << " " << m_statusTableColumnSizes[i];
|
||||
}
|
||||
}
|
||||
|
||||
// 7
|
||||
if (settingsKeys.contains("messagesTableColumnIndexes"))
|
||||
{
|
||||
ostr << "m_messagesTableColumnIndexes:";
|
||||
|
||||
for (int i = 0; i < APRS_MESSAGES_TABLE_COLUMNS; i++) {
|
||||
ostr << " " << m_messagesTableColumnIndexes[i];
|
||||
}
|
||||
}
|
||||
|
||||
// 8
|
||||
if (settingsKeys.contains("messagesTableColumnSizes"))
|
||||
{
|
||||
ostr << "m_messagesTableColumnSizes:";
|
||||
|
||||
for (int i = 0; i < APRS_MESSAGES_TABLE_COLUMNS; i++) {
|
||||
ostr << " " << m_messagesTableColumnSizes[i];
|
||||
}
|
||||
}
|
||||
|
||||
// 9
|
||||
if (settingsKeys.contains("telemetryTableColumnIndexes"))
|
||||
{
|
||||
ostr << "m_telemetryTableColumnIndexes:";
|
||||
|
||||
for (int i = 0; i < APRS_TELEMETRY_TABLE_COLUMNS; i++) {
|
||||
ostr << " " << m_telemetryTableColumnIndexes[i];
|
||||
}
|
||||
}
|
||||
|
||||
// 10
|
||||
if (settingsKeys.contains("telemetryTableColumnSizes"))
|
||||
{
|
||||
ostr << "m_telemetryTableColumnSizes:";
|
||||
|
||||
for (int i = 0; i < APRS_TELEMETRY_TABLE_COLUMNS; i++) {
|
||||
ostr << " " << m_telemetryTableColumnSizes[i];
|
||||
}
|
||||
}
|
||||
|
||||
// 11
|
||||
if (settingsKeys.contains("motionTableColumnIndexes"))
|
||||
{
|
||||
ostr << "m_telemetryTableColumnSizes:";
|
||||
|
||||
for (int i = 0; i < APRS_MOTION_TABLE_COLUMNS; i++) {
|
||||
ostr << " " << m_motionTableColumnIndexes[i];
|
||||
}
|
||||
}
|
||||
|
||||
// 12
|
||||
if (settingsKeys.contains("motionTableColumnSizes"))
|
||||
{
|
||||
ostr << "m_motionTableColumnSizes:";
|
||||
|
||||
for (int i = 0; i < APRS_MOTION_TABLE_COLUMNS; i++) {
|
||||
ostr << " " << m_motionTableColumnSizes[i];
|
||||
}
|
||||
}
|
||||
|
||||
return QString(ostr.str().c_str());
|
||||
}
|
||||
|
@ -82,14 +82,19 @@ struct APRSSettings
|
||||
|
||||
int m_packetsTableColumnIndexes[APRS_PACKETS_TABLE_COLUMNS];//!< How the columns are ordered in the table
|
||||
int m_packetsTableColumnSizes[APRS_PACKETS_TABLE_COLUMNS]; //!< Size of the columns in the table
|
||||
|
||||
int m_weatherTableColumnIndexes[APRS_WEATHER_TABLE_COLUMNS];
|
||||
int m_weatherTableColumnSizes[APRS_WEATHER_TABLE_COLUMNS];
|
||||
|
||||
int m_statusTableColumnIndexes[APRS_STATUS_TABLE_COLUMNS];
|
||||
int m_statusTableColumnSizes[APRS_STATUS_TABLE_COLUMNS];
|
||||
|
||||
int m_messagesTableColumnIndexes[APRS_MESSAGES_TABLE_COLUMNS];
|
||||
int m_messagesTableColumnSizes[APRS_MESSAGES_TABLE_COLUMNS];
|
||||
|
||||
int m_telemetryTableColumnIndexes[APRS_TELEMETRY_TABLE_COLUMNS];
|
||||
int m_telemetryTableColumnSizes[APRS_TELEMETRY_TABLE_COLUMNS];
|
||||
|
||||
int m_motionTableColumnIndexes[APRS_MOTION_TABLE_COLUMNS];
|
||||
int m_motionTableColumnSizes[APRS_MOTION_TABLE_COLUMNS];
|
||||
|
||||
@ -98,6 +103,8 @@ struct APRSSettings
|
||||
QByteArray serialize() const;
|
||||
bool deserialize(const QByteArray& data);
|
||||
void setRollupState(Serializable *rollupState) { m_rollupState = rollupState; }
|
||||
void applySettings(const QStringList& settingsKeys, const APRSSettings& settings);
|
||||
QString getDebugString(const QStringList& settingsKeys, bool force=false) const;
|
||||
|
||||
static const QStringList m_pipeTypes;
|
||||
static const QStringList m_pipeURIs;
|
||||
|
@ -94,7 +94,7 @@ bool APRSWorker::handleMessage(const Message& cmd)
|
||||
QMutexLocker mutexLocker(&m_mutex);
|
||||
MsgConfigureAPRSWorker& cfg = (MsgConfigureAPRSWorker&) cmd;
|
||||
|
||||
applySettings(cfg.getSettings(), cfg.getForce());
|
||||
applySettings(cfg.getSettings(), cfg.getSettingsKeys(), cfg.getForce());
|
||||
return true;
|
||||
}
|
||||
else if (MainCore::MsgPacket::match(cmd))
|
||||
@ -126,20 +126,14 @@ bool APRSWorker::handleMessage(const Message& cmd)
|
||||
}
|
||||
}
|
||||
|
||||
void APRSWorker::applySettings(const APRSSettings& settings, bool force)
|
||||
void APRSWorker::applySettings(const APRSSettings& settings, const QList<QString>& settingsKeys, bool force)
|
||||
{
|
||||
qDebug() << "APRSWorker::applySettings:"
|
||||
<< " m_igateEnabled: " << settings.m_igateEnabled
|
||||
<< " m_igateServer: " << settings.m_igateServer
|
||||
<< " m_igatePort: " << settings.m_igatePort
|
||||
<< " m_igateCallsign: " << settings.m_igateCallsign
|
||||
<< " m_igateFilter: " << settings.m_igateFilter
|
||||
<< " force: " << force;
|
||||
qDebug() << "APRSWorker::applySettings:" << settings.getDebugString(settingsKeys, force) << force;
|
||||
|
||||
if ((settings.m_igateEnabled != m_settings.m_igateEnabled)
|
||||
|| (settings.m_igateServer != m_settings.m_igateServer)
|
||||
|| (settings.m_igatePort != m_settings.m_igatePort)
|
||||
|| (settings.m_igateFilter != m_settings.m_igateFilter)
|
||||
if (settingsKeys.contains("igateEnabled")
|
||||
|| settingsKeys.contains("igateServer")
|
||||
|| settingsKeys.contains("igatePort")
|
||||
|| settingsKeys.contains("igateFilter")
|
||||
|| force)
|
||||
{
|
||||
// Close any existing connection
|
||||
@ -172,7 +166,11 @@ void APRSWorker::applySettings(const APRSSettings& settings, bool force)
|
||||
}
|
||||
}
|
||||
|
||||
m_settings = settings;
|
||||
if (force) {
|
||||
m_settings = settings;
|
||||
} else {
|
||||
m_settings.applySettings(settingsKeys, settings);
|
||||
}
|
||||
}
|
||||
|
||||
void APRSWorker::connected()
|
||||
|
@ -39,20 +39,23 @@ public:
|
||||
|
||||
public:
|
||||
const APRSSettings& getSettings() const { return m_settings; }
|
||||
const QList<QString>& getSettingsKeys() const { return m_settingsKeys; }
|
||||
bool getForce() const { return m_force; }
|
||||
|
||||
static MsgConfigureAPRSWorker* create(const APRSSettings& settings, bool force)
|
||||
static MsgConfigureAPRSWorker* create(const APRSSettings& settings, const QList<QString>& settingsKeys, bool force)
|
||||
{
|
||||
return new MsgConfigureAPRSWorker(settings, force);
|
||||
return new MsgConfigureAPRSWorker(settings, settingsKeys, force);
|
||||
}
|
||||
|
||||
private:
|
||||
APRSSettings m_settings;
|
||||
QList<QString> m_settingsKeys;
|
||||
bool m_force;
|
||||
|
||||
MsgConfigureAPRSWorker(const APRSSettings& settings, bool force) :
|
||||
MsgConfigureAPRSWorker(const APRSSettings& settings, const QList<QString>& settingsKeys, bool force) :
|
||||
Message(),
|
||||
m_settings(settings),
|
||||
m_settingsKeys(settingsKeys),
|
||||
m_force(force)
|
||||
{ }
|
||||
};
|
||||
@ -78,7 +81,7 @@ private:
|
||||
bool m_loggedIn;
|
||||
|
||||
bool handleMessage(const Message& cmd);
|
||||
void applySettings(const APRSSettings& settings, bool force = false);
|
||||
void applySettings(const APRSSettings& settings, const QList<QString>& settingsKeys, bool force = false);
|
||||
MessageQueue *getMessageQueueToGUI() { return m_msgQueueToGUI; }
|
||||
void send(const char *data, int length);
|
||||
|
||||
|
@ -1594,6 +1594,78 @@ margin-bottom: 20px;
|
||||
},
|
||||
"rollupState" : {
|
||||
"$ref" : "#/definitions/RollupState"
|
||||
},
|
||||
"packetsTableColumnIndexes" : {
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"packetsTableColumnSizes" : {
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"weatherTableColumnIndexes" : {
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"weatherTableColumnSizes" : {
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"statusTableColumnIndexes" : {
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"statusTableColumnSizes" : {
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"messagesTableColumnIndexes" : {
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"messagesTableColumnSizes" : {
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"telemetryTableColumnIndexes" : {
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"telemetryTableColumnSizes" : {
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"motionTableColumnIndexes" : {
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"motionTableColumnSizes" : {
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"type" : "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description" : "APRS settings"
|
||||
@ -56641,7 +56713,7 @@ except ApiException as e:
|
||||
</div>
|
||||
<div id="generator">
|
||||
<div class="content">
|
||||
Generated 2022-11-20T11:19:42.122+01:00
|
||||
Generated 2022-11-20T22:35:51.424+01:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -30,3 +30,51 @@ APRSSettings:
|
||||
type: integer
|
||||
rollupState:
|
||||
$ref: "/doc/swagger/include/RollupState.yaml#/RollupState"
|
||||
packetsTableColumnIndexes:
|
||||
type: array
|
||||
items:
|
||||
type: integer
|
||||
packetsTableColumnSizes:
|
||||
type: array
|
||||
items:
|
||||
type: integer
|
||||
weatherTableColumnIndexes:
|
||||
type: array
|
||||
items:
|
||||
type: integer
|
||||
weatherTableColumnSizes:
|
||||
type: array
|
||||
items:
|
||||
type: integer
|
||||
statusTableColumnIndexes:
|
||||
type: array
|
||||
items:
|
||||
type: integer
|
||||
statusTableColumnSizes:
|
||||
type: array
|
||||
items:
|
||||
type: integer
|
||||
messagesTableColumnIndexes:
|
||||
type: array
|
||||
items:
|
||||
type: integer
|
||||
messagesTableColumnSizes:
|
||||
type: array
|
||||
items:
|
||||
type: integer
|
||||
telemetryTableColumnIndexes:
|
||||
type: array
|
||||
items:
|
||||
type: integer
|
||||
telemetryTableColumnSizes:
|
||||
type: array
|
||||
items:
|
||||
type: integer
|
||||
motionTableColumnIndexes:
|
||||
type: array
|
||||
items:
|
||||
type: integer
|
||||
motionTableColumnSizes:
|
||||
type: array
|
||||
items:
|
||||
type: integer
|
||||
|
@ -30,3 +30,51 @@ APRSSettings:
|
||||
type: integer
|
||||
rollupState:
|
||||
$ref: "http://swgserver:8081/api/swagger/include/RollupState.yaml#/RollupState"
|
||||
packetsTableColumnIndexes:
|
||||
type: array
|
||||
items:
|
||||
type: integer
|
||||
packetsTableColumnSizes:
|
||||
type: array
|
||||
items:
|
||||
type: integer
|
||||
weatherTableColumnIndexes:
|
||||
type: array
|
||||
items:
|
||||
type: integer
|
||||
weatherTableColumnSizes:
|
||||
type: array
|
||||
items:
|
||||
type: integer
|
||||
statusTableColumnIndexes:
|
||||
type: array
|
||||
items:
|
||||
type: integer
|
||||
statusTableColumnSizes:
|
||||
type: array
|
||||
items:
|
||||
type: integer
|
||||
messagesTableColumnIndexes:
|
||||
type: array
|
||||
items:
|
||||
type: integer
|
||||
messagesTableColumnSizes:
|
||||
type: array
|
||||
items:
|
||||
type: integer
|
||||
telemetryTableColumnIndexes:
|
||||
type: array
|
||||
items:
|
||||
type: integer
|
||||
telemetryTableColumnSizes:
|
||||
type: array
|
||||
items:
|
||||
type: integer
|
||||
motionTableColumnIndexes:
|
||||
type: array
|
||||
items:
|
||||
type: integer
|
||||
motionTableColumnSizes:
|
||||
type: array
|
||||
items:
|
||||
type: integer
|
||||
|
@ -1594,6 +1594,78 @@ margin-bottom: 20px;
|
||||
},
|
||||
"rollupState" : {
|
||||
"$ref" : "#/definitions/RollupState"
|
||||
},
|
||||
"packetsTableColumnIndexes" : {
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"packetsTableColumnSizes" : {
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"weatherTableColumnIndexes" : {
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"weatherTableColumnSizes" : {
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"statusTableColumnIndexes" : {
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"statusTableColumnSizes" : {
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"messagesTableColumnIndexes" : {
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"messagesTableColumnSizes" : {
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"telemetryTableColumnIndexes" : {
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"telemetryTableColumnSizes" : {
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"motionTableColumnIndexes" : {
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"type" : "integer"
|
||||
}
|
||||
},
|
||||
"motionTableColumnSizes" : {
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"type" : "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description" : "APRS settings"
|
||||
@ -56641,7 +56713,7 @@ except ApiException as e:
|
||||
</div>
|
||||
<div id="generator">
|
||||
<div class="content">
|
||||
Generated 2022-11-20T11:19:42.122+01:00
|
||||
Generated 2022-11-20T22:35:51.424+01:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -56,6 +56,30 @@ SWGAPRSSettings::SWGAPRSSettings() {
|
||||
m_reverse_api_feature_index_isSet = false;
|
||||
rollup_state = nullptr;
|
||||
m_rollup_state_isSet = false;
|
||||
packets_table_column_indexes = new QList<qint32>();
|
||||
m_packets_table_column_indexes_isSet = false;
|
||||
packets_table_column_sizes = new QList<qint32>();
|
||||
m_packets_table_column_sizes_isSet = false;
|
||||
weather_table_column_indexes = new QList<qint32>();
|
||||
m_weather_table_column_indexes_isSet = false;
|
||||
weather_table_column_sizes = new QList<qint32>();
|
||||
m_weather_table_column_sizes_isSet = false;
|
||||
status_table_column_indexes = new QList<qint32>();
|
||||
m_status_table_column_indexes_isSet = false;
|
||||
status_table_column_sizes = new QList<qint32>();
|
||||
m_status_table_column_sizes_isSet = false;
|
||||
messages_table_column_indexes = new QList<qint32>();
|
||||
m_messages_table_column_indexes_isSet = false;
|
||||
messages_table_column_sizes = new QList<qint32>();
|
||||
m_messages_table_column_sizes_isSet = false;
|
||||
telemetry_table_column_indexes = new QList<qint32>();
|
||||
m_telemetry_table_column_indexes_isSet = false;
|
||||
telemetry_table_column_sizes = new QList<qint32>();
|
||||
m_telemetry_table_column_sizes_isSet = false;
|
||||
motion_table_column_indexes = new QList<qint32>();
|
||||
m_motion_table_column_indexes_isSet = false;
|
||||
motion_table_column_sizes = new QList<qint32>();
|
||||
m_motion_table_column_sizes_isSet = false;
|
||||
}
|
||||
|
||||
SWGAPRSSettings::~SWGAPRSSettings() {
|
||||
@ -92,6 +116,30 @@ SWGAPRSSettings::init() {
|
||||
m_reverse_api_feature_index_isSet = false;
|
||||
rollup_state = new SWGRollupState();
|
||||
m_rollup_state_isSet = false;
|
||||
packets_table_column_indexes = new QList<qint32>();
|
||||
m_packets_table_column_indexes_isSet = false;
|
||||
packets_table_column_sizes = new QList<qint32>();
|
||||
m_packets_table_column_sizes_isSet = false;
|
||||
weather_table_column_indexes = new QList<qint32>();
|
||||
m_weather_table_column_indexes_isSet = false;
|
||||
weather_table_column_sizes = new QList<qint32>();
|
||||
m_weather_table_column_sizes_isSet = false;
|
||||
status_table_column_indexes = new QList<qint32>();
|
||||
m_status_table_column_indexes_isSet = false;
|
||||
status_table_column_sizes = new QList<qint32>();
|
||||
m_status_table_column_sizes_isSet = false;
|
||||
messages_table_column_indexes = new QList<qint32>();
|
||||
m_messages_table_column_indexes_isSet = false;
|
||||
messages_table_column_sizes = new QList<qint32>();
|
||||
m_messages_table_column_sizes_isSet = false;
|
||||
telemetry_table_column_indexes = new QList<qint32>();
|
||||
m_telemetry_table_column_indexes_isSet = false;
|
||||
telemetry_table_column_sizes = new QList<qint32>();
|
||||
m_telemetry_table_column_sizes_isSet = false;
|
||||
motion_table_column_indexes = new QList<qint32>();
|
||||
m_motion_table_column_indexes_isSet = false;
|
||||
motion_table_column_sizes = new QList<qint32>();
|
||||
m_motion_table_column_sizes_isSet = false;
|
||||
}
|
||||
|
||||
void
|
||||
@ -124,6 +172,18 @@ SWGAPRSSettings::cleanup() {
|
||||
if(rollup_state != nullptr) {
|
||||
delete rollup_state;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
SWGAPRSSettings*
|
||||
@ -165,6 +225,30 @@ SWGAPRSSettings::fromJsonObject(QJsonObject &pJson) {
|
||||
|
||||
::SWGSDRangel::setValue(&rollup_state, pJson["rollupState"], "SWGRollupState", "SWGRollupState");
|
||||
|
||||
|
||||
::SWGSDRangel::setValue(&packets_table_column_indexes, pJson["packetsTableColumnIndexes"], "QList", "qint32");
|
||||
|
||||
::SWGSDRangel::setValue(&packets_table_column_sizes, pJson["packetsTableColumnSizes"], "QList", "qint32");
|
||||
|
||||
::SWGSDRangel::setValue(&weather_table_column_indexes, pJson["weatherTableColumnIndexes"], "QList", "qint32");
|
||||
|
||||
::SWGSDRangel::setValue(&weather_table_column_sizes, pJson["weatherTableColumnSizes"], "QList", "qint32");
|
||||
|
||||
::SWGSDRangel::setValue(&status_table_column_indexes, pJson["statusTableColumnIndexes"], "QList", "qint32");
|
||||
|
||||
::SWGSDRangel::setValue(&status_table_column_sizes, pJson["statusTableColumnSizes"], "QList", "qint32");
|
||||
|
||||
::SWGSDRangel::setValue(&messages_table_column_indexes, pJson["messagesTableColumnIndexes"], "QList", "qint32");
|
||||
|
||||
::SWGSDRangel::setValue(&messages_table_column_sizes, pJson["messagesTableColumnSizes"], "QList", "qint32");
|
||||
|
||||
::SWGSDRangel::setValue(&telemetry_table_column_indexes, pJson["telemetryTableColumnIndexes"], "QList", "qint32");
|
||||
|
||||
::SWGSDRangel::setValue(&telemetry_table_column_sizes, pJson["telemetryTableColumnSizes"], "QList", "qint32");
|
||||
|
||||
::SWGSDRangel::setValue(&motion_table_column_indexes, pJson["motionTableColumnIndexes"], "QList", "qint32");
|
||||
|
||||
::SWGSDRangel::setValue(&motion_table_column_sizes, pJson["motionTableColumnSizes"], "QList", "qint32");
|
||||
}
|
||||
|
||||
QString
|
||||
@ -223,6 +307,42 @@ SWGAPRSSettings::asJsonObject() {
|
||||
if((rollup_state != nullptr) && (rollup_state->isSet())){
|
||||
toJsonValue(QString("rollupState"), rollup_state, obj, QString("SWGRollupState"));
|
||||
}
|
||||
if(packets_table_column_indexes && packets_table_column_indexes->size() > 0){
|
||||
toJsonArray((QList<void*>*)packets_table_column_indexes, obj, "packetsTableColumnIndexes", "");
|
||||
}
|
||||
if(packets_table_column_sizes && packets_table_column_sizes->size() > 0){
|
||||
toJsonArray((QList<void*>*)packets_table_column_sizes, obj, "packetsTableColumnSizes", "");
|
||||
}
|
||||
if(weather_table_column_indexes && weather_table_column_indexes->size() > 0){
|
||||
toJsonArray((QList<void*>*)weather_table_column_indexes, obj, "weatherTableColumnIndexes", "");
|
||||
}
|
||||
if(weather_table_column_sizes && weather_table_column_sizes->size() > 0){
|
||||
toJsonArray((QList<void*>*)weather_table_column_sizes, obj, "weatherTableColumnSizes", "");
|
||||
}
|
||||
if(status_table_column_indexes && status_table_column_indexes->size() > 0){
|
||||
toJsonArray((QList<void*>*)status_table_column_indexes, obj, "statusTableColumnIndexes", "");
|
||||
}
|
||||
if(status_table_column_sizes && status_table_column_sizes->size() > 0){
|
||||
toJsonArray((QList<void*>*)status_table_column_sizes, obj, "statusTableColumnSizes", "");
|
||||
}
|
||||
if(messages_table_column_indexes && messages_table_column_indexes->size() > 0){
|
||||
toJsonArray((QList<void*>*)messages_table_column_indexes, obj, "messagesTableColumnIndexes", "");
|
||||
}
|
||||
if(messages_table_column_sizes && messages_table_column_sizes->size() > 0){
|
||||
toJsonArray((QList<void*>*)messages_table_column_sizes, obj, "messagesTableColumnSizes", "");
|
||||
}
|
||||
if(telemetry_table_column_indexes && telemetry_table_column_indexes->size() > 0){
|
||||
toJsonArray((QList<void*>*)telemetry_table_column_indexes, obj, "telemetryTableColumnIndexes", "");
|
||||
}
|
||||
if(telemetry_table_column_sizes && telemetry_table_column_sizes->size() > 0){
|
||||
toJsonArray((QList<void*>*)telemetry_table_column_sizes, obj, "telemetryTableColumnSizes", "");
|
||||
}
|
||||
if(motion_table_column_indexes && motion_table_column_indexes->size() > 0){
|
||||
toJsonArray((QList<void*>*)motion_table_column_indexes, obj, "motionTableColumnIndexes", "");
|
||||
}
|
||||
if(motion_table_column_sizes && motion_table_column_sizes->size() > 0){
|
||||
toJsonArray((QList<void*>*)motion_table_column_sizes, obj, "motionTableColumnSizes", "");
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
@ -367,6 +487,126 @@ SWGAPRSSettings::setRollupState(SWGRollupState* rollup_state) {
|
||||
this->m_rollup_state_isSet = true;
|
||||
}
|
||||
|
||||
QList<qint32>*
|
||||
SWGAPRSSettings::getPacketsTableColumnIndexes() {
|
||||
return packets_table_column_indexes;
|
||||
}
|
||||
void
|
||||
SWGAPRSSettings::setPacketsTableColumnIndexes(QList<qint32>* packets_table_column_indexes) {
|
||||
this->packets_table_column_indexes = packets_table_column_indexes;
|
||||
this->m_packets_table_column_indexes_isSet = true;
|
||||
}
|
||||
|
||||
QList<qint32>*
|
||||
SWGAPRSSettings::getPacketsTableColumnSizes() {
|
||||
return packets_table_column_sizes;
|
||||
}
|
||||
void
|
||||
SWGAPRSSettings::setPacketsTableColumnSizes(QList<qint32>* packets_table_column_sizes) {
|
||||
this->packets_table_column_sizes = packets_table_column_sizes;
|
||||
this->m_packets_table_column_sizes_isSet = true;
|
||||
}
|
||||
|
||||
QList<qint32>*
|
||||
SWGAPRSSettings::getWeatherTableColumnIndexes() {
|
||||
return weather_table_column_indexes;
|
||||
}
|
||||
void
|
||||
SWGAPRSSettings::setWeatherTableColumnIndexes(QList<qint32>* weather_table_column_indexes) {
|
||||
this->weather_table_column_indexes = weather_table_column_indexes;
|
||||
this->m_weather_table_column_indexes_isSet = true;
|
||||
}
|
||||
|
||||
QList<qint32>*
|
||||
SWGAPRSSettings::getWeatherTableColumnSizes() {
|
||||
return weather_table_column_sizes;
|
||||
}
|
||||
void
|
||||
SWGAPRSSettings::setWeatherTableColumnSizes(QList<qint32>* weather_table_column_sizes) {
|
||||
this->weather_table_column_sizes = weather_table_column_sizes;
|
||||
this->m_weather_table_column_sizes_isSet = true;
|
||||
}
|
||||
|
||||
QList<qint32>*
|
||||
SWGAPRSSettings::getStatusTableColumnIndexes() {
|
||||
return status_table_column_indexes;
|
||||
}
|
||||
void
|
||||
SWGAPRSSettings::setStatusTableColumnIndexes(QList<qint32>* status_table_column_indexes) {
|
||||
this->status_table_column_indexes = status_table_column_indexes;
|
||||
this->m_status_table_column_indexes_isSet = true;
|
||||
}
|
||||
|
||||
QList<qint32>*
|
||||
SWGAPRSSettings::getStatusTableColumnSizes() {
|
||||
return status_table_column_sizes;
|
||||
}
|
||||
void
|
||||
SWGAPRSSettings::setStatusTableColumnSizes(QList<qint32>* status_table_column_sizes) {
|
||||
this->status_table_column_sizes = status_table_column_sizes;
|
||||
this->m_status_table_column_sizes_isSet = true;
|
||||
}
|
||||
|
||||
QList<qint32>*
|
||||
SWGAPRSSettings::getMessagesTableColumnIndexes() {
|
||||
return messages_table_column_indexes;
|
||||
}
|
||||
void
|
||||
SWGAPRSSettings::setMessagesTableColumnIndexes(QList<qint32>* messages_table_column_indexes) {
|
||||
this->messages_table_column_indexes = messages_table_column_indexes;
|
||||
this->m_messages_table_column_indexes_isSet = true;
|
||||
}
|
||||
|
||||
QList<qint32>*
|
||||
SWGAPRSSettings::getMessagesTableColumnSizes() {
|
||||
return messages_table_column_sizes;
|
||||
}
|
||||
void
|
||||
SWGAPRSSettings::setMessagesTableColumnSizes(QList<qint32>* messages_table_column_sizes) {
|
||||
this->messages_table_column_sizes = messages_table_column_sizes;
|
||||
this->m_messages_table_column_sizes_isSet = true;
|
||||
}
|
||||
|
||||
QList<qint32>*
|
||||
SWGAPRSSettings::getTelemetryTableColumnIndexes() {
|
||||
return telemetry_table_column_indexes;
|
||||
}
|
||||
void
|
||||
SWGAPRSSettings::setTelemetryTableColumnIndexes(QList<qint32>* telemetry_table_column_indexes) {
|
||||
this->telemetry_table_column_indexes = telemetry_table_column_indexes;
|
||||
this->m_telemetry_table_column_indexes_isSet = true;
|
||||
}
|
||||
|
||||
QList<qint32>*
|
||||
SWGAPRSSettings::getTelemetryTableColumnSizes() {
|
||||
return telemetry_table_column_sizes;
|
||||
}
|
||||
void
|
||||
SWGAPRSSettings::setTelemetryTableColumnSizes(QList<qint32>* telemetry_table_column_sizes) {
|
||||
this->telemetry_table_column_sizes = telemetry_table_column_sizes;
|
||||
this->m_telemetry_table_column_sizes_isSet = true;
|
||||
}
|
||||
|
||||
QList<qint32>*
|
||||
SWGAPRSSettings::getMotionTableColumnIndexes() {
|
||||
return motion_table_column_indexes;
|
||||
}
|
||||
void
|
||||
SWGAPRSSettings::setMotionTableColumnIndexes(QList<qint32>* motion_table_column_indexes) {
|
||||
this->motion_table_column_indexes = motion_table_column_indexes;
|
||||
this->m_motion_table_column_indexes_isSet = true;
|
||||
}
|
||||
|
||||
QList<qint32>*
|
||||
SWGAPRSSettings::getMotionTableColumnSizes() {
|
||||
return motion_table_column_sizes;
|
||||
}
|
||||
void
|
||||
SWGAPRSSettings::setMotionTableColumnSizes(QList<qint32>* motion_table_column_sizes) {
|
||||
this->motion_table_column_sizes = motion_table_column_sizes;
|
||||
this->m_motion_table_column_sizes_isSet = true;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
SWGAPRSSettings::isSet(){
|
||||
@ -414,6 +654,78 @@ SWGAPRSSettings::isSet(){
|
||||
if(rollup_state && rollup_state->isSet()){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_packets_table_column_indexes_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(packets_table_column_indexes && (packets_table_column_indexes->size() > 0)){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_packets_table_column_sizes_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(packets_table_column_sizes && (packets_table_column_sizes->size() > 0)){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_weather_table_column_indexes_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(weather_table_column_indexes && (weather_table_column_indexes->size() > 0)){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_weather_table_column_sizes_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(weather_table_column_sizes && (weather_table_column_sizes->size() > 0)){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_status_table_column_indexes_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(status_table_column_indexes && (status_table_column_indexes->size() > 0)){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_status_table_column_sizes_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(status_table_column_sizes && (status_table_column_sizes->size() > 0)){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_messages_table_column_indexes_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(messages_table_column_indexes && (messages_table_column_indexes->size() > 0)){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_messages_table_column_sizes_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(messages_table_column_sizes && (messages_table_column_sizes->size() > 0)){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_telemetry_table_column_indexes_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(telemetry_table_column_indexes && (telemetry_table_column_indexes->size() > 0)){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_telemetry_table_column_sizes_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(telemetry_table_column_sizes && (telemetry_table_column_sizes->size() > 0)){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_motion_table_column_indexes_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(motion_table_column_indexes && (motion_table_column_indexes->size() > 0)){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(m_motion_table_column_sizes_isSet){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
if(motion_table_column_sizes && (motion_table_column_sizes->size() > 0)){
|
||||
isObjectUpdated = true; break;
|
||||
}
|
||||
}while(false);
|
||||
return isObjectUpdated;
|
||||
}
|
||||
|
@ -23,6 +23,7 @@
|
||||
|
||||
|
||||
#include "SWGRollupState.h"
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
|
||||
#include "SWGObject.h"
|
||||
@ -85,6 +86,42 @@ public:
|
||||
SWGRollupState* getRollupState();
|
||||
void setRollupState(SWGRollupState* rollup_state);
|
||||
|
||||
QList<qint32>* getPacketsTableColumnIndexes();
|
||||
void setPacketsTableColumnIndexes(QList<qint32>* packets_table_column_indexes);
|
||||
|
||||
QList<qint32>* getPacketsTableColumnSizes();
|
||||
void setPacketsTableColumnSizes(QList<qint32>* packets_table_column_sizes);
|
||||
|
||||
QList<qint32>* getWeatherTableColumnIndexes();
|
||||
void setWeatherTableColumnIndexes(QList<qint32>* weather_table_column_indexes);
|
||||
|
||||
QList<qint32>* getWeatherTableColumnSizes();
|
||||
void setWeatherTableColumnSizes(QList<qint32>* weather_table_column_sizes);
|
||||
|
||||
QList<qint32>* getStatusTableColumnIndexes();
|
||||
void setStatusTableColumnIndexes(QList<qint32>* status_table_column_indexes);
|
||||
|
||||
QList<qint32>* getStatusTableColumnSizes();
|
||||
void setStatusTableColumnSizes(QList<qint32>* status_table_column_sizes);
|
||||
|
||||
QList<qint32>* getMessagesTableColumnIndexes();
|
||||
void setMessagesTableColumnIndexes(QList<qint32>* messages_table_column_indexes);
|
||||
|
||||
QList<qint32>* getMessagesTableColumnSizes();
|
||||
void setMessagesTableColumnSizes(QList<qint32>* messages_table_column_sizes);
|
||||
|
||||
QList<qint32>* getTelemetryTableColumnIndexes();
|
||||
void setTelemetryTableColumnIndexes(QList<qint32>* telemetry_table_column_indexes);
|
||||
|
||||
QList<qint32>* getTelemetryTableColumnSizes();
|
||||
void setTelemetryTableColumnSizes(QList<qint32>* telemetry_table_column_sizes);
|
||||
|
||||
QList<qint32>* getMotionTableColumnIndexes();
|
||||
void setMotionTableColumnIndexes(QList<qint32>* motion_table_column_indexes);
|
||||
|
||||
QList<qint32>* getMotionTableColumnSizes();
|
||||
void setMotionTableColumnSizes(QList<qint32>* motion_table_column_sizes);
|
||||
|
||||
|
||||
virtual bool isSet() override;
|
||||
|
||||
@ -131,6 +168,42 @@ private:
|
||||
SWGRollupState* rollup_state;
|
||||
bool m_rollup_state_isSet;
|
||||
|
||||
QList<qint32>* packets_table_column_indexes;
|
||||
bool m_packets_table_column_indexes_isSet;
|
||||
|
||||
QList<qint32>* packets_table_column_sizes;
|
||||
bool m_packets_table_column_sizes_isSet;
|
||||
|
||||
QList<qint32>* weather_table_column_indexes;
|
||||
bool m_weather_table_column_indexes_isSet;
|
||||
|
||||
QList<qint32>* weather_table_column_sizes;
|
||||
bool m_weather_table_column_sizes_isSet;
|
||||
|
||||
QList<qint32>* status_table_column_indexes;
|
||||
bool m_status_table_column_indexes_isSet;
|
||||
|
||||
QList<qint32>* status_table_column_sizes;
|
||||
bool m_status_table_column_sizes_isSet;
|
||||
|
||||
QList<qint32>* messages_table_column_indexes;
|
||||
bool m_messages_table_column_indexes_isSet;
|
||||
|
||||
QList<qint32>* messages_table_column_sizes;
|
||||
bool m_messages_table_column_sizes_isSet;
|
||||
|
||||
QList<qint32>* telemetry_table_column_indexes;
|
||||
bool m_telemetry_table_column_indexes_isSet;
|
||||
|
||||
QList<qint32>* telemetry_table_column_sizes;
|
||||
bool m_telemetry_table_column_sizes_isSet;
|
||||
|
||||
QList<qint32>* motion_table_column_indexes;
|
||||
bool m_motion_table_column_indexes_isSet;
|
||||
|
||||
QList<qint32>* motion_table_column_sizes;
|
||||
bool m_motion_table_column_sizes_isSet;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user