mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-07-31 21:22:27 -04:00
1. Corrected a logic error in rigOpen() procedure.
2. Added a "Rig Open" indicator. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3235 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
8fb1dc683f
commit
cfc89d0ad2
@ -307,7 +307,6 @@ MainWindow::MainWindow(QSharedMemory *shdmem, QWidget *parent) :
|
|||||||
out << QDateTime::currentDateTimeUtc().toString("yyyy-MMM-dd hh:mm")
|
out << QDateTime::currentDateTimeUtc().toString("yyyy-MMM-dd hh:mm")
|
||||||
<< " " << m_dialFreq << " MHz " << m_mode << endl;
|
<< " " << m_dialFreq << " MHz " << m_mode << endl;
|
||||||
f2.close();
|
f2.close();
|
||||||
|
|
||||||
} // End of MainWindow constructor
|
} // End of MainWindow constructor
|
||||||
|
|
||||||
//--------------------------------------------------- MainWindow destructor
|
//--------------------------------------------------- MainWindow destructor
|
||||||
@ -483,7 +482,6 @@ void MainWindow::readSettings()
|
|||||||
ui->actionLog_JT9_without_submode->setChecked(m_noSuffix);
|
ui->actionLog_JT9_without_submode->setChecked(m_noSuffix);
|
||||||
m_dBtoComments=settings.value("dBtoComments",false).toBool();
|
m_dBtoComments=settings.value("dBtoComments",false).toBool();
|
||||||
ui->actionLog_dB_reports_to_Comments->setChecked(m_dBtoComments);
|
ui->actionLog_dB_reports_to_Comments->setChecked(m_dBtoComments);
|
||||||
m_catEnabled=settings.value("catEnabled",false).toBool();
|
|
||||||
m_rig=settings.value("Rig",214).toInt();
|
m_rig=settings.value("Rig",214).toInt();
|
||||||
m_rigIndex=settings.value("RigIndex",100).toInt();
|
m_rigIndex=settings.value("RigIndex",100).toInt();
|
||||||
m_catPort=settings.value("CATport","None").toString();
|
m_catPort=settings.value("CATport","None").toString();
|
||||||
@ -499,6 +497,7 @@ void MainWindow::readSettings()
|
|||||||
m_band=settings.value("BandIndex",7).toInt();
|
m_band=settings.value("BandIndex",7).toInt();
|
||||||
ui->bandComboBox->setCurrentIndex(m_band);
|
ui->bandComboBox->setCurrentIndex(m_band);
|
||||||
dialFreqChanged2(m_dialFreq);
|
dialFreqChanged2(m_dialFreq);
|
||||||
|
m_catEnabled=settings.value("catEnabled",false).toBool();
|
||||||
m_promptToLog=settings.value("PromptToLog",false).toBool();
|
m_promptToLog=settings.value("PromptToLog",false).toBool();
|
||||||
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();
|
||||||
@ -635,6 +634,7 @@ void MainWindow::on_actionDeviceSetup_triggered() //Setup Dialog
|
|||||||
|
|
||||||
if(m_bRigOpen) {
|
if(m_bRigOpen) {
|
||||||
rig->close();
|
rig->close();
|
||||||
|
ui->labRigOpen->setStyleSheet("");
|
||||||
delete rig;
|
delete rig;
|
||||||
m_bRigOpen=false;
|
m_bRigOpen=false;
|
||||||
m_catEnabled=false;
|
m_catEnabled=false;
|
||||||
@ -2490,11 +2490,9 @@ void MainWindow::on_bandComboBox_currentIndexChanged(int index)
|
|||||||
if(m_catEnabled) {
|
if(m_catEnabled) {
|
||||||
if(!m_bRigOpen) {
|
if(!m_bRigOpen) {
|
||||||
rigOpen();
|
rigOpen();
|
||||||
m_bRigOpen = true;
|
|
||||||
}
|
}
|
||||||
rig->setFreq(MHz(m_dialFreq));
|
if(m_bRigOpen) rig->setFreq(MHz(m_dialFreq));
|
||||||
}
|
}
|
||||||
|
|
||||||
QFile f2("ALL.TXT");
|
QFile f2("ALL.TXT");
|
||||||
f2.open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Append);
|
f2.open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Append);
|
||||||
QTextStream out(&f2);
|
QTextStream out(&f2);
|
||||||
@ -2689,11 +2687,12 @@ void MainWindow::rigOpen()
|
|||||||
rigMode=rig->getMode(bw);
|
rigMode=rig->getMode(bw);
|
||||||
if(rigMode!=RIG_MODE_USB) rig->setMode(RIG_MODE_USB);
|
if(rigMode!=RIG_MODE_USB) rig->setMode(RIG_MODE_USB);
|
||||||
m_bRigOpen=true;
|
m_bRigOpen=true;
|
||||||
|
ui->labRigOpen->setStyleSheet("QLabel{background-color: red}");
|
||||||
}
|
}
|
||||||
catch (const RigException &Ex) {
|
catch (const RigException &Ex) {
|
||||||
m_catEnabled=false;
|
m_catEnabled=false;
|
||||||
m_bRigOpen=false;
|
m_bRigOpen=false;
|
||||||
msgBox("Failed to open rig (mainwindow)");
|
ui->labRigOpen->setStyleSheet("");
|
||||||
delete rig;
|
delete rig;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2149,6 +2149,31 @@ p, li { white-space: pre-wrap; }
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<widget class="QLabel" name="labRigOpen">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>20</horstretch>
|
||||||
|
<verstretch>20</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>10</width>
|
||||||
|
<height>10</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>10</width>
|
||||||
|
<height>10</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user