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 QString test_notification_path(
const QString &key)
const;
90 Q_SIGNAL
void test_notify(
const QString &key);
96 bool restart_audio_input()
const;
97 bool restart_audio_output()
const;
98 bool restart_notification_audio_output()
const;
100 bool use_dynamic_grid()
const;
101 QString my_callsign()
const;
102 QString my_grid()
const;
103 QSet<QString> my_groups()
const;
104 void addGroup(QString
const &group);
105 void removeGroup(QString
const &group);
106 void setMyGroups(QStringList
const &groups);
107 void addToHbBlacklist(
const QString &callsign);
108 QSet<QString> auto_whitelist()
const;
109 QSet<QString> auto_blacklist()
const;
110 QSet<QString> hb_blacklist()
const;
111 QSet<QString> spot_blacklist()
const;
112 QSet<QString> rx_callsign_blocklist()
const;
113 QSet<QString> primary_highlight_words()
const;
114 QSet<QString> secondary_highlight_words()
const;
115 int activity_aging()
const;
116 int callsign_aging()
const;
119 QString my_info()
const;
120 QString my_status()
const;
121 QString hb_message()
const;
122 QString cq_message()
const;
123 QString reply_message()
const;
124 QFont table_font()
const;
125 QFont text_font()
const;
126 QFont rx_text_font()
const;
127 QFont tx_text_font()
const;
128 QFont compose_text_font()
const;
129 double txDelay()
const;
130 bool write_logs()
const;
131 bool reset_activity()
const;
132 bool check_for_updates()
const;
133 bool tx_qsy_allowed()
const;
134 bool spot_to_reporting_networks()
const;
135 void set_spot_to_reporting_networks(
bool);
136 bool spot_to_aprs()
const;
137 bool spot_to_aprs_relay()
const;
138 bool transmit_directed()
const;
139 bool autoreply_on_at_startup()
const;
140 bool autoreply_confirmation()
const;
141 void set_autoreply_confirmation(
bool);
142 bool heartbeat_anywhere()
const;
143 bool heartbeat_qso_pause()
const;
144 bool heartbeat_ack_snr()
const;
145 bool hb_rate_limit()
const;
146 bool relay_off()
const;
147 bool monitor_off_at_startup()
const;
148 bool transmit_off_at_startup()
const;
149 bool monitor_last_used()
const;
150 bool insert_blank()
const;
154 bool hold_ptt()
const;
155 bool avoid_forced_identify()
const;
156 bool avoid_allcall()
const;
157 void set_avoid_allcall(
bool avoid);
158 bool spellcheck()
const;
159 int heartbeat()
const;
160 int watchdog()
const;
161 bool TX_messages()
const;
162 bool split_mode()
const;
163 QString opCall()
const;
164 QString ptt_command()
const;
165 QString aprs_server_name()
const;
166 port_type aprs_server_port()
const;
167 QString udp_server_name()
const;
168 port_type udp_server_port()
const;
169 QString tcp_server_name()
const;
170 port_type tcp_server_port()
const;
171 QString n1mm_server_name()
const;
172 port_type n1mm_server_port()
const;
173 bool valid_n1mm_info()
const;
174 bool broadcast_to_n1mm()
const;
175 QString n3fjp_server_name()
const;
176 port_type n3fjp_server_port()
const;
177 bool valid_n3fjp_info()
const;
178 bool broadcast_to_n3fjp()
const;
179 bool accept_udp_requests()
const;
180 bool accept_tcp_requests()
const;
181 bool udpEnabled()
const;
182 bool tcpEnabled()
const;
219 int tcp_max_connections()
const;
221 Bands const *bands()
const;
222 IARURegions::Region region()
const;
227 bool auto_switch_bands()
const;
228 QStringListModel *macros();
229 QStringListModel
const *macros()
const;
230 QDir save_directory()
const;
231 QString rig_name()
const;
232 QColor color_table_background()
const;
233 QColor color_table_highlight()
const;
234 QColor color_table_foreground()
const;
235 QColor color_primary_highlight()
const;
236 QColor color_secondary_highlight()
const;
237 QColor color_CQ()
const;
238 QColor color_MyCall()
const;
239 QColor color_rx_background()
const;
240 QColor color_rx_foreground()
const;
241 QColor color_tx_foreground()
const;
242 QColor color_compose_background()
const;
243 QColor color_compose_foreground()
const;
244 QColor color_DXCC()
const;
245 QColor color_NewCall()
const;
246 bool pills_enabled()
const;
247 QColor color_pill_recipient_bg()
const;
248 QColor color_pill_recipient_fg()
const;
249 QColor color_pill_command_bg()
const;
250 QColor color_pill_command_fg()
const;
251 QColor color_pill_group_bg()
const;
252 QColor color_pill_group_fg()
const;
253 QColor color_pill_sender_bg()
const;
254 QColor color_pill_sender_fg()
const;
255 bool pwrBandTxMemory()
const;
256 bool pwrBandTuneMemory()
const;
258 struct CalibrationParams {
259 CalibrationParams() : intercept{0.}, slope_ppm{0.} {}
261 CalibrationParams(
double the_intercept,
double the_slope_ppm)
262 : intercept{the_intercept}, slope_ppm{the_slope_ppm} {}
269 void enable_calibration(
bool =
true);
276 void set_dynamic_location(QString
const &);
280 void set_dynamic_station_info(QString
const &info);
284 void set_dynamic_station_status(QString
const &status);
287 void add_to_rx_callsign_blocklist(
const QString &callsign);
290 bool is_transceiver_online()
const;
294 bool transceiver_online();
297 bool is_dummy_rig()
const;
306 int transceiver_resolution()
const;
309 void transceiver_offline();
312 Q_SLOT
void transceiver_frequency(Frequency);
316 Q_SLOT
void transceiver_tx_frequency(Frequency = 0u);
321 Q_SLOT
void transceiver_mode(MODE);
328 Q_SLOT
void transceiver_ptt(
bool =
true);
338 Q_SLOT
void sync_transceiver(
bool force_signal =
false,
339 bool enforce_mode_and_split =
false);
341 Q_SLOT
void invalidate_audio_input_device(QString error);
342 Q_SLOT
void invalidate_audio_output_device(QString error);
343 Q_SLOT
void invalidate_notification_audio_output_device(QString error);
349 Q_SIGNAL
void gui_text_font_changed(QFont);
350 Q_SIGNAL
void tx_text_font_changed(QFont);
351 Q_SIGNAL
void rx_text_font_changed(QFont);
352 Q_SIGNAL
void compose_text_font_changed(QFont);
353 Q_SIGNAL
void table_font_changed(QFont);
354 Q_SIGNAL
void colors_changed();
359 Q_SIGNAL
void udp_server_name_changed(QString
const &name);
360 Q_SIGNAL
void udp_server_port_changed(port_type port);
361 Q_SIGNAL
void tcp_server_changed(QString
const &host);
362 Q_SIGNAL
void tcp_server_port_changed(port_type port);
363 Q_SIGNAL
void tcp_max_connections_changed(
int n);
365 Q_SIGNAL
void spot_to_aprs_relay_changed(
bool enabled);
399 Q_SIGNAL
void band_schedule_changed(
StationList &stations);
402 Q_SIGNAL
void auto_switch_bands_changed(
bool auto_switch_bands);
421 Q_SIGNAL
void transceiver_failure(QString
const &reason)
const;
427 Q_SIGNAL
void enumerating_audio_devices();