Removed tx power from the log window. It's not valid ADIF without a dropdown
This commit is contained in:
		
							parent
							
								
									c4656fcada
								
							
						
					
					
						commit
						ee350524fa
					
				| @ -166,7 +166,7 @@ QByteArray ADIF::QSOToADIF(QString const& hisCall, QString const& hisGrid, QStri | ||||
|                            , QString const& rptSent, QString const& rptRcvd, QDateTime const& dateTimeOn | ||||
|                            , QDateTime const& dateTimeOff, QString const& band, QString const& comments | ||||
|                            , QString const& name, QString const& strDialFreq, QString const& m_myCall | ||||
|                            , QString const& m_myGrid, QString const& m_txPower, QString const& operator_call) | ||||
|                            , QString const& m_myGrid, QString const& operator_call) | ||||
| { | ||||
|   QString t; | ||||
|   t = "<call:" + QString::number(hisCall.length()) + ">" + hisCall; | ||||
| @ -187,9 +187,6 @@ QByteArray ADIF::QSOToADIF(QString const& hisCall, QString const& hisGrid, QStri | ||||
|       m_myCall; | ||||
|   t += " <my_gridsquare:" + QString::number(m_myGrid.length()) + ">" + | ||||
|       m_myGrid; | ||||
|   if (m_txPower != "") | ||||
|     t += " <tx_pwr:" + QString::number(m_txPower.length()) + | ||||
|         ">" + m_txPower; | ||||
|   if (comments != "") | ||||
|     t += " <comment:" + QString::number(comments.length()) + | ||||
|         ">" + comments; | ||||
|  | ||||
| @ -32,10 +32,10 @@ class ADIF | ||||
| 	bool addQSOToFile(QByteArray const& ADIF_record); | ||||
| 
 | ||||
|   QByteArray QSOToADIF(QString const& hisCall, QString const& hisGrid, QString const& mode, QString const& submode, QString const& rptSent | ||||
| 											 , QString const& rptRcvd, QDateTime const& dateTimeOn, QDateTime const& dateTimeOff | ||||
| 											 , QString const& band, QString const& comments, QString const& name | ||||
| 											 , QString const& strDialFreq, QString const& m_myCall, QString const& m_myGrid | ||||
| 											 , QString const& m_txPower, QString const& operator_call); | ||||
|                                              , QString const& rptRcvd, QDateTime const& dateTimeOn, QDateTime const& dateTimeOff | ||||
|                                              , QString const& band, QString const& comments, QString const& name | ||||
|                                              , QString const& strDialFreq, QString const& m_myCall, QString const& m_myGrid | ||||
|                                              , QString const& operator_call); | ||||
| 
 | ||||
| 
 | ||||
| private: | ||||
|  | ||||
							
								
								
									
										17
									
								
								logqso.cpp
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								logqso.cpp
									
									
									
									
									
								
							| @ -37,9 +37,7 @@ void LogQSO::loadSettings () | ||||
| { | ||||
|   m_settings->beginGroup ("LogQSO"); | ||||
|   restoreGeometry (m_settings->value ("geometry", saveGeometry ()).toByteArray ()); | ||||
|   ui->cbTxPower->setChecked (m_settings->value ("SaveTxPower", false).toBool ()); | ||||
|   ui->cbComments->setChecked (m_settings->value ("SaveComments", false).toBool ()); | ||||
|   m_txPower = m_settings->value ("TxPower", "").toString (); | ||||
|   m_comments = m_settings->value ("LogComments", "").toString(); | ||||
|   m_settings->endGroup (); | ||||
| } | ||||
| @ -48,9 +46,7 @@ void LogQSO::storeSettings () const | ||||
| { | ||||
|   m_settings->beginGroup ("LogQSO"); | ||||
|   m_settings->setValue ("geometry", saveGeometry ()); | ||||
|   m_settings->setValue ("SaveTxPower", ui->cbTxPower->isChecked ()); | ||||
|   m_settings->setValue ("SaveComments", ui->cbComments->isChecked ()); | ||||
|   m_settings->setValue ("TxPower", m_txPower); | ||||
|   m_settings->setValue ("LogComments", m_comments); | ||||
|   m_settings->endGroup (); | ||||
| } | ||||
| @ -59,15 +55,13 @@ void LogQSO::initLogQSO(QString const& hisCall, QString const& hisGrid, QString | ||||
|                         QString const& rptSent, QString const& rptRcvd, | ||||
|                         QDateTime const& dateTimeOn, QDateTime const& dateTimeOff, | ||||
|                         Radio::Frequency dialFreq, QString const& myCall, QString const& myGrid, | ||||
|                         bool toRTTY, bool dBtoComments, bool bFox, QString const& opCall) | ||||
|                         bool toDATA, bool dBtoComments, bool bFox, QString const& opCall) | ||||
| { | ||||
|   if(!isHidden()) return; | ||||
|   ui->call->setText(hisCall); | ||||
|   ui->grid->setText(hisGrid); | ||||
|   ui->name->setText(""); | ||||
|   ui->txPower->setText(""); | ||||
|   ui->comments->setText(""); | ||||
|   if (ui->cbTxPower->isChecked ()) ui->txPower->setText(m_txPower); | ||||
|   if (ui->cbComments->isChecked ()) ui->comments->setText(m_comments); | ||||
|   if(dBtoComments) { | ||||
|     QString t=mode; | ||||
| @ -75,7 +69,7 @@ void LogQSO::initLogQSO(QString const& hisCall, QString const& hisGrid, QString | ||||
|     if(rptRcvd!="") t+="  Rcvd: " + rptRcvd; | ||||
|     ui->comments->setText(t); | ||||
|   } | ||||
|   if(toRTTY) mode="DATA"; | ||||
|   if(toDATA) mode="DATA"; | ||||
|   ui->mode->setText(mode); | ||||
|   ui->sent->setText(rptSent); | ||||
|   ui->rcvd->setText(rptRcvd); | ||||
| @ -111,7 +105,6 @@ void LogQSO::accept() | ||||
|   m_dateTimeOff = ui->end_date_time->dateTime (); | ||||
|   band=ui->band->text(); | ||||
|   name=ui->name->text(); | ||||
|   m_txPower=ui->txPower->text(); | ||||
|   comments=ui->comments->text(); | ||||
|   m_comments=comments; | ||||
|   QString strDialFreq(QString::number(m_dialFreq / 1.e6,'f',6)); | ||||
| @ -123,7 +116,7 @@ void LogQSO::accept() | ||||
|   adifile.init(adifilePath); | ||||
| 
 | ||||
|   QByteArray ADIF {adifile.QSOToADIF (hisCall, hisGrid, mode, submode, rptSent, rptRcvd, m_dateTimeOn, m_dateTimeOff, band | ||||
|                                       , comments, name, strDialFreq, m_myCall, m_myGrid, m_txPower, operator_call)}; | ||||
|                                       , comments, name, strDialFreq, m_myCall, m_myGrid, operator_call)}; | ||||
|   if (!adifile.addQSOToFile (ADIF)) | ||||
|   { | ||||
|     MessageBox::warning_message (this, tr ("Log file error"), | ||||
| @ -153,7 +146,7 @@ void LogQSO::accept() | ||||
|       m_dateTimeOff.date().toString("yyyy-MM-dd,") + | ||||
|       m_dateTimeOff.time().toString("hh:mm:ss,") + hisCall + "," + | ||||
|       hisGrid + "," + strDialFreq + "," + (mode == "MFSK" ? "JS8" : mode) + | ||||
|       "," + rptSent + "," + rptRcvd + "," + m_txPower + | ||||
|       "," + rptSent + "," + rptRcvd + | ||||
|       "," + comments + "," + name; | ||||
|     QTextStream out(&f); | ||||
|     out << logEntry << endl; | ||||
| @ -161,7 +154,7 @@ void LogQSO::accept() | ||||
|   } | ||||
| 
 | ||||
| //Clean up and finish logging
 | ||||
|   Q_EMIT acceptQSO (m_dateTimeOff, hisCall, hisGrid, m_dialFreq, mode, submode, rptSent, rptRcvd, m_txPower, comments, name,m_dateTimeOn, operator_call, m_myCall, m_myGrid, ADIF); | ||||
|   Q_EMIT acceptQSO (m_dateTimeOff, hisCall, hisGrid, m_dialFreq, mode, submode, rptSent, rptRcvd, comments, name,m_dateTimeOn, operator_call, m_myCall, m_myGrid, ADIF); | ||||
|   QDialog::accept(); | ||||
| } | ||||
| 
 | ||||
|  | ||||
							
								
								
									
										5
									
								
								logqso.h
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								logqso.h
									
									
									
									
									
								
							| @ -33,7 +33,7 @@ public: | ||||
|                   QString const& rptSent, QString const& rptRcvd, QDateTime const& dateTimeOn, | ||||
|                   QDateTime const& dateTimeOff, | ||||
|                   Radio::Frequency dialFreq, QString const& myCall, QString const& myGrid, | ||||
|                   bool toRTTY, bool dBtoComments, bool bFox, QString const& opCall); | ||||
|                   bool toDATA, bool dBtoComments, bool bFox, QString const& opCall); | ||||
| 
 | ||||
| public slots: | ||||
|   void accept(); | ||||
| @ -42,7 +42,7 @@ signals: | ||||
|   void acceptQSO (QDateTime const& QSO_date_off, QString const& call, QString const& grid | ||||
|                   , Radio::Frequency dial_freq, QString const& mode, QString const& submode | ||||
|                   , QString const& rpt_sent, QString const& rpt_received | ||||
|                   , QString const& tx_power, QString const& comments | ||||
|                   , QString const& comments | ||||
|                   , QString const& name, QDateTime const& QSO_date_on,  QString const& operator_call | ||||
|                   , QString const& my_call, QString const& my_grid, QByteArray const& ADIF); | ||||
| 
 | ||||
| @ -56,7 +56,6 @@ private: | ||||
|   QScopedPointer<Ui::LogQSO> ui; | ||||
|   QSettings * m_settings; | ||||
|   Configuration const * m_config; | ||||
|   QString m_txPower; | ||||
|   QString m_comments; | ||||
|   Radio::Frequency m_dialFreq; | ||||
|   QString m_myCall; | ||||
|  | ||||
							
								
								
									
										45
									
								
								logqso.ui
									
									
									
									
									
								
							
							
						
						
									
										45
									
								
								logqso.ui
									
									
									
									
									
								
							| @ -125,6 +125,19 @@ | ||||
|      </item> | ||||
|     </layout> | ||||
|    </item> | ||||
|    <item> | ||||
|     <spacer name="verticalSpacer_3"> | ||||
|      <property name="orientation"> | ||||
|       <enum>Qt::Vertical</enum> | ||||
|      </property> | ||||
|      <property name="sizeHint" stdset="0"> | ||||
|       <size> | ||||
|        <width>20</width> | ||||
|        <height>40</height> | ||||
|       </size> | ||||
|      </property> | ||||
|     </spacer> | ||||
|    </item> | ||||
|    <item> | ||||
|     <layout class="QHBoxLayout" name="horizontalLayout_4"> | ||||
|      <item> | ||||
| @ -307,25 +320,17 @@ | ||||
|     </layout> | ||||
|    </item> | ||||
|    <item> | ||||
|     <layout class="QHBoxLayout" name="horizontalLayout_6"> | ||||
|      <item> | ||||
|       <widget class="QLabel" name="label_2"> | ||||
|        <property name="text"> | ||||
|         <string>Tx power</string> | ||||
|        </property> | ||||
|       </widget> | ||||
|      </item> | ||||
|      <item> | ||||
|       <widget class="QLineEdit" name="txPower"/> | ||||
|      </item> | ||||
|      <item> | ||||
|       <widget class="QCheckBox" name="cbTxPower"> | ||||
|        <property name="text"> | ||||
|         <string>Retain</string> | ||||
|        </property> | ||||
|       </widget> | ||||
|      </item> | ||||
|     </layout> | ||||
|     <spacer name="verticalSpacer_2"> | ||||
|      <property name="orientation"> | ||||
|       <enum>Qt::Vertical</enum> | ||||
|      </property> | ||||
|      <property name="sizeHint" stdset="0"> | ||||
|       <size> | ||||
|        <width>20</width> | ||||
|        <height>40</height> | ||||
|       </size> | ||||
|      </property> | ||||
|     </spacer> | ||||
|    </item> | ||||
|    <item> | ||||
|     <layout class="QHBoxLayout" name="horizontalLayout"> | ||||
| @ -434,8 +439,6 @@ | ||||
|   <tabstop>rcvd</tabstop> | ||||
|   <tabstop>grid</tabstop> | ||||
|   <tabstop>name</tabstop> | ||||
|   <tabstop>txPower</tabstop> | ||||
|   <tabstop>cbTxPower</tabstop> | ||||
|   <tabstop>comments</tabstop> | ||||
|   <tabstop>cbComments</tabstop> | ||||
|  </tabstops> | ||||
|  | ||||
| @ -6370,18 +6370,13 @@ void MainWindow::on_logQSOButton_clicked()                 //Log QSO button | ||||
| void MainWindow::acceptQSO (QDateTime const& QSO_date_off, QString const& call, QString const& grid | ||||
|                             , Frequency dial_freq, QString const& mode, QString const &submode | ||||
|                             , QString const& rpt_sent, QString const& rpt_received | ||||
|                             , QString const& tx_power, QString const& comments | ||||
|                             , QString const& comments | ||||
|                             , QString const& name, QDateTime const& QSO_date_on, QString const& operator_call | ||||
|                             , QString const& my_call, QString const& my_grid, QByteArray const& ADIF) | ||||
| { | ||||
|   QString date = QSO_date_on.toString("yyyyMMdd"); | ||||
|   m_logBook.addAsWorked (m_hisCall, m_config.bands ()->find (m_freqNominal), mode, submode, date); | ||||
| 
 | ||||
| #if 0 | ||||
|   m_messageClient->qso_logged (QSO_date_off, call, grid, dial_freq, mode, rpt_sent, rpt_received, tx_power, comments, name, QSO_date_on, operator_call, my_call, my_grid); | ||||
|   m_messageClient->logged_ADIF (ADIF); | ||||
| #endif | ||||
| 
 | ||||
|   sendNetworkMessage("LOG.QSO", QString(ADIF), { | ||||
|       {"UTC.ON", QVariant(QSO_date_on.toMSecsSinceEpoch())}, | ||||
|       {"UTC.OFF", QVariant(QSO_date_off.toMSecsSinceEpoch())}, | ||||
|  | ||||
| @ -343,7 +343,7 @@ private slots: | ||||
|   void acceptQSO (QDateTime const&, QString const& call, QString const& grid | ||||
|                   , Frequency dial_freq, QString const& mode, QString const& submode | ||||
|                   , QString const& rpt_sent, QString const& rpt_received | ||||
|                   , QString const& tx_power, QString const& comments | ||||
|                   , QString const& comments | ||||
|                   , QString const& name, QDateTime const& QSO_date_on, QString const& operator_call | ||||
|                   , QString const& my_call, QString const& my_grid, QByteArray const& ADIF); | ||||
|   void on_bandComboBox_currentIndexChanged (int index); | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Jordan Sherer
						Jordan Sherer