mirror of
				https://github.com/saitohirga/WSJT-X.git
				synced 2025-10-31 04:50:34 -04:00 
			
		
		
		
	"Clear call and grid after logging" is now optional.
Option to display distance in miles. Remove (or reduce?) negative red spikes at start of Rx period. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3128 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
		
							parent
							
								
									aaf43ad071
								
							
						
					
					
						commit
						c5bd47a9cd
					
				| @ -25,13 +25,12 @@ subroutine redsync(ss,ntrperiod,ihsym,iz,red) | |||||||
|      enddo |      enddo | ||||||
|      red(i)=smax |      red(i)=smax | ||||||
|   enddo |   enddo | ||||||
|   call pctile(red,iz,50,xmed) |   call pctile(red,iz,40,xmed) | ||||||
|   if(xmed.le.0.0) xmed=1.0 |   if(xmed.le.0.0) xmed=1.0 | ||||||
|   red=red/xmed |   red=red/xmed | ||||||
|   smax=0. |   smax=0. | ||||||
|   do i=1,iz |   do i=1,iz | ||||||
|      red(i)=0.2*db(red(i)) |      red(i)=0.2*db(red(i)) | ||||||
| !     red(i)=2.0*sqrt(red(i)) |  | ||||||
|      smax=max(smax,red(i)) |      smax=max(smax,red(i)) | ||||||
|   enddo |   enddo | ||||||
|   h=10. |   h=10. | ||||||
|  | |||||||
| @ -161,6 +161,8 @@ MainWindow::MainWindow(QWidget *parent) : | |||||||
|   m_promptToLog=false; |   m_promptToLog=false; | ||||||
|   m_blankLine=false; |   m_blankLine=false; | ||||||
|   m_insertBlank=false; |   m_insertBlank=false; | ||||||
|  |   m_clearCallGrid=false; | ||||||
|  |   m_bMiles=false; | ||||||
|   m_fMin=1000; |   m_fMin=1000; | ||||||
|   ui->fMinSpinBox->setValue(m_fMin); |   ui->fMinSpinBox->setValue(m_fMin); | ||||||
|   decodeBusy(false); |   decodeBusy(false); | ||||||
| @ -367,6 +369,8 @@ void MainWindow::writeSettings() | |||||||
|   settings.setValue("BandIndex",m_band); |   settings.setValue("BandIndex",m_band); | ||||||
|   settings.setValue("PromptToLog",m_promptToLog); |   settings.setValue("PromptToLog",m_promptToLog); | ||||||
|   settings.setValue("InsertBlank",m_insertBlank); |   settings.setValue("InsertBlank",m_insertBlank); | ||||||
|  |   settings.setValue("ClearCallGrid",m_clearCallGrid); | ||||||
|  |   settings.setValue("Miles",m_bMiles); | ||||||
|   settings.endGroup(); |   settings.endGroup(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| @ -461,8 +465,10 @@ void MainWindow::readSettings() | |||||||
|   ui->actionPrompt_to_log_QSO->setChecked(m_promptToLog); |   ui->actionPrompt_to_log_QSO->setChecked(m_promptToLog); | ||||||
|   m_insertBlank=settings.value("InsertBlank",false).toBool(); |   m_insertBlank=settings.value("InsertBlank",false).toBool(); | ||||||
|   ui->actionBlank_line_between_decoding_periods->setChecked(m_insertBlank); |   ui->actionBlank_line_between_decoding_periods->setChecked(m_insertBlank); | ||||||
| 
 |   m_clearCallGrid=settings.value("ClearCallGrid",false).toBool(); | ||||||
|   settings.endGroup(); |   ui->actionClear_DX_Call_and_Grid_after_logging->setChecked(m_clearCallGrid); | ||||||
|  |     m_bMiles=settings.value("Miles",false).toBool(); | ||||||
|  |   ui->actionDisplay_distance_in_miles->setChecked(m_bMiles); | ||||||
| 
 | 
 | ||||||
|   if(!ui->actionLinrad->isChecked() && !ui->actionCuteSDR->isChecked() && |   if(!ui->actionLinrad->isChecked() && !ui->actionCuteSDR->isChecked() && | ||||||
|     !ui->actionAFMHot->isChecked() && !ui->actionBlue->isChecked()) { |     !ui->actionAFMHot->isChecked() && !ui->actionBlue->isChecked()) { | ||||||
| @ -1156,7 +1162,7 @@ void MainWindow::readFromStdout()                             //readFromStdout | |||||||
|       QTextCursor cursor; |       QTextCursor cursor; | ||||||
|       QTextBlockFormat bf; |       QTextBlockFormat bf; | ||||||
|       if(m_insertBlank and m_blankLine) { |       if(m_insertBlank and m_blankLine) { | ||||||
|         QString bg="#9fb6cd"; |         QString bg="#d3d3d3"; | ||||||
|         bf.setBackground(QBrush(QColor(bg))); |         bf.setBackground(QBrush(QColor(bg))); | ||||||
|         QString s = "<table border=0 cellspacing=0 width=100%><tr><td bgcolor=\"" + |         QString s = "<table border=0 cellspacing=0 width=100%><tr><td bgcolor=\"" + | ||||||
|             bg + "\"><pre>" + " " + "</pre></td></tr></table>"; |             bg + "\"><pre>" + " " + "</pre></td></tr></table>"; | ||||||
| @ -1928,7 +1934,8 @@ void MainWindow::on_dxGridEntry_textChanged(const QString &t) //dxGrid changed | |||||||
|     QString t; |     QString t; | ||||||
|     t.sprintf("Az: %d",nAz); |     t.sprintf("Az: %d",nAz); | ||||||
|     ui->labAz->setText(t); |     ui->labAz->setText(t); | ||||||
|     t.sprintf("%d km",nDkm); |     if(m_bMiles) t.sprintf("%d mi",int(0.621371*nDkm)); | ||||||
|  |     if(!m_bMiles) t.sprintf("%d km",nDkm); | ||||||
|     ui->labDist->setText(t); |     ui->labDist->setText(t); | ||||||
|   } else { |   } else { | ||||||
|     ui->labAz->setText(""); |     ui->labAz->setText(""); | ||||||
| @ -1965,6 +1972,7 @@ void MainWindow::on_logQSOButton_clicked()                 //Log QSO button | |||||||
|                     m_noSuffix,m_toRTTY,m_dBtoComments); |                     m_noSuffix,m_toRTTY,m_dBtoComments); | ||||||
|   if(logDlg.exec() == QDialog::Accepted) { |   if(logDlg.exec() == QDialog::Accepted) { | ||||||
|   } |   } | ||||||
|  |   if(m_clearCallGrid) { | ||||||
|     m_hisCall=""; |     m_hisCall=""; | ||||||
|     ui->dxCallEntry->setText(""); |     ui->dxCallEntry->setText(""); | ||||||
|     m_hisGrid=""; |     m_hisGrid=""; | ||||||
| @ -1973,6 +1981,7 @@ void MainWindow::on_logQSOButton_clicked()                 //Log QSO button | |||||||
|     m_rptRcvd=""; |     m_rptRcvd=""; | ||||||
|     m_qsoStart=""; |     m_qsoStart=""; | ||||||
|     m_qsoStop=""; |     m_qsoStop=""; | ||||||
|  |   } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void MainWindow::on_actionJT9_1_triggered() | void MainWindow::on_actionJT9_1_triggered() | ||||||
| @ -2248,3 +2257,14 @@ void MainWindow::on_fMaxSpinBox_valueChanged(int n) | |||||||
|   m_fMax=n; |   m_fMax=n; | ||||||
|   g_pWideGraph->setRxRange(m_fMin,m_fMax); |   g_pWideGraph->setRxRange(m_fMin,m_fMax); | ||||||
| } | } | ||||||
|  | 
 | ||||||
|  | void MainWindow::on_actionClear_DX_Call_and_Grid_after_logging_triggered(bool checked) | ||||||
|  | { | ||||||
|  |   m_clearCallGrid=checked; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | void MainWindow::on_actionDisplay_distance_in_miles_triggered(bool checked) | ||||||
|  | { | ||||||
|  |   m_bMiles=checked; | ||||||
|  |   on_dxGridEntry_textChanged(m_hisGrid); | ||||||
|  | } | ||||||
|  | |||||||
| @ -134,6 +134,10 @@ private slots: | |||||||
|   void on_fMinSpinBox_valueChanged(int n); |   void on_fMinSpinBox_valueChanged(int n); | ||||||
|   void on_fMaxSpinBox_valueChanged(int n); |   void on_fMaxSpinBox_valueChanged(int n); | ||||||
| 
 | 
 | ||||||
|  |   void on_actionClear_DX_Call_and_Grid_after_logging_triggered(bool checked); | ||||||
|  | 
 | ||||||
|  |   void on_actionDisplay_distance_in_miles_triggered(bool checked); | ||||||
|  | 
 | ||||||
| private: | private: | ||||||
|     Ui::MainWindow *ui; |     Ui::MainWindow *ui; | ||||||
| 
 | 
 | ||||||
| @ -214,6 +218,8 @@ private: | |||||||
|     bool    m_promptToLog; |     bool    m_promptToLog; | ||||||
|     bool    m_blankLine; |     bool    m_blankLine; | ||||||
|     bool    m_insertBlank; |     bool    m_insertBlank; | ||||||
|  |     bool    m_clearCallGrid; | ||||||
|  |     bool    m_bMiles; | ||||||
| 
 | 
 | ||||||
|     char    m_decoded[80]; |     char    m_decoded[80]; | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -526,7 +526,7 @@ p, li { white-space: pre-wrap; } | |||||||
|           <property name="lineWidth"> |           <property name="lineWidth"> | ||||||
|            <number>1</number> |            <number>1</number> | ||||||
|           </property> |           </property> | ||||||
|           <widget class="QWidget" name=""> |           <widget class="QWidget" name="layoutWidget"> | ||||||
|            <property name="geometry"> |            <property name="geometry"> | ||||||
|             <rect> |             <rect> | ||||||
|              <x>2</x> |              <x>2</x> | ||||||
| @ -1711,12 +1711,13 @@ p, li { white-space: pre-wrap; } | |||||||
|     <addaction name="separator"/> |     <addaction name="separator"/> | ||||||
|     <addaction name="actionMonitor_OFF_at_startup"/> |     <addaction name="actionMonitor_OFF_at_startup"/> | ||||||
|     <addaction name="actionF4_sets_Tx6"/> |     <addaction name="actionF4_sets_Tx6"/> | ||||||
|     <addaction name="separator"/> |  | ||||||
|     <addaction name="actionLog_JT9_without_submode"/> |     <addaction name="actionLog_JT9_without_submode"/> | ||||||
|     <addaction name="actionConvert_JT9_x_to_RTTY"/> |     <addaction name="actionConvert_JT9_x_to_RTTY"/> | ||||||
|     <addaction name="actionLog_dB_reports_to_Comments"/> |     <addaction name="actionLog_dB_reports_to_Comments"/> | ||||||
|     <addaction name="actionPrompt_to_log_QSO"/> |     <addaction name="actionPrompt_to_log_QSO"/> | ||||||
|     <addaction name="actionBlank_line_between_decoding_periods"/> |     <addaction name="actionBlank_line_between_decoding_periods"/> | ||||||
|  |     <addaction name="actionClear_DX_Call_and_Grid_after_logging"/> | ||||||
|  |     <addaction name="actionDisplay_distance_in_miles"/> | ||||||
|    </widget> |    </widget> | ||||||
|    <widget class="QMenu" name="menuView"> |    <widget class="QMenu" name="menuView"> | ||||||
|     <property name="title"> |     <property name="title"> | ||||||
| @ -2213,6 +2214,27 @@ p, li { white-space: pre-wrap; } | |||||||
|     <string>Blank line between decoding periods</string> |     <string>Blank line between decoding periods</string> | ||||||
|    </property> |    </property> | ||||||
|   </action> |   </action> | ||||||
|  |   <action name="actionClear_DX_Call_and_Grid_after_logging"> | ||||||
|  |    <property name="checkable"> | ||||||
|  |     <bool>true</bool> | ||||||
|  |    </property> | ||||||
|  |    <property name="text"> | ||||||
|  |     <string>Clear DX Call and Grid after logging</string> | ||||||
|  |    </property> | ||||||
|  |   </action> | ||||||
|  |   <action name="actionDistance_in_miles"> | ||||||
|  |    <property name="text"> | ||||||
|  |     <string>Distance in miles</string> | ||||||
|  |    </property> | ||||||
|  |   </action> | ||||||
|  |   <action name="actionDisplay_distance_in_miles"> | ||||||
|  |    <property name="checkable"> | ||||||
|  |     <bool>true</bool> | ||||||
|  |    </property> | ||||||
|  |    <property name="text"> | ||||||
|  |     <string>Display distance in miles</string> | ||||||
|  |    </property> | ||||||
|  |   </action> | ||||||
|  </widget> |  </widget> | ||||||
|  <layoutdefault spacing="6" margin="11"/> |  <layoutdefault spacing="6" margin="11"/> | ||||||
|  <customwidgets> |  <customwidgets> | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user