2022-11-27 04:45:32 +00:00
|
|
|
#ifndef PREFS_H
|
|
|
|
#define PREFS_H
|
|
|
|
|
|
|
|
#include <QString>
|
2023-03-17 23:35:40 +00:00
|
|
|
#include <QColor>
|
|
|
|
#include <QMap>
|
2023-05-28 21:11:59 +00:00
|
|
|
#include "audioconverter.h"
|
2023-06-11 09:33:16 +00:00
|
|
|
#include "cluster.h"
|
2023-05-27 19:26:53 +00:00
|
|
|
#include "rigidentities.h"
|
2022-11-27 04:45:32 +00:00
|
|
|
#include "wfviewtypes.h"
|
|
|
|
|
2023-02-19 03:25:02 +00:00
|
|
|
enum prefIfItem {
|
|
|
|
if_useFullScreen = 1 << 0,
|
|
|
|
if_useSystemTheme = 1 << 1,
|
|
|
|
if_drawPeaks = 1 << 2,
|
|
|
|
if_underlayMode = 1 << 3,
|
|
|
|
if_underlayBufferSize = 1 << 4,
|
|
|
|
if_wfAntiAlias = 1 << 5,
|
|
|
|
if_wfInterpolate = 1 << 6,
|
|
|
|
if_wftheme = 1 << 7,
|
|
|
|
if_plotFloor = 1 << 8,
|
|
|
|
if_plotCeiling = 1 << 9,
|
|
|
|
if_stylesheetPath = 1 << 10,
|
|
|
|
if_wflength = 1 << 11,
|
|
|
|
if_confirmExit = 1 << 12,
|
|
|
|
if_confirmPowerOff = 1 << 13,
|
2023-02-20 02:29:22 +00:00
|
|
|
if_meter2Type = 1 << 14,
|
2024-02-05 21:42:00 +00:00
|
|
|
if_meter3Type = 1 << 15,
|
2024-02-06 19:06:50 +00:00
|
|
|
if_compMeterReverse = 1 << 16,
|
|
|
|
if_clickDragTuningEnable = 1 << 17,
|
|
|
|
if_currentColorPresetNumber = 1 << 18,
|
|
|
|
if_rigCreatorEnable = 1 << 19,
|
|
|
|
if_frequencyUnits = 1 << 20,
|
|
|
|
if_all = 1 << 21
|
2023-02-19 03:25:02 +00:00
|
|
|
};
|
|
|
|
|
2023-05-27 19:26:53 +00:00
|
|
|
enum prefColItem {
|
|
|
|
col_grid = 1 << 0,
|
|
|
|
col_axis = 1 << 1,
|
|
|
|
col_text = 1 << 2,
|
|
|
|
col_plotBackground = 1 << 3,
|
|
|
|
col_spectrumLine = 1 << 4,
|
|
|
|
col_spectrumFill = 1 << 5,
|
|
|
|
col_underlayLine = 1 << 6,
|
|
|
|
col_underlayFill = 1 << 7,
|
|
|
|
col_tuningLine = 1 << 8,
|
|
|
|
col_passband = 1 << 9,
|
|
|
|
col_pbtIndicator = 1 << 10,
|
|
|
|
col_meterLevel = 1 << 11,
|
|
|
|
col_meterAverage = 1 << 12,
|
|
|
|
col_meterPeakLevel = 1 << 13,
|
|
|
|
col_meterHighScale = 1 << 14,
|
|
|
|
col_meterScale = 1 << 15,
|
|
|
|
col_meterText = 1 << 16,
|
|
|
|
col_waterfallBack = 1 << 17,
|
|
|
|
col_waterfallGrid = 1 << 18,
|
|
|
|
col_waterfallAxis = 1 << 19,
|
|
|
|
col_waterfallText = 1 << 20,
|
|
|
|
col_clusterSpots = 1 << 21,
|
|
|
|
col_all = 1 << 22
|
|
|
|
};
|
|
|
|
|
|
|
|
enum prefRsItem {
|
|
|
|
rs_dataOffMod = 1 << 0,
|
|
|
|
rs_data1Mod = 1 << 1,
|
|
|
|
rs_data2Mod = 1 << 2,
|
|
|
|
rs_data3Mod = 1 << 3,
|
2023-06-08 07:20:50 +00:00
|
|
|
rs_setClock = 1 << 4,
|
|
|
|
rs_clockUseUtc = 1 << 5,
|
|
|
|
rs_pttOn = 1 << 6,
|
|
|
|
rs_pttOff = 1 << 7,
|
|
|
|
rs_satOps = 1 << 8,
|
|
|
|
rs_adjRef = 1 << 9,
|
|
|
|
rs_debug = 1 << 10,
|
|
|
|
rs_all = 1 << 11
|
2023-05-27 19:26:53 +00:00
|
|
|
};
|
|
|
|
|
2023-02-19 03:25:02 +00:00
|
|
|
enum prefRaItem {
|
|
|
|
|
|
|
|
ra_radioCIVAddr = 1 << 0,
|
|
|
|
ra_CIVisRadioModel = 1 << 1,
|
|
|
|
ra_forceRTSasPTT = 1 << 2,
|
|
|
|
ra_polling_ms = 1 << 3,
|
2023-05-28 21:11:59 +00:00
|
|
|
ra_serialEnabled = 1 << 4,
|
|
|
|
ra_serialPortRadio = 1 << 5,
|
|
|
|
ra_serialPortBaud = 1 << 6,
|
|
|
|
ra_virtualSerialPort = 1 << 7,
|
|
|
|
ra_localAFgain = 1 << 8,
|
|
|
|
ra_audioSystem = 1 << 9,
|
|
|
|
ra_all = 1 << 10
|
2023-02-19 03:25:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enum prefCtItem {
|
|
|
|
ct_enablePTT = 1 << 0,
|
|
|
|
ct_niceTS = 1 << 1,
|
|
|
|
ct_automaticSidebandSwitching = 1 << 2,
|
|
|
|
ct_enableUSBControllers = 1 << 3,
|
2023-06-08 07:20:50 +00:00
|
|
|
ct_USBControllersSetup = 1 << 4,
|
|
|
|
ct_USBControllersReset = 1 << 5,
|
2023-02-19 03:25:02 +00:00
|
|
|
ct_all = 1 << 5
|
|
|
|
};
|
|
|
|
|
|
|
|
enum prefLanItem {
|
|
|
|
|
2023-02-19 05:14:41 +00:00
|
|
|
l_enableLAN = 1 << 0,
|
|
|
|
l_enableRigCtlD = 1 << 1,
|
|
|
|
l_rigCtlPort = 1 << 2,
|
|
|
|
l_tcpPort = 1 << 3,
|
2023-07-06 09:36:11 +00:00
|
|
|
l_tciPort = 1 << 4,
|
|
|
|
l_waterfallFormat = 1 << 5,
|
|
|
|
l_all = 1 << 6
|
2023-02-19 03:25:02 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enum prefClusterItem {
|
2023-02-19 05:14:41 +00:00
|
|
|
cl_clusterUdpEnable = 1 << 0,
|
|
|
|
cl_clusterTcpEnable = 1 << 1,
|
|
|
|
cl_clusterUdpPort = 1 << 2,
|
|
|
|
cl_clusterTcpServerName = 1 << 3,
|
|
|
|
cl_clusterTcpUserName = 1 << 4,
|
|
|
|
cl_clusterTcpPassword = 1 << 5,
|
2023-02-20 21:45:33 +00:00
|
|
|
cl_clusterTcpPort = 1 << 6,
|
|
|
|
cl_clusterTimeout = 1 << 7,
|
|
|
|
cl_clusterSkimmerSpotsEnable = 1 << 8,
|
2023-06-11 09:33:16 +00:00
|
|
|
cl_clusterTcpConnect = 1 << 9,
|
|
|
|
cl_clusterTcpDisconnect = 1 << 10,
|
|
|
|
cl_all = 1 << 11
|
2023-02-19 03:25:02 +00:00
|
|
|
};
|
|
|
|
|
2023-06-08 20:58:22 +00:00
|
|
|
enum prefUDPItem {
|
2023-05-28 21:11:59 +00:00
|
|
|
u_enabled = 1 << 0,
|
|
|
|
u_ipAddress = 1 << 1,
|
|
|
|
u_controlLANPort = 1 << 2,
|
|
|
|
u_serialLANPort = 1 << 3,
|
|
|
|
u_audioLANPort = 1 << 4,
|
|
|
|
u_username = 1 << 5,
|
|
|
|
u_password = 1 << 6,
|
|
|
|
u_clientName = 1 << 7,
|
|
|
|
u_waterfallFormat = 1 << 8,
|
|
|
|
u_halfDuplex = 1 << 9,
|
|
|
|
u_sampleRate = 1 << 10,
|
|
|
|
u_rxCodec = 1 << 11,
|
|
|
|
u_txCodec = 1 << 12,
|
|
|
|
u_rxLatency = 1 << 13,
|
|
|
|
u_txLatency = 1 << 14,
|
|
|
|
u_audioInput = 1 << 15,
|
|
|
|
u_audioOutput = 1 << 16,
|
|
|
|
u_all = 1 << 17
|
|
|
|
};
|
2023-02-19 03:25:02 +00:00
|
|
|
|
2023-03-17 23:35:40 +00:00
|
|
|
|
2023-06-08 07:20:50 +00:00
|
|
|
|
2022-11-27 04:45:32 +00:00
|
|
|
struct preferences {
|
2023-01-18 05:09:54 +00:00
|
|
|
// Program:
|
2022-11-27 04:53:12 +00:00
|
|
|
QString version;
|
2023-01-18 05:09:54 +00:00
|
|
|
int majorVersion = 0;
|
|
|
|
int minorVersion = 0;
|
|
|
|
QString gitShort;
|
2023-05-28 21:11:59 +00:00
|
|
|
bool settingsChanged = false;
|
2023-01-18 05:09:54 +00:00
|
|
|
|
|
|
|
// Interface:
|
2022-11-27 04:45:32 +00:00
|
|
|
bool useFullScreen;
|
|
|
|
bool useSystemTheme;
|
2023-04-02 20:09:37 +00:00
|
|
|
int wfEnable;
|
2022-11-27 04:45:32 +00:00
|
|
|
bool drawPeaks;
|
|
|
|
underlay_t underlayMode = underlayNone;
|
|
|
|
int underlayBufferSize = 64;
|
|
|
|
bool wfAntiAlias;
|
|
|
|
bool wfInterpolate;
|
2023-09-26 09:32:56 +00:00
|
|
|
int mainWfTheme;
|
|
|
|
int subWfTheme;
|
|
|
|
int mainPlotFloor;
|
|
|
|
int subPlotFloor;
|
|
|
|
int mainPlotCeiling;
|
|
|
|
int subPlotCeiling;
|
|
|
|
unsigned int mainWflength;
|
|
|
|
unsigned int subWflength;
|
2023-09-23 20:03:38 +00:00
|
|
|
int scopeScrollX;
|
|
|
|
int scopeScrollY;
|
2022-11-27 04:45:32 +00:00
|
|
|
QString stylesheetPath;
|
2023-01-18 05:09:54 +00:00
|
|
|
bool confirmExit;
|
|
|
|
bool confirmPowerOff;
|
2023-05-15 12:47:45 +00:00
|
|
|
meter_t meter2Type;
|
2024-02-05 21:42:00 +00:00
|
|
|
meter_t meter3Type;
|
2024-02-06 19:06:50 +00:00
|
|
|
bool compMeterReverse = false;
|
2023-01-18 05:09:54 +00:00
|
|
|
bool clickDragTuningEnable;
|
2023-02-19 03:25:02 +00:00
|
|
|
int currentColorPresetNumber = 0;
|
2023-05-28 21:11:59 +00:00
|
|
|
bool rigCreatorEnable = false;
|
2023-09-19 22:04:48 +00:00
|
|
|
int frequencyUnits = 3;
|
2023-01-18 05:09:54 +00:00
|
|
|
|
|
|
|
// Radio:
|
2022-11-27 04:45:32 +00:00
|
|
|
unsigned char radioCIVAddr;
|
|
|
|
bool CIVisRadioModel;
|
|
|
|
bool forceRTSasPTT;
|
2023-01-18 05:09:54 +00:00
|
|
|
int polling_ms;
|
2022-11-27 04:45:32 +00:00
|
|
|
QString serialPortRadio;
|
|
|
|
quint32 serialPortBaud;
|
2023-01-18 05:09:54 +00:00
|
|
|
QString virtualSerialPort;
|
|
|
|
unsigned char localAFgain;
|
|
|
|
audioType audioSystem;
|
|
|
|
|
|
|
|
// Controls:
|
2022-11-27 04:45:32 +00:00
|
|
|
bool enablePTT;
|
|
|
|
bool niceTS;
|
2023-01-19 07:17:28 +00:00
|
|
|
bool automaticSidebandSwitching = true;
|
2023-01-30 12:01:29 +00:00
|
|
|
bool enableUSBControllers;
|
2023-01-18 05:09:54 +00:00
|
|
|
|
|
|
|
// LAN:
|
2022-11-27 04:45:32 +00:00
|
|
|
bool enableLAN;
|
|
|
|
bool enableRigCtlD;
|
|
|
|
quint16 rigCtlPort;
|
|
|
|
quint16 tcpPort;
|
2023-07-06 09:36:11 +00:00
|
|
|
quint16 tciPort=50001;
|
2022-11-27 04:45:32 +00:00
|
|
|
quint8 waterfallFormat;
|
2023-01-18 05:09:54 +00:00
|
|
|
|
|
|
|
// Cluster:
|
2023-06-11 09:33:16 +00:00
|
|
|
QList<clusterSettings> clusters;
|
2022-11-27 04:45:32 +00:00
|
|
|
bool clusterUdpEnable;
|
|
|
|
bool clusterTcpEnable;
|
|
|
|
int clusterUdpPort;
|
2023-02-20 21:45:33 +00:00
|
|
|
int clusterTcpPort = 7300;
|
2023-01-18 05:13:16 +00:00
|
|
|
int clusterTimeout; // used?
|
|
|
|
bool clusterSkimmerSpotsEnable; // where is this used?
|
2023-05-28 21:11:59 +00:00
|
|
|
QString clusterTcpServerName;
|
|
|
|
QString clusterTcpUserName;
|
|
|
|
QString clusterTcpPassword;
|
|
|
|
|
|
|
|
// Temporary settings
|
2023-09-30 10:08:20 +00:00
|
|
|
rigInput inputSource[4];
|
2023-06-08 07:20:50 +00:00
|
|
|
bool useUTC = false;
|
2023-05-28 21:11:59 +00:00
|
|
|
|
|
|
|
audioSetup rxSetup;
|
|
|
|
audioSetup txSetup;
|
2023-06-11 09:33:16 +00:00
|
|
|
|
2022-11-27 04:45:32 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // PREFS_H
|