mirror of
				https://github.com/saitohirga/WSJT-X.git
				synced 2025-10-31 04:50:34 -04:00 
			
		
		
		
	Option to AutoLog in contests; display to "Fox and Contest Log" window.
This commit is contained in:
		
							parent
							
								
									0451d10b25
								
							
						
					
					
						commit
						c9cb15052c
					
				| @ -465,6 +465,8 @@ private: | |||||||
|   Q_SLOT void on_rbRTTYroundup_toggled(); |   Q_SLOT void on_rbRTTYroundup_toggled(); | ||||||
|   Q_SLOT void on_FieldDay_Exchange_textChanged(); |   Q_SLOT void on_FieldDay_Exchange_textChanged(); | ||||||
|   Q_SLOT void on_RTTY_Exchange_textChanged(); |   Q_SLOT void on_RTTY_Exchange_textChanged(); | ||||||
|  |   Q_SLOT void on_prompt_to_log_check_box_clicked(bool); | ||||||
|  |   Q_SLOT void on_cbAutoLog_clicked(bool); | ||||||
| 
 | 
 | ||||||
|   // typenames used as arguments must match registered type names :(
 |   // typenames used as arguments must match registered type names :(
 | ||||||
|   Q_SIGNAL void start_transceiver (unsigned seqeunce_number) const; |   Q_SIGNAL void start_transceiver (unsigned seqeunce_number) const; | ||||||
| @ -586,6 +588,7 @@ private: | |||||||
|   bool log_as_RTTY_; |   bool log_as_RTTY_; | ||||||
|   bool report_in_comments_; |   bool report_in_comments_; | ||||||
|   bool prompt_to_log_; |   bool prompt_to_log_; | ||||||
|  |   bool autoLog_; | ||||||
|   bool insert_blank_; |   bool insert_blank_; | ||||||
|   bool DXCC_; |   bool DXCC_; | ||||||
|   bool ppfx_; |   bool ppfx_; | ||||||
| @ -695,6 +698,7 @@ bool Configuration::monitor_last_used () const {return m_->rig_is_dummy_ || m_-> | |||||||
| bool Configuration::log_as_RTTY () const {return m_->log_as_RTTY_;} | bool Configuration::log_as_RTTY () const {return m_->log_as_RTTY_;} | ||||||
| bool Configuration::report_in_comments () const {return m_->report_in_comments_;} | bool Configuration::report_in_comments () const {return m_->report_in_comments_;} | ||||||
| bool Configuration::prompt_to_log () const {return m_->prompt_to_log_;} | bool Configuration::prompt_to_log () const {return m_->prompt_to_log_;} | ||||||
|  | bool Configuration::autoLog() const {return m_->autoLog_;} | ||||||
| bool Configuration::insert_blank () const {return m_->insert_blank_;} | bool Configuration::insert_blank () const {return m_->insert_blank_;} | ||||||
| bool Configuration::DXCC () const {return m_->DXCC_;} | bool Configuration::DXCC () const {return m_->DXCC_;} | ||||||
| bool Configuration::ppfx() const {return m_->ppfx_;} | bool Configuration::ppfx() const {return m_->ppfx_;} | ||||||
| @ -1223,6 +1227,7 @@ void Configuration::impl::initialize_models () | |||||||
|   ui_->log_as_RTTY_check_box->setChecked (log_as_RTTY_); |   ui_->log_as_RTTY_check_box->setChecked (log_as_RTTY_); | ||||||
|   ui_->report_in_comments_check_box->setChecked (report_in_comments_); |   ui_->report_in_comments_check_box->setChecked (report_in_comments_); | ||||||
|   ui_->prompt_to_log_check_box->setChecked (prompt_to_log_); |   ui_->prompt_to_log_check_box->setChecked (prompt_to_log_); | ||||||
|  |   ui_->cbAutoLog->setChecked(autoLog_); | ||||||
|   ui_->insert_blank_check_box->setChecked (insert_blank_); |   ui_->insert_blank_check_box->setChecked (insert_blank_); | ||||||
|   ui_->DXCC_check_box->setChecked (DXCC_); |   ui_->DXCC_check_box->setChecked (DXCC_); | ||||||
|   ui_->ppfx_check_box->setChecked (ppfx_); |   ui_->ppfx_check_box->setChecked (ppfx_); | ||||||
| @ -1476,6 +1481,7 @@ void Configuration::impl::read_settings () | |||||||
|   rig_params_.ptt_port = settings_->value ("PTTport").toString (); |   rig_params_.ptt_port = settings_->value ("PTTport").toString (); | ||||||
|   data_mode_ = settings_->value ("DataMode", QVariant::fromValue (data_mode_none)).value<Configuration::DataMode> (); |   data_mode_ = settings_->value ("DataMode", QVariant::fromValue (data_mode_none)).value<Configuration::DataMode> (); | ||||||
|   prompt_to_log_ = settings_->value ("PromptToLog", false).toBool (); |   prompt_to_log_ = settings_->value ("PromptToLog", false).toBool (); | ||||||
|  |   autoLog_ = settings_->value ("AutoLog", false).toBool (); | ||||||
|   insert_blank_ = settings_->value ("InsertBlank", false).toBool (); |   insert_blank_ = settings_->value ("InsertBlank", false).toBool (); | ||||||
|   DXCC_ = settings_->value ("DXCCEntity", false).toBool (); |   DXCC_ = settings_->value ("DXCCEntity", false).toBool (); | ||||||
|   ppfx_ = settings_->value ("PrincipalPrefix", false).toBool (); |   ppfx_ = settings_->value ("PrincipalPrefix", false).toBool (); | ||||||
| @ -1588,6 +1594,7 @@ void Configuration::impl::write_settings () | |||||||
|   settings_->setValue ("CATHandshake", QVariant::fromValue (rig_params_.handshake)); |   settings_->setValue ("CATHandshake", QVariant::fromValue (rig_params_.handshake)); | ||||||
|   settings_->setValue ("DataMode", QVariant::fromValue (data_mode_)); |   settings_->setValue ("DataMode", QVariant::fromValue (data_mode_)); | ||||||
|   settings_->setValue ("PromptToLog", prompt_to_log_); |   settings_->setValue ("PromptToLog", prompt_to_log_); | ||||||
|  |   settings_->setValue ("AutoLog", autoLog_); | ||||||
|   settings_->setValue ("InsertBlank", insert_blank_); |   settings_->setValue ("InsertBlank", insert_blank_); | ||||||
|   settings_->setValue ("DXCCEntity", DXCC_); |   settings_->setValue ("DXCCEntity", DXCC_); | ||||||
|   settings_->setValue ("PrincipalPrefix", ppfx_); |   settings_->setValue ("PrincipalPrefix", ppfx_); | ||||||
| @ -2009,6 +2016,7 @@ void Configuration::impl::accept () | |||||||
|   log_as_RTTY_ = ui_->log_as_RTTY_check_box->isChecked (); |   log_as_RTTY_ = ui_->log_as_RTTY_check_box->isChecked (); | ||||||
|   report_in_comments_ = ui_->report_in_comments_check_box->isChecked (); |   report_in_comments_ = ui_->report_in_comments_check_box->isChecked (); | ||||||
|   prompt_to_log_ = ui_->prompt_to_log_check_box->isChecked (); |   prompt_to_log_ = ui_->prompt_to_log_check_box->isChecked (); | ||||||
|  |   autoLog_ = ui_->cbAutoLog->isChecked(); | ||||||
|   insert_blank_ = ui_->insert_blank_check_box->isChecked (); |   insert_blank_ = ui_->insert_blank_check_box->isChecked (); | ||||||
|   DXCC_ = ui_->DXCC_check_box->isChecked (); |   DXCC_ = ui_->DXCC_check_box->isChecked (); | ||||||
|   ppfx_ = ui_->ppfx_check_box->isChecked (); |   ppfx_ = ui_->ppfx_check_box->isChecked (); | ||||||
| @ -2606,6 +2614,16 @@ void Configuration::impl::on_calibration_slope_ppm_spin_box_valueChanged (double | |||||||
|   rig_active_ = false;          // force reset
 |   rig_active_ = false;          // force reset
 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | void Configuration::impl::on_prompt_to_log_check_box_clicked(bool checked) | ||||||
|  | { | ||||||
|  |   if(checked) ui_->cbAutoLog->setChecked(false); | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | void Configuration::impl::on_cbAutoLog_clicked(bool checked) | ||||||
|  | { | ||||||
|  |   if(checked) ui_->prompt_to_log_check_box->setChecked(false); | ||||||
|  | } | ||||||
|  | 
 | ||||||
| void Configuration::impl::on_cbFox_clicked (bool checked) | void Configuration::impl::on_cbFox_clicked (bool checked) | ||||||
| { | { | ||||||
|   if(checked) { |   if(checked) { | ||||||
|  | |||||||
| @ -117,6 +117,7 @@ public: | |||||||
|   bool log_as_RTTY () const; |   bool log_as_RTTY () const; | ||||||
|   bool report_in_comments () const; |   bool report_in_comments () const; | ||||||
|   bool prompt_to_log () const; |   bool prompt_to_log () const; | ||||||
|  |   bool autoLog() const; | ||||||
|   bool insert_blank () const; |   bool insert_blank () const; | ||||||
|   bool DXCC () const; |   bool DXCC () const; | ||||||
|   bool ppfx() const; |   bool ppfx() const; | ||||||
|  | |||||||
| @ -1702,24 +1702,7 @@ QListView::item:hover { | |||||||
|             </property> |             </property> | ||||||
|            </widget> |            </widget> | ||||||
|           </item> |           </item> | ||||||
|           <item row="0" column="3"> |           <item row="3" column="0"> | ||||||
|            <widget class="QLineEdit" name="opCallEntry"> |  | ||||||
|             <property name="toolTip"> |  | ||||||
|              <string><html><head/><body><p>The callsign of the operator, if different from the station callsign.</p></body></html></string> |  | ||||||
|             </property> |  | ||||||
|            </widget> |  | ||||||
|           </item> |  | ||||||
|           <item row="1" column="0"> |  | ||||||
|            <widget class="QCheckBox" name="log_as_RTTY_check_box"> |  | ||||||
|             <property name="toolTip"> |  | ||||||
|              <string>Some logging programs will not accept JT-65 or JT9 as a recognized mode.</string> |  | ||||||
|             </property> |  | ||||||
|             <property name="text"> |  | ||||||
|              <string>Con&vert mode to RTTY</string> |  | ||||||
|             </property> |  | ||||||
|            </widget> |  | ||||||
|           </item> |  | ||||||
|           <item row="2" column="0"> |  | ||||||
|            <widget class="QCheckBox" name="report_in_comments_check_box"> |            <widget class="QCheckBox" name="report_in_comments_check_box"> | ||||||
|             <property name="toolTip"> |             <property name="toolTip"> | ||||||
|              <string>Some logging programs will not accept the type of reports |              <string>Some logging programs will not accept the type of reports | ||||||
| @ -1732,7 +1715,7 @@ comments field.</string> | |||||||
|             </property> |             </property> | ||||||
|            </widget> |            </widget> | ||||||
|           </item> |           </item> | ||||||
|           <item row="3" column="0" colspan="2"> |           <item row="4" column="0" colspan="2"> | ||||||
|            <widget class="QCheckBox" name="clear_DX_check_box"> |            <widget class="QCheckBox" name="clear_DX_check_box"> | ||||||
|             <property name="toolTip"> |             <property name="toolTip"> | ||||||
|              <string>Check this option to force the clearing of the DX Call |              <string>Check this option to force the clearing of the DX Call | ||||||
| @ -1743,6 +1726,30 @@ and DX Grid fields when a 73 or free text message is sent.</string> | |||||||
|             </property> |             </property> | ||||||
|            </widget> |            </widget> | ||||||
|           </item> |           </item> | ||||||
|  |           <item row="2" column="0"> | ||||||
|  |            <widget class="QCheckBox" name="log_as_RTTY_check_box"> | ||||||
|  |             <property name="toolTip"> | ||||||
|  |              <string>Some logging programs will not accept JT-65 or JT9 as a recognized mode.</string> | ||||||
|  |             </property> | ||||||
|  |             <property name="text"> | ||||||
|  |              <string>Con&vert mode to RTTY</string> | ||||||
|  |             </property> | ||||||
|  |            </widget> | ||||||
|  |           </item> | ||||||
|  |           <item row="0" column="3"> | ||||||
|  |            <widget class="QLineEdit" name="opCallEntry"> | ||||||
|  |             <property name="toolTip"> | ||||||
|  |              <string><html><head/><body><p>The callsign of the operator, if different from the station callsign.</p></body></html></string> | ||||||
|  |             </property> | ||||||
|  |            </widget> | ||||||
|  |           </item> | ||||||
|  |           <item row="1" column="0"> | ||||||
|  |            <widget class="QCheckBox" name="cbAutoLog"> | ||||||
|  |             <property name="text"> | ||||||
|  |              <string>Log automatically</string> | ||||||
|  |             </property> | ||||||
|  |            </widget> | ||||||
|  |           </item> | ||||||
|          </layout> |          </layout> | ||||||
|         </widget> |         </widget> | ||||||
|        </item> |        </item> | ||||||
|  | |||||||
| @ -59,7 +59,8 @@ void LogQSO::initLogQSO(QString const& hisCall, QString const& hisGrid, QString | |||||||
|                         QString const& rptSent, QString const& rptRcvd, |                         QString const& rptSent, QString const& rptRcvd, | ||||||
|                         QDateTime const& dateTimeOn, QDateTime const& dateTimeOff, |                         QDateTime const& dateTimeOn, QDateTime const& dateTimeOff, | ||||||
|                         Radio::Frequency dialFreq, QString const& myCall, QString const& myGrid, |                         Radio::Frequency dialFreq, QString const& myCall, QString const& myGrid, | ||||||
|                         bool noSuffix, bool toRTTY, bool dBtoComments, bool bFox, QString const& opCall) |                         bool noSuffix, bool toRTTY, bool dBtoComments, bool bFox, | ||||||
|  |                         bool bAutoLog, QString const& opCall) | ||||||
| { | { | ||||||
|   if(!isHidden()) return; |   if(!isHidden()) return; | ||||||
|   ui->call->setText(hisCall); |   ui->call->setText(hisCall); | ||||||
| @ -87,7 +88,7 @@ void LogQSO::initLogQSO(QString const& hisCall, QString const& hisGrid, QString | |||||||
|   m_myGrid=myGrid; |   m_myGrid=myGrid; | ||||||
|   ui->band->setText (m_config->bands ()->find (dialFreq)); |   ui->band->setText (m_config->bands ()->find (dialFreq)); | ||||||
|   ui->loggedOperator->setText(opCall); |   ui->loggedOperator->setText(opCall); | ||||||
|   if(bFox) { |   if(bFox or bAutoLog) { | ||||||
|     accept(); |     accept(); | ||||||
|   } else { |   } else { | ||||||
|     show (); |     show (); | ||||||
|  | |||||||
							
								
								
									
										3
									
								
								logqso.h
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								logqso.h
									
									
									
									
									
								
							| @ -33,7 +33,8 @@ public: | |||||||
|                   QString const& rptSent, QString const& rptRcvd, QDateTime const& dateTimeOn, |                   QString const& rptSent, QString const& rptRcvd, QDateTime const& dateTimeOn, | ||||||
|                   QDateTime const& dateTimeOff, |                   QDateTime const& dateTimeOff, | ||||||
|                   Radio::Frequency dialFreq, QString const& myCall, QString const& myGrid, |                   Radio::Frequency dialFreq, QString const& myCall, QString const& myGrid, | ||||||
|                   bool noSuffix, bool toRTTY, bool dBtoComments, bool bFox, QString const& opCall); |                   bool noSuffix, bool toRTTY, bool dBtoComments, bool bFox, | ||||||
|  |                   bool bAutoLog, QString const& opCall); | ||||||
| 
 | 
 | ||||||
| public slots: | public slots: | ||||||
|   void accept(); |   void accept(); | ||||||
|  | |||||||
| @ -2388,13 +2388,12 @@ void MainWindow::on_actionColors_triggered() | |||||||
| 
 | 
 | ||||||
| void MainWindow::on_actionMessage_averaging_triggered() | void MainWindow::on_actionMessage_averaging_triggered() | ||||||
| { | { | ||||||
|   if (!m_msgAvgWidget) |   if(!m_msgAvgWidget) { | ||||||
|     { |     m_msgAvgWidget.reset (new MessageAveraging {m_settings, m_config.decoded_text_font ()}); | ||||||
|       m_msgAvgWidget.reset (new MessageAveraging {m_settings, m_config.decoded_text_font ()}); |  | ||||||
| 
 | 
 | ||||||
|       // Connect signals from Message Averaging window
 |     // Connect signals from Message Averaging window
 | ||||||
|       connect (this, &MainWindow::finished, m_msgAvgWidget.data (), &MessageAveraging::close); |     connect (this, &MainWindow::finished, m_msgAvgWidget.data (), &MessageAveraging::close); | ||||||
|     } |   } | ||||||
|   m_msgAvgWidget->showNormal(); |   m_msgAvgWidget->showNormal(); | ||||||
|   m_msgAvgWidget->raise (); |   m_msgAvgWidget->raise (); | ||||||
|   m_msgAvgWidget->activateWindow (); |   m_msgAvgWidget->activateWindow (); | ||||||
| @ -3611,8 +3610,8 @@ void MainWindow::guiUpdate() | |||||||
|       if(m_config.id_after_73 ()) { |       if(m_config.id_after_73 ()) { | ||||||
|         icw[0] = m_ncw; |         icw[0] = m_ncw; | ||||||
|       } |       } | ||||||
|       if (m_config.prompt_to_log () && !m_tune) { |       if ((m_config.prompt_to_log() or m_config.autoLog()) && !m_tune) { | ||||||
|         logQSOTimer.start (0); |         logQSOTimer.start(0); | ||||||
|       } |       } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
| @ -3735,7 +3734,7 @@ void MainWindow::guiUpdate() | |||||||
| 
 | 
 | ||||||
| //Once per second:
 | //Once per second:
 | ||||||
|   if(nsec != m_sec0) { |   if(nsec != m_sec0) { | ||||||
| //    qDebug() << "OneSec:";
 | //    qDebug() << "OneSec:" << m_config.autoLog();
 | ||||||
| 
 | 
 | ||||||
|     if(m_freqNominal!=0 and m_freqNominal<50000000 and m_config.enable_VHF_features()) { |     if(m_freqNominal!=0 and m_freqNominal<50000000 and m_config.enable_VHF_features()) { | ||||||
|       if(!m_bVHFwarned) vhfWarning(); |       if(!m_bVHFwarned) vhfWarning(); | ||||||
| @ -5166,11 +5165,12 @@ void MainWindow::on_logQSOButton_clicked()                 //Log QSO button | |||||||
|   if (dateTimeQSOOff < m_dateTimeQSOOn) dateTimeQSOOff = m_dateTimeQSOOn; |   if (dateTimeQSOOff < m_dateTimeQSOOn) dateTimeQSOOff = m_dateTimeQSOOn; | ||||||
|   QString grid=m_hisGrid; |   QString grid=m_hisGrid; | ||||||
|   if(grid=="....") grid=""; |   if(grid=="....") grid=""; | ||||||
|  |   bool bAutoLog=m_config.autoLog() and m_nContest>0; | ||||||
|   m_logDlg->initLogQSO (m_hisCall, grid, m_modeTx, m_rptSent, m_rptRcvd, |   m_logDlg->initLogQSO (m_hisCall, grid, m_modeTx, m_rptSent, m_rptRcvd, | ||||||
|                         m_dateTimeQSOOn, dateTimeQSOOff, m_freqNominal + ui->TxFreqSpinBox->value(), |                         m_dateTimeQSOOn, dateTimeQSOOff, m_freqNominal + ui->TxFreqSpinBox->value(), | ||||||
|                         m_config.my_callsign(), m_config.my_grid(), m_noSuffix, |                         m_config.my_callsign(), m_config.my_grid(), m_noSuffix, | ||||||
|                         m_config.log_as_RTTY(), m_config.report_in_comments(), |                         m_config.log_as_RTTY(), m_config.report_in_comments(), | ||||||
|                         m_config.bFox(), m_opCall); |                         m_config.bFox(), bAutoLog, m_opCall); | ||||||
|   if(m_nContest!=NONE) { |   if(m_nContest!=NONE) { | ||||||
|     if(m_nContest==NA_VHF) { |     if(m_nContest==NA_VHF) { | ||||||
|       m_xSent=m_config.my_grid().left(4); |       m_xSent=m_config.my_grid().left(4); | ||||||
| @ -5198,6 +5198,9 @@ void MainWindow::cabLog() | |||||||
|     QTextStream out(&f); |     QTextStream out(&f); | ||||||
|     out << t << endl; |     out << t << endl; | ||||||
|     f.close(); |     f.close(); | ||||||
|  |     if(m_msgAvgWidget != NULL and m_msgAvgWidget->isVisible()) { | ||||||
|  |       m_msgAvgWidget->foxAddLog(t); | ||||||
|  |     } | ||||||
|   } else { |   } else { | ||||||
|     MessageBox::warning_message (this, tr("File Open Error"), |     MessageBox::warning_message (this, tr("File Open Error"), | ||||||
|       tr("Cannot open \"%1\" for append: %2").arg(f.fileName()).arg(f.errorString())); |       tr("Cannot open \"%1\" for append: %2").arg(f.fileName()).arg(f.errorString())); | ||||||
| @ -6754,7 +6757,7 @@ void::MainWindow::VHF_features_enabled(bool b) | |||||||
|   ui->actionMessage_averaging->setEnabled(b); |   ui->actionMessage_averaging->setEnabled(b); | ||||||
|   ui->actionEnable_AP_DXcall->setVisible (m_mode=="QRA64"); |   ui->actionEnable_AP_DXcall->setVisible (m_mode=="QRA64"); | ||||||
|   ui->actionEnable_AP_JT65->setVisible (b && m_mode=="JT65"); |   ui->actionEnable_AP_JT65->setVisible (b && m_mode=="JT65"); | ||||||
|   if(!b && m_msgAvgWidget and !m_config.bFox()) { |   if(!b && m_msgAvgWidget and !m_config.bFox() and !m_config.autoLog()) { | ||||||
|     if(m_msgAvgWidget->isVisible()) m_msgAvgWidget->close(); |     if(m_msgAvgWidget->isVisible()) m_msgAvgWidget->close(); | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  | |||||||
| @ -3287,13 +3287,13 @@ QPushButton[state="ok"] { | |||||||
|   </action> |   </action> | ||||||
|   <action name="actionFox_Log"> |   <action name="actionFox_Log"> | ||||||
|    <property name="text"> |    <property name="text"> | ||||||
|     <string>Fox Log</string> |     <string>Fox or Contest Log</string> | ||||||
|    </property> |    </property> | ||||||
|    <property name="iconText"> |    <property name="iconText"> | ||||||
|     <string>Fox Log</string> |     <string>Fox or Contest Log</string> | ||||||
|    </property> |    </property> | ||||||
|    <property name="toolTip"> |    <property name="toolTip"> | ||||||
|     <string>Fox Log</string> |     <string>Fox or Contest Log</string> | ||||||
|    </property> |    </property> | ||||||
|   </action> |   </action> | ||||||
|   <action name="actionErase_FoxQSO_txt"> |   <action name="actionErase_FoxQSO_txt"> | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user