mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-18 01:52:05 -05:00
Set fQSO as well as TxFreq when decoded text line is double-clicked.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3026 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
bea312da5e
commit
5de4baa9bc
@ -1255,8 +1255,10 @@ void MainWindow::on_txb6_clicked() //txb6
|
||||
|
||||
void MainWindow::doubleClickOnCall(bool ctrl)
|
||||
{
|
||||
QTextCursor cursor=ui->decodedTextBrowser->textCursor();
|
||||
cursor.select(QTextCursor::LineUnderCursor);
|
||||
int i2=cursor.position();
|
||||
QString t = ui->decodedTextBrowser->toPlainText(); //Full contents
|
||||
int i2=ui->decodedTextBrowser->textCursor().position();
|
||||
QString t1 = t.mid(0,i2); //contents up to \n on selected line
|
||||
int i1=t1.lastIndexOf("\n") + 1; //points to first char of line
|
||||
QString t2 = t1.mid(i1,i2-i1); //selected line
|
||||
@ -1264,7 +1266,9 @@ void MainWindow::doubleClickOnCall(bool ctrl)
|
||||
if(i4>60) i4=60;
|
||||
QString t3=t.mid(i1,i4);
|
||||
QStringList t4=t3.split(" ",QString::SkipEmptyParts);
|
||||
ui->TxFreqSpinBox->setValue(int(t4.at(4).toFloat()));
|
||||
int nfreq=int(t4.at(4).toFloat());
|
||||
ui->TxFreqSpinBox->setValue(nfreq);
|
||||
g_pWideGraph->setQSOfreq(nfreq);
|
||||
QString hiscall=t4.at(7);
|
||||
ui->dxCallEntry->setText(hiscall);
|
||||
int n = 60*t2.mid(0,2).toInt() + t2.mid(2,2).toInt();
|
||||
|
Loading…
Reference in New Issue
Block a user