Compare commits

..

46 Commits

Author SHA1 Message Date
Jordan Sherer 22e4b0891e Bump eol 2018-11-15 22:09:03 -05:00
Jordan Sherer 8c564b6637 Added control menu 2018-11-15 22:06:52 -05:00
Jordan Sherer 97763ed82d Bump to 0.9 2018-11-15 21:57:20 -05:00
Jordan Sherer a7849c5b72 Added push button bold style for colorblindness 2018-11-15 21:57:04 -05:00
Jordan Sherer 04394273dd Added notification for CQ messages 2018-11-15 15:03:05 -05:00
Jordan Sherer 1052dd3f9f Added macro expansion in typed message text 2018-11-14 22:48:31 -05:00
Jordan Sherer 78ed799a8b Updated configuration panel to be more flexible (scroll areas) 2018-11-14 22:03:45 -05:00
Jordan Sherer c0d08f87b6 Added keyboard shortcuts to the basic Show actions. Added show action to disable tooltips 2018-11-13 12:35:39 -05:00
Jordan Sherer f92b3db5ea Added ability to add an arbitrary station to the heard list manually 2018-11-12 16:51:51 -05:00
Jordan Sherer cebed44ccd User Interface Tweaks:
* Changed Window Menu to View Menu
* Added Show Clock to View Menu
* Changed minimum sizing for better fit on smaller screens
* Reordered Clock and Date for Clock Priority
2018-11-12 16:34:31 -05:00
Jordan Sherer d47d88681b Updated dependencies list 2018-11-11 15:06:45 -05:00
Jordan Sherer 1be0ee4f4f Added a reference to dependency installation 2018-11-11 14:58:23 -05:00
Jordan Sherer 43d8986e0a Tweaking window sizes 2018-11-08 17:11:25 -05:00
Jordan Sherer fd69dce0ae Fixed word wrapping of non-breaking space words by only replacing double spaces 2018-11-06 23:06:05 -05:00
Jordan Sherer b2fb3f31ac Added azimuth to the distance column 2018-11-06 17:28:21 -05:00
Jordan Sherer db704858e2 Merge branch 'ft8call-develop' of bitbucket.org:widefido/js8call into ft8call-develop 2018-11-05 21:36:13 -05:00
Jordan Sherer 1d11f0f8ba Fixed word wrapping with no break spaces 2018-11-05 21:13:16 -05:00
Jordan Sherer b6bc50a8e1 Fixed QAction for older Qt versions 2018-11-05 17:00:59 -05:00
Jordan Sherer 5addf8f61f Fixed bug with space collapsing in displayTextForFreq 2018-11-05 16:51:24 -05:00
Jordan Sherer 367966f5e6 Bump to v0.8.3 2018-11-05 16:47:09 -05:00
Jordan Sherer caaaa957b6 Fixed OSX issue with menuBar menus that have sub-menues that aren't populated at construction, but when the menu is aboutToShow 2018-11-05 16:00:12 -05:00
Jordan Sherer c440d4c143 Added TDELTA macro variable 2018-11-05 11:35:37 -05:00
Jordan Sherer 740c0b4c04 Fixed call activity with empty rows 2018-11-04 14:57:44 -05:00
Jordan Sherer f5ce9f0e30 Added TU short command 2018-11-03 22:38:27 -04:00
Jordan Sherer 0a6ec136f9 Fixed macro expansion for auto-reply messages QTC and QTH 2018-11-03 22:20:49 -04:00
Jordan Sherer d5e1f2822d Fixed more issues with compressed data decoding and invalid frames 2018-11-03 22:14:42 -04:00
Jordan Sherer 3fffb45338 Bump to v0.8.2 2018-11-03 02:13:19 -04:00
Jordan Sherer 1d255b1ebf Fixed time delta labeling 2018-11-03 02:06:20 -04:00
Jordan Sherer bb97799bdf Added checkmark to column header for worked before status 2018-11-03 02:01:01 -04:00
Jordan Sherer cc6a719f6d Added default column show settings 2018-11-03 01:59:21 -04:00
Jordan Sherer ccd380356a Fixed log cache issue by reloading log after qso or erase 2018-11-03 01:47:54 -04:00
Jordan Sherer 9f8583c8e2 Fixed reply queuing when text is typed in the reply textbox 2018-11-03 01:31:24 -04:00
Jordan Sherer c9016d7378 Fixed issue with false decodes causing app crash 2018-11-03 01:14:31 -04:00
Jordan Sherer cd683f9bf7 Added back foxcom waveform to the modulator 2018-11-01 22:14:57 -04:00
Jordan Sherer 6d7b187269 Fixed table column swap for snr and offset 2018-11-01 00:50:39 -04:00
Jordan Sherer 13308a38f8 Fixed sync for non APPLE 2018-11-01 00:44:14 -04:00
Jordan Sherer 804605e9e6 Fixed text count for APPLE 2018-11-01 00:41:15 -04:00
Jordan Sherer 4e981da9c8 Fixed send button initial frame count. Fixed apple specific text counting 2018-11-01 00:37:29 -04:00
Jordan Sherer 6436e163bd Fixed QSO log not uppercase callsign 2018-11-01 00:20:20 -04:00
Jordan Sherer 379a0fa78f Fixed bug with auto-replies using selected callsign as the directed callsign 2018-11-01 00:06:09 -04:00
Jordan Sherer 1c4a2ab7d8 Fix bug with fort.19 2018-11-01 00:05:41 -04:00
Jordan Sherer 54f6bdb0af Bump to v0.8.1 2018-10-31 22:13:26 -04:00
Jordan Sherer 5a0e2a8b14 Fixed time delta average reset on activity clear 2018-10-31 22:10:04 -04:00
Jordan Sherer 1a9c611195 Fixed issue with tdrift average when reset 2018-10-31 22:09:03 -04:00
Jordan Sherer c70661461e Fixed selcall button should prevent heartbeat acks 2018-10-31 21:52:58 -04:00
Jordan Sherer 1f866e14f1 Hotfix. Fixed heartbear idle min value should be zero 2018-10-31 21:42:08 -04:00
15 changed files with 4255 additions and 3601 deletions
+51 -4
View File
@@ -463,6 +463,9 @@ private:
void delete_selected_macros (QModelIndexList); void delete_selected_macros (QModelIndexList);
Q_SLOT void on_save_path_select_push_button_clicked (bool); Q_SLOT void on_save_path_select_push_button_clicked (bool);
Q_SLOT void on_azel_path_select_push_button_clicked (bool); Q_SLOT void on_azel_path_select_push_button_clicked (bool);
Q_SLOT void on_sound_cq_path_select_push_button_clicked();
Q_SLOT void on_sound_cq_path_test_push_button_clicked();
Q_SLOT void on_sound_cq_path_reset_push_button_clicked();
Q_SLOT void on_sound_dm_path_select_push_button_clicked(); Q_SLOT void on_sound_dm_path_select_push_button_clicked();
Q_SLOT void on_sound_dm_path_test_push_button_clicked(); Q_SLOT void on_sound_dm_path_test_push_button_clicked();
Q_SLOT void on_sound_dm_path_reset_push_button_clicked(); Q_SLOT void on_sound_dm_path_reset_push_button_clicked();
@@ -517,6 +520,7 @@ private:
QDir default_azel_directory_; QDir default_azel_directory_;
QDir azel_directory_; QDir azel_directory_;
QString sound_cq_path_; // cq message sound file
QString sound_dm_path_; // directed message sound file QString sound_dm_path_; // directed message sound file
QString sound_am_path_; // alert message sound file QString sound_am_path_; // alert message sound file
@@ -810,6 +814,7 @@ QStringListModel * Configuration::macros () {return &m_->macros_;}
QStringListModel const * Configuration::macros () const {return &m_->macros_;} QStringListModel const * Configuration::macros () const {return &m_->macros_;}
QDir Configuration::save_directory () const {return m_->save_directory_;} QDir Configuration::save_directory () const {return m_->save_directory_;}
QDir Configuration::azel_directory () const {return m_->azel_directory_;} QDir Configuration::azel_directory () const {return m_->azel_directory_;}
QString Configuration::sound_cq_path() const {return m_->sound_cq_path_;}
QString Configuration::sound_dm_path() const {return m_->sound_dm_path_;} QString Configuration::sound_dm_path() const {return m_->sound_dm_path_;}
QString Configuration::sound_am_path() const {return m_->sound_am_path_;} QString Configuration::sound_am_path() const {return m_->sound_am_path_;}
QString Configuration::rig_name () const {return m_->rig_params_.rig_name;} QString Configuration::rig_name () const {return m_->rig_params_.rig_name;}
@@ -1042,6 +1047,7 @@ Configuration::impl::impl (Configuration * self, QDir const& temp_directory,
, default_audio_output_device_selected_ {false} , default_audio_output_device_selected_ {false}
{ {
ui_->setupUi (this); ui_->setupUi (this);
// ui_->groupBox_6->setVisible(false); //### Temporary ??? ### // ui_->groupBox_6->setVisible(false); //### Temporary ??? ###
{ {
@@ -1331,6 +1337,7 @@ void Configuration::impl::initialize_models ()
ui_->PTT_method_button_group->button (rig_params_.ptt_type)->setChecked (true); ui_->PTT_method_button_group->button (rig_params_.ptt_type)->setChecked (true);
ui_->save_path_display_label->setText (save_directory_.absolutePath ()); ui_->save_path_display_label->setText (save_directory_.absolutePath ());
ui_->azel_path_display_label->setText (azel_directory_.absolutePath ()); ui_->azel_path_display_label->setText (azel_directory_.absolutePath ());
ui_->sound_cq_path_display_label->setText(sound_cq_path_);
ui_->sound_dm_path_display_label->setText(sound_dm_path_); ui_->sound_dm_path_display_label->setText(sound_dm_path_);
ui_->sound_am_path_display_label->setText(sound_am_path_); ui_->sound_am_path_display_label->setText(sound_am_path_);
ui_->CW_id_after_73_check_box->setChecked (id_after_73_); ui_->CW_id_after_73_check_box->setChecked (id_after_73_);
@@ -1430,7 +1437,7 @@ void Configuration::impl::done (int r)
{ {
// do this here since window is still on screen at this point // do this here since window is still on screen at this point
SettingsGroup g {settings_, "Configuration"}; SettingsGroup g {settings_, "Configuration"};
settings_->setValue ("window/geometry", saveGeometry ()); settings_->setValue ("WindowGeometry", saveGeometry ());
QDialog::done (r); QDialog::done (r);
} }
@@ -1438,7 +1445,9 @@ void Configuration::impl::done (int r)
void Configuration::impl::read_settings () void Configuration::impl::read_settings ()
{ {
SettingsGroup g {settings_, "Configuration"}; SettingsGroup g {settings_, "Configuration"};
restoreGeometry (settings_->value ("window/geometry").toByteArray ()); setMinimumSize(800, 400);
restoreGeometry (settings_->value ("WindowGeometry").toByteArray ());
setMinimumSize(800, 400);
auto_switch_bands_ = settings_->value("AutoSwitchBands", false).toBool(); auto_switch_bands_ = settings_->value("AutoSwitchBands", false).toBool();
my_callsign_ = settings_->value ("MyCall", QString {}).toString (); my_callsign_ = settings_->value ("MyCall", QString {}).toString ();
@@ -1533,6 +1542,7 @@ void Configuration::impl::read_settings ()
RxBandwidth_ = settings_->value ("RxBandwidth", 2500).toInt (); RxBandwidth_ = settings_->value ("RxBandwidth", 2500).toInt ();
save_directory_ = settings_->value ("SaveDir", default_save_directory_.absolutePath ()).toString (); save_directory_ = settings_->value ("SaveDir", default_save_directory_.absolutePath ()).toString ();
azel_directory_ = settings_->value ("AzElDir", default_azel_directory_.absolutePath ()).toString (); azel_directory_ = settings_->value ("AzElDir", default_azel_directory_.absolutePath ()).toString ();
sound_cq_path_ = settings_->value ("SoundCQPath", "").toString ();
sound_dm_path_ = settings_->value ("SoundDMPath", "").toString (); sound_dm_path_ = settings_->value ("SoundDMPath", "").toString ();
sound_am_path_ = settings_->value ("SoundAMPath", "").toString (); sound_am_path_ = settings_->value ("SoundAMPath", "").toString ();
@@ -1736,6 +1746,7 @@ void Configuration::impl::write_settings ()
settings_->setValue ("PTTport", rig_params_.ptt_port); settings_->setValue ("PTTport", rig_params_.ptt_port);
settings_->setValue ("SaveDir", save_directory_.absolutePath ()); settings_->setValue ("SaveDir", save_directory_.absolutePath ());
settings_->setValue ("AzElDir", azel_directory_.absolutePath ()); settings_->setValue ("AzElDir", azel_directory_.absolutePath ());
settings_->setValue ("SoundCQPath", sound_cq_path_);
settings_->setValue ("SoundDMPath", sound_dm_path_); settings_->setValue ("SoundDMPath", sound_dm_path_);
settings_->setValue ("SoundAMPath", sound_am_path_); settings_->setValue ("SoundAMPath", sound_am_path_);
@@ -1880,7 +1891,8 @@ void Configuration::impl::set_rig_invariants ()
// makes no sense with rig as "None" // makes no sense with rig as "None"
ui_->monitor_last_used_check_box->setEnabled (false); ui_->monitor_last_used_check_box->setEnabled (false);
ui_->CAT_control_group_box->setEnabled (false); ui_->catTab->setEnabled(false);
//ui_->CAT_control_group_box->setEnabled (false);
ui_->test_CAT_push_button->setEnabled (false); ui_->test_CAT_push_button->setEnabled (false);
ui_->test_PTT_push_button->setEnabled (TransceiverFactory::PTT_method_DTR == ptt_method ui_->test_PTT_push_button->setEnabled (TransceiverFactory::PTT_method_DTR == ptt_method
|| TransceiverFactory::PTT_method_RTS == ptt_method); || TransceiverFactory::PTT_method_RTS == ptt_method);
@@ -1889,7 +1901,8 @@ void Configuration::impl::set_rig_invariants ()
else else
{ {
ui_->monitor_last_used_check_box->setEnabled (true); ui_->monitor_last_used_check_box->setEnabled (true);
ui_->CAT_control_group_box->setEnabled (true); ui_->catTab->setEnabled(true);
//ui_->CAT_control_group_box->setEnabled (true);
ui_->test_CAT_push_button->setEnabled (true); ui_->test_CAT_push_button->setEnabled (true);
ui_->test_PTT_push_button->setEnabled (false); ui_->test_PTT_push_button->setEnabled (false);
ui_->TX_audio_source_group_box->setEnabled (transceiver_factory_.has_CAT_PTT_mic_data (rig) && TransceiverFactory::PTT_method_CAT == ptt_method); ui_->TX_audio_source_group_box->setEnabled (transceiver_factory_.has_CAT_PTT_mic_data (rig) && TransceiverFactory::PTT_method_CAT == ptt_method);
@@ -1940,7 +1953,9 @@ void Configuration::impl::set_rig_invariants ()
break; break;
} }
} }
ui_->CAT_serial_port_parameters_group_box->setEnabled (is_serial_CAT); ui_->CAT_serial_port_parameters_group_box->setEnabled (is_serial_CAT);
ui_->force_DTR_combo_box->setEnabled (is_serial_CAT ui_->force_DTR_combo_box->setEnabled (is_serial_CAT
&& (cat_port != ptt_port && (cat_port != ptt_port
|| !ui_->PTT_DTR_radio_button->isEnabled () || !ui_->PTT_DTR_radio_button->isEnabled ()
@@ -2277,6 +2292,7 @@ void Configuration::impl::accept ()
data_mode_ = static_cast<DataMode> (ui_->TX_mode_button_group->checkedId ()); data_mode_ = static_cast<DataMode> (ui_->TX_mode_button_group->checkedId ());
save_directory_ = ui_->save_path_display_label->text (); save_directory_ = ui_->save_path_display_label->text ();
azel_directory_ = ui_->azel_path_display_label->text (); azel_directory_ = ui_->azel_path_display_label->text ();
sound_cq_path_ = ui_->sound_cq_path_display_label->text();
sound_dm_path_ = ui_->sound_dm_path_display_label->text(); sound_dm_path_ = ui_->sound_dm_path_display_label->text();
sound_am_path_ = ui_->sound_am_path_display_label->text(); sound_am_path_ = ui_->sound_am_path_display_label->text();
enable_VHF_features_ = ui_->enable_VHF_features_check_box->isChecked (); enable_VHF_features_ = ui_->enable_VHF_features_check_box->isChecked ();
@@ -2945,6 +2961,37 @@ void Configuration::impl::on_azel_path_select_push_button_clicked (bool /* check
} }
} }
void Configuration::impl::on_sound_cq_path_select_push_button_clicked(){
QStringList filters;
filters << "Audio files (*.wav)"
<< "Any files (*)";
QFileDialog fd {this, tr ("Sound File"), ui_->sound_cq_path_display_label->text ()};
fd.setNameFilters(filters);
if (fd.exec ()) {
if (fd.selectedFiles ().size ()) {
if(rig_params_.ptt_type == TransceiverFactory::PTT_method_VOX){
QMessageBox::warning(this, "Notifications Sounds Warning", "You have enabled notification sounds while using VOX. To avoid transmitting these notification sounds, please make sure your rig is using a different sound card than your system.");
}
ui_->sound_cq_path_display_label->setText(fd.selectedFiles().at(0));
}
}
}
void Configuration::impl::on_sound_cq_path_test_push_button_clicked(){
auto path = ui_->sound_cq_path_display_label->text();
if(path.isEmpty()){
return;
}
QSound::play(path);
}
void Configuration::impl::on_sound_cq_path_reset_push_button_clicked(){
ui_->sound_cq_path_display_label->clear();
}
void Configuration::impl::on_sound_dm_path_select_push_button_clicked(){ void Configuration::impl::on_sound_dm_path_select_push_button_clicked(){
QStringList filters; QStringList filters;
filters << "Audio files (*.wav)" filters << "Audio files (*.wav)"
+1
View File
@@ -180,6 +180,7 @@ public:
QStringListModel const * macros () const; QStringListModel const * macros () const;
QDir save_directory () const; QDir save_directory () const;
QDir azel_directory () const; QDir azel_directory () const;
QString sound_cq_path() const;
QString sound_dm_path() const; QString sound_dm_path() const;
QString sound_am_path() const; QString sound_am_path() const;
QString rig_name () const; QString rig_name () const;
+1091 -760
View File
File diff suppressed because it is too large Load Diff
+7
View File
@@ -50,6 +50,13 @@ require this so normally you can choose not to install libusb-1.0-dev
but if you have a SoftRock USB or similar SDR that uses a custom USB but if you have a SoftRock USB or similar SDR that uses a custom USB
interface then it is required. interface then it is required.
On Debian based systems, install requirements like:
sudo apt install git cmake clang gfortran \
libfftw3-dev git libgfortran3 libusb-1.0-dev autoconf libtool \
texinfo qt5-default qtmultimedia5-dev libqt5multimedia5-plugins libqt5serialport5-dev \
libudev-dev pkg-config
The Hamlib library is required. Currently WSJT-X needs to be built The Hamlib library is required. Currently WSJT-X needs to be built
using a forked version of the Hamlib git master. This fork contains using a forked version of the Hamlib git master. This fork contains
patches not yet accepted by the Hamlib development team which are patches not yet accepted by the Hamlib development team which are
+1
View File
@@ -291,6 +291,7 @@ qint64 Modulator::readData (char * data, qint64 maxSize)
if (m_ic > i1) m_amp = 0.0; if (m_ic > i1) m_amp = 0.0;
sample=qRound(m_amp*qSin(m_phi)); sample=qRound(m_amp*qSin(m_phi));
if(m_toneSpacing < 0) sample=qRound(m_amp*foxcom_.wave[m_ic]);
samples = load(postProcessSample(sample), samples); samples = load(postProcessSample(sample), samples);
++framesGenerated; ++framesGenerated;
++m_ic; ++m_ic;
+1 -1
View File
@@ -1,6 +1,6 @@
# Version number components # Version number components
set (WSJTX_VERSION_MAJOR 0) set (WSJTX_VERSION_MAJOR 0)
set (WSJTX_VERSION_MINOR 8) set (WSJTX_VERSION_MINOR 9)
set (WSJTX_VERSION_PATCH 0) set (WSJTX_VERSION_PATCH 0)
set (WSJTX_RC 0) # release candidate number, comment out or zero for development versions set (WSJTX_RC 0) # release candidate number, comment out or zero for development versions
set (WSJTX_VERSION_IS_RELEASE 0) # set to 1 for final release build set (WSJTX_VERSION_IS_RELEASE 0) # set to 1 for final release build
+5
View File
@@ -61,6 +61,11 @@ DecodedText::DecodedText (QString const& the_string, bool contest_mode, QString
bits_ = bits(); bits_ = bits();
// don't even try to unpack -24dB frames...they are *very* likely to be false decodes...
if(snr() <= -24){
return;
}
tryUnpack(); tryUnpack();
} }
+18 -6
View File
@@ -107,17 +107,23 @@ QString JSC::decompress(Codeword const& bitvec){
QList<quint64> bytes; QList<quint64> bytes;
QList<int> separators; QList<int> separators;
auto iter = bitvec.begin();
while(iter != bitvec.end()){ int i = 0;
quint64 byte = Varicode::bitsToInt(iter, 4); int count = bitvec.count();
iter += 4; while(i < count){
auto b = bitvec.mid(i, 4);
if(b.length() != 4){
break;
}
quint64 byte = Varicode::bitsToInt(b);
bytes.append(byte); bytes.append(byte);
i += 4;
if(byte < s){ if(byte < s){
if(*iter){ if(count - i > 0 && bitvec.at(i)){
separators.append(bytes.length()-1); separators.append(bytes.length()-1);
} }
iter += 1; i += 1;
} }
} }
@@ -131,8 +137,14 @@ QString JSC::decompress(Codeword const& bitvec){
k++; k++;
} }
if(start + k >= bytes.length()){
break;
}
j = j*s + bytes[start + k] + base[k]; j = j*s + bytes[start + k] + base[k];
if(j >= (int)JSC::size){
break;
}
auto word = QString(JSC::map[j].str); auto word = QString(JSC::map[j].str);
out.append(word); out.append(word);
-26
View File
@@ -93,32 +93,6 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
n30min=minval(n30fox(1:nfox)) n30min=minval(n30fox(1:nfox))
n30max=maxval(n30fox(1:nfox)) n30max=maxval(n30fox(1:nfox))
endif endif
j=0
rewind 19
if(nfox.eq.0) then
endfile 19
rewind 19
else
do i=1,nfox
n=n30fox(i)
if(n30max-n30fox(i).le.4) then
j=j+1
c2fox(j)=c2fox(i)
g2fox(j)=g2fox(i)
nsnrfox(j)=nsnrfox(i)
nfreqfox(j)=nfreqfox(i)
n30fox(j)=n
m=n30max-n
if(len(trim(g2fox(j))).eq.4) then
call azdist(mygrid,g2fox(j),0.d0,nAz,nEl,nDmiles,nDkm, &
nHotAz,nHotABetter)
else
nDkm=9999
endif
endif
enddo
nfox=j
endif
go to 800 go to 800
endif endif
+3 -3
View File
@@ -98,9 +98,9 @@ void LogQSO::accept()
QString hisCall,hisGrid,mode,rptSent,rptRcvd,dateOn,dateOff,timeOn,timeOff,band,operator_call; QString hisCall,hisGrid,mode,rptSent,rptRcvd,dateOn,dateOff,timeOn,timeOff,band,operator_call;
QString comments,name; QString comments,name;
hisCall=ui->call->text(); hisCall=ui->call->text().toUpper();
hisGrid=ui->grid->text(); hisGrid=ui->grid->text().toUpper();
mode=ui->mode->text(); mode=ui->mode->text().toUpper();
rptSent=ui->sent->text(); rptSent=ui->sent->text();
rptRcvd=ui->rcvd->text(); rptRcvd=ui->rcvd->text();
m_dateTimeOn = ui->start_date_time->dateTime (); m_dateTimeOn = ui->start_date_time->dateTime ();
+323 -55
View File
@@ -551,6 +551,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
m_manual {&m_network_manager}, m_manual {&m_network_manager},
m_txFrameCount {0}, m_txFrameCount {0},
m_txTextDirty {false}, m_txTextDirty {false},
m_txFrameCountEstimate {0},
m_previousFreq {0} m_previousFreq {0}
{ {
ui->setupUi(this); ui->setupUi(this);
@@ -1101,10 +1102,9 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
ui->menuTools->setEnabled(false); ui->menuTools->setEnabled(false);
ui->menuView->setEnabled(false); ui->menuView->setEnabled(false);
foreach(auto action, ui->menuBar->actions()){ foreach(auto action, ui->menuBar->actions()){
if(action->text() == "View") ui->menuBar->removeAction(action); if(action->text() == "Old View") ui->menuBar->removeAction(action);
if(action->text() == "Mode") ui->menuBar->removeAction(action); if(action->text() == "Old Mode") ui->menuBar->removeAction(action);
//if(action->text() == "Decode") ui->menuBar->removeAction(action); if(action->text() == "Old Tools") ui->menuBar->removeAction(action);
if(action->text() == "Tools") ui->menuBar->removeAction(action);
} }
ui->dxCallEntry->clear(); ui->dxCallEntry->clear();
ui->dxGridEntry->clear(); ui->dxGridEntry->clear();
@@ -1294,6 +1294,22 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
auto clearAction4 = new QAction(QIcon::fromTheme("edit-clear"), QString("Clear"), ui->tableWidgetCalls); auto clearAction4 = new QAction(QIcon::fromTheme("edit-clear"), QString("Clear"), ui->tableWidgetCalls);
connect(clearAction4, &QAction::triggered, this, [this](){ this->on_clearAction_triggered(ui->tableWidgetCalls); }); connect(clearAction4, &QAction::triggered, this, [this](){ this->on_clearAction_triggered(ui->tableWidgetCalls); });
auto addStation = new QAction(QString("Add New Station.."), ui->tableWidgetCalls);
connect(addStation, &QAction::triggered, this, [this](){
bool ok = false;
QString callsign = QInputDialog::getText(this, tr("Add New Station..."),
tr("Station Callsign:"), QLineEdit::Normal,
"", &ok).toUpper().trimmed();
if(!ok || callsign.isEmpty()){
return;
}
CallDetail cd = {};
cd.call = callsign;
m_callActivity[callsign] = cd;
displayActivity(true);
});
auto removeStation = new QAction(QString("Remove Station"), ui->tableWidgetCalls); auto removeStation = new QAction(QString("Remove Station"), ui->tableWidgetCalls);
connect(removeStation, &QAction::triggered, this, [this](){ connect(removeStation, &QAction::triggered, this, [this](){
QString selectedCall = callsignSelected(); QString selectedCall = callsignSelected();
@@ -1305,7 +1321,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
ui->tableWidgetCalls->setContextMenuPolicy(Qt::CustomContextMenu); ui->tableWidgetCalls->setContextMenuPolicy(Qt::CustomContextMenu);
connect(ui->tableWidgetCalls, &QTableWidget::customContextMenuRequested, this, [this, logAction, clearAction4, clearActionAll, removeStation](QPoint const &point){ connect(ui->tableWidgetCalls, &QTableWidget::customContextMenuRequested, this, [this, logAction, clearAction4, clearActionAll, addStation, removeStation](QPoint const &point){
QMenu * menu = new QMenu(ui->tableWidgetCalls); QMenu * menu = new QMenu(ui->tableWidgetCalls);
ui->tableWidgetRXAll->selectionModel()->clearSelection(); ui->tableWidgetRXAll->selectionModel()->clearSelection();
@@ -1351,6 +1367,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
menu->addSeparator(); menu->addSeparator();
menu->addAction(addStation);
removeStation->setDisabled(missingCallsign || isAllCall); removeStation->setDisabled(missingCallsign || isAllCall);
menu->addAction(removeStation); menu->addAction(removeStation);
@@ -1389,6 +1406,35 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
ui->heartbeatButton->setContextMenuPolicy(Qt::ActionsContextMenu); ui->heartbeatButton->setContextMenuPolicy(Qt::ActionsContextMenu);
ui->heartbeatButton->addAction(heartbeatNow); ui->heartbeatButton->addAction(heartbeatNow);
int width = 75;
/*
QList<QPushButton*> btns;
foreach(auto child, ui->buttonGrid->children()){
if(!child->isWidgetType()){
continue;
}
if(!child->objectName().contains("Button")){
continue;
}
auto b = qobject_cast<QPushButton*>(child);
width = qMax(width, b->geometry().width());
btns.append(b);
}
*/
auto buttonLayout = ui->buttonGrid->layout();
auto gridButtonLayout = qobject_cast<QGridLayout*>(buttonLayout);
gridButtonLayout->setColumnMinimumWidth(0, width);
gridButtonLayout->setColumnMinimumWidth(1, width);
gridButtonLayout->setColumnMinimumWidth(2, width);
gridButtonLayout->setColumnMinimumWidth(3, width);
gridButtonLayout->setColumnStretch(0, 1);
gridButtonLayout->setColumnStretch(1, 1);
gridButtonLayout->setColumnStretch(2, 1);
gridButtonLayout->setColumnStretch(3, 1);
pskSetLocal(); pskSetLocal();
aprsSetLocal(); aprsSetLocal();
@@ -1414,7 +1460,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
if (!m_valid) throw std::runtime_error {"Fatal initialization exception"}; if (!m_valid) throw std::runtime_error {"Fatal initialization exception"};
} }
QDate eol(2018, 11, 15); QDate eol(2018, 11, 30);
void MainWindow::checkExpiryWarningMessage() void MainWindow::checkExpiryWarningMessage()
{ {
@@ -1444,6 +1490,12 @@ void MainWindow::initializeDummyData(){
return; return;
} }
auto d = DecodedText("h+vWp6mRPprH", 6);
qDebug() << d.message() << buildMessageFrames(d.message());
d = DecodedText("bYG4CKYT0cKG", 7);
qDebug() << d.message();
// qDebug() << Varicode::isValidCallsign("@GROUP1", nullptr); // qDebug() << Varicode::isValidCallsign("@GROUP1", nullptr);
// qDebug() << Varicode::packAlphaNumeric50("VE7/KN4CRD"); // qDebug() << Varicode::packAlphaNumeric50("VE7/KN4CRD");
// qDebug() << Varicode::unpackAlphaNumeric50(Varicode::packAlphaNumeric50("VE7/KN4CRD")); // qDebug() << Varicode::unpackAlphaNumeric50(Varicode::packAlphaNumeric50("VE7/KN4CRD"));
@@ -1496,6 +1548,7 @@ void MainWindow::initializeDummyData(){
displayTextForFreq("KN4CRD: @ALLCALL? \u2301 ", 42, DriftingDateTime::currentDateTimeUtc().addSecs(-315), true, true, true); displayTextForFreq("KN4CRD: @ALLCALL? \u2301 ", 42, DriftingDateTime::currentDateTimeUtc().addSecs(-315), true, true, true);
displayTextForFreq("J1Y: KN4CRD SNR -05 \u2301 ", 42, DriftingDateTime::currentDateTimeUtc().addSecs(-300), false, true, true); displayTextForFreq("J1Y: KN4CRD SNR -05 \u2301 ", 42, DriftingDateTime::currentDateTimeUtc().addSecs(-300), false, true, true);
displayTextForFreq("HELLO BRAVE NEW WORLD \u2301 ", 42, DriftingDateTime::currentDateTimeUtc().addSecs(-300), false, true, true);
displayActivity(true); displayActivity(true);
@@ -1682,6 +1735,7 @@ void MainWindow::writeSettings()
m_settings->setValue("ShowTimeDrift", ui->driftSyncFrame->isVisible()); m_settings->setValue("ShowTimeDrift", ui->driftSyncFrame->isVisible());
m_settings->setValue("TimeDrift", ui->driftSpinBox->value()); m_settings->setValue("TimeDrift", ui->driftSpinBox->value());
m_settings->setValue("SelCal", ui->selcalButton->isChecked()); m_settings->setValue("SelCal", ui->selcalButton->isChecked());
m_settings->setValue("ShowTooltips", ui->actionShow_Tooltips->isChecked());
m_settings->endGroup(); m_settings->endGroup();
@@ -1754,8 +1808,9 @@ void MainWindow::readSettings()
ui->cbAutoSeq->setVisible(false); ui->cbAutoSeq->setVisible(false);
ui->cbFirst->setVisible(false); ui->cbFirst->setVisible(false);
m_settings->beginGroup("MainWindow"); m_settings->beginGroup("MainWindow");
setMinimumSize(800, 400);
restoreGeometry (m_settings->value ("geometry", saveGeometry ()).toByteArray ()); restoreGeometry (m_settings->value ("geometry", saveGeometry ()).toByteArray ());
setMinimumSize(800, 545); setMinimumSize(800, 400);
m_geometryNoControls = m_settings->value ("geometryNoControls",saveGeometry()).toByteArray(); m_geometryNoControls = m_settings->value ("geometryNoControls",saveGeometry()).toByteArray();
restoreState (m_settings->value ("state", saveState ()).toByteArray ()); restoreState (m_settings->value ("state", saveState ()).toByteArray ());
@@ -1792,6 +1847,7 @@ void MainWindow::readSettings()
ui->driftSyncFrame->setVisible(m_settings->value("ShowTimeDrift", false).toBool()); ui->driftSyncFrame->setVisible(m_settings->value("ShowTimeDrift", false).toBool());
ui->driftSpinBox->setValue(m_settings->value("TimeDrift", 0).toInt()); ui->driftSpinBox->setValue(m_settings->value("TimeDrift", 0).toInt());
ui->selcalButton->setChecked(m_settings->value("SelCal", false).toBool()); ui->selcalButton->setChecked(m_settings->value("SelCal", false).toBool());
ui->actionShow_Tooltips->setChecked(m_settings->value("ShowTooltips", true).toBool());
m_settings->endGroup(); m_settings->endGroup();
@@ -2274,40 +2330,96 @@ void MainWindow::showSoundOutError(const QString& errorMsg)
} }
void MainWindow::showStatusMessage(const QString& statusMsg) void MainWindow::showStatusMessage(const QString& statusMsg)
{statusBar()->showMessage(statusMsg);} {
statusBar()->showMessage(statusMsg);
}
/**
* This function forces the menuBar to rebuild a QAction that has a submenu
* on OSX fixing a weird bug where they aren't displayed correctly.
*/
void rebuildMacQAction(QMenu *menu, QAction *existingAction){
auto dummyAction = new QAction("...", menu);
menu->insertAction(existingAction, dummyAction);
menu->insertAction(dummyAction, existingAction);
menu->removeAction(dummyAction);
}
void MainWindow::on_menuControl_aboutToShow(){
ui->actionEnable_Spotting->setChecked(ui->spotButton->isChecked());
ui->actionEnable_Auto_Reply->setChecked(ui->autoReplyButton->isChecked());
ui->actionEnable_Heartbeat->setChecked(ui->heartbeatButton->isChecked());
ui->actionEnable_Selcall->setChecked(ui->selcalButton->isChecked());
}
void MainWindow::on_actionEnable_Spotting_toggled(bool checked){
ui->spotButton->setChecked(checked);
}
void MainWindow::on_actionEnable_Auto_Reply_toggled(bool checked){
ui->autoReplyButton->setChecked(checked);
}
void MainWindow::on_actionEnable_Heartbeat_toggled(bool checked){
ui->heartbeatButton->setChecked(checked);
}
void MainWindow::on_actionEnable_Selcall_toggled(bool checked){
ui->selcalButton->setChecked(checked);
}
void MainWindow::on_menuWindow_aboutToShow(){ void MainWindow::on_menuWindow_aboutToShow(){
auto hsizes = ui->textHorizontalSplitter->sizes(); auto hsizes = ui->textHorizontalSplitter->sizes();
ui->actionShow_Band_Activity->setChecked(hsizes.at(0) > 0); ui->actionShow_Band_Activity->setChecked(hsizes.at(0) > 0);
ui->actionShow_Call_Activity->setChecked(hsizes.at(2) > 0); ui->actionShow_Call_Activity->setChecked(hsizes.at(2) > 0);
auto vsizes = ui->mainSplitter->sizes(); auto vsizes = ui->mainSplitter->sizes();
ui->actionShow_Frequency_Clock->setChecked(vsizes.first() > 0);
ui->actionShow_Waterfall->setChecked(vsizes.last() > 0); ui->actionShow_Waterfall->setChecked(vsizes.last() > 0);
ui->actionShow_Waterfall_Controls->setChecked(m_wideGraph->controlsVisible()); ui->actionShow_Waterfall_Controls->setChecked(m_wideGraph->controlsVisible());
ui->actionShow_Waterfall_Controls->setEnabled(ui->actionShow_Waterfall->isChecked()); ui->actionShow_Waterfall_Controls->setEnabled(ui->actionShow_Waterfall->isChecked());
ui->actionShow_Time_Drift_Controls->setChecked(ui->driftSyncFrame->isVisible()); ui->actionShow_Time_Drift_Controls->setChecked(ui->driftSyncFrame->isVisible());
ui->actionShow_Time_Drift_Controls->setEnabled(ui->actionShow_Waterfall->isChecked()); ui->actionShow_Time_Drift_Controls->setEnabled(ui->actionShow_Waterfall->isChecked());
QMenu * sortBandMenu = new QMenu(ui->menuWindow); QMenu * sortBandMenu = new QMenu(this->menuBar()); //ui->menuWindow);
buildBandActivitySortByMenu(sortBandMenu); buildBandActivitySortByMenu(sortBandMenu);
ui->actionSort_Band_Activity->setMenu(sortBandMenu); ui->actionSort_Band_Activity->setMenu(sortBandMenu);
ui->actionSort_Band_Activity->setEnabled(ui->actionShow_Band_Activity->isChecked()); ui->actionSort_Band_Activity->setEnabled(ui->actionShow_Band_Activity->isChecked());
#if __APPLE__
rebuildMacQAction(ui->menuWindow, ui->actionSort_Band_Activity);
#endif
QMenu * sortCallMenu = new QMenu(ui->menuWindow); QMenu * sortCallMenu = new QMenu(this->menuBar()); //ui->menuWindow);
buildCallActivitySortByMenu(sortCallMenu); buildCallActivitySortByMenu(sortCallMenu);
ui->actionSort_Call_Activity->setMenu(sortCallMenu); ui->actionSort_Call_Activity->setMenu(sortCallMenu);
ui->actionSort_Call_Activity->setEnabled(ui->actionShow_Call_Activity->isChecked()); ui->actionSort_Call_Activity->setEnabled(ui->actionShow_Call_Activity->isChecked());
#if __APPLE__
rebuildMacQAction(ui->menuWindow, ui->actionSort_Call_Activity);
#endif
QMenu * showBandMenu = new QMenu(ui->menuWindow); QMenu * showBandMenu = new QMenu(this->menuBar()); //ui->menuWindow);
buildShowColumnsMenu(showBandMenu, "band"); buildShowColumnsMenu(showBandMenu, "band");
ui->actionShow_Band_Activity_Columns->setMenu(showBandMenu); ui->actionShow_Band_Activity_Columns->setMenu(showBandMenu);
ui->actionShow_Band_Activity_Columns->setEnabled(ui->actionShow_Band_Activity->isChecked()); ui->actionShow_Band_Activity_Columns->setEnabled(ui->actionShow_Band_Activity->isChecked());
#if __APPLE__
rebuildMacQAction(ui->menuWindow, ui->actionShow_Band_Activity_Columns);
#endif
QMenu * showCallMenu = new QMenu(ui->menuWindow); QMenu * showCallMenu = new QMenu(this->menuBar()); //ui->menuWindow);
buildShowColumnsMenu(showCallMenu, "call"); buildShowColumnsMenu(showCallMenu, "call");
ui->actionShow_Call_Activity_Columns->setMenu(showCallMenu); ui->actionShow_Call_Activity_Columns->setMenu(showCallMenu);
ui->actionShow_Call_Activity_Columns->setEnabled(ui->actionShow_Call_Activity->isChecked()); ui->actionShow_Call_Activity_Columns->setEnabled(ui->actionShow_Call_Activity->isChecked());
#if __APPLE__
rebuildMacQAction(ui->menuWindow, ui->actionShow_Call_Activity_Columns);
#endif
}
void MainWindow::on_actionShow_Frequency_Clock_triggered(bool checked){
auto vsizes = ui->mainSplitter->sizes();
vsizes[0] = checked ? ui->logHorizontalWidget->minimumHeight() : 0;
ui->logHorizontalWidget->setVisible(checked);
ui->mainSplitter->setSizes(vsizes);
} }
void MainWindow::on_actionShow_Band_Activity_triggered(bool checked){ void MainWindow::on_actionShow_Band_Activity_triggered(bool checked){
@@ -2402,6 +2514,8 @@ void MainWindow::openSettings(int tab){
m_msAudioOutputBuffered); m_msAudioOutputBuffered);
} }
ui->bandComboBox->view ()->setMinimumWidth (ui->bandComboBox->view ()->sizeHintForColumn (FrequencyList_v2::frequency_mhz_column));
displayDialFrequency (); displayDialFrequency ();
displayActivity(true); displayActivity(true);
@@ -2533,6 +2647,34 @@ void MainWindow::on_autoButton_clicked (bool checked)
} }
} }
void MainWindow::on_autoReplyButton_toggled(bool checked){
resetPushButtonToggleText(ui->autoReplyButton);
}
void MainWindow::on_monitorButton_toggled(bool checked){
resetPushButtonToggleText(ui->monitorButton);
}
void MainWindow::on_monitorTxButton_toggled(bool checked){
resetPushButtonToggleText(ui->monitorTxButton);
}
void MainWindow::on_selcalButton_toggled(bool checked){
resetPushButtonToggleText(ui->selcalButton);
}
void MainWindow::on_tuneButton_toggled(bool checked){
resetPushButtonToggleText(ui->tuneButton);
}
void MainWindow::on_spotButton_toggled(bool checked){
resetPushButtonToggleText(ui->spotButton);
}
void MainWindow::on_heartbeatButton_toggled(bool checked){
resetPushButtonToggleText(ui->heartbeatButton);
}
void MainWindow::auto_tx_mode (bool state) void MainWindow::auto_tx_mode (bool state)
{ {
ui->autoButton->setChecked (state); ui->autoButton->setChecked (state);
@@ -2669,6 +2811,13 @@ bool MainWindow::eventFilter (QObject * object, QEvent * event)
remove_child_from_event_filter (static_cast<QChildEvent *> (event)->child ()); remove_child_from_event_filter (static_cast<QChildEvent *> (event)->child ());
break; break;
case QEvent::ToolTip:
if(!ui->actionShow_Tooltips->isChecked()){
return true;
}
break;
default: break; default: break;
} }
return QObject::eventFilter(object, event); return QObject::eventFilter(object, event);
@@ -3549,14 +3698,6 @@ void MainWindow::readFromStdout() //readFromStdout
, tr ("Cannot open \"%1\" for append: %2") , tr ("Cannot open \"%1\" for append: %2")
.arg (f.fileName ()).arg (f.errorString ())); .arg (f.fileName ()).arg (f.errorString ()));
} }
if (m_config.insert_blank () && m_blankLine && !m_config.bFox()) {
QString band;
if((DriftingDateTime::currentMSecsSinceEpoch() / 1000 - m_secBandChanged) > 4*m_TRperiod/4) {
band = ' ' + m_config.bands ()->find (m_freqNominal);
}
ui->decodedTextBrowser->insertLineSpacer (band.rightJustified (40, '-'));
m_blankLine = false;
}
DecodedText decodedtext {QString::fromUtf8 (t.constData ()).remove (QRegularExpression {"\r|\n"}), "FT8" == m_mode && DecodedText decodedtext {QString::fromUtf8 (t.constData ()).remove (QRegularExpression {"\r|\n"}), "FT8" == m_mode &&
ui->cbVHFcontest->isChecked(), m_config.my_grid ()}; ui->cbVHFcontest->isChecked(), m_config.my_grid ()};
@@ -3649,6 +3790,9 @@ void MainWindow::readFromStdout() //readFromStdout
// it is not processed elsewhere, so we need to just log it here. // it is not processed elsewhere, so we need to just log it here.
logCallActivity(cd, true); logCallActivity(cd, true);
// play cq notification
playSoundNotification(m_config.sound_cq_path());
} else { } else {
// convert HEARTBEAT to a directed command and process... // convert HEARTBEAT to a directed command and process...
cmd.from = cd.call; cmd.from = cd.call;
@@ -3872,6 +4016,15 @@ void MainWindow::readFromStdout() //readFromStdout
// See MainWindow::postDecode for displaying the latest decodes // See MainWindow::postDecode for displaying the latest decodes
} }
void MainWindow::playSoundNotification(const QString &path){
if(path.isEmpty()){
return;
}
qDebug() << "Trying to play sound file" << path;
QSound::play(path);
}
bool MainWindow::hasExistingMessageBuffer(int offset, bool drift, int *pPrevOffset){ bool MainWindow::hasExistingMessageBuffer(int offset, bool drift, int *pPrevOffset){
if(m_messageBuffer.contains(offset)){ if(m_messageBuffer.contains(offset)){
@@ -3899,6 +4052,10 @@ bool MainWindow::hasExistingMessageBuffer(int offset, bool drift, int *pPrevOffs
} }
void MainWindow::logCallActivity(CallDetail d, bool spot){ void MainWindow::logCallActivity(CallDetail d, bool spot){
if(d.call.trimmed().isEmpty()){
return;
}
if(m_callActivity.contains(d.call)){ if(m_callActivity.contains(d.call)){
// update (keep grid) // update (keep grid)
CallDetail old = m_callActivity[d.call]; CallDetail old = m_callActivity[d.call];
@@ -4353,6 +4510,7 @@ void MainWindow::guiUpdate()
tx_status_label.setText(t.trimmed()); tx_status_label.setText(t.trimmed());
} }
} }
} else if(m_monitoring) { } else if(m_monitoring) {
if (m_tx_watchdog) { if (m_tx_watchdog) {
tx_status_label.setStyleSheet ("QLabel{background-color: #ff0000}"); tx_status_label.setStyleSheet ("QLabel{background-color: #ff0000}");
@@ -4376,9 +4534,10 @@ void MainWindow::guiUpdate()
auto drift = DriftingDateTime::drift(); auto drift = DriftingDateTime::drift();
QDateTime t = DriftingDateTime::currentDateTimeUtc(); QDateTime t = DriftingDateTime::currentDateTimeUtc();
QString utc = t.date().toString("yyyy MMM dd") + "\n " + QStringList parts;
t.time().toString() + (!drift ? " " : QString(" (%1%2ms)").arg(drift > 0 ? "+" : "").arg(drift)); parts << (t.time().toString() + (!drift ? " " : QString(" (%1%2ms)").arg(drift > 0 ? "+" : "").arg(drift)));
ui->labUTC->setText(utc); parts << t.date().toString("yyyy MMM dd");
ui->labUTC->setText(parts.join("\n"));
auto delta = t.secsTo(m_nextHeartbeat); auto delta = t.secsTo(m_nextHeartbeat);
QString ping; QString ping;
@@ -5141,6 +5300,7 @@ int MainWindow::writeMessageTextToUI(QDateTime date, QString text, int freq, boo
c.insertText(text); c.insertText(text);
} else { } else {
text = text.toHtmlEscaped(); text = text.toHtmlEscaped();
text = text.replace(" ", "&nbsp;&nbsp;");
if(bold){ if(bold){
text = QString("<strong>%1</strong>").arg(text); text = QString("<strong>%1</strong>").arg(text);
} }
@@ -5311,7 +5471,7 @@ void MainWindow::createMessage(QString const& text){
} }
resetMessageTransmitQueue(); resetMessageTransmitQueue();
createMessageTransmitQueue(text); createMessageTransmitQueue(replaceMacros(text, buildMacroValues(), false));
} }
void MainWindow::createMessageTransmitQueue(QString const& text){ void MainWindow::createMessageTransmitQueue(QString const& text){
@@ -5620,7 +5780,7 @@ void MainWindow::prepareHeartbeat(){
QString MainWindow::calculateDistance(QString const& value, int *pDistance) QString MainWindow::calculateDistance(QString const& value, int *pDistance, int *pAzimuth)
{ {
QString grid = value.trimmed(); QString grid = value.trimmed();
if(grid.isEmpty() || grid.length() < 4){ if(grid.isEmpty() || grid.length() < 4){
@@ -5634,20 +5794,21 @@ QString MainWindow::calculateDistance(QString const& value, int *pDistance)
const_cast <char *> ((grid + " ").left (6).toLatin1().constData()),&utch, const_cast <char *> ((grid + " ").left (6).toLatin1().constData()),&utch,
&nAz,&nEl,&nDmiles,&nDkm,&nHotAz,&nHotABetter,6,6); &nAz,&nEl,&nDmiles,&nDkm,&nHotAz,&nHotABetter,6,6);
if(pAzimuth) *pAzimuth = nAz;
if(m_config.miles()){ if(m_config.miles()){
if(pDistance) *pDistance = nDmiles; if(pDistance) *pDistance = nDmiles;
return QString("%1 mi").arg(nDmiles); return QString("%1 mi / %2°").arg(nDmiles).arg(nAz);
} }
if(pDistance) *pDistance = nDkm; if(pDistance) *pDistance = nDkm;
return QString("%1 km").arg(nDkm); return QString("%1 km / %2°").arg(nDkm).arg(nAz);
} }
// this function is called by auto_tx_mode, which is called by autoButton.clicked // this function is called by auto_tx_mode, which is called by autoButton.clicked
void MainWindow::on_startTxButton_toggled(bool checked) void MainWindow::on_startTxButton_toggled(bool checked)
{ {
if(checked){ if(checked){
checkExpiryWarningMessage();
createMessage(ui->extFreeTextMsgEdit->toPlainText()); createMessage(ui->extFreeTextMsgEdit->toPlainText());
startTx(); startTx();
} else { } else {
@@ -5747,7 +5908,10 @@ void MainWindow::acceptQSO (QDateTime const& QSO_date_off, QString const& call,
clearCallsignSelected(); clearCallsignSelected();
m_logBook.init();
if (m_config.clear_DX () and !m_config.bHound()) clearDX (); if (m_config.clear_DX () and !m_config.bHound()) clearDX ();
m_dateTimeQSOOn = QDateTime {}; m_dateTimeQSOOn = QDateTime {};
} }
@@ -6036,6 +6200,8 @@ void MainWindow::on_actionErase_js8call_log_adi_triggered()
if(ret==MessageBox::Yes) { if(ret==MessageBox::Yes) {
QFile f {m_config.writeable_data_dir ().absoluteFilePath ("js8call_log.adi")}; QFile f {m_config.writeable_data_dir ().absoluteFilePath ("js8call_log.adi")};
f.remove(); f.remove();
m_logBook.init();
} }
} }
@@ -6245,6 +6411,7 @@ void MainWindow::on_clearAction_triggered(QObject * sender){
if(sender == ui->tableWidgetRXAll){ if(sender == ui->tableWidgetRXAll){
m_bandActivity.clear(); m_bandActivity.clear();
clearTableWidget(ui->tableWidgetRXAll); clearTableWidget(ui->tableWidgetRXAll);
resetTimeDeltaAverage();
} }
// TODO: jsherer - abstract this into a tableWidgetCallsReset function // TODO: jsherer - abstract this into a tableWidgetCallsReset function
@@ -6252,6 +6419,7 @@ void MainWindow::on_clearAction_triggered(QObject * sender){
m_callActivity.clear(); m_callActivity.clear();
clearTableWidget((ui->tableWidgetCalls)); clearTableWidget((ui->tableWidgetCalls));
createAllcallTableRows(ui->tableWidgetCalls, ""); createAllcallTableRows(ui->tableWidgetCalls, "");
resetTimeDeltaAverage();
} }
if(sender == ui->extFreeTextMsgEdit){ if(sender == ui->extFreeTextMsgEdit){
@@ -6346,8 +6514,8 @@ void MainWindow::setShowColumn(QString tableKey, QString columnKey, bool value){
displayCallActivity(); displayCallActivity();
} }
bool MainWindow::showColumn(QString tableKey, QString columnKey){ bool MainWindow::showColumn(QString tableKey, QString columnKey, bool default_){
return m_showColumnsCache.value(tableKey + columnKey, QVariant(true)).toBool(); return m_showColumnsCache.value(tableKey + columnKey, QVariant(default_)).toBool();
} }
void MainWindow::buildShowColumnsMenu(QMenu *menu, QString tableKey){ void MainWindow::buildShowColumnsMenu(QMenu *menu, QString tableKey){
@@ -6355,7 +6523,13 @@ void MainWindow::buildShowColumnsMenu(QMenu *menu, QString tableKey){
{"Frequency Offset", "offset"}, {"Frequency Offset", "offset"},
{"Last heard timestamp", "timestamp"}, {"Last heard timestamp", "timestamp"},
{"SNR", "snr"}, {"SNR", "snr"},
{"Time delta", "tdrift"}, {"Time Delta", "tdrift"},
};
QMap<QString, bool> defaultOverride = {
{"tdrift", false},
{"grid", false},
{"distance", false}
}; };
if(tableKey == "call"){ if(tableKey == "call"){
@@ -6376,7 +6550,13 @@ void MainWindow::buildShowColumnsMenu(QMenu *menu, QString tableKey){
auto a = menu->addAction(columnLabel); auto a = menu->addAction(columnLabel);
a->setCheckable(true); a->setCheckable(true);
a->setChecked(showColumn(tableKey, columnKey));
bool showByDefault = true;
if(defaultOverride.contains(columnKey)){
showByDefault = defaultOverride[columnKey];
}
a->setChecked(showColumn(tableKey, columnKey, showByDefault));
connect(a, &QAction::triggered, this, [this, a, tableKey, columnKey](){ connect(a, &QAction::triggered, this, [this, a, tableKey, columnKey](){
setShowColumn(tableKey, columnKey, a->isChecked()); setShowColumn(tableKey, columnKey, a->isChecked());
@@ -6546,7 +6726,7 @@ void MainWindow::buildQueryMenu(QMenu * menu, QString call){
menu->addSeparator(); menu->addSeparator();
auto snrQueryAction = menu->addAction(QString("%1 SNR? - What is my signal report?").arg(call)); auto snrQueryAction = menu->addAction(QString("%1 SNR? - What is my signal report?").arg(call).trimmed());
snrQueryAction->setDisabled(isAllCall); snrQueryAction->setDisabled(isAllCall);
connect(snrQueryAction, &QAction::triggered, this, [this](){ connect(snrQueryAction, &QAction::triggered, this, [this](){
@@ -6560,7 +6740,7 @@ void MainWindow::buildQueryMenu(QMenu * menu, QString call){
if(m_config.transmit_directed()) toggleTx(true); if(m_config.transmit_directed()) toggleTx(true);
}); });
auto qthQueryAction = menu->addAction(QString("%1 QTH? - What is your QTH message?").arg(call)); auto qthQueryAction = menu->addAction(QString("%1 QTH? - What is your QTH message?").arg(call).trimmed());
qthQueryAction->setDisabled(isAllCall); qthQueryAction->setDisabled(isAllCall);
connect(qthQueryAction, &QAction::triggered, this, [this](){ connect(qthQueryAction, &QAction::triggered, this, [this](){
@@ -6574,7 +6754,7 @@ void MainWindow::buildQueryMenu(QMenu * menu, QString call){
if(m_config.transmit_directed()) toggleTx(true); if(m_config.transmit_directed()) toggleTx(true);
}); });
auto gridQueryAction = menu->addAction(QString("%1 GRID? - What is your current grid locator?").arg(call)); auto gridQueryAction = menu->addAction(QString("%1 GRID? - What is your current grid locator?").arg(call).trimmed());
gridQueryAction->setDisabled(isAllCall); gridQueryAction->setDisabled(isAllCall);
connect(gridQueryAction, &QAction::triggered, this, [this](){ connect(gridQueryAction, &QAction::triggered, this, [this](){
@@ -6787,6 +6967,19 @@ void MainWindow::buildQueryMenu(QMenu * menu, QString call){
if(m_config.transmit_directed()) toggleTx(true); if(m_config.transmit_directed()) toggleTx(true);
}); });
auto tuAction = menu->addAction(QString("%1 TU - Thank You").arg(call).trimmed());
connect(tuAction, &QAction::triggered, this, [this](){
QString selectedCall = callsignSelected();
if(selectedCall.isEmpty()){
return;
}
addMessageText(QString("%1 TU").arg(selectedCall), true);
if(m_config.transmit_directed()) toggleTx(true);
});
auto qrzAction = menu->addAction(QString("%1 QRZ? - Who is calling me?").arg(call).trimmed()); auto qrzAction = menu->addAction(QString("%1 QRZ? - Who is calling me?").arg(call).trimmed());
connect(qrzAction, &QAction::triggered, this, [this](){ connect(qrzAction, &QAction::triggered, this, [this](){
@@ -6888,6 +7081,7 @@ QMap<QString, QString> MainWindow::buildMacroValues(){
auto cd = m_callActivity[selectedCall]; auto cd = m_callActivity[selectedCall];
values["<CALL>"] = selectedCall; values["<CALL>"] = selectedCall;
values["<TDELTA>"] = QString("%1 ms").arg((int)(1000*cd.tdrift));
if(cd.snr > -31){ if(cd.snr > -31){
values["<SNR>"] = Varicode::formatSNR(cd.snr); values["<SNR>"] = Varicode::formatSNR(cd.snr);
@@ -7182,7 +7376,51 @@ void MainWindow::stopTuneATU()
m_bTxTime=false; m_bTxTime=false;
} }
void MainWindow::resetPushButtonToggleText(QPushButton *btn){
bool checked = btn->isChecked();
auto style = btn->styleSheet();
if(checked){
style = style.replace("font-weight:normal;", "font-weight:bold;");
} else {
style = style.replace("font-weight:bold;", "font-weight:normal;");
}
btn->setStyleSheet(style);
#if PUSH_BUTTON_CHECKMARK
auto on = "";
auto text = btn->text();
if(checked){
btn->setText(on + text.replace(on, ""));
} else {
btn->setText(text.replace(on, ""));
}
#endif
#if PUSH_BUTTON_MIN_WIDTH
int width = 0;
QList<QPushButton*> btns;
foreach(auto child, ui->buttonGrid->children()){
if(!child->isWidgetType()){
continue;
}
if(!child->objectName().contains("Button")){
continue;
}
auto b = qobject_cast<QPushButton*>(child);
width = qMax(width, b->geometry().width());
btns.append(b);
}
foreach(auto child, btns){
child->setMinimumWidth(width);
}
#endif
}
void MainWindow::on_monitorTxButton_clicked(){ void MainWindow::on_monitorTxButton_clicked(){
ui->monitorTxButton->setChecked(false);
on_stopTxButton_clicked(); on_stopTxButton_clicked();
} }
@@ -7716,6 +7954,8 @@ void MainWindow::aprsSetLocal ()
void MainWindow::transmitDisplay (bool transmitting) void MainWindow::transmitDisplay (bool transmitting)
{ {
ui->monitorTxButton->setChecked(transmitting);
if (transmitting == m_transmitting) { if (transmitting == m_transmitting) {
if (transmitting) { if (transmitting) {
ui->signal_meter_widget->setValue(0,0); ui->signal_meter_widget->setValue(0,0);
@@ -7759,8 +7999,10 @@ void MainWindow::transmitDisplay (bool transmitting)
} }
// TODO: jsherer - encapsulate this in a function? // TODO: jsherer - encapsulate this in a function?
/*
ui->monitorButton->setVisible(!transmitting); ui->monitorButton->setVisible(!transmitting);
ui->monitorTxButton->setVisible(transmitting); ui->monitorTxButton->setVisible(transmitting);
*/
} }
void MainWindow::on_sbFtol_valueChanged(int value) void MainWindow::on_sbFtol_valueChanged(int value)
@@ -8018,7 +8260,12 @@ void MainWindow::updateTextDisplay(){
} }
} }
#if __APPLE__
#define USE_SYNC_FRAME_COUNT 1
#else
#define USE_SYNC_FRAME_COUNT 0 #define USE_SYNC_FRAME_COUNT 0
#endif
void MainWindow::refreshTextDisplay(){ void MainWindow::refreshTextDisplay(){
qDebug() << "refreshing text display..."; qDebug() << "refreshing text display...";
@@ -8029,8 +8276,8 @@ void MainWindow::refreshTextDisplay(){
QStringList textList; QStringList textList;
qDebug() << "frames:"; qDebug() << "frames:";
foreach(Frame frame, frames){ foreach(auto frame, frames){
auto dt = DecodedText(frame.frame, frame.bits); auto dt = DecodedText(frame.first, frame.second);
qDebug() << "->" << frame << dt.message() << Varicode::frameTypeString(dt.frameType()); qDebug() << "->" << frame << dt.message() << Varicode::frameTypeString(dt.frameType());
textList.append(dt.message()); textList.append(dt.message());
} }
@@ -8269,12 +8516,15 @@ void MainWindow::observeTimeDeltaForAverage(float delta){
} }
// display average // display average
ui->driftAvgLabel->setText(QString("Avg RX TDrift: %1 ms").arg(m_timeDeltaMsMMA)); ui->driftAvgLabel->setText(QString("Avg Time Delta: %1 ms").arg(m_timeDeltaMsMMA));
} }
void MainWindow::resetTimeDeltaAverage(){ void MainWindow::resetTimeDeltaAverage(){
m_timeDeltaMsMMA = 0; m_timeDeltaMsMMA = 0;
m_timeDeltaMsMMA_N = 0; m_timeDeltaMsMMA_N = 0;
// observe zero for reset
observeTimeDeltaForAverage(0);
} }
void MainWindow::processRxActivity() { void MainWindow::processRxActivity() {
@@ -8686,10 +8936,7 @@ void MainWindow::processCommandActivity() {
}); });
if(!isAllCall){ if(!isAllCall){
auto wav = m_config.sound_dm_path(); playSoundNotification(m_config.sound_dm_path());
if(!wav.isEmpty()){
QSound::play(wav);
}
} }
writeDirectedCommandToFile(d); writeDirectedCommandToFile(d);
@@ -8721,7 +8968,7 @@ void MainWindow::processCommandActivity() {
continue; continue;
} }
reply = QString("%1 QTH %2").arg(d.from).arg(qth); reply = QString("%1 QTH %2").arg(d.from).arg(replaceMacros(qth, buildMacroValues(), true));
} }
// QUERIED ACTIVE // QUERIED ACTIVE
@@ -8745,7 +8992,11 @@ void MainWindow::processCommandActivity() {
// QUERIED STATION MESSAGE // QUERIED STATION MESSAGE
else if (d.cmd == " QTC?" && !isAllCall) { else if (d.cmd == " QTC?" && !isAllCall) {
reply = QString("%1 QTC %2").arg(d.from).arg(m_config.my_station()); QString qtc = m_config.my_station();
if(qtc.isEmpty()) {
continue;
}
reply = QString("%1 QTC %2").arg(d.from).arg(replaceMacros(qtc, buildMacroValues(), true));
} }
#if ALLOW_STATIONS_HEARD #if ALLOW_STATIONS_HEARD
@@ -8859,7 +9110,7 @@ void MainWindow::processCommandActivity() {
} }
// PROCESS HEARTBEAT // PROCESS HEARTBEAT
else if (d.cmd == " HEARTBEAT" && ui->heartbeatButton->isChecked() && ui->autoReplyButton->isChecked()){ else if (d.cmd == " HEARTBEAT" && ui->heartbeatButton->isChecked() && ui->autoReplyButton->isChecked() && !ui->selcalButton->isChecked()){
reply = QString("%1 HEARTBEAT ACK %2").arg(d.from).arg(Varicode::formatSNR(d.snr)); reply = QString("%1 HEARTBEAT ACK %2").arg(d.from).arg(Varicode::formatSNR(d.snr));
enqueueHeartbeat(reply); enqueueHeartbeat(reply);
@@ -8956,6 +9207,7 @@ void MainWindow::processCommandActivity() {
} }
#endif #endif
// well, if there's no reply, don't do anything...
if (reply.isEmpty()) { if (reply.isEmpty()) {
continue; continue;
} }
@@ -8965,6 +9217,11 @@ void MainWindow::processCommandActivity() {
continue; continue;
} }
// do not queue for reply if there's text in the window
if(!ui->extFreeTextMsgEdit->toPlainText().isEmpty()){
continue;
}
// add @ALLCALLs to the @ALLCALL cache // add @ALLCALLs to the @ALLCALL cache
if(isAllCall){ if(isAllCall){
m_txAllcallCommandCache.insert(d.from, new QDateTime(now), 25); m_txAllcallCommandCache.insert(d.from, new QDateTime(now), 25);
@@ -9052,10 +9309,7 @@ void MainWindow::processAlertReplyForCommand(CommandDetail d, QString from, QStr
} }
}); });
auto wav = m_config.sound_am_path(); playSoundNotification(m_config.sound_am_path());
if(!wav.isEmpty()){
QSound::play(wav);
}
msgBox->setModal(false); msgBox->setModal(false);
msgBox->show(); msgBox->show();
@@ -9397,7 +9651,7 @@ void MainWindow::displayBandActivity() {
ui->tableWidgetRXAll->setColumnHidden(0, !showColumn("band", "offset")); ui->tableWidgetRXAll->setColumnHidden(0, !showColumn("band", "offset"));
ui->tableWidgetRXAll->setColumnHidden(1, !showColumn("band", "timestamp")); ui->tableWidgetRXAll->setColumnHidden(1, !showColumn("band", "timestamp"));
ui->tableWidgetRXAll->setColumnHidden(2, !showColumn("band", "snr")); ui->tableWidgetRXAll->setColumnHidden(2, !showColumn("band", "snr"));
ui->tableWidgetRXAll->setColumnHidden(3, !showColumn("band", "tdrift")); ui->tableWidgetRXAll->setColumnHidden(3, !showColumn("band", "tdrift", false));
// Resize the table columns // Resize the table columns
ui->tableWidgetRXAll->resizeColumnToContents(0); ui->tableWidgetRXAll->resizeColumnToContents(0);
@@ -9509,6 +9763,10 @@ void MainWindow::displayCallActivity() {
int callsignAging = m_config.callsign_aging(); int callsignAging = m_config.callsign_aging();
foreach(QString call, keys) { foreach(QString call, keys) {
if(call.trimmed().isEmpty()){
continue;
}
CallDetail d = m_callActivity[call]; CallDetail d = m_callActivity[call];
bool isCallSelected = (call == selectedCall); bool isCallSelected = (call == selectedCall);
@@ -9541,6 +9799,7 @@ void MainWindow::displayCallActivity() {
auto flagItem = new QTableWidgetItem(flag); auto flagItem = new QTableWidgetItem(flag);
flagItem->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter); flagItem->setTextAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
ui->tableWidgetCalls->setItem(row, col++, flagItem); ui->tableWidgetCalls->setItem(row, col++, flagItem);
if(d.utcTimestamp.isValid()){
ui->tableWidgetCalls->setItem(row, col++, new QTableWidgetItem(QString("(%1)").arg(since(d.utcTimestamp)))); ui->tableWidgetCalls->setItem(row, col++, new QTableWidgetItem(QString("(%1)").arg(since(d.utcTimestamp))));
ui->tableWidgetCalls->setItem(row, col++, new QTableWidgetItem(QString("%1").arg(Varicode::formatSNR(d.snr)))); ui->tableWidgetCalls->setItem(row, col++, new QTableWidgetItem(QString("%1").arg(Varicode::formatSNR(d.snr))));
ui->tableWidgetCalls->setItem(row, col++, new QTableWidgetItem(QString("%1").arg(d.freq))); ui->tableWidgetCalls->setItem(row, col++, new QTableWidgetItem(QString("%1").arg(d.freq)));
@@ -9554,6 +9813,15 @@ void MainWindow::displayCallActivity() {
distanceItem->setTextAlignment(Qt::AlignRight | Qt::AlignVCenter); distanceItem->setTextAlignment(Qt::AlignRight | Qt::AlignVCenter);
ui->tableWidgetCalls->setItem(ui->tableWidgetCalls->rowCount() - 1, col++, distanceItem); ui->tableWidgetCalls->setItem(ui->tableWidgetCalls->rowCount() - 1, col++, distanceItem);
} else {
ui->tableWidgetCalls->setItem(row, col++, new QTableWidgetItem(""));
ui->tableWidgetCalls->setItem(row, col++, new QTableWidgetItem(""));
ui->tableWidgetCalls->setItem(row, col++, new QTableWidgetItem(""));
ui->tableWidgetCalls->setItem(row, col++, new QTableWidgetItem(""));
ui->tableWidgetCalls->setItem(row, col++, new QTableWidgetItem(""));
ui->tableWidgetCalls->setItem(row, col++, new QTableWidgetItem(""));
}
if (isCallSelected) { if (isCallSelected) {
for(int i = 0; i < ui->tableWidgetCalls->columnCount(); i++){ for(int i = 0; i < ui->tableWidgetCalls->columnCount(); i++){
ui->tableWidgetCalls->item(row, i)->setSelected(true); ui->tableWidgetCalls->item(row, i)->setSelected(true);
@@ -9585,11 +9853,11 @@ void MainWindow::displayCallActivity() {
ui->tableWidgetCalls->setColumnHidden(0, !showColumn("call", "callsign")); ui->tableWidgetCalls->setColumnHidden(0, !showColumn("call", "callsign"));
ui->tableWidgetCalls->setColumnHidden(1, !showColumn("call", "flag")); ui->tableWidgetCalls->setColumnHidden(1, !showColumn("call", "flag"));
ui->tableWidgetCalls->setColumnHidden(2, !showColumn("call", "timestamp")); ui->tableWidgetCalls->setColumnHidden(2, !showColumn("call", "timestamp"));
ui->tableWidgetCalls->setColumnHidden(3, !showColumn("call", "offset")); ui->tableWidgetCalls->setColumnHidden(3, !showColumn("call", "snr"));
ui->tableWidgetCalls->setColumnHidden(4, !showColumn("call", "snr")); ui->tableWidgetCalls->setColumnHidden(4, !showColumn("call", "offset"));
ui->tableWidgetCalls->setColumnHidden(5, !showColumn("call", "tdrift")); ui->tableWidgetCalls->setColumnHidden(5, !showColumn("call", "tdrift", false));
ui->tableWidgetCalls->setColumnHidden(6, !showColumn("call", "grid")); ui->tableWidgetCalls->setColumnHidden(6, !showColumn("call", "grid", false));
ui->tableWidgetCalls->setColumnHidden(7, !showColumn("call", "distance")); ui->tableWidgetCalls->setColumnHidden(7, !showColumn("call", "distance", false));
// Resize the table columns // Resize the table columns
ui->tableWidgetCalls->resizeColumnToContents(0); ui->tableWidgetCalls->resizeColumnToContents(0);
+18 -2
View File
@@ -130,6 +130,7 @@ public slots:
void msgAvgDecode2(); void msgAvgDecode2();
void fastPick(int x0, int x1, int y); void fastPick(int x0, int x1, int y);
void playSoundNotification(const QString &path);
bool hasExistingMessageBuffer(int offset, bool drift, int *pPrevOffset); bool hasExistingMessageBuffer(int offset, bool drift, int *pPrevOffset);
void logCallActivity(CallDetail d, bool spot=true); void logCallActivity(CallDetail d, bool spot=true);
QString lookupCallInCompoundCache(QString const &call); QString lookupCallInCompoundCache(QString const &call);
@@ -170,7 +171,13 @@ private slots:
void on_tx4_editingFinished(); void on_tx4_editingFinished();
void on_tx5_currentTextChanged (QString const&); void on_tx5_currentTextChanged (QString const&);
void on_tx6_editingFinished(); void on_tx6_editingFinished();
void on_menuControl_aboutToShow();
void on_actionEnable_Spotting_toggled(bool checked);
void on_actionEnable_Auto_Reply_toggled(bool checked);
void on_actionEnable_Heartbeat_toggled(bool checked);
void on_actionEnable_Selcall_toggled(bool checked);
void on_menuWindow_aboutToShow(); void on_menuWindow_aboutToShow();
void on_actionShow_Frequency_Clock_triggered(bool checked);
void on_actionShow_Band_Activity_triggered(bool checked); void on_actionShow_Band_Activity_triggered(bool checked);
void on_actionShow_Call_Activity_triggered(bool checked); void on_actionShow_Call_Activity_triggered(bool checked);
void on_actionShow_Waterfall_triggered(bool checked); void on_actionShow_Waterfall_triggered(bool checked);
@@ -185,6 +192,7 @@ private slots:
void on_actionAbout_triggered(); void on_actionAbout_triggered();
void on_autoButton_clicked (bool); void on_autoButton_clicked (bool);
void on_labDialFreq_clicked(); void on_labDialFreq_clicked();
void resetPushButtonToggleText(QPushButton *btn);
void on_monitorTxButton_clicked(); void on_monitorTxButton_clicked();
void on_stopTxButton_clicked(); void on_stopTxButton_clicked();
void on_stopButton_clicked(); void on_stopButton_clicked();
@@ -271,7 +279,7 @@ private slots:
void on_qthMacroButton_clicked(); void on_qthMacroButton_clicked();
void on_qtcMacroButton_clicked(); void on_qtcMacroButton_clicked();
void setShowColumn(QString tableKey, QString columnKey, bool value); void setShowColumn(QString tableKey, QString columnKey, bool value);
bool showColumn(QString tableKey, QString columnKey); bool showColumn(QString tableKey, QString columnKey, bool default_=true);
void buildShowColumnsMenu(QMenu *menu, QString tableKey); void buildShowColumnsMenu(QMenu *menu, QString tableKey);
void setSortBy(QString key, QString value); void setSortBy(QString key, QString value);
QString getSortBy(QString key, QString defaultValue); QString getSortBy(QString key, QString defaultValue);
@@ -307,7 +315,7 @@ private slots:
void unpauseHeartbeat(); void unpauseHeartbeat();
void checkHeartbeat(); void checkHeartbeat();
void prepareHeartbeat(); void prepareHeartbeat();
QString calculateDistance(QString const& grid, int *pDistance=nullptr); QString calculateDistance(QString const& grid, int *pDistance=nullptr, int *pAzimuth=nullptr);
void on_driftSpinBox_valueChanged(int n); void on_driftSpinBox_valueChanged(int n);
void on_driftSyncButton_clicked(); void on_driftSyncButton_clicked();
void on_driftSyncEndButton_clicked(); void on_driftSyncEndButton_clicked();
@@ -342,6 +350,14 @@ private slots:
void stop_tuning (); void stop_tuning ();
void stopTuneATU(); void stopTuneATU();
void auto_tx_mode(bool); void auto_tx_mode(bool);
void on_autoReplyButton_toggled(bool checked);
void on_monitorButton_toggled(bool checked);
void on_monitorTxButton_toggled(bool checked);
void on_selcalButton_toggled(bool checked);
void on_tuneButton_toggled(bool checked);
void on_spotButton_toggled(bool checked);
void on_heartbeatButton_toggled(bool checked);
void on_actionMessage_averaging_triggered(); void on_actionMessage_averaging_triggered();
void on_actionFox_Log_triggered(); void on_actionFox_Log_triggered();
void on_actionInclude_averaging_toggled (bool); void on_actionInclude_averaging_toggled (bool);
+596 -606
View File
File diff suppressed because it is too large Load Diff
+5 -3
View File
@@ -65,7 +65,8 @@ QMap<QString, int> directed_cmds = {
//{"!", 7 }, // alert message //{"!", 7 }, // alert message
//{"$", 3 }, // query station(s) heard //{"$", 3 }, // query station(s) heard
//{"=", 9 }, // unused
{" TU", 9 }, // thank you
{" ACTIVE", 10 }, // i have been active in the past 10 minutes {" ACTIVE", 10 }, // i have been active in the past 10 minutes
{" IDLE", 11 }, // i have not been active in the past 10 minutes {" IDLE", 11 }, // i have not been active in the past 10 minutes
@@ -96,7 +97,7 @@ QMap<QString, int> directed_cmds = {
{" ", 31 }, // send freetext {" ", 31 }, // send freetext
}; };
QSet<int> allowed_cmds = {-1, 0, 1, 2, 3, 4, 5, 6, /*7,*/ 8, /*9,*/ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31}; QSet<int> allowed_cmds = {-1, 0, 1, 2, 3, 4, 5, 6, /*7,*/ 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31};
QSet<int> buffered_cmds = {3, 5, /*6,*/ /*7,*/ 8, 13, 14, 15}; QSet<int> buffered_cmds = {3, 5, /*6,*/ /*7,*/ 8, 13, 14, 15};
@@ -111,7 +112,7 @@ QMap<int, int> checksum_cmds = {
}; };
QString callsign_pattern = QString("(?<callsign>[@]?[A-Z0-9/]+)"); QString callsign_pattern = QString("(?<callsign>[@]?[A-Z0-9/]+)");
QString optional_cmd_pattern = QString("(?<cmd>\\s?(?:HEARTBEAT (ACK|REQ)|AGN[?]|QSL[?]|HW CPY[?]|APRS[:]|QRZ[?]|SNR[?]|QTC[?]|QTH[?]|GRID[?]|STATUS[?]|(?:(?:ACK|73|YES|NO|SNR|QSL|RR|SK|FB|QTH|QTC|GRID|ACTIVE|IDLE)(?=[ ]|$))|[?*^&@#> ]))?"); QString optional_cmd_pattern = QString("(?<cmd>\\s?(?:HEARTBEAT (ACK|REQ)|AGN[?]|QSL[?]|HW CPY[?]|APRS[:]|QRZ[?]|SNR[?]|QTC[?]|QTH[?]|GRID[?]|STATUS[?]|(?:(?:ACK|73|YES|NO|SNR|QSL|RR|SK|FB|QTH|QTC|GRID|ACTIVE|IDLE|TU)(?=[ ]|$))|[?*^&@#> ]))?");
QString optional_grid_pattern = QString("(?<grid>\\s?[A-R]{2}[0-9]{2})?"); QString optional_grid_pattern = QString("(?<grid>\\s?[A-R]{2}[0-9]{2})?");
QString optional_extended_grid_pattern = QString("^(?<grid>\\s?(?:[A-R]{2}[0-9]{2}(?:[A-X]{2}(?:[0-9]{2})?)*))?"); QString optional_extended_grid_pattern = QString("^(?<grid>\\s?(?:[A-R]{2}[0-9]{2}(?:[A-X]{2}(?:[0-9]{2})?)*))?");
QString optional_num_pattern = QString("(?<num>(?<=SNR|HEARTBEAT ACK)\\s?[-+]?(?:3[01]|[0-2]?[0-9]))?"); QString optional_num_pattern = QString("(?<num>(?<=SNR|HEARTBEAT ACK)\\s?[-+]?(?:3[01]|[0-2]?[0-9]))?");
@@ -1622,6 +1623,7 @@ QList<QPair<QString, int>> Varicode::buildMessageFrames(
#define ALLOW_SEND_COMPOUND_DIRECTED 1 #define ALLOW_SEND_COMPOUND_DIRECTED 1
#define AUTO_PREPEND_DIRECTED 1 #define AUTO_PREPEND_DIRECTED 1
#define AUTO_REMOVE_MYCALL 1 #define AUTO_REMOVE_MYCALL 1
#define AUTO_PREPEND_DIRECTED_ALLOW_TEXT_CALLSIGNS 1
bool mycallCompound = Varicode::isCompoundCallsign(mycall); bool mycallCompound = Varicode::isCompoundCallsign(mycall);
+2 -2
View File
@@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>1083</width> <width>1083</width>
<height>337</height> <height>154</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@@ -43,7 +43,7 @@
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>400</width> <width>400</width>
<height>100</height> <height>10</height>
</size> </size>
</property> </property>
<property name="frameShape"> <property name="frameShape">