summaryrefslogtreecommitdiff
path: root/Configuration.hpp
diff options
context:
space:
mode:
authorhibby <d@vehibberd.com>2018-02-16 15:17:14 +0000
committerhibby <d@vehibberd.com>2018-02-16 15:17:14 +0000
commit37f727ac0746fd85504aa46c1f023c09b3eff33a (patch)
treec8a7ce04545040a8f161ba279528730bd9a3e6ab /Configuration.hpp
parentd63dd8d081a6fcd0715cd13f26df59fb831769d2 (diff)
New upstream version 1.8.0+repackupstream/1.8.0+repack
Diffstat (limited to 'Configuration.hpp')
-rw-r--r--Configuration.hpp108
1 files changed, 89 insertions, 19 deletions
diff --git a/Configuration.hpp b/Configuration.hpp
index e2003d16..c6e8875f 100644
--- a/Configuration.hpp
+++ b/Configuration.hpp
@@ -2,8 +2,10 @@
#define CONFIGURATION_HPP_
#include <QObject>
+#include <QFont>
#include "Radio.hpp"
+#include "IARURegions.hpp"
#include "AudioDevice.hpp"
#include "Transceiver.hpp"
@@ -14,9 +16,8 @@ class QWidget;
class QAudioDeviceInfo;
class QString;
class QDir;
-class QFont;
class Bands;
-class FrequencyList;
+class FrequencyList_v2;
class StationList;
class QStringListModel;
class QHostAddress;
@@ -54,8 +55,8 @@ class QHostAddress;
class Configuration final
: public QObject
{
- Q_OBJECT;
- Q_ENUMS (DataMode Type2MsgGen);
+ Q_OBJECT
+ Q_ENUMS (DataMode Type2MsgGen)
public:
using MODE = Transceiver::MODE;
@@ -64,15 +65,22 @@ public:
using port_type = quint16;
enum DataMode {data_mode_none, data_mode_USB, data_mode_data};
+ Q_ENUM (DataMode)
enum Type2MsgGen {type_2_msg_1_full, type_2_msg_3_full, type_2_msg_5_only};
+ Q_ENUM (Type2MsgGen)
- explicit Configuration (QSettings * settings, QWidget * parent = nullptr);
+ explicit Configuration (QDir const& temp_directory, QSettings * settings,
+ QWidget * parent = nullptr);
~Configuration ();
+ void select_tab (int);
int exec ();
+ bool is_active () const;
QDir temp_dir () const;
QDir doc_dir () const;
+ QDir data_dir () const;
+ QDir writeable_data_dir () const;
QAudioDeviceInfo const& audio_input_device () const;
AudioDevice::Channel audio_input_channel () const;
@@ -88,8 +96,14 @@ public:
QString my_callsign () const;
QString my_grid () const;
+ QFont text_font () const;
QFont decoded_text_font () const;
qint32 id_interval () const;
+ qint32 ntrials() const;
+ qint32 aggressive() const;
+ qint32 RxBandwidth() const;
+ double degrade() const;
+ double txDelay() const;
bool id_after_73 () const;
bool tx_QSY_allowed () const;
bool spot_to_psk_reporter () const;
@@ -104,9 +118,21 @@ public:
bool miles () const;
bool quick_call () const;
bool disable_TX_on_73 () const;
- bool watchdog () const;
+ int watchdog () const;
bool TX_messages () const;
bool split_mode () const;
+ bool enable_VHF_features () const;
+ bool decode_at_52s () const;
+ bool single_decode () const;
+ bool twoPass() const;
+ bool x2ToneSpacing() const;
+ bool contestMode() const;
+ bool realTimeDecode() const;
+ bool MyDx() const;
+ bool CQMyN() const;
+ bool NDxG() const;
+ bool NN() const;
+ bool EMEonly() const;
bool post_decodes () const;
QString udp_server_name () const;
port_type udp_server_port () const;
@@ -114,26 +140,68 @@ public:
bool udpWindowToFront () const;
bool udpWindowRestore () const;
Bands * bands ();
- FrequencyList * frequencies ();
+ Bands const * bands () const;
+ IARURegions::Region region () const;
+ FrequencyList_v2 * frequencies ();
+ FrequencyList_v2 const * frequencies () const;
StationList * stations ();
+ StationList const * stations () const;
QStringListModel * macros ();
+ QStringListModel const * macros () const;
QDir save_directory () const;
+ QDir azel_directory () const;
QString rig_name () const;
- unsigned jt9w_bw_mult () const;
- float jt9w_min_dt () const;
- float jt9w_max_dt () const;
Type2MsgGen type_2_msg_gen () const;
QColor color_CQ () const;
QColor color_MyCall () const;
QColor color_TxMsg () const;
QColor color_DXCC () const;
QColor color_NewCall () const;
+ bool pwrBandTxMemory () const;
+ bool pwrBandTuneMemory () const;
- // This method queries if a CAT and PTT connection is operational,
+ struct CalibrationParams
+ {
+ CalibrationParams ()
+ : intercept {0.}
+ , slope_ppm {0.}
+ {
+ }
+
+ CalibrationParams (double the_intercept, double the_slope_ppm)
+ : intercept {the_intercept}
+ , slope_ppm {the_slope_ppm}
+ {
+ }
+
+ double intercept; // Hertz
+ double slope_ppm; // Hertz
+ };
+
+ // Temporarily enable or disable calibration adjustments.
+ void enable_calibration (bool = true);
+
+ // Set the calibration parameters and enable calibration corrections.
+ void set_calibration (CalibrationParams);
+
+ // This method queries if a CAT and PTT connection is operational.
+ bool is_transceiver_online () const;
+
+ // Start the rig connection, safe and normal to call when rig is
+ // already open.
+ bool transceiver_online ();
+
+ // check if a real rig is configured
+ bool is_dummy_rig () const;
+
+ // Frequency resolution of the rig
//
- // It also doubles as an initialisation method when the
- // open_if_closed parameter is passed as true.
- bool transceiver_online (bool open_if_closed = false);
+ // 0 - 1Hz
+ // 1 - 10Hz rounded
+ // -1 - 10Hz truncated
+ // 2 - 100Hz rounded
+ // -2 - 100Hz truncated
+ int transceiver_resolution () const;
// Close down connection to rig.
void transceiver_offline ();
@@ -169,9 +237,10 @@ public:
//
- // This signal indicates that a font has been selected and accepted
- // for the decoded text.
+ // These signals indicate a font has been selected and accepted for
+ // the application text and decoded text respectively.
//
+ Q_SIGNAL void text_font_changed (QFont);
Q_SIGNAL void decoded_text_font_changed (QFont);
//
@@ -186,7 +255,7 @@ public:
//
// signals a change in one of the TransceiverState members
- Q_SIGNAL void transceiver_update (Transceiver::TransceiverState) const;
+ Q_SIGNAL void transceiver_update (Transceiver::TransceiverState const&) const;
// Signals a failure of a control rig CAT or PTT connection.
//
@@ -194,16 +263,17 @@ public:
// connections are closed automatically. The connections can be
// re-established with a call to transceiver_online(true) assuming
// the fault condition has been rectified or is transient.
- Q_SIGNAL void transceiver_failure (QString reason) const;
+ Q_SIGNAL void transceiver_failure (QString const& reason) const;
private:
class impl;
pimpl<impl> m_;
};
-
+#if QT_VERSION < 0x050500
Q_DECLARE_METATYPE (Configuration::DataMode);
Q_DECLARE_METATYPE (Configuration::Type2MsgGen);
+#endif
#if !defined (QT_NO_DEBUG_STREAM)
ENUM_QDEBUG_OPS_DECL (Configuration, DataMode);