kopia lustrzana https://gitlab.com/eliggett/wfview
Moved preferences to prefs.h, which should make it easier to add new
preferences. Moved custom types (as it seemed useful here and there) to wfviewtypes.h. Let's use the wfviewtypes.h file for any kind of datatype which more than one module can make use of.half-duplex
rodzic
afcf087a70
commit
b25c8a93f3
|
@ -17,7 +17,7 @@
|
|||
#include <eigen3/Eigen/Eigen>
|
||||
#endif
|
||||
|
||||
enum audioType {qtAudio,portAudio,rtAudio};
|
||||
#include "wfviewtypes.h"
|
||||
|
||||
#include "resampler/speex_resampler.h"
|
||||
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
#ifndef PREFS_H
|
||||
#define PREFS_H
|
||||
|
||||
#include <QString>
|
||||
|
||||
#include "wfviewtypes.h"
|
||||
|
||||
struct preferences {
|
||||
bool useFullScreen;
|
||||
bool useSystemTheme;
|
||||
bool drawPeaks;
|
||||
underlay_t underlayMode = underlayNone;
|
||||
int underlayBufferSize = 64;
|
||||
bool wfAntiAlias;
|
||||
bool wfInterpolate;
|
||||
QString stylesheetPath;
|
||||
unsigned char radioCIVAddr;
|
||||
bool CIVisRadioModel;
|
||||
bool forceRTSasPTT;
|
||||
QString serialPortRadio;
|
||||
quint32 serialPortBaud;
|
||||
bool enablePTT;
|
||||
bool niceTS;
|
||||
bool enableLAN;
|
||||
bool enableRigCtlD;
|
||||
quint16 rigCtlPort;
|
||||
int currentColorPresetNumber = 0;
|
||||
QString virtualSerialPort;
|
||||
unsigned char localAFgain;
|
||||
unsigned int wflength;
|
||||
int wftheme;
|
||||
int plotFloor;
|
||||
int plotCeiling;
|
||||
bool confirmExit;
|
||||
bool confirmPowerOff;
|
||||
meterKind meter2Type;
|
||||
quint16 tcpPort;
|
||||
quint8 waterfallFormat;
|
||||
audioType audioSystem;
|
||||
bool clusterUdpEnable;
|
||||
bool clusterTcpEnable;
|
||||
int clusterUdpPort;
|
||||
QString clusterTcpServerName;
|
||||
QString clusterTcpUserName;
|
||||
QString clusterTcpPassword;
|
||||
int clusterTimeout;
|
||||
bool clickDragTuningEnable;
|
||||
};
|
||||
|
||||
#endif // PREFS_H
|
|
@ -5,7 +5,7 @@
|
|||
#include <QMutexLocker>
|
||||
#include <QDebug>
|
||||
|
||||
|
||||
#include "wfviewtypes.h"
|
||||
#include "commhandler.h"
|
||||
#include "pttyhandler.h"
|
||||
#include "udphandler.h"
|
||||
|
@ -23,48 +23,6 @@
|
|||
// note: using a define because switch case doesn't even work with const unsigned char. Surprised me.
|
||||
#define compCivAddr 0xE1
|
||||
|
||||
enum meterKind {
|
||||
meterNone=0,
|
||||
meterS,
|
||||
meterCenter,
|
||||
meterSWR,
|
||||
meterPower,
|
||||
meterALC,
|
||||
meterComp,
|
||||
meterVoltage,
|
||||
meterCurrent,
|
||||
meterRxdB,
|
||||
meterTxMod,
|
||||
meterRxAudio,
|
||||
meterAudio,
|
||||
meterLatency
|
||||
};
|
||||
|
||||
enum spectrumMode {
|
||||
spectModeCenter=0x00,
|
||||
spectModeFixed=0x01,
|
||||
spectModeScrollC=0x02,
|
||||
spectModeScrollF=0x03,
|
||||
spectModeUnknown=0xff
|
||||
};
|
||||
|
||||
struct freqt {
|
||||
quint64 Hz;
|
||||
double MHzDouble;
|
||||
};
|
||||
|
||||
struct datekind {
|
||||
uint16_t year;
|
||||
unsigned char month;
|
||||
unsigned char day;
|
||||
};
|
||||
|
||||
struct timekind {
|
||||
unsigned char hours;
|
||||
unsigned char minutes;
|
||||
bool isMinus;
|
||||
};
|
||||
|
||||
class rigCommander : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
47
wfmain.h
47
wfmain.h
|
@ -20,6 +20,8 @@
|
|||
#include <QColor>
|
||||
|
||||
#include "logcategories.h"
|
||||
#include "wfviewtypes.h"
|
||||
#include "prefs.h"
|
||||
#include "commhandler.h"
|
||||
#include "rigcommander.h"
|
||||
#include "rigstate.h"
|
||||
|
@ -799,9 +801,6 @@ private:
|
|||
quint16 wfLength;
|
||||
bool spectrumDrawLock;
|
||||
|
||||
enum underlay_t { underlayNone, underlayPeakHold, underlayPeakBuffer, underlayAverageBuffer };
|
||||
|
||||
|
||||
QByteArray spectrumPeaks;
|
||||
QVector <double> spectrumPlasmaLine;
|
||||
QVector <QByteArray> spectrumPlasma;
|
||||
|
@ -902,47 +901,7 @@ private:
|
|||
|
||||
colorPrefsType colorPreset[numColorPresetsTotal];
|
||||
|
||||
struct preferences {
|
||||
bool useFullScreen;
|
||||
bool useSystemTheme;
|
||||
bool drawPeaks;
|
||||
underlay_t underlayMode = underlayNone;
|
||||
int underlayBufferSize = 64;
|
||||
bool wfAntiAlias;
|
||||
bool wfInterpolate;
|
||||
QString stylesheetPath;
|
||||
unsigned char radioCIVAddr;
|
||||
bool CIVisRadioModel;
|
||||
bool forceRTSasPTT;
|
||||
QString serialPortRadio;
|
||||
quint32 serialPortBaud;
|
||||
bool enablePTT;
|
||||
bool niceTS;
|
||||
bool enableLAN;
|
||||
bool enableRigCtlD;
|
||||
quint16 rigCtlPort;
|
||||
int currentColorPresetNumber = 0;
|
||||
QString virtualSerialPort;
|
||||
unsigned char localAFgain;
|
||||
unsigned int wflength;
|
||||
int wftheme;
|
||||
int plotFloor;
|
||||
int plotCeiling;
|
||||
bool confirmExit;
|
||||
bool confirmPowerOff;
|
||||
meterKind meter2Type;
|
||||
quint16 tcpPort;
|
||||
quint8 waterfallFormat;
|
||||
audioType audioSystem;
|
||||
bool clusterUdpEnable;
|
||||
bool clusterTcpEnable;
|
||||
int clusterUdpPort;
|
||||
QString clusterTcpServerName;
|
||||
QString clusterTcpUserName;
|
||||
QString clusterTcpPassword;
|
||||
int clusterTimeout;
|
||||
bool clickDragTuningEnable;
|
||||
} prefs;
|
||||
preferences prefs;
|
||||
|
||||
preferences defPrefs;
|
||||
udpPreferences udpPrefs;
|
||||
|
|
|
@ -185,6 +185,7 @@ HEADERS += wfmain.h \
|
|||
colorprefs.h \
|
||||
commhandler.h \
|
||||
loggingwindow.h \
|
||||
prefs.h \
|
||||
rigcommander.h \
|
||||
freqmemory.h \
|
||||
rigidentities.h \
|
||||
|
@ -217,7 +218,8 @@ HEADERS += wfmain.h \
|
|||
tcpserver.h \
|
||||
cluster.h \
|
||||
database.h \
|
||||
aboutbox.h
|
||||
aboutbox.h \
|
||||
wfviewtypes.h
|
||||
|
||||
|
||||
FORMS += wfmain.ui \
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
#ifndef WFVIEWTYPES_H
|
||||
#define WFVIEWTYPES_H
|
||||
|
||||
enum underlay_t { underlayNone, underlayPeakHold, underlayPeakBuffer, underlayAverageBuffer };
|
||||
|
||||
enum meterKind {
|
||||
meterNone=0,
|
||||
meterS,
|
||||
meterCenter,
|
||||
meterSWR,
|
||||
meterPower,
|
||||
meterALC,
|
||||
meterComp,
|
||||
meterVoltage,
|
||||
meterCurrent,
|
||||
meterRxdB,
|
||||
meterTxMod,
|
||||
meterRxAudio,
|
||||
meterAudio,
|
||||
meterLatency
|
||||
};
|
||||
|
||||
enum spectrumMode {
|
||||
spectModeCenter=0x00,
|
||||
spectModeFixed=0x01,
|
||||
spectModeScrollC=0x02,
|
||||
spectModeScrollF=0x03,
|
||||
spectModeUnknown=0xff
|
||||
};
|
||||
|
||||
struct freqt {
|
||||
quint64 Hz;
|
||||
double MHzDouble;
|
||||
};
|
||||
|
||||
struct datekind {
|
||||
uint16_t year;
|
||||
unsigned char month;
|
||||
unsigned char day;
|
||||
};
|
||||
|
||||
struct timekind {
|
||||
unsigned char hours;
|
||||
unsigned char minutes;
|
||||
bool isMinus;
|
||||
};
|
||||
|
||||
enum audioType {qtAudio,portAudio,rtAudio};
|
||||
|
||||
|
||||
#endif // WFVIEWTYPES_H
|
Ładowanie…
Reference in New Issue