mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-02-03 09:44:24 -05:00
More work in progress on the ActiveStations window.
This commit is contained in:
parent
ceb13110c5
commit
15e33d22af
@ -23,6 +23,8 @@ ActiveStations::ActiveStations(QSettings * settings, QFont const& font, QWidget
|
||||
read_settings ();
|
||||
ui->header_label->setText("Pts Call Grid Az S/N Dial Freq");
|
||||
ui->header_label2->setText(" Call Grid Age Points");
|
||||
|
||||
connect(ui->RecentStationsPlainTextEdit, &QPlainTextEdit::selectionChanged, this, select);
|
||||
}
|
||||
|
||||
ActiveStations::~ActiveStations()
|
||||
@ -94,3 +96,9 @@ int ActiveStations::maxAge()
|
||||
{
|
||||
return ui->sbMaxAge->value();
|
||||
}
|
||||
|
||||
void ActiveStations::select()
|
||||
{
|
||||
int nline=ui->RecentStationsPlainTextEdit->textCursor().blockNumber();
|
||||
emit callSandP(nline);
|
||||
}
|
||||
|
@ -24,6 +24,10 @@ public:
|
||||
void changeFont (QFont const&);
|
||||
int maxRecent();
|
||||
int maxAge();
|
||||
Q_SLOT void select();
|
||||
|
||||
signals:
|
||||
void callSandP(int nline);
|
||||
|
||||
private:
|
||||
void read_settings ();
|
||||
|
@ -2775,6 +2775,7 @@ void MainWindow::on_actionActiveStations_triggered()
|
||||
m_ActiveStationsWidget->showNormal();
|
||||
m_ActiveStationsWidget->raise();
|
||||
m_ActiveStationsWidget->activateWindow();
|
||||
connect(m_ActiveStationsWidget.data (), SIGNAL(callSandP(int)),this,SLOT(callSandP2(int)));
|
||||
}
|
||||
|
||||
void MainWindow::on_actionOpen_triggered() //Open File
|
||||
@ -3443,13 +3444,31 @@ void MainWindow::ARRL_Digi_Display()
|
||||
int maxRecent=qMin(i,m_ActiveStationsWidget->maxRecent());
|
||||
indexx_(pts,&maxRecent,indx);
|
||||
QString t;
|
||||
i=0;
|
||||
for(int j=maxRecent-1; j>=0; j--) {
|
||||
int k=indx[j]-1;
|
||||
m_ready2call[i]=list[k];
|
||||
i++;
|
||||
t += (list[k] + "\n");
|
||||
}
|
||||
if(m_ActiveStationsWidget!=NULL) m_ActiveStationsWidget->displayRecentStations(t);
|
||||
}
|
||||
|
||||
void MainWindow::callSandP2(int n)
|
||||
{
|
||||
QStringList w=m_ready2call[n].split(' ', SkipEmptyParts);
|
||||
|
||||
m_deCall=w[0]; //### needed?
|
||||
m_deGrid=w[1]; //### needed?
|
||||
m_bDoubleClicked=true; //### needed?
|
||||
ui->dxCallEntry->setText(m_deCall);
|
||||
ui->dxGridEntry->setText(m_deGrid);
|
||||
genStdMsgs("-10"); //### real SNR would be better here?
|
||||
setTxMsg(3);
|
||||
|
||||
if (!ui->autoButton->isChecked()) ui->autoButton->click(); // Enable Tx
|
||||
}
|
||||
|
||||
void MainWindow::readFromStdout() //readFromStdout
|
||||
{
|
||||
while(proc_jt9.canReadLine()) {
|
||||
@ -7493,7 +7512,7 @@ void MainWindow::transmit (double snr)
|
||||
true, false, snr, m_TRperiod);
|
||||
}
|
||||
|
||||
if((m_mode=="FT4" or m_mode=="FT8") and m_maxPoints>0 and SpecOp::NA_VHF==m_config.special_op_id()) {
|
||||
if((m_mode=="FT4" or m_mode=="FT8") and m_maxPoints>0 and SpecOp::ARRL_DIGI==m_config.special_op_id()) {
|
||||
qDebug() << "dd" << m_maxPoints << m_deCall << m_deGrid;
|
||||
ui->dxCallEntry->setText(m_deCall);
|
||||
ui->dxGridEntry->setText(m_deGrid);
|
||||
|
@ -335,6 +335,7 @@ private slots:
|
||||
void remote_configure (QString const& mode, quint32 frequency_tolerance, QString const& submode
|
||||
, bool fast_mode, quint32 tr_period, quint32 rx_df, QString const& dx_call
|
||||
, QString const& dx_grid, bool generate_messages);
|
||||
void callSandP2(int nline);
|
||||
|
||||
private:
|
||||
Q_SIGNAL void initializeAudioOutputStream (QAudioDeviceInfo,
|
||||
@ -647,6 +648,7 @@ private:
|
||||
QString m_BestCQpriority;
|
||||
QString m_deCall;
|
||||
QString m_deGrid;
|
||||
QString m_ready2call[20];
|
||||
|
||||
QSet<QString> m_pfx;
|
||||
QSet<QString> m_sfx;
|
||||
|
Loading…
Reference in New Issue
Block a user