kopia lustrzana https://gitlab.com/eliggett/wfview
Merge branch 'ui-enhance' into lan-alpha
commit
a73a105509
|
@ -687,7 +687,7 @@ void rigCommander::setDataMode(bool dataOn, unsigned char filter)
|
|||
payload.setRawData("\x1A\x06", 2);
|
||||
if(dataOn)
|
||||
{
|
||||
payload.append("\x01", 1); // data mode on, wide bandwidth
|
||||
payload.append("\x01", 1); // data mode on
|
||||
payload.append(filter);
|
||||
|
||||
} else {
|
||||
|
@ -2726,6 +2726,25 @@ void rigCommander::determineRigCaps()
|
|||
rigCaps.bands.push_back(band630m);
|
||||
rigCaps.bands.push_back(band2200m);
|
||||
break;
|
||||
case model7000:
|
||||
rigCaps.modelName = QString("IC-7000");
|
||||
rigCaps.hasSpectrum = false;
|
||||
rigCaps.inputs.append(inputACC);
|
||||
rigCaps.hasLan = false;
|
||||
rigCaps.hasEthernet = false;
|
||||
rigCaps.hasWiFi = false;
|
||||
rigCaps.hasATU = true;
|
||||
rigCaps.hasCTCSS = true;
|
||||
rigCaps.hasDTCS = true;
|
||||
rigCaps.attenuators.push_back('\x12');
|
||||
rigCaps.preamps.push_back('\x01');
|
||||
rigCaps.bands = standardHF;
|
||||
rigCaps.bands.insert(rigCaps.bands.end(), standardVU.begin(), standardVU.end());
|
||||
rigCaps.bands.push_back(bandGen);
|
||||
rigCaps.bsr[band2m] = 0x11;
|
||||
rigCaps.bsr[band70cm] = 0x12;
|
||||
rigCaps.bsr[bandGen] = 0x13;
|
||||
break;
|
||||
case model7100:
|
||||
rigCaps.modelName = QString("IC-7100");
|
||||
rigCaps.hasSpectrum = false;
|
||||
|
@ -3211,7 +3230,7 @@ void rigCommander::setAntenna(unsigned char ant)
|
|||
{
|
||||
QByteArray payload("\x12");
|
||||
payload.append(ant);
|
||||
payload.append("\x01"); // "on", presumably the other ones turn off...
|
||||
payload.append("\x00"); // 0x00 = use for TX and RX
|
||||
prepDataAndSend(payload);
|
||||
}
|
||||
|
||||
|
|
|
@ -22,6 +22,9 @@ model_kind determineRadioModel(unsigned char rigID)
|
|||
case modelR8600:
|
||||
rig = modelR8600;
|
||||
break;
|
||||
case model7000:
|
||||
rig = model7000;
|
||||
break;
|
||||
case model7600:
|
||||
rig = model7600;
|
||||
break;
|
||||
|
|
|
@ -20,6 +20,7 @@ enum model_kind {
|
|||
model7610 = 0x98,
|
||||
model7700 = 0x74,
|
||||
model7800 = 0x6A,
|
||||
model7000 = 0x70,
|
||||
model7850 = 0x8E,
|
||||
model9700 = 0xA2,
|
||||
model705 = 0xA4,
|
||||
|
|
27
wfmain.cpp
27
wfmain.cpp
|
@ -619,6 +619,20 @@ wfmain::~wfmain()
|
|||
delete ui;
|
||||
}
|
||||
|
||||
void wfmain::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
// Are you sure?
|
||||
QMessageBox::StandardButton resBtn = QMessageBox::question( this, QString("Confirm close"),
|
||||
tr("Are you sure you wish to exit?\n"),
|
||||
QMessageBox::No | QMessageBox::Yes,
|
||||
QMessageBox::Yes);
|
||||
if (resBtn == QMessageBox::Yes) {
|
||||
QApplication::exit();
|
||||
} else {
|
||||
event->ignore();
|
||||
}
|
||||
}
|
||||
|
||||
void wfmain::openRig()
|
||||
{
|
||||
// This function is intended to handle opening a connection to the rig.
|
||||
|
@ -1711,7 +1725,7 @@ void wfmain::setDefaultColors()
|
|||
defaultColors.Dark_PlotBasePen = QColor(Qt::white);
|
||||
defaultColors.Dark_PlotTickPen = QColor(Qt::white);
|
||||
defaultColors.Dark_PeakPlotLine = QColor(Qt::yellow);
|
||||
defaultColors.Dark_TuningLine = QColor(Qt::blue);
|
||||
defaultColors.Dark_TuningLine = QColor(Qt::cyan);
|
||||
|
||||
defaultColors.Light_PlotBackground = QColor(255,255,255,255);
|
||||
defaultColors.Light_PlotAxisPen = QColor(200,200,200,255);
|
||||
|
@ -2844,7 +2858,7 @@ void wfmain::on_modeSelectCombo_activated(int index)
|
|||
{
|
||||
// oops, we forgot to reset the combo box
|
||||
} else {
|
||||
qDebug(logSystem()) << __func__ << " at index " << index << " has newMode: " << newMode;
|
||||
//qDebug(logSystem()) << __func__ << " at index " << index << " has newMode: " << newMode;
|
||||
currentMode = (mode_kind)newMode;
|
||||
emit setMode(newMode, filterSelection);
|
||||
}
|
||||
|
@ -3493,11 +3507,14 @@ void wfmain::on_modeFilterCombo_activated(int index)
|
|||
//
|
||||
|
||||
} else {
|
||||
|
||||
unsigned char newMode = static_cast<unsigned char>(ui->modeSelectCombo->currentData().toUInt());
|
||||
currentModeIndex = newMode; // we track this for other functions
|
||||
|
||||
emit setMode(newMode, (unsigned char)filterSelection);
|
||||
if(ui->dataModeBtn->isChecked())
|
||||
{
|
||||
emit setDataMode(true, (unsigned char)filterSelection);
|
||||
} else {
|
||||
emit setMode(newMode, (unsigned char)filterSelection);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
2
wfmain.h
2
wfmain.h
|
@ -2,6 +2,7 @@
|
|||
#define WFMAIN_H
|
||||
|
||||
#include <QMainWindow>
|
||||
#include <QCloseEvent>
|
||||
#include <QThread>
|
||||
#include <QString>
|
||||
#include <QVector>
|
||||
|
@ -437,6 +438,7 @@ private slots:
|
|||
|
||||
private:
|
||||
Ui::wfmain *ui;
|
||||
void closeEvent(QCloseEvent *event);
|
||||
QSettings settings;
|
||||
void loadSettings();
|
||||
void saveSettings();
|
||||
|
|
40
wfmain.ui
40
wfmain.ui
|
@ -257,6 +257,30 @@
|
|||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_27">
|
||||
<item>
|
||||
<widget class="QPushButton" name="rigPowerOnBtn">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Turns the radio on</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Power On</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="rigPowerOffBtn">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Turns the radio off</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Power Off</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -2098,20 +2122,6 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="rigPowerOnBtn">
|
||||
<property name="text">
|
||||
<string>Rig Power On</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="rigPowerOffBtn">
|
||||
<property name="text">
|
||||
<string>Rig Power Off</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<property name="orientation">
|
||||
|
@ -2522,6 +2532,7 @@
|
|||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusBar"/>
|
||||
<widget class="QMenuBar" name="menuBar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
|
@ -2532,7 +2543,6 @@
|
|||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusBar"/>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<customwidgets>
|
||||
|
|
Ładowanie…
Reference in New Issue