Porównaj commity

...

10 Commity

Autor SHA1 Wiadomość Data
Elliott Liggett d1c11ed0b4 Gradient fills for spectrum and overlay! 2024-04-14 21:56:34 -07:00
Elliott Liggett fe821d1f0a Removed old code from debug function 2024-04-14 16:24:27 -07:00
Elliott Liggett e9ebaef9e7 Added FirstTimeSetup
Also fixed a bug in the repeater setup if we had not encountered a radio
yet.
2024-04-14 15:59:16 -07:00
Elliott Liggett 7cb3cbd59b I have no idea why this commit message is necessary, but I will play
along if it lets me continue to write code.
Merge branch 'creator-widgets' of gitlab.com:eliggett/wfview into creator-widgets
2024-04-14 10:26:07 -07:00
Elliott Liggett 7d06a5bafd Tells user what to do when serial port doesn't work 2024-04-14 10:24:37 -07:00
Phil Taylor 6a87cb7386 Merge branch 'creator-widgets' of https://gitlab.com/eliggett/wfview into creator-widgets 2024-04-14 15:27:49 +01:00
Phil Taylor 301e481a2c More TCI fixes 2024-04-14 15:27:37 +01:00
Elliott Liggett da3cf1cfee Preliminary revert settings button 2024-04-13 20:04:35 -07:00
Elliott Liggett 4e491ae441 Attach and detach now resize the main window. Still some work to be done
on selecting good sizes for the scopes themselves.
2024-04-13 15:06:08 -07:00
Elliott Liggett 7f5c5a8973 WIP for stretched issue 2024-04-13 10:35:17 -07:00
19 zmienionych plików z 1457 dodań i 557 usunięć

Wyświetl plik

@ -16,8 +16,14 @@ struct colorPrefsType{
QColor textColor;
QColor spectrumLine;
QColor spectrumFill;
QColor spectrumFillTop;
QColor spectrumFillBot;
bool useSpectrumFillGradient = false;
QColor underlayLine;
QColor underlayFill;
bool useUnderlayFillGradient = false;
QColor underlayFillTop;
QColor underlayFillBot;
QColor plotBackground;
QColor tuningLine;
QColor passband;

Wyświetl plik

@ -342,10 +342,10 @@ void commHandler::openPort()
qInfo(logSerial()) << "Opened port: " << portName;
return;
} else {
qInfo(logSerial()) << "Could not open serial port " << portName << " , please restart.";
qInfo(logSerial()) << "Could not open serial port " << portName << " , please check Radio Access under Settings.";
isConnected = false;
serialError = true;
emit havePortError(errorType(true, portName, "Could not open port. Please restart."));
emit havePortError(errorType(true, portName, "Could not open Serial or USB port.\nPlease check Radio Access under Settings."));
return;
}
}

107
firsttimesetup.cpp 100644
Wyświetl plik

@ -0,0 +1,107 @@
#include "firsttimesetup.h"
#include "ui_firsttimesetup.h"
FirstTimeSetup::FirstTimeSetup(QWidget *parent) :
QDialog(parent),
ui(new Ui::FirstTimeSetup)
{
ui->setupUi(this);
setWindowFlags(Qt::Dialog
| Qt::FramelessWindowHint);
this->setupState = setupInitial;
ui->step2GroupBox->setHidden(true);
ui->backBtn->setHidden(true);
serialText1 = QString("Serial Port Name");
serialText2 = QString("Baud Rate");
serialText3 = QString("");
networkText1 = QString("Radio IP address, UDP Port Numbers");
networkText2 = QString("Radio Username, Radio Password");
networkText2 = QString("Mic and Speaker on THIS PC");
}
FirstTimeSetup::~FirstTimeSetup()
{
delete ui;
}
void FirstTimeSetup::on_exitProgramBtn_clicked()
{
emit exitProgram();
this->close();
}
void FirstTimeSetup::on_nextBtn_clicked()
{
switch (setupState) {
case setupInitial:
// go to step 2:
ui->nextBtn->setText("Finish");
ui->step1GroupBox->setHidden(true);
ui->step2GroupBox->setHidden(false);
if(isNetwork) {
ui->neededDetailsLabel1->setText(networkText1);
ui->neededDetailsLabel2->setText(networkText2);
ui->neededDetailsLabel3->setText(networkText3);
} else {
ui->neededDetailsLabel1->setText(serialText1);
ui->neededDetailsLabel2->setText(serialText2);
ui->neededDetailsLabel3->setText(serialText3);
}
ui->backBtn->setHidden(false);
setupState = setupStep2;
break;
case setupStep2:
// Done
emit showSettings(isNetwork);
this->close();
break;
default:
break;
}
}
void FirstTimeSetup::on_onMyOwnBtn_clicked()
{
emit skipSetup();
this->close();
}
void FirstTimeSetup::on_ethernetNetwork_clicked(bool checked)
{
this->isNetwork = checked;
}
void FirstTimeSetup::on_WiFiNetwork_clicked(bool checked)
{
this->isNetwork = checked;
}
void FirstTimeSetup::on_USBPortThisPC_clicked(bool checked)
{
this->isNetwork = !checked;
}
void FirstTimeSetup::on_serialPortThisPC_clicked(bool checked)
{
this->isNetwork = !checked;
}
void FirstTimeSetup::on_backBtn_clicked()
{
setupState = setupInitial;
ui->nextBtn->setText("Next");
ui->step1GroupBox->setHidden(false);
ui->step2GroupBox->setHidden(true);
ui->backBtn->setHidden(true);
}

50
firsttimesetup.h 100644
Wyświetl plik

@ -0,0 +1,50 @@
#ifndef FIRSTTIMESETUP_H
#define FIRSTTIMESETUP_H
// include <QWidget>
#include <QDialog>
namespace Ui {
class FirstTimeSetup;
}
class FirstTimeSetup : public QDialog
{
Q_OBJECT
public:
explicit FirstTimeSetup(QWidget *parent = nullptr);
~FirstTimeSetup();
private:
Ui::FirstTimeSetup *ui;
enum setupState_t {
setupInitial,
setupStep2
} setupState;
bool isNetwork = true;
QString serialText1;
QString serialText2;
QString serialText3;
QString networkText1;
QString networkText2;
QString networkText3;
signals:
void exitProgram();
void showSettings(bool isNetwork);
void skipSetup();
private slots:
void on_exitProgramBtn_clicked();
void on_nextBtn_clicked();
void on_onMyOwnBtn_clicked();
void on_ethernetNetwork_clicked(bool checked);
void on_WiFiNetwork_clicked(bool checked);
void on_USBPortThisPC_clicked(bool checked);
void on_serialPortThisPC_clicked(bool checked);
void on_backBtn_clicked();
};
#endif // FIRSTTIMESETUP_H

260
firsttimesetup.ui 100644
Wyświetl plik

@ -0,0 +1,260 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>FirstTimeSetup</class>
<widget class="QWidget" name="FirstTimeSetup">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>518</width>
<height>421</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="label">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<pointsize>24</pointsize>
</font>
</property>
<property name="text">
<string>Welcome to wfview!</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="step1GroupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>How is your radio connected?</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QRadioButton" name="serialPortThisPC">
<property name="text">
<string>Serial Port on this PC</string>
</property>
<attribute name="buttonGroup">
<string notr="true">buttonGroup</string>
</attribute>
</widget>
</item>
<item>
<widget class="QRadioButton" name="USBPortThisPC">
<property name="text">
<string>USB Port on This PC</string>
</property>
<attribute name="buttonGroup">
<string notr="true">buttonGroup</string>
</attribute>
</widget>
</item>
<item>
<widget class="QRadioButton" name="ethernetNetwork">
<property name="text">
<string>Ethernet Network</string>
</property>
<attribute name="buttonGroup">
<string notr="true">buttonGroup</string>
</attribute>
</widget>
</item>
<item>
<widget class="QRadioButton" name="WiFiNetwork">
<property name="text">
<string>WiFi Network</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
<attribute name="buttonGroup">
<string notr="true">buttonGroup</string>
</attribute>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="step2GroupBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Next Steps:</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QLabel" name="label_3">
<property name="text">
<string>You will now be taken to the Radio Access page under Settings.</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>Please fill in the relevent details for this connection type:</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QLabel" name="neededDetailsLabel1">
<property name="text">
<string>1</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="neededDetailsLabel2">
<property name="text">
<string>2</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="neededDetailsLabel3">
<property name="text">
<string>3</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="label_4">
<property name="text">
<string>Note: If you do not have this information, press Exit Program, and return later.</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QLabel" name="label_5">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Even if you have run wfview before, please take a moment to review your settings.</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="exitProgramBtn">
<property name="toolTip">
<string>Press to exit the program.
You will see this dialog box the next time you open wfview.</string>
</property>
<property name="text">
<string>Exit Program</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="onMyOwnBtn">
<property name="toolTip">
<string>Press to skip the setup.</string>
</property>
<property name="text">
<string>Skip</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="backBtn">
<property name="toolTip">
<string>Press to go back to the prior step. </string>
</property>
<property name="text">
<string>Back</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="nextBtn">
<property name="toolTip">
<string>Press for the next step.</string>
</property>
<property name="text">
<string>Next</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources/>
<connections/>
<buttongroups>
<buttongroup name="buttonGroup"/>
</buttongroups>
</ui>

41
prefs.h
Wyświetl plik

@ -41,23 +41,29 @@ enum prefColItem {
col_plotBackground = 1 << 3,
col_spectrumLine = 1 << 4,
col_spectrumFill = 1 << 5,
col_underlayLine = 1 << 6,
col_underlayFill = 1 << 7,
col_tuningLine = 1 << 8,
col_passband = 1 << 9,
col_pbtIndicator = 1 << 10,
col_meterLevel = 1 << 11,
col_meterAverage = 1 << 12,
col_meterPeakLevel = 1 << 13,
col_meterHighScale = 1 << 14,
col_meterScale = 1 << 15,
col_meterText = 1 << 16,
col_waterfallBack = 1 << 17,
col_waterfallGrid = 1 << 18,
col_waterfallAxis = 1 << 19,
col_waterfallText = 1 << 20,
col_clusterSpots = 1 << 21,
col_all = 1 << 22
col_useSpectrumFillGradient = 1 << 6,
col_spectrumFillTop = 1 << 7,
col_spectrumFillBot = 1 << 8,
col_underlayLine = 1 << 9,
col_underlayFill = 1 << 10,
col_useUnderlayFillGradient = 1 << 11,
col_underlayFillTop = 1 << 12,
col_underlayFillBot = 1 << 13,
col_tuningLine = 1 << 14,
col_passband = 1 << 15,
col_pbtIndicator = 1 << 16,
col_meterLevel = 1 << 17,
col_meterAverage = 1 << 18,
col_meterPeakLevel = 1 << 19,
col_meterHighScale = 1 << 20,
col_meterScale = 1 << 21,
col_meterText = 1 << 22,
col_waterfallBack = 1 << 23,
col_waterfallGrid = 1 << 24,
col_waterfallAxis = 1 << 25,
col_waterfallText = 1 << 26,
col_clusterSpots = 1 << 27,
col_all = 1 << 28
};
enum prefRsItem {
@ -155,6 +161,7 @@ struct preferences {
int majorVersion = 0;
int minorVersion = 0;
QString gitShort;
bool hasRunSetup = false;
bool settingsChanged = false;
// Interface:

Wyświetl plik

@ -373,11 +373,12 @@ void repeaterSetup::handleTransmitStatus(bool amTransmitting)
void repeaterSetup::showEvent(QShowEvent *event)
{
queue->add(priorityImmediate,funcSplitStatus,false,false);
if(rigCaps->commands.contains(funcToneSquelchType))
queue->add(priorityImmediate,funcReadFreqOffset,false,false);
QMainWindow::showEvent(event);
if(haveRig) {
queue->add(priorityImmediate,funcSplitStatus,false,false);
if(rigCaps->commands.contains(funcToneSquelchType))
queue->add(priorityImmediate,funcReadFreqOffset,false,false);
QMainWindow::showEvent(event);
}
(void)event;
}

Wyświetl plik

@ -524,6 +524,23 @@ void settingswidget::updateColPref(prefColItem col)
setColorElement(c, ui->colorSwatchSpecFill, ui->colorEditSpecFill);
break;
}
case col_useSpectrumFillGradient:
{
quietlyUpdateCheckbox(ui->useSpectrumFillGradientChk, colorPreset[pos].useSpectrumFillGradient);
break;
}
case col_spectrumFillTop:
{
QColor c = (colorPreset[pos].spectrumFillTop);
setColorElement(c, ui->colorSwatchSpecFillTop, ui->colorEditSpecFillTop);
break;
}
case col_spectrumFillBot:
{
QColor c = (colorPreset[pos].spectrumFillBot);
setColorElement(c, ui->colorSwatchSpecFillBot, ui->colorEditSpecFillBot);
break;
}
case col_underlayLine:
{
QColor c = (colorPreset[pos].underlayLine);
@ -536,6 +553,23 @@ void settingswidget::updateColPref(prefColItem col)
setColorElement(c, ui->colorSwatchUnderlayFill, ui->colorEditUnderlayFill);
break;
}
case col_useUnderlayFillGradient:
{
quietlyUpdateCheckbox(ui->useUnderlayFillGradientChk, colorPreset[pos].useUnderlayFillGradient);
break;
}
case col_underlayFillTop:
{
QColor c = (colorPreset[pos].underlayFillTop);
setColorElement(c, ui->colorSwatchUnderlayFillTop, ui->colorEditUnderlayFillTop);
break;
}
case col_underlayFillBot:
{
QColor c = (colorPreset[pos].underlayFillBot);
setColorElement(c, ui->colorSwatchUnderlayFillBot, ui->colorEditUnderlayFillBot);
break;
}
case col_tuningLine:
{
QColor c = (colorPreset[pos].tuningLine);
@ -818,6 +852,10 @@ void settingswidget::updateLanPref(prefLanItem plan)
case l_enableLAN:
quietlyUpdateRadiobutton(ui->lanEnableBtn, prefs->enableLAN);
quietlyUpdateRadiobutton(ui->serialEnableBtn, !prefs->enableLAN);
if(!connectedStatus) {
ui->groupNetwork->setEnabled(prefs->enableLAN);
ui->groupSerial->setEnabled(!prefs->enableLAN);
}
break;
case l_enableRigCtlD:
quietlyUpdateCheckbox(ui->enableRigctldChk, prefs->enableRigCtlD);
@ -2143,9 +2181,16 @@ void settingswidget::loadColorPresetToUIandPlots(int presetNumber)
setEditAndLedFromColor(p.textColor, ui->colorEditText, ui->colorSwatchText);
setEditAndLedFromColor(p.spectrumLine, ui->colorEditSpecLine, ui->colorSwatchSpecLine);
setEditAndLedFromColor(p.spectrumFill, ui->colorEditSpecFill, ui->colorSwatchSpecFill);
quietlyUpdateCheckbox(ui->useSpectrumFillGradientChk, p.useSpectrumFillGradient);
setEditAndLedFromColor(p.spectrumFillTop, ui->colorEditSpecFillTop, ui->colorSwatchSpecFillTop);
setEditAndLedFromColor(p.spectrumFillBot, ui->colorEditSpecFillBot, ui->colorSwatchSpecFillBot);
setEditAndLedFromColor(p.underlayLine, ui->colorEditUnderlayLine, ui->colorSwatchUnderlayLine);
setEditAndLedFromColor(p.underlayFill, ui->colorEditUnderlayFill, ui->colorSwatchUnderlayFill);
setEditAndLedFromColor(p.underlayFillTop, ui->colorEditUnderlayFillTop, ui->colorSwatchUnderlayFillTop);
setEditAndLedFromColor(p.underlayFillBot, ui->colorEditUnderlayFillBot, ui->colorSwatchUnderlayFillBot);
quietlyUpdateCheckbox(ui->useUnderlayFillGradientChk, p.useUnderlayFillGradient);
setEditAndLedFromColor(p.plotBackground, ui->colorEditPlotBackground, ui->colorSwatchPlotBackground);
setEditAndLedFromColor(p.tuningLine, ui->colorEditTuningLine, ui->colorSwatchTuningLine);
setEditAndLedFromColor(p.passband, ui->colorEditPassband, ui->colorSwatchPassband);
setEditAndLedFromColor(p.pbt, ui->colorEditPBT, ui->colorSwatchPBT);
@ -2295,6 +2340,44 @@ void settingswidget::on_colorEditSpecFill_editingFinished()
setColorLineEditOperations(c, ui->colorEditSpecFill, ui->colorSwatchSpecFill);
emit changedColPref(col_spectrumFill);
}
void settingswidget::on_useSpectrumFillGradientChk_clicked(bool checked)
{
int pos = ui->colorPresetCombo->currentIndex();
colorPreset[pos].useSpectrumFillGradient = checked;
emit changedColPref(col_useSpectrumFillGradient);
}
// SpecFill Top:
void settingswidget::on_colorSetBtnSpectFillTop_clicked()
{
int pos = ui->colorPresetCombo->currentIndex();
QColor *c = &(colorPreset[pos].spectrumFillTop);
setColorButtonOperations(c, ui->colorEditSpecFillTop, ui->colorSwatchSpecFillTop);
emit changedColPref(col_spectrumFillTop);
}
void settingswidget::on_colorEditSpecFillTop_editingFinished()
{
int pos = ui->colorPresetCombo->currentIndex();
QColor *c = &(colorPreset[pos].spectrumFillTop);
setColorLineEditOperations(c, ui->colorEditSpecFillTop, ui->colorSwatchSpecFillTop);
emit changedColPref(col_spectrumFillTop);
}
// SpecFill Bot:
void settingswidget::on_colorSetBtnSpectFillBot_clicked()
{
int pos = ui->colorPresetCombo->currentIndex();
QColor *c = &(colorPreset[pos].spectrumFillBot);
setColorButtonOperations(c, ui->colorEditSpecFillBot, ui->colorSwatchSpecFillBot);
emit changedColPref(col_spectrumFillBot);
}
void settingswidget::on_colorEditSpecFillBot_editingFinished()
{
int pos = ui->colorPresetCombo->currentIndex();
QColor *c = &(colorPreset[pos].spectrumFillBot);
setColorLineEditOperations(c, ui->colorEditSpecFillBot, ui->colorSwatchSpecFillBot);
emit changedColPref(col_spectrumFillBot);
}
// PlotBackground:
void settingswidget::on_colorEditPlotBackground_editingFinished()
@ -2344,6 +2427,44 @@ void settingswidget::on_colorEditUnderlayFill_editingFinished()
setColorLineEditOperations(c, ui->colorEditUnderlayFill, ui->colorSwatchUnderlayFill);
emit changedColPref(col_underlayFill);
}
void settingswidget::on_useUnderlayFillGradientChk_clicked(bool checked)
{
int pos = ui->colorPresetCombo->currentIndex();
colorPreset[pos].useUnderlayFillGradient = checked;
emit changedColPref(col_useUnderlayFillGradient);
}
// Underlay Fill Top:
void settingswidget::on_colorSetBtnUnderlayFillTop_clicked()
{
int pos = ui->colorPresetCombo->currentIndex();
QColor *c = &(colorPreset[pos].underlayFillTop);
setColorButtonOperations(c, ui->colorEditUnderlayFillTop, ui->colorSwatchUnderlayFillTop);
emit changedColPref(col_underlayFillTop);
}
void settingswidget::on_colorEditUnderlayFillTop_editingFinished()
{
int pos = ui->colorPresetCombo->currentIndex();
QColor *c = &(colorPreset[pos].underlayFillTop);
setColorLineEditOperations(c, ui->colorEditUnderlayFillTop, ui->colorSwatchUnderlayFillTop);
emit changedColPref(col_underlayFillTop);
}
// Underlay Fill Bot:
void settingswidget::on_colorSetBtnUnderlayFillBot_clicked()
{
int pos = ui->colorPresetCombo->currentIndex();
QColor *c = &(colorPreset[pos].underlayFillBot);
setColorButtonOperations(c, ui->colorEditUnderlayFillBot, ui->colorSwatchUnderlayFillBot);
emit changedColPref(col_underlayFillBot);
}
void settingswidget::on_colorEditUnderlayFillBot_editingFinished()
{
int pos = ui->colorPresetCombo->currentIndex();
QColor *c = &(colorPreset[pos].underlayFillBot);
setColorLineEditOperations(c, ui->colorEditUnderlayFillBot, ui->colorSwatchUnderlayFillBot);
emit changedColPref(col_underlayFillBot);
}
// WF Background:
void settingswidget::on_colorSetBtnwfBackground_clicked()
@ -2701,6 +2822,7 @@ void settingswidget::onServerUserFieldChanged()
// This is a slot that receives a signal from wfmain when we are connecting/disconnected
void settingswidget::connectionStatus(bool conn)
{
connectedStatus = conn;
ui->groupConnection->setEnabled(!conn);
ui->audioInputCombo->setEnabled(!conn);
ui->audioOutputCombo->setEnabled(!conn);
@ -2731,10 +2853,18 @@ void settingswidget::connectionStatus(bool conn)
}
}
void settingswidget::on_connectBtn_clicked()
{
emit connectButtonPressed();
}
void settingswidget::on_saveSettingsBtn_clicked()
{
emit saveSettingsButtonPressed();
}
void settingswidget::on_revertSettingsBtn_clicked()
{
emit revertSettingsButtonPressed();
}

Wyświetl plik

@ -97,6 +97,8 @@ signals:
void changedUdpPref(prefUDPItem i);
void changedServerPref(prefServerItem i);
void connectButtonPressed();
void saveSettingsButtonPressed();
void revertSettingsButtonPressed();
private slots:
void on_settingsList_currentRowChanged(int currentRow);
@ -243,6 +245,30 @@ private slots:
void on_connectBtn_clicked();
void on_saveSettingsBtn_clicked();
void on_revertSettingsBtn_clicked();
void on_colorSetBtnSpectFillTop_clicked();
void on_colorEditSpecFillTop_editingFinished();
void on_colorSetBtnSpectFillBot_clicked();
void on_colorEditSpecFillBot_editingFinished();
void on_useSpectrumFillGradientChk_clicked(bool checked);
void on_colorSetBtnUnderlayFillTop_clicked();
void on_colorEditUnderlayFillTop_editingFinished();
void on_colorSetBtnUnderlayFillBot_clicked();
void on_colorEditUnderlayFillBot_editingFinished();
void on_useUnderlayFillGradientChk_clicked(bool checked);
private:
Ui::settingswidget *ui;
void createSettingsListItems();
@ -296,7 +322,7 @@ private:
bool haveServerAudioOutputs = false;
bool haveClusterList = false;
bool updatingUIFromPrefs = false;
bool connectedStatus = false;
audioDevices* audioDev = Q_NULLPTR;
};

Plik diff jest za duży Load Diff

Wyświetl plik

@ -19,6 +19,7 @@ spectrumScope::spectrumScope(uchar receiver, uchar vfo, QWidget *parent)
splitter = new QSplitter(this);
layout->addWidget(splitter);
splitter->setOrientation(Qt::Vertical);
originalParent = parent;
displayLayout = new QHBoxLayout();
@ -283,18 +284,18 @@ spectrumScope::spectrumScope(uchar receiver, uchar vfo, QWidget *parent)
configTheme->setAccessibleName("Waterfall display color theme");
configTheme->setAccessibleDescription("Selects the color theme for the waterfall display");
configTheme->setToolTip("Waterfall color theme");
configTheme->addItem("Theme Jet", QCPColorGradient::gpJet);
configTheme->addItem("Theme Cold", QCPColorGradient::gpCold);
configTheme->addItem("Theme Hot", QCPColorGradient::gpHot);
configTheme->addItem("Theme Therm", QCPColorGradient::gpThermal);
configTheme->addItem("Theme Night", QCPColorGradient::gpNight);
configTheme->addItem("Theme Ion", QCPColorGradient::gpIon);
configTheme->addItem("Theme Gray", QCPColorGradient::gpGrayscale);
configTheme->addItem("Theme Geo", QCPColorGradient::gpGeography);
configTheme->addItem("Theme Hues", QCPColorGradient::gpHues);
configTheme->addItem("Theme Polar", QCPColorGradient::gpPolar);
configTheme->addItem("Theme Spect", QCPColorGradient::gpSpectrum);
configTheme->addItem("Theme Candy", QCPColorGradient::gpCandy);
configTheme->addItem("Jet", QCPColorGradient::gpJet);
configTheme->addItem("Cold", QCPColorGradient::gpCold);
configTheme->addItem("Hot", QCPColorGradient::gpHot);
configTheme->addItem("Therm", QCPColorGradient::gpThermal);
configTheme->addItem("Night", QCPColorGradient::gpNight);
configTheme->addItem("Ion", QCPColorGradient::gpIon);
configTheme->addItem("Gray", QCPColorGradient::gpGrayscale);
configTheme->addItem("Geo", QCPColorGradient::gpGeography);
configTheme->addItem("Hues", QCPColorGradient::gpHues);
configTheme->addItem("Polar", QCPColorGradient::gpPolar);
configTheme->addItem("Spect", QCPColorGradient::gpSpectrum);
configTheme->addItem("Candy", QCPColorGradient::gpCandy);
configTheme->setSizeAdjustPolicy(QComboBox::AdjustToContents);
configLayout->addRow("Theme",configTheme);
@ -312,7 +313,7 @@ spectrumScope::spectrumScope(uchar receiver, uchar vfo, QWidget *parent)
configFilterWidth = new QSlider(Qt::Orientation::Horizontal);
configFilterWidth->setRange(0,10000);
configLayout->addRow("Fil Width",configFilterWidth);
configLayout->addRow("Fill Width",configFilterWidth);
connect(configLength, &QSlider::valueChanged, this, [=](const int &val) {
prepareWf(val);
@ -517,10 +518,28 @@ void spectrumScope::colorPreset(colorPrefsType *cp)
pbtIndicator->setBrush(QBrush(cp->pbt));
spectrum->graph(0)->setPen(QPen(cp->spectrumLine));
spectrum->graph(0)->setBrush(QBrush(cp->spectrumFill));
if(cp->useSpectrumFillGradient) {
spectrumGradient.setStart(QPointF(0,1));
spectrumGradient.setFinalStop(QPointF(0,0));
spectrumGradient.setCoordinateMode(QLinearGradient::ObjectMode);
spectrumGradient.setColorAt(0, cp->spectrumFillBot);
spectrumGradient.setColorAt(1, cp->spectrumFillTop);
spectrum->graph(0)->setBrush(QBrush(spectrumGradient));
} else {
spectrum->graph(0)->setBrush(QBrush(cp->spectrumFill));
}
spectrum->graph(1)->setPen(QPen(cp->underlayLine));
spectrum->graph(1)->setBrush(QBrush(cp->underlayFill));
if(cp->useUnderlayFillGradient) {
underlayGradient.setStart(QPointF(0,1));
underlayGradient.setFinalStop(QPointF(0,0));
underlayGradient.setCoordinateMode(QLinearGradient::ObjectMode);
underlayGradient.setColorAt(0, cp->underlayFillBot);
underlayGradient.setColorAt(1, cp->underlayFillTop);
spectrum->graph(1)->setBrush(QBrush(underlayGradient));
} else {
spectrum->graph(1)->setBrush(QBrush(cp->underlayFill));
}
waterfall->yAxis->setBasePen(cp->wfAxis);
waterfall->yAxis->setTickPen(cp->wfAxis);
@ -1787,13 +1806,29 @@ void spectrumScope::detachScope(bool state)
detachButton->setText("Attach");
qInfo(logGui()) << "Detaching scope" << (receiver?"Sub":"Main");
this->parentWidget()->layout()->replaceWidget(this,windowLabel);
QTimer::singleShot(1, [&](){
if(originalParent) {
this->originalParent->resize(1,1);
}
});
this->parentWidget()->resize(1,1);
this->setParent(NULL);
this-> setWindowFlags(Qt::Window | Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint);
this->move(screen()->geometry().center() - frameGeometry().center());
} else {
detachButton->setText("Detach");
qInfo(logGui()) << "Attaching scope" << (receiver?"Sub":"Main");
windowLabel->parentWidget()->layout()->replaceWidget(windowLabel,this);
QTimer::singleShot(1, [&](){
if(originalParent) {
this->originalParent->resize(1,1);
}
});
windowLabel->setParent(NULL);
delete windowLabel;
}

Wyświetl plik

@ -149,6 +149,8 @@ private:
QLabel* windowLabel = Q_NULLPTR;
QCustomPlot* spectrum = Q_NULLPTR;
QCustomPlot* waterfall = Q_NULLPTR;
QLinearGradient spectrumGradient;
QLinearGradient underlayGradient;
freqCtrl* freqDisplay[2];
QSpacerItem* displaySpacer;
QGroupBox* group;

Wyświetl plik

@ -90,7 +90,8 @@ static const tciCommandStruct tci_commands[] =
{ "audio_stream_samples", funcNone, typeUChar, typeBinary, typeNone},
{ "digl_offset", funcNone, typeUChar, typeBinary, typeNone},
{ "digu_offset", funcNone, typeUChar, typeBinary, typeNone},
{ "", funcNone, typeNone, typeNone, typeNone },
{ "rx_smeter", funcSMeter, typeUChar, typeUChar, typedB},
{ 0x0, funcNone, typeNone, typeNone, typeNone },
};
#define MAXNAMESIZE 32
@ -176,9 +177,33 @@ void tciServer::onNewConnection()
pSocket->sendTextMessage(QString("receive_only:%0;\n").arg(rigCaps->hasTransmit?"false":"true"));
pSocket->sendTextMessage(QString("trx_count:1;\n"));
pSocket->sendTextMessage(QString("channel_count:1;\n"));
pSocket->sendTextMessage(QString("vfo_limits:10000,52000000;\n"));
quint64 start=UINT64_MAX;
quint64 end=0;
for (auto &band: rigCaps->bands)
{
if (start > band.lowFreq)
start = band.lowFreq;
if (end < band.highFreq)
end = band.highFreq;
}
pSocket->sendTextMessage(QString("vfo_limits:%0,%1;\n").arg(start).arg(end));
pSocket->sendTextMessage(QString("if_limits:-48000,48000;\n"));
pSocket->sendTextMessage(QString("modulations_list:AM,LSB,USB,CW,NFM,WSPR,FT8,FT4,JT65,JT9,RTTY,BPSK,DIGL,DIGU,WFM,DRM;\n"));
QString mods = "modulations_list:";
for (modeInfo &mi: rigCaps->modes)
{
mods+=mi.name.toUpper();
mods+=",";
if (mi.reg == modeUSB || mi.reg == modeLSB)
{
mods+=QString("DIG%0").arg(mi.name.at(0));
mods+=",";
}
}
mods.chop(1);
mods+=";\n";
pSocket->sendTextMessage(mods);
// pSocket->sendTextMessage(QString("modulations_list:AM,LSB,USB,CW,NFM,WSPR,FT8,FT4,JT65,JT9,RTTY,BPSK,DIGL,DIGU,WFM,DRM;\n"));
pSocket->sendTextMessage(QString("iq_samplerate:48000;\n"));
pSocket->sendTextMessage(QString("audio_samplerate:48000;\n"));
pSocket->sendTextMessage(QString("mute:false;\n"));
@ -212,7 +237,8 @@ void tciServer::processIncomingTextMessage(QString message)
for (int i=0; tci_commands[i].str != 0x00; i++)
{
if (!strncmp(cmd.toLower().toLocal8Bit(), tci_commands[i].str,MAXNAMESIZE))
cmd=cmd.toLower();
if (!strncmp(cmd.toLocal8Bit(), tci_commands[i].str,MAXNAMESIZE))
{
tciCommandStruct tc = tci_commands[i];
uchar numArgs=0;
@ -527,20 +553,24 @@ void tciServer::receiveCache(cacheItem item)
reply = QString("%0:%1").arg(tc.str).arg(round(item.value.value<ushort>()/2.55));
if (numArgs == 2 && tc.arg2 == typeUChar)
if (numArgs == 2 && tc.arg2 == typeUChar) {
reply += QString(",%0").arg(item.value.value<uchar>());
else if (numArgs == 2 && tc.arg2 == typeUShort)
} else if (numArgs == 2 && tc.arg2 == typeUShort) {
reply += QString(",%0").arg(round(item.value.value<ushort>()/2.55));
else if (numArgs == 3 && tc.arg3 == typeFreq)
} else if (numArgs == 3 && tc.arg3 == typedB) {
int val = item.value.value<uchar>();
val = (val/2.42) - 120; // Approximate s-meter.
reply += QString(",%0,%1").arg(vfo).arg(val);
} else if (numArgs == 3 && tc.arg3 == typeFreq) {
reply += QString(",%0,%1").arg(vfo).arg(quint64(item.value.value<freqt>().Hz));
else if (tc.arg2 == typeMode)
} else if (tc.arg2 == typeMode) {
reply += QString(",%0").arg(tciMode(item.value.value<modeInfo>()));
else if (tc.arg2 == typeBinary)
} else if (tc.arg2 == typeBinary) {
reply += QString(",%0").arg(item.value.value<bool>()?"true":"false");
}
reply += ";";
it.key()->sendTextMessage(reply);
qInfo() << "Sending TCI:" << reply;
//qInfo() << "Sending TCI:" << reply;
}
}
}

Wyświetl plik

@ -96,4 +96,4 @@ void tcpServerClient::receiveDataToClient(QByteArray data) {
{
qInfo(logTcpServer()) << "socket not open!";
}
}
}

Wyświetl plik

@ -243,8 +243,38 @@ wfmain::wfmain(const QString settingsFile, const QString logFile, bool debugMode
qDebug(logSystem()) << "Running setInititalTiming()";
setInitialTiming();
qDebug(logSystem()) << "Running openRig()";
openRig();
fts = new FirstTimeSetup();
if(prefs.hasRunSetup) {
qDebug(logSystem()) << "Running openRig()";
openRig();
} else {
qInfo(logSystem()) << "Detected first-time run. Showing the First Time Setup widget.";
connect(fts, &FirstTimeSetup::exitProgram, [=]() {
qInfo(logSystem()) << "User elected exit program.";
prefs.settingsChanged = false;
prefs.confirmExit = false;
QTimer::singleShot(10, [&](){
on_exitBtn_clicked();
});
});
connect(fts, &FirstTimeSetup::showSettings, [=](const bool networkEnabled) {
qInfo(logSystem()) << "User elected to visit the Settings UI.";
prefs.enableLAN = networkEnabled;
setupui->updateLanPrefs((int)l_all);
showAndRaiseWidget(setupui);
prefs.settingsChanged = true;
prefs.hasRunSetup = true;
});
connect(fts, &FirstTimeSetup::skipSetup, [=]() {
qInfo(logSystem()) << "User elected to skip the setup. Marking setup complete.";
prefs.settingsChanged = true;
prefs.hasRunSetup = true;
});
fts->exec();
}
cluster = new dxClusterClient();
@ -329,9 +359,9 @@ wfmain::wfmain(const QString settingsFile, const QString logFile, bool debugMode
qInfo(logUsbControl()) << "Cannot register udev_monitor, hotplug of USB devices is not available";
return;
}
int fd = udev_monitor_get_fd(uDevMonitor);
int fd = udev_monitor_get_fd(uDevMonitor);
uDevNotifier = new QSocketNotifier(fd, QSocketNotifier::Read,this);
connect(uDevNotifier, SIGNAL(activated(int)), this, SLOT(uDevEvent()));
connect(uDevNotifier, SIGNAL(activated(int)), this, SLOT(uDevEvent()));
udev_monitor_enable_receiving(uDevMonitor);
#endif
#endif
@ -871,6 +901,8 @@ void wfmain::connectSettingsWidget()
connect(this, SIGNAL(connectionStatus(bool)), setupui, SLOT(connectionStatus(bool)));
connect(setupui, SIGNAL(connectButtonPressed()), this, SLOT(handleExtConnectBtn()));
connect(setupui, SIGNAL(saveSettingsButtonPressed()), this, SLOT(on_saveSettingsBtn_clicked()));
connect(setupui, SIGNAL(revertSettingsButtonPressed()), this, SLOT(handleRevertSettingsBtn()));
}
// NOT Migrated, EHL TODO, carefully remove this function
@ -1026,7 +1058,7 @@ void wfmain::configureVFOs()
connect(receiver,SIGNAL(showStatusBarText(QString)),this,SLOT(showStatusBarText(QString)));
receivers.append(receiver);
ui->scopeSpacer->changeSize(0,0,QSizePolicy::Minimum);
//ui->scopeSpacer->changeSize(0,0,QSizePolicy::Minimum);
}
}
@ -1494,6 +1526,7 @@ void wfmain::changeFrequency(int value) {
void wfmain::setDefPrefs()
{
defPrefs.hasRunSetup = false;
defPrefs.useFullScreen = false;
defPrefs.useSystemTheme = false;
defPrefs.drawPeaks = true;
@ -1509,6 +1542,7 @@ void wfmain::setDefPrefs()
defPrefs.forceRTSasPTT = false;
defPrefs.serialPortRadio = QString("auto");
defPrefs.serialPortBaud = 115200;
defPrefs.enableLAN = false;
defPrefs.polling_ms = 0; // 0 = Automatic
defPrefs.enablePTT = true;
defPrefs.niceTS = true;
@ -1534,6 +1568,8 @@ void wfmain::setDefPrefs()
defPrefs.tcpPort = 0;
defPrefs.tciPort = 50001;
defPrefs.clusterUdpEnable = false;
defPrefs.clusterTcpEnable = false;
defPrefs.waterfallFormat = 0;
defPrefs.audioSystem = qtAudio;
defPrefs.enableUSBControllers = false;
@ -1569,6 +1605,7 @@ void wfmain::loadSettings()
prefs.version = priorVersionString;
prefs.majorVersion = settings->value("majorVersion", defPrefs.majorVersion).toInt();
prefs.minorVersion = settings->value("minorVersion", defPrefs.minorVersion).toInt();
prefs.hasRunSetup = settings->value("hasRunSetup", defPrefs.hasRunSetup).toBool();
settings->endGroup();
// UI: (full screen, dark theme, draw peaks, colors, etc)
@ -1643,8 +1680,14 @@ void wfmain::loadSettings()
p->textColor.setNamedColor(settings->value("textColor", p->textColor.name(QColor::HexArgb)).toString());
p->spectrumLine.setNamedColor(settings->value("spectrumLine", p->spectrumLine.name(QColor::HexArgb)).toString());
p->spectrumFill.setNamedColor(settings->value("spectrumFill", p->spectrumFill.name(QColor::HexArgb)).toString());
p->useSpectrumFillGradient = settings->value("useSpectrumFillGradient", p->useSpectrumFillGradient).toBool();
p->spectrumFillTop.setNamedColor(settings->value("spectrumFillTop", p->spectrumFillTop.name(QColor::HexArgb)).toString());
p->spectrumFillBot.setNamedColor(settings->value("spectrumFillBot", p->spectrumFillBot.name(QColor::HexArgb)).toString());
p->underlayLine.setNamedColor(settings->value("underlayLine", p->underlayLine.name(QColor::HexArgb)).toString());
p->underlayFill.setNamedColor(settings->value("underlayFill", p->underlayFill.name(QColor::HexArgb)).toString());
p->useUnderlayFillGradient = settings->value("useUnderlayFillGradient", p->useUnderlayFillGradient).toBool();
p->underlayFillTop.setNamedColor(settings->value("underlayFillTop", p->underlayFillTop.name(QColor::HexArgb)).toString());
p->underlayFillBot.setNamedColor(settings->value("underlayFillBot", p->underlayFillBot.name(QColor::HexArgb)).toString());
p->plotBackground.setNamedColor(settings->value("plotBackground", p->plotBackground.name(QColor::HexArgb)).toString());
p->tuningLine.setNamedColor(settings->value("tuningLine", p->tuningLine.name(QColor::HexArgb)).toString());
p->passband.setNamedColor(settings->value("passband", p->passband.name(QColor::HexArgb)).toString());
@ -1780,8 +1823,6 @@ void wfmain::loadSettings()
udpPrefs.clientName = settings->value("ClientName", udpDefPrefs.clientName).toString();
udpPrefs.halfDuplex = settings->value("HalfDuplex", udpDefPrefs.halfDuplex).toBool();
//ui->audioDuplexCombo->setVisible(false);
//ui->label_51->setVisible(false);
settings->endGroup();
@ -2356,8 +2397,14 @@ void wfmain::extChangedColPref(prefColItem i)
case col_plotBackground:
case col_spectrumLine:
case col_spectrumFill:
case col_useSpectrumFillGradient:
case col_spectrumFillTop:
case col_spectrumFillBot:
case col_underlayLine:
case col_underlayFill:
case col_underlayFillTop:
case col_underlayFillBot:
case col_useUnderlayFillGradient:
case col_tuningLine:
case col_passband:
case col_pbtIndicator:
@ -2744,6 +2791,7 @@ void wfmain::saveSettings()
settings->setValue("majorVersion", int(majorVersion.toInt()));
settings->setValue("minorVersion", int(minorVersion.toInt()));
settings->setValue("gitShort", QString(GITSHORT));
settings->setValue("hasRunSetup", prefs.hasRunSetup);
settings->endGroup();
// UI: (full screen, dark theme, draw peaks, colors, etc)
@ -2862,8 +2910,14 @@ void wfmain::saveSettings()
settings->setValue("textColor", p->textColor.name(QColor::HexArgb));
settings->setValue("spectrumLine", p->spectrumLine.name(QColor::HexArgb));
settings->setValue("spectrumFill", p->spectrumFill.name(QColor::HexArgb));
settings->setValue("useSpectrumFillGradient", p->useSpectrumFillGradient);
settings->setValue("spectrumFillTop", p->spectrumFillTop.name(QColor::HexArgb));
settings->setValue("spectrumFillBot", p->spectrumFillBot.name(QColor::HexArgb));
settings->setValue("underlayLine", p->underlayLine.name(QColor::HexArgb));
settings->setValue("underlayFill", p->underlayFill.name(QColor::HexArgb));
settings->setValue("useUnderlayFillGradient", p->useUnderlayFillGradient);
settings->setValue("underlayFillTop", p->underlayFillTop.name(QColor::HexArgb));
settings->setValue("underlayFillBot", p->underlayFillBot.name(QColor::HexArgb));
settings->setValue("plotBackground", p->plotBackground.name(QColor::HexArgb));
settings->setValue("tuningLine", p->tuningLine.name(QColor::HexArgb));
settings->setValue("passband", p->passband.name(QColor::HexArgb));
@ -4164,6 +4218,25 @@ void wfmain::handleExtConnectBtn() {
on_connectBtn_clicked();
}
void wfmain::handleRevertSettingsBtn() {
// from settings widget
int ret = QMessageBox::warning(this, tr("Revert settings"),
tr("Are you sure you wish to reset all wfview settings?\nIf so, wfview will exit and you will need to start the program again."),
QMessageBox::Ok | QMessageBox::Cancel,
QMessageBox::Cancel);
if (ret == QMessageBox::Ok) {
qInfo(logSystem()) << "Per user request, resetting preferences.";
prefs = defPrefs;
udpPrefs = udpDefPrefs;
serverConfig.enabled = false;
serverConfig.users.clear();
saveSettings();
qInfo(logSystem()) << "Closing wfview for full preference-reset.";
QApplication::exit();
}
}
void wfmain::on_connectBtn_clicked()
{
this->rigStatus->setText(""); // Clear status
@ -4779,7 +4852,6 @@ funcs wfmain::meter_tToMeterCommand(meter_t m)
return c;
}
void wfmain::changeMeterType(meter_t m, int meterNum)
{
qDebug() << "Changing meter type.";
@ -4868,26 +4940,9 @@ void wfmain::setAudioDevicesUI()
void wfmain::debugBtn_clicked()
{
qInfo(logSystem()) << "Debug button pressed.";
//qDebug(logSystem()) << "Query for repeater access mode (tone, tsql, etc) sent.";
//issueDelayedCommand(cmdGetRptAccessMode);
debugWindow* debug = new debugWindow();
debug->setAttribute(Qt::WA_DeleteOnClose);
debug->show();
qInfo(logSystem()) << "Scroll wheel debug: ";
qInfo(logSystem()) << "tick interval: " << ui->afGainSlider->tickInterval();
qInfo(logSystem()) << "page step: " << ui->afGainSlider->pageStep();
qInfo(logSystem()) << "single step: " << ui->afGainSlider->singleStep();
qInfo(logSystem()) << "QApp wheel scroll lines: " << QApplication::wheelScrollLines();
qInfo(logSystem()) << "QStyleHint wheel scroll lines: " << QApplication::styleHints()->wheelScrollLines();
//showAndRaiseWidget(setupui);
//setupui->updateIfPrefs((int)if_all);
//setupui->updateRaPrefs((int)ra_all);
//setupui->updateCtPrefs((int)ct_all);
//setupui->updateClusterPrefs((int)cl_all);
//setupui->updateUdpPrefs((int)u_all);
}
// ---------- color helper functions: ---------- //
@ -4923,8 +4978,6 @@ void wfmain::setDefaultColorPresets()
}
}
void wfmain::on_showLogBtn_clicked()
{
if(logWindow->isMinimized())
@ -5047,8 +5100,6 @@ void wfmain::receiveClusterOutput(QString text) {
setupui->insertClusterOutputText(text);
}
void wfmain::changePollTiming(int timing_ms, bool setUI)
{
queue->interval(timing_ms);

Wyświetl plik

@ -30,6 +30,7 @@
#include "rigidentities.h"
#include "repeaterattributes.h"
#include "memories.h"
#include "firsttimesetup.h"
#include "packettypes.h"
#include "calibrationwindow.h"
@ -330,6 +331,7 @@ private slots:
void extChangedServerPref(prefServerItem i);
void handleExtConnectBtn();
void handleRevertSettingsBtn();
void receiveScopeSettings(uchar receiver, int theme, quint16 len, int floor, int ceiling);
void receiveValue(cacheItem val);
@ -531,6 +533,7 @@ private:
void showButton(QPushButton *btn);
void hideButton(QPushButton *btn);
FirstTimeSetup *fts = Q_NULLPTR;
void openRig();
void powerRigOff();
void powerRigOn();

Wyświetl plik

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>942</width>
<height>327</height>
<width>946</width>
<height>361</height>
</rect>
</property>
<property name="acceptDrops">
@ -18,8 +18,66 @@
</property>
<widget class="QWidget" name="centralWidget">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QFrame" name="scopeVFOGroup">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QVBoxLayout" name="scopeVFOLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<layout class="QVBoxLayout" name="vfoLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QFrame" name="mainGroup">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
@ -48,26 +106,6 @@
<property name="bottomMargin">
<number>3</number>
</property>
<item>
<spacer name="scopeSpacer">
<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="QVBoxLayout" name="vfoLayout">
<property name="spacing">
<number>0</number>
</property>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
@ -992,7 +1030,7 @@
</widget>
</item>
<item>
<widget class="QFrame" name="frame">
<widget class="QFrame" name="lowerButtonsFrame">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
@ -1012,6 +1050,9 @@
<property name="rightMargin">
<number>1</number>
</property>
<property name="bottomMargin">
<number>1</number>
</property>
<item>
<widget class="QPushButton" name="aboutBtn">
<property name="text">
@ -1105,6 +1146,7 @@
<widget class="QPushButton" name="exitBtn">
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>

Wyświetl plik

@ -249,6 +249,7 @@ SOURCES += main.cpp\
bandbuttons.cpp \
cachingqueue.cpp \
cwsender.cpp \
firsttimesetup.cpp \
freqctrl.cpp \
frequencyinputwidget.cpp \
cwsidetone.cpp \
@ -301,6 +302,7 @@ HEADERS += wfmain.h \
colorprefs.h \
commhandler.h \
cwsender.h \
firsttimesetup.h \
freqctrl.h \
frequencyinputwidget.h \
cwsidetone.h \
@ -359,6 +361,7 @@ FORMS += wfmain.ui \
bandbuttons.ui \
calibrationwindow.ui \
cwsender.ui \
firsttimesetup.ui \
frequencyinputwidget.ui \
debugwindow.ui \
loggingwindow.ui \

Wyświetl plik

@ -9,7 +9,8 @@
#include <memory>
enum valueType { typeNone=0, typeFloat, typeFloatDiv, typeFloatDiv5, typeUChar, typeUShort, typeChar, typeShort, typeBinary , typeFreq, typeMode, typeLevel, typeVFO, typeString};
enum valueType { typeNone=0, typeFloat, typeFloatDiv, typeFloatDiv5, typeUChar, typeUShort,
typeChar, typeShort, typeBinary , typeFreq, typeMode, typeLevel, typeVFO, typeString, typedB};
enum connectionStatus_t { connDisconnected, connConnecting, connConnected };