57class Configuration final :
public QObject {
62 using MODE = Transceiver::MODE;
64 using Frequency = Radio::Frequency;
65 using port_type = quint16;
67 enum DataMode { data_mode_none, data_mode_USB, data_mode_data };
70 explicit Configuration(QDir
const &temp_directory, QSettings *settings,
71 QWidget *parent =
nullptr);
76 bool is_active()
const;
78 QDir temp_dir()
const;
79 QDir writeable_data_dir()
const;
81 QAudioDevice
const &audio_input_device()
const;
82 AudioDevice::Channel audio_input_channel()
const;
83 QAudioDevice
const &audio_output_device()
const;
84 AudioDevice::Channel audio_output_channel()
const;
85 QAudioDevice
const ¬ification_audio_output_device()
const;
87 bool notifications_enabled()
const;
88 QString notification_path(
const QString &key)
const;
89 Q_SIGNAL
void test_notify(
const QString &key);
95 bool restart_audio_input()
const;
96 bool restart_audio_output()
const;
97 bool restart_notification_audio_output()
const;
99 bool use_dynamic_grid()
const;
100 QString my_callsign()
const;
101 QString my_grid()
const;
102 QSet<QString> my_groups()
const;
103 void addGroup(QString
const &group);
104 void removeGroup(QString
const &group);
105 void setMyGroups(QStringList
const &groups);
106 QSet<QString> auto_whitelist()
const;
107 QSet<QString> auto_blacklist()
const;
108 QSet<QString> hb_blacklist()
const;
109 QSet<QString> spot_blacklist()
const;
110 QSet<QString> primary_highlight_words()
const;
111 QSet<QString> secondary_highlight_words()
const;
112 int activity_aging()
const;
113 int callsign_aging()
const;
116 QString my_info()
const;
117 QString my_status()
const;
118 QString hb_message()
const;
119 QString cq_message()
const;
120 QString reply_message()
const;
121 QFont table_font()
const;
122 QFont text_font()
const;
123 QFont rx_text_font()
const;
124 QFont tx_text_font()
const;
125 QFont compose_text_font()
const;
126 double txDelay()
const;
127 bool write_logs()
const;
128 bool reset_activity()
const;
129 bool check_for_updates()
const;
130 bool tx_qsy_allowed()
const;
131 bool spot_to_reporting_networks()
const;
132 void set_spot_to_reporting_networks(
bool);
133 bool spot_to_aprs()
const;
134 bool spot_to_aprs_relay()
const;
135 bool transmit_directed()
const;
136 bool autoreply_on_at_startup()
const;
137 bool autoreply_confirmation()
const;
138 void set_autoreply_confirmation(
bool);
139 bool heartbeat_anywhere()
const;
140 bool heartbeat_qso_pause()
const;
141 bool heartbeat_ack_snr()
const;
142 bool relay_off()
const;
143 bool monitor_off_at_startup()
const;
144 bool transmit_off_at_startup()
const;
145 bool monitor_last_used()
const;
146 bool insert_blank()
const;
150 bool hold_ptt()
const;
151 bool avoid_forced_identify()
const;
152 bool avoid_allcall()
const;
153 void set_avoid_allcall(
bool avoid);
154 bool spellcheck()
const;
155 int heartbeat()
const;
156 int watchdog()
const;
157 bool TX_messages()
const;
158 bool split_mode()
const;
159 QString opCall()
const;
160 QString ptt_command()
const;
161 QString aprs_server_name()
const;
162 port_type aprs_server_port()
const;
163 QString udp_server_name()
const;
164 port_type udp_server_port()
const;
165 QString tcp_server_name()
const;
166 port_type tcp_server_port()
const;
167 QString n1mm_server_name()
const;
168 port_type n1mm_server_port()
const;
169 bool valid_n1mm_info()
const;
170 bool broadcast_to_n1mm()
const;
171 QString n3fjp_server_name()
const;
172 port_type n3fjp_server_port()
const;
173 bool valid_n3fjp_info()
const;
174 bool broadcast_to_n3fjp()
const;
175 bool accept_udp_requests()
const;
176 bool accept_tcp_requests()
const;
177 bool udpEnabled()
const;
178 bool tcpEnabled()
const;
215 int tcp_max_connections()
const;
217 Bands const *bands()
const;
218 IARURegions::Region region()
const;
223 bool auto_switch_bands()
const;
224 QStringListModel *macros();
225 QStringListModel
const *macros()
const;
226 QDir save_directory()
const;
227 QString rig_name()
const;
228 QColor color_table_background()
const;
229 QColor color_table_highlight()
const;
230 QColor color_table_foreground()
const;
231 QColor color_primary_highlight()
const;
232 QColor color_secondary_highlight()
const;
233 QColor color_CQ()
const;
234 QColor color_MyCall()
const;
235 QColor color_rx_background()
const;
236 QColor color_rx_foreground()
const;
237 QColor color_tx_foreground()
const;
238 QColor color_compose_background()
const;
239 QColor color_compose_foreground()
const;
240 QColor color_DXCC()
const;
241 QColor color_NewCall()
const;
242 bool pwrBandTxMemory()
const;
243 bool pwrBandTuneMemory()
const;
245 struct CalibrationParams {
246 CalibrationParams() : intercept{0.}, slope_ppm{0.} {}
248 CalibrationParams(
double the_intercept,
double the_slope_ppm)
249 : intercept{the_intercept}, slope_ppm{the_slope_ppm} {}
256 void enable_calibration(
bool =
true);
263 void set_dynamic_location(QString
const &);
267 void set_dynamic_station_info(QString
const &info);
271 void set_dynamic_station_status(QString
const &status);
274 bool is_transceiver_online()
const;
278 bool transceiver_online();
281 bool is_dummy_rig()
const;
290 int transceiver_resolution()
const;
293 void transceiver_offline();
296 Q_SLOT
void transceiver_frequency(Frequency);
300 Q_SLOT
void transceiver_tx_frequency(Frequency = 0u);
305 Q_SLOT
void transceiver_mode(MODE);
312 Q_SLOT
void transceiver_ptt(
bool =
true);
322 Q_SLOT
void sync_transceiver(
bool force_signal =
false,
323 bool enforce_mode_and_split =
false);
325 Q_SLOT
void invalidate_audio_input_device(QString error);
326 Q_SLOT
void invalidate_audio_output_device(QString error);
327 Q_SLOT
void invalidate_notification_audio_output_device(QString error);
333 Q_SIGNAL
void gui_text_font_changed(QFont);
334 Q_SIGNAL
void tx_text_font_changed(QFont);
335 Q_SIGNAL
void rx_text_font_changed(QFont);
336 Q_SIGNAL
void compose_text_font_changed(QFont);
337 Q_SIGNAL
void table_font_changed(QFont);
338 Q_SIGNAL
void colors_changed();
343 Q_SIGNAL
void udp_server_name_changed(QString
const &name);
344 Q_SIGNAL
void udp_server_port_changed(port_type port);
345 Q_SIGNAL
void tcp_server_changed(QString
const &host);
346 Q_SIGNAL
void tcp_server_port_changed(port_type port);
347 Q_SIGNAL
void tcp_max_connections_changed(
int n);
349 Q_SIGNAL
void spot_to_aprs_relay_changed(
bool enabled);
383 Q_SIGNAL
void band_schedule_changed(
StationList &stations);
386 Q_SIGNAL
void auto_switch_bands_changed(
bool auto_switch_bands);
405 Q_SIGNAL
void transceiver_failure(QString
const &reason)
const;
411 Q_SIGNAL
void enumerating_audio_devices();