2018-01-04 23:05:12 -05:00
|
|
|
///////////////////////////////////////////////////////////////////////////////////
|
2022-01-06 16:47:41 -05:00
|
|
|
// Copyright (C) 2022 Edouard Griffiths, F4EXB //
|
2018-01-04 23:05:12 -05:00
|
|
|
// //
|
|
|
|
// This program 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 as version 3 of the License, or //
|
2019-04-11 08:43:33 -04:00
|
|
|
// (at your option) any later version. //
|
2018-01-04 23:05:12 -05:00
|
|
|
// //
|
|
|
|
// This program 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 V3 for more details. //
|
|
|
|
// //
|
|
|
|
// You should have received a copy of the GNU General Public License //
|
|
|
|
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2022-01-06 16:47:41 -05:00
|
|
|
#ifndef INCLUDE_FEATURE_JOGDIALCONTROLLERSETTINGS_H_
|
|
|
|
#define INCLUDE_FEATURE_JOGDIALCONTROLLERSETTINGS_H_
|
2018-01-04 23:05:12 -05:00
|
|
|
|
2022-01-06 16:47:41 -05:00
|
|
|
#include <QByteArray>
|
|
|
|
#include <QString>
|
2018-01-04 23:05:12 -05:00
|
|
|
|
2022-01-06 16:47:41 -05:00
|
|
|
#include "util/message.h"
|
2018-03-03 14:23:38 -05:00
|
|
|
|
2022-01-06 16:47:41 -05:00
|
|
|
class Serializable;
|
|
|
|
class ChannelAPI;
|
|
|
|
class DeviceAPI;
|
2018-01-04 23:05:12 -05:00
|
|
|
|
2022-01-06 16:47:41 -05:00
|
|
|
struct JogdialControllerSettings
|
2018-01-04 23:05:12 -05:00
|
|
|
{
|
2022-01-06 16:47:41 -05:00
|
|
|
struct AvailableChannel
|
|
|
|
{
|
|
|
|
bool m_tx;
|
|
|
|
int m_deviceSetIndex;
|
|
|
|
int m_channelIndex;
|
|
|
|
DeviceAPI *m_deviceAPI;
|
|
|
|
ChannelAPI *m_channelAPI;
|
|
|
|
QString m_deviceId;
|
|
|
|
QString m_channelId;
|
2018-01-04 23:05:12 -05:00
|
|
|
|
2022-01-06 16:47:41 -05:00
|
|
|
AvailableChannel() = default;
|
|
|
|
AvailableChannel(const AvailableChannel&) = default;
|
|
|
|
AvailableChannel& operator=(const AvailableChannel&) = default;
|
|
|
|
};
|
2018-01-04 23:05:12 -05:00
|
|
|
|
2022-01-06 16:47:41 -05:00
|
|
|
QString m_title;
|
|
|
|
quint32 m_rgbColor;
|
|
|
|
bool m_useReverseAPI;
|
|
|
|
QString m_reverseAPIAddress;
|
|
|
|
uint16_t m_reverseAPIPort;
|
|
|
|
uint16_t m_reverseAPIFeatureSetIndex;
|
|
|
|
uint16_t m_reverseAPIFeatureIndex;
|
2022-01-08 23:27:12 -05:00
|
|
|
Serializable *m_rollupState;
|
2018-01-04 23:05:12 -05:00
|
|
|
|
2022-01-06 16:47:41 -05:00
|
|
|
JogdialControllerSettings();
|
|
|
|
void resetToDefaults();
|
|
|
|
QByteArray serialize() const;
|
|
|
|
bool deserialize(const QByteArray& data);
|
2022-01-08 23:27:12 -05:00
|
|
|
void setRollupState(Serializable *rollupState) { m_rollupState = rollupState; }
|
2018-01-04 23:05:12 -05:00
|
|
|
|
2022-01-06 16:47:41 -05:00
|
|
|
static const QStringList m_channelTypes;
|
|
|
|
static const QStringList m_channelURIs;
|
2018-01-04 23:05:12 -05:00
|
|
|
};
|
|
|
|
|
2022-01-06 16:47:41 -05:00
|
|
|
#endif // INCLUDE_FEATURE_JOGDIALCONTROLLERSETTINGS_H_
|