1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2025-08-03 14:32:25 -04:00

Windows: MSVC2017: changes in sdrgui and sdrbase (5)

This commit is contained in:
f4exb 2018-11-12 18:36:27 +01:00
parent fd50eeb810
commit d910675587
18 changed files with 146 additions and 71 deletions

View File

@ -15,9 +15,10 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // // along with this program. If not, see <http://www.gnu.org/licenses/>. //
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#include "export.h"
#include "dsptypes.h" #include "dsptypes.h"
class Projector class SDRBASE_API Projector
{ {
public: public:
enum ProjectionType enum ProjectionType

View File

@ -216,8 +216,9 @@ void ScopeVis::setMemoryIndex(uint32_t memoryIndex)
getInputMessageQueue()->push(cmd); getInputMessageQueue()->push(cmd);
} }
void ScopeVis::feed(const SampleVector::const_iterator& cbegin, const SampleVector::const_iterator& end, bool positiveOnly __attribute__((unused))) void ScopeVis::feed(const SampleVector::const_iterator& cbegin, const SampleVector::const_iterator& end, bool positiveOnly)
{ {
(void) positiveOnly;
if (m_freeRun) { if (m_freeRun) {
m_triggerPoint = cbegin; m_triggerPoint = cbegin;
} }

View File

@ -15,9 +15,11 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // // along with this program. If not, see <http://www.gnu.org/licenses/>. //
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#include <chrono>
#include <thread>
#include "scopevisxy.h" #include "scopevisxy.h"
#include "gui/tvscreen.h" #include "gui/tvscreen.h"
#include <unistd.h>
ScopeVisXY::ScopeVisXY(TVScreen *tvScreen) : ScopeVisXY::ScopeVisXY(TVScreen *tvScreen) :
m_tvScreen(tvScreen), m_tvScreen(tvScreen),
@ -47,9 +49,9 @@ void ScopeVisXY::setPixelsPerFrame(int pixelsPerFrame)
m_tvScreen->setAlphaReset(); m_tvScreen->setAlphaReset();
} }
void ScopeVisXY::feed(const SampleVector::const_iterator& cbegin, const SampleVector::const_iterator& end, void ScopeVisXY::feed(const SampleVector::const_iterator& cbegin, const SampleVector::const_iterator& end, bool positiveOnly)
bool positiveOnly __attribute__((unused)))
{ {
(void) positiveOnly;
SampleVector::const_iterator begin(cbegin); SampleVector::const_iterator begin(cbegin);
while (begin < end) while (begin < end)
@ -83,7 +85,7 @@ void ScopeVisXY::feed(const SampleVector::const_iterator& cbegin, const SampleVe
m_tvScreen->renderImage(0); m_tvScreen->renderImage(0);
m_tvScreen->update(); m_tvScreen->update();
usleep(5000); std::this_thread::sleep_for(std::chrono::microseconds(5000));
m_tvScreen->resetImage(m_alphaReset); m_tvScreen->resetImage(m_alphaReset);
drawGraticule(); drawGraticule();
m_pixelCount = 0; m_pixelCount = 0;
@ -99,8 +101,9 @@ void ScopeVisXY::stop()
{ {
} }
bool ScopeVisXY::handleMessage(const Message& message __attribute__((unused))) bool ScopeVisXY::handleMessage(const Message& message)
{ {
(void) message;
return false; return false;
} }

View File

@ -14,8 +14,9 @@ SpectrumScopeComboVis::~SpectrumScopeComboVis()
{ {
} }
void SpectrumScopeComboVis::feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool positiveOnly __attribute__((unused))) void SpectrumScopeComboVis::feed(const SampleVector::const_iterator& begin, const SampleVector::const_iterator& end, bool positiveOnly)
{ {
(void) positiveOnly;
m_scopeVis->feed(begin, end, false); m_scopeVis->feed(begin, end, false);
SampleVector::const_iterator triggerPoint = m_scopeVis->getTriggerPoint(); SampleVector::const_iterator triggerPoint = m_scopeVis->getTriggerPoint();
m_spectrumVis->feedTriggered(triggerPoint, end, positiveOnly); m_spectrumVis->feedTriggered(triggerPoint, end, positiveOnly);

View File

@ -159,14 +159,16 @@ void AudioDialogX::on_inputVolume_valueChanged(int value)
ui->inputVolumeText->setText(QString("%1").arg(volume, 0, 'f', 2)); ui->inputVolumeText->setText(QString("%1").arg(volume, 0, 'f', 2));
} }
void AudioDialogX::on_inputReset_clicked(bool checked __attribute__((unused))) void AudioDialogX::on_inputReset_clicked(bool checked)
{ {
(void) checked;
m_inputDeviceInfo.resetToDefaults(); m_inputDeviceInfo.resetToDefaults();
updateInputDisplay(); updateInputDisplay();
} }
void AudioDialogX::on_inputCleanup_clicked(bool checked __attribute__((unused))) void AudioDialogX::on_inputCleanup_clicked(bool checked)
{ {
(void) checked;
m_audioDeviceManager->inputInfosCleanup(); m_audioDeviceManager->inputInfosCleanup();
} }
@ -196,14 +198,16 @@ void AudioDialogX::on_outputUDPPort_editingFinished()
ui->outputUDPPort->setText(tr("%1").arg(m_outputDeviceInfo.udpPort)); ui->outputUDPPort->setText(tr("%1").arg(m_outputDeviceInfo.udpPort));
} }
void AudioDialogX::on_outputReset_clicked(bool checked __attribute__((unused))) void AudioDialogX::on_outputReset_clicked(bool checked)
{ {
(void) checked;
m_outputDeviceInfo.resetToDefaults(); m_outputDeviceInfo.resetToDefaults();
updateOutputDisplay(); updateOutputDisplay();
} }
void AudioDialogX::on_outputCleanup_clicked(bool checked __attribute__((unused))) void AudioDialogX::on_outputCleanup_clicked(bool checked)
{ {
(void) checked;
m_audioDeviceManager->outputInfosCleanup(); m_audioDeviceManager->outputInfosCleanup();
} }

View File

@ -17,9 +17,16 @@
#include "gui/clickablelabel.h" #include "gui/clickablelabel.h"
ClickableLabel::ClickableLabel()
: QLabel(nullptr)
{
setText("");
}
ClickableLabel::ClickableLabel(QWidget* parent) ClickableLabel::ClickableLabel(QWidget* parent)
: QLabel(parent) : QLabel(parent)
{ {
setText("");
} }
ClickableLabel::ClickableLabel(const QString& text, QWidget* parent) ClickableLabel::ClickableLabel(const QString& text, QWidget* parent)
@ -32,8 +39,9 @@ ClickableLabel::~ClickableLabel()
{ {
} }
void ClickableLabel::mousePressEvent(QMouseEvent* event __attribute__((unused))) void ClickableLabel::mousePressEvent(QMouseEvent* event)
{ {
(void) event;
emit clicked(); emit clicked();
} }

View File

@ -27,8 +27,9 @@ class SDRGUI_API ClickableLabel : public QLabel
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit ClickableLabel( QWidget* parent=0 ); explicit ClickableLabel();
explicit ClickableLabel( const QString& text="", QWidget* parent=0 ); explicit ClickableLabel(QWidget* parent);
explicit ClickableLabel(const QString& text, QWidget* parent=nullptr);
~ClickableLabel(); ~ClickableLabel();
signals: signals:
void clicked(); void clicked();

View File

@ -30,7 +30,9 @@ signals:
void rightClick(); void rightClick();
protected: protected:
inline bool eventFilter(QObject *watched __attribute__((unused)), QEvent *event) override { inline bool eventFilter(QObject *watched, QEvent *event) override
{
(void) watched;
if (event->type() == QEvent::MouseButtonPress) if (event->type() == QEvent::MouseButtonPress)
{ {
auto mouseEvent = (QMouseEvent*)event; auto mouseEvent = (QMouseEvent*)event;

View File

@ -93,8 +93,9 @@ bool CWKeyerGUI::deserialize(const QByteArray& data)
// === SLOTS ================================================================== // === SLOTS ==================================================================
void CWKeyerGUI::on_cwTextClear_clicked(bool checked __attribute__((unused))) void CWKeyerGUI::on_cwTextClear_clicked(bool checked)
{ {
(void) checked;
ui->cwTextEdit->clear(); ui->cwTextEdit->clear();
m_cwKeyer->setText(""); m_cwKeyer->setText("");
} }

View File

@ -122,8 +122,9 @@ void EditCommandDialog::setRelease(bool release)
ui->keyRelease->setChecked(release); ui->keyRelease->setChecked(release);
} }
void EditCommandDialog::on_showFileDialog_clicked(bool checked __attribute__((unused))) void EditCommandDialog::on_showFileDialog_clicked(bool checked)
{ {
(void) checked;
QString commandFileName = ui->command->text(); QString commandFileName = ui->command->text();
QFileInfo commandFileInfo(commandFileName); QFileInfo commandFileInfo(commandFileName);
QString commandFolderName = commandFileInfo.baseName(); QString commandFolderName = commandFileInfo.baseName();
@ -224,8 +225,9 @@ void EditCommandDialog::setKeyAssociate()
} }
} }
void EditCommandDialog::commandKeyPressed(Qt::Key key, Qt::KeyboardModifiers keyModifiers, bool release __attribute__((unused))) void EditCommandDialog::commandKeyPressed(Qt::Key key, Qt::KeyboardModifiers keyModifiers, bool release)
{ {
(void) release;
// qDebug("EditCommandDialog::commandKeyPressed: key: %x", m_key); // qDebug("EditCommandDialog::commandKeyPressed: key: %x", m_key);
// qDebug("EditCommandDialog::commandKeyPressed: has modifiers: %x", QFlags<Qt::KeyboardModifier>::Int(keyModifiers)); // qDebug("EditCommandDialog::commandKeyPressed: has modifiers: %x", QFlags<Qt::KeyboardModifier>::Int(keyModifiers));
m_key = key; m_key = key;

View File

@ -616,15 +616,17 @@ void GLScopeGUI::on_trace_valueChanged(int value)
m_scopeVis->focusOnTrace(value); m_scopeVis->focusOnTrace(value);
} }
void GLScopeGUI::on_traceAdd_clicked(bool checked __attribute__((unused))) void GLScopeGUI::on_traceAdd_clicked(bool checked)
{ {
(void) checked;
ScopeVis::TraceData traceData; ScopeVis::TraceData traceData;
fillTraceData(traceData); fillTraceData(traceData);
addTrace(traceData); addTrace(traceData);
} }
void GLScopeGUI::on_traceDel_clicked(bool checked __attribute__((unused))) void GLScopeGUI::on_traceDel_clicked(bool checked)
{ {
(void) checked;
if (ui->trace->value() > 0) // not the X trace if (ui->trace->value() > 0) // not the X trace
{ {
ui->trace->setMaximum(ui->trace->maximum() - 1); ui->trace->setMaximum(ui->trace->maximum() - 1);
@ -644,8 +646,9 @@ void GLScopeGUI::on_traceDel_clicked(bool checked __attribute__((unused)))
} }
} }
void GLScopeGUI::on_traceUp_clicked(bool checked __attribute__((unused))) void GLScopeGUI::on_traceUp_clicked(bool checked)
{ {
(void) checked;
if (ui->trace->maximum() > 0) // more than one trace if (ui->trace->maximum() > 0) // more than one trace
{ {
int newTraceIndex = (ui->trace->value() + 1) % (ui->trace->maximum()+1); int newTraceIndex = (ui->trace->value() + 1) % (ui->trace->maximum()+1);
@ -658,8 +661,9 @@ void GLScopeGUI::on_traceUp_clicked(bool checked __attribute__((unused)))
} }
} }
void GLScopeGUI::on_traceDown_clicked(bool checked __attribute__((unused))) void GLScopeGUI::on_traceDown_clicked(bool checked)
{ {
(void) checked;
if (ui->trace->value() > 0) // not the X (lowest) trace if (ui->trace->value() > 0) // not the X (lowest) trace
{ {
int newTraceIndex = (ui->trace->value() - 1) % (ui->trace->maximum()+1); int newTraceIndex = (ui->trace->value() - 1) % (ui->trace->maximum()+1);
@ -691,15 +695,17 @@ void GLScopeGUI::on_trig_valueChanged(int value)
m_scopeVis->focusOnTrigger(value); m_scopeVis->focusOnTrigger(value);
} }
void GLScopeGUI::on_trigAdd_clicked(bool checked __attribute__((unused))) void GLScopeGUI::on_trigAdd_clicked(bool checked)
{ {
(void) checked;
ScopeVis::TriggerData triggerData; ScopeVis::TriggerData triggerData;
fillTriggerData(triggerData); fillTriggerData(triggerData);
addTrigger(triggerData); addTrigger(triggerData);
} }
void GLScopeGUI::on_trigDel_clicked(bool checked __attribute__((unused))) void GLScopeGUI::on_trigDel_clicked(bool checked)
{ {
(void) checked;
if (ui->trig->value() > 0) if (ui->trig->value() > 0)
{ {
m_scopeVis->removeTrigger(ui->trig->value()); m_scopeVis->removeTrigger(ui->trig->value());
@ -707,8 +713,9 @@ void GLScopeGUI::on_trigDel_clicked(bool checked __attribute__((unused)))
} }
} }
void GLScopeGUI::on_trigUp_clicked(bool checked __attribute__((unused))) void GLScopeGUI::on_trigUp_clicked(bool checked)
{ {
(void) checked;
if (ui->trig->maximum() > 0) // more than one trigger if (ui->trig->maximum() > 0) // more than one trigger
{ {
int newTriggerIndex = (ui->trig->value() + 1) % (ui->trig->maximum()+1); int newTriggerIndex = (ui->trig->value() + 1) % (ui->trig->maximum()+1);
@ -721,8 +728,9 @@ void GLScopeGUI::on_trigUp_clicked(bool checked __attribute__((unused)))
} }
} }
void GLScopeGUI::on_trigDown_clicked(bool checked __attribute__((unused))) void GLScopeGUI::on_trigDown_clicked(bool checked)
{ {
(void) checked;
if (ui->trig->value() > 0) // not the 0 (lowest) trigger if (ui->trig->value() > 0) // not the 0 (lowest) trigger
{ {
int newTriggerIndex = (ui->trig->value() - 1) % (ui->trig->maximum()+1); int newTriggerIndex = (ui->trig->value() - 1) % (ui->trig->maximum()+1);
@ -735,45 +743,52 @@ void GLScopeGUI::on_trigDown_clicked(bool checked __attribute__((unused)))
} }
} }
void GLScopeGUI::on_traceMode_currentIndexChanged(int index __attribute__((unused))) void GLScopeGUI::on_traceMode_currentIndexChanged(int index)
{ {
(void) index;
setAmpScaleDisplay(); setAmpScaleDisplay();
setAmpOfsDisplay(); setAmpOfsDisplay();
changeCurrentTrace(); changeCurrentTrace();
} }
void GLScopeGUI::on_amp_valueChanged(int value __attribute__((unused))) void GLScopeGUI::on_amp_valueChanged(int value)
{ {
(void) value;
setAmpScaleDisplay(); setAmpScaleDisplay();
changeCurrentTrace(); changeCurrentTrace();
} }
void GLScopeGUI::on_ofsCoarse_valueChanged(int value __attribute__((unused))) void GLScopeGUI::on_ofsCoarse_valueChanged(int value)
{ {
(void) value;
setAmpOfsDisplay(); setAmpOfsDisplay();
changeCurrentTrace(); changeCurrentTrace();
} }
void GLScopeGUI::on_ofsFine_valueChanged(int value __attribute__((unused))) void GLScopeGUI::on_ofsFine_valueChanged(int value)
{ {
(void) value;
setAmpOfsDisplay(); setAmpOfsDisplay();
changeCurrentTrace(); changeCurrentTrace();
} }
void GLScopeGUI::on_traceDelayCoarse_valueChanged(int value __attribute__((unused))) void GLScopeGUI::on_traceDelayCoarse_valueChanged(int value)
{ {
(void) value;
setTraceDelayDisplay(); setTraceDelayDisplay();
changeCurrentTrace(); changeCurrentTrace();
} }
void GLScopeGUI::on_traceDelayFine_valueChanged(int value __attribute__((unused))) void GLScopeGUI::on_traceDelayFine_valueChanged(int value)
{ {
(void) value;
setTraceDelayDisplay(); setTraceDelayDisplay();
changeCurrentTrace(); changeCurrentTrace();
} }
void GLScopeGUI::on_traceView_toggled(bool checked __attribute__((unused))) void GLScopeGUI::on_traceView_toggled(bool checked)
{ {
(void) checked;
changeCurrentTrace(); changeCurrentTrace();
} }
@ -791,8 +806,9 @@ void GLScopeGUI::on_traceColor_clicked()
} }
} }
void GLScopeGUI::on_memorySave_clicked(bool checked __attribute__((unused))) void GLScopeGUI::on_memorySave_clicked(bool checked)
{ {
(void) checked;
QString fileName = QFileDialog::getSaveFileName(this, QString fileName = QFileDialog::getSaveFileName(this,
tr("Open trace memory file"), ".", tr("Trace memory files (*.trcm)"), 0, QFileDialog::DontUseNativeDialog); tr("Open trace memory file"), ".", tr("Trace memory files (*.trcm)"), 0, QFileDialog::DontUseNativeDialog);
@ -821,8 +837,9 @@ void GLScopeGUI::on_memorySave_clicked(bool checked __attribute__((unused)))
} }
} }
void GLScopeGUI::on_memoryLoad_clicked(bool checked __attribute__((unused))) void GLScopeGUI::on_memoryLoad_clicked(bool checked)
{ {
(void) checked;
qDebug("GLScopeGUI::on_memoryLoad_clicked"); qDebug("GLScopeGUI::on_memoryLoad_clicked");
QString fileName = QFileDialog::getOpenFileName(this, QString fileName = QFileDialog::getOpenFileName(this,
@ -857,14 +874,16 @@ void GLScopeGUI::on_mem_valueChanged(int value)
m_scopeVis->setMemoryIndex(value); m_scopeVis->setMemoryIndex(value);
} }
void GLScopeGUI::on_trigMode_currentIndexChanged(int index __attribute__((unused))) void GLScopeGUI::on_trigMode_currentIndexChanged(int index)
{ {
(void) index;
setTrigLevelDisplay(); setTrigLevelDisplay();
changeCurrentTrigger(); changeCurrentTrigger();
} }
void GLScopeGUI::on_trigCount_valueChanged(int value __attribute__((unused))) void GLScopeGUI::on_trigCount_valueChanged(int value)
{ {
(void) value;
setTrigCountDisplay(); setTrigCountDisplay();
changeCurrentTrigger(); changeCurrentTrigger();
} }
@ -905,32 +924,37 @@ void GLScopeGUI::on_trigHoldoff_valueChanged(int value)
changeCurrentTrigger(); changeCurrentTrigger();
} }
void GLScopeGUI::on_trigLevelCoarse_valueChanged(int value __attribute__((unused))) void GLScopeGUI::on_trigLevelCoarse_valueChanged(int value)
{ {
(void) value;
setTrigLevelDisplay(); setTrigLevelDisplay();
changeCurrentTrigger(); changeCurrentTrigger();
} }
void GLScopeGUI::on_trigLevelFine_valueChanged(int value __attribute__((unused))) void GLScopeGUI::on_trigLevelFine_valueChanged(int value)
{ {
(void) value;
setTrigLevelDisplay(); setTrigLevelDisplay();
changeCurrentTrigger(); changeCurrentTrigger();
} }
void GLScopeGUI::on_trigDelayCoarse_valueChanged(int value __attribute__((unused))) void GLScopeGUI::on_trigDelayCoarse_valueChanged(int value)
{ {
(void) value;
setTrigDelayDisplay(); setTrigDelayDisplay();
changeCurrentTrigger(); changeCurrentTrigger();
} }
void GLScopeGUI::on_trigDelayFine_valueChanged(int value __attribute__((unused))) void GLScopeGUI::on_trigDelayFine_valueChanged(int value)
{ {
(void) value;
setTrigDelayDisplay(); setTrigDelayDisplay();
changeCurrentTrigger(); changeCurrentTrigger();
} }
void GLScopeGUI::on_trigPre_valueChanged(int value __attribute__((unused))) void GLScopeGUI::on_trigPre_valueChanged(int value)
{ {
(void) value;
setTrigPreDisplay(); setTrigPreDisplay();
m_scopeVis->configure(m_traceLenMult*ScopeVis::m_traceChunkSize, m_scopeVis->configure(m_traceLenMult*ScopeVis::m_traceChunkSize,
m_timeBase, m_timeBase,
@ -1436,8 +1460,9 @@ void GLScopeGUI::applySettings()
{ {
} }
bool GLScopeGUI::handleMessage(Message* message __attribute__((unused))) bool GLScopeGUI::handleMessage(Message* message)
{ {
(void) message;
return false; return false;
} }

View File

@ -451,8 +451,9 @@ void GLSpectrumGUI::on_traceIntensity_valueChanged(int index)
} }
} }
void GLSpectrumGUI::on_clearSpectrum_clicked(bool checked __attribute__((unused))) void GLSpectrumGUI::on_clearSpectrum_clicked(bool checked)
{ {
(void) checked;
if(m_glSpectrum != 0) { if(m_glSpectrum != 0) {
m_glSpectrum->clearSpectrumHistogram(); m_glSpectrum->clearSpectrumHistogram();
} }

View File

@ -47,8 +47,9 @@ void LoggingDialog::accept()
QDialog::accept(); QDialog::accept();
} }
void LoggingDialog::on_showFileDialog_clicked(bool checked __attribute__((unused))) void LoggingDialog::on_showFileDialog_clicked(bool checked)
{ {
(void) checked;
QString fileName = QFileDialog::getSaveFileName(this, QString fileName = QFileDialog::getSaveFileName(this,
tr("Save log file"), ".", tr("Log Files (*.log)"), 0, QFileDialog::DontUseNativeDialog); tr("Save log file"), ".", tr("Log Files (*.log)"), 0, QFileDialog::DontUseNativeDialog);

View File

@ -28,9 +28,9 @@ TickedSlider::TickedSlider(QWidget* parent) :
m_tickColor(Qt::white) m_tickColor(Qt::white)
{ } { }
void TickedSlider::paintEvent(QPaintEvent *ev __attribute__((unused))) void TickedSlider::paintEvent(QPaintEvent *ev)
{ {
(void) ev;
QStylePainter p(this); QStylePainter p(this);
QStyleOptionSlider opt; QStyleOptionSlider opt;
initStyleOption(&opt); initStyleOption(&opt);

View File

@ -180,8 +180,9 @@ void TVScreen::paintGL()
m_objMutex.unlock(); m_objMutex.unlock();
} }
void TVScreen::mousePressEvent(QMouseEvent* event __attribute__((unused))) void TVScreen::mousePressEvent(QMouseEvent* event)
{ {
(void) event;
} }
void TVScreen::tick() void TVScreen::tick()

View File

@ -1404,13 +1404,17 @@ void MainWindow::on_presetDelete_clicked()
} }
} }
void MainWindow::on_presetTree_currentItemChanged(QTreeWidgetItem *current __attribute__((unused)), QTreeWidgetItem *previous __attribute__((unused))) void MainWindow::on_presetTree_currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous)
{ {
(void) current;
(void) previous;
updatePresetControls(); updatePresetControls();
} }
void MainWindow::on_presetTree_itemActivated(QTreeWidgetItem *item __attribute__((unused)), int column __attribute__((unused))) void MainWindow::on_presetTree_itemActivated(QTreeWidgetItem *item, int column)
{ {
(void) item;
(void) column;
on_presetLoad_clicked(); on_presetLoad_clicked();
} }
@ -1644,8 +1648,9 @@ void MainWindow::sampleSinkChanged()
} }
} }
void MainWindow::channelAddClicked(bool checked __attribute__((unused))) void MainWindow::channelAddClicked(bool checked)
{ {
(void) checked;
// Do it in the currently selected source tab // Do it in the currently selected source tab
int currentSourceTabIndex = ui->tabInputsSelect->currentIndex(); int currentSourceTabIndex = ui->tabInputsSelect->currentIndex();
@ -1778,8 +1783,9 @@ void MainWindow::setLoggingOptions()
} }
} }
void MainWindow::focusHasChanged(QWidget *oldWidget __attribute__((unused)), QWidget *newWidget) void MainWindow::focusHasChanged(QWidget *oldWidget, QWidget *newWidget)
{ {
(void) oldWidget;
// this is the hard way: // this is the hard way:
// if (ui->commandKeyboardConnect->isChecked() && (newWidget != this)) { // if (ui->commandKeyboardConnect->isChecked() && (newWidget != this)) {
// setFocus(); // setFocus();

View File

@ -30,10 +30,13 @@ QMAKE_CXXFLAGS += -std=c++11
CONFIG(Release):build_subdir = release CONFIG(Release):build_subdir = release
CONFIG(Debug):build_subdir = debug CONFIG(Debug):build_subdir = debug
CONFIG(MSVC):DEFINES += sdrgui_EXPORTS
CONFIG(ANDROID):INCLUDEPATH += /opt/softs/boost_1_60_0 CONFIG(ANDROID):INCLUDEPATH += /opt/softs/boost_1_60_0
CONFIG(MINGW32):INCLUDEPATH += "C:\softs\boost_1_66_0" CONFIG(MINGW32):INCLUDEPATH += "C:\softs\boost_1_66_0"
CONFIG(MINGW64):INCLUDEPATH += "C:\softs\boost_1_66_0" CONFIG(MINGW64):INCLUDEPATH += "C:\softs\boost_1_66_0"
CONFIG(MSVC):INCLUDEPATH += "C:\softs\boost_1_66_0"
CONFIG(macx):INCLUDEPATH += "../../../boost_1_64_0" CONFIG(macx):INCLUDEPATH += "../../../boost_1_64_0"

View File

@ -20,8 +20,6 @@
#include <QList> #include <QList>
#include <QSysInfo> #include <QSysInfo>
#include <unistd.h>
#include "mainwindow.h" #include "mainwindow.h"
#include "ui_mainwindow.h" #include "ui_mainwindow.h"
#include "loggerwithfile.h" #include "loggerwithfile.h"
@ -73,8 +71,9 @@ WebAPIAdapterGUI::~WebAPIAdapterGUI()
int WebAPIAdapterGUI::instanceSummary( int WebAPIAdapterGUI::instanceSummary(
SWGSDRangel::SWGInstanceSummaryResponse& response, SWGSDRangel::SWGInstanceSummaryResponse& response,
SWGSDRangel::SWGErrorResponse& error __attribute__((unused))) SWGSDRangel::SWGErrorResponse& error)
{ {
(void) error;
response.init(); response.init();
*response.getAppname() = qApp->applicationName(); *response.getAppname() = qApp->applicationName();
*response.getVersion() = qApp->applicationVersion(); *response.getVersion() = qApp->applicationVersion();
@ -105,9 +104,10 @@ int WebAPIAdapterGUI::instanceSummary(
} }
int WebAPIAdapterGUI::instanceDelete( int WebAPIAdapterGUI::instanceDelete(
SWGSDRangel::SWGSuccessResponse& response __attribute__((unused)), SWGSDRangel::SWGSuccessResponse& response,
SWGSDRangel::SWGErrorResponse& error) SWGSDRangel::SWGErrorResponse& error)
{ {
(void) response;
*error.getMessage() = QString("Not supported in GUI instance"); *error.getMessage() = QString("Not supported in GUI instance");
return 400; return 400;
} }
@ -115,8 +115,9 @@ int WebAPIAdapterGUI::instanceDelete(
int WebAPIAdapterGUI::instanceDevices( int WebAPIAdapterGUI::instanceDevices(
bool tx, bool tx,
SWGSDRangel::SWGInstanceDevicesResponse& response, SWGSDRangel::SWGInstanceDevicesResponse& response,
SWGSDRangel::SWGErrorResponse& error __attribute__((unused))) SWGSDRangel::SWGErrorResponse& error)
{ {
(void) error;
response.init(); response.init();
int nbSamplingDevices = tx ? DeviceEnumerator::instance()->getNbTxSamplingDevices() : DeviceEnumerator::instance()->getNbRxSamplingDevices(); int nbSamplingDevices = tx ? DeviceEnumerator::instance()->getNbTxSamplingDevices() : DeviceEnumerator::instance()->getNbRxSamplingDevices();
response.setDevicecount(nbSamplingDevices); response.setDevicecount(nbSamplingDevices);
@ -143,8 +144,9 @@ int WebAPIAdapterGUI::instanceDevices(
int WebAPIAdapterGUI::instanceChannels( int WebAPIAdapterGUI::instanceChannels(
bool tx, bool tx,
SWGSDRangel::SWGInstanceChannelsResponse& response, SWGSDRangel::SWGInstanceChannelsResponse& response,
SWGSDRangel::SWGErrorResponse& error __attribute__((unused))) SWGSDRangel::SWGErrorResponse& error)
{ {
(void) error;
response.init(); response.init();
PluginAPI::ChannelRegistrations *channelRegistrations = tx ? m_mainWindow.m_pluginManager->getTxChannelRegistrations() : m_mainWindow.m_pluginManager->getRxChannelRegistrations(); PluginAPI::ChannelRegistrations *channelRegistrations = tx ? m_mainWindow.m_pluginManager->getTxChannelRegistrations() : m_mainWindow.m_pluginManager->getRxChannelRegistrations();
int nbChannelDevices = channelRegistrations->size(); int nbChannelDevices = channelRegistrations->size();
@ -170,8 +172,9 @@ int WebAPIAdapterGUI::instanceChannels(
int WebAPIAdapterGUI::instanceLoggingGet( int WebAPIAdapterGUI::instanceLoggingGet(
SWGSDRangel::SWGLoggingInfo& response, SWGSDRangel::SWGLoggingInfo& response,
SWGSDRangel::SWGErrorResponse& error __attribute__((unused))) SWGSDRangel::SWGErrorResponse& error)
{ {
(void) error;
response.init(); response.init();
response.setDumpToFile(m_mainWindow.m_logger->getUseFileLogger() ? 1 : 0); response.setDumpToFile(m_mainWindow.m_logger->getUseFileLogger() ? 1 : 0);
@ -188,8 +191,9 @@ int WebAPIAdapterGUI::instanceLoggingGet(
int WebAPIAdapterGUI::instanceLoggingPut( int WebAPIAdapterGUI::instanceLoggingPut(
SWGSDRangel::SWGLoggingInfo& query, SWGSDRangel::SWGLoggingInfo& query,
SWGSDRangel::SWGLoggingInfo& response, SWGSDRangel::SWGLoggingInfo& response,
SWGSDRangel::SWGErrorResponse& error __attribute__((unused))) SWGSDRangel::SWGErrorResponse& error)
{ {
(void) error;
// response input is the query actually // response input is the query actually
bool dumpToFile = (query.getDumpToFile() != 0); bool dumpToFile = (query.getDumpToFile() != 0);
QString* consoleLevel = query.getConsoleLevel(); QString* consoleLevel = query.getConsoleLevel();
@ -225,8 +229,9 @@ int WebAPIAdapterGUI::instanceLoggingPut(
int WebAPIAdapterGUI::instanceAudioGet( int WebAPIAdapterGUI::instanceAudioGet(
SWGSDRangel::SWGAudioDevices& response, SWGSDRangel::SWGAudioDevices& response,
SWGSDRangel::SWGErrorResponse& error __attribute__((unused))) SWGSDRangel::SWGErrorResponse& error)
{ {
(void) error;
const QList<QAudioDeviceInfo>& audioInputDevices = m_mainWindow.m_dspEngine->getAudioDeviceManager()->getInputDevices(); const QList<QAudioDeviceInfo>& audioInputDevices = m_mainWindow.m_dspEngine->getAudioDeviceManager()->getInputDevices();
const QList<QAudioDeviceInfo>& audioOutputDevices = m_mainWindow.m_dspEngine->getAudioDeviceManager()->getOutputDevices(); const QList<QAudioDeviceInfo>& audioOutputDevices = m_mainWindow.m_dspEngine->getAudioDeviceManager()->getOutputDevices();
int nbInputDevices = audioInputDevices.size(); int nbInputDevices = audioInputDevices.size();
@ -454,8 +459,9 @@ int WebAPIAdapterGUI::instanceAudioOutputDelete(
int WebAPIAdapterGUI::instanceAudioInputCleanupPatch( int WebAPIAdapterGUI::instanceAudioInputCleanupPatch(
SWGSDRangel::SWGSuccessResponse& response, SWGSDRangel::SWGSuccessResponse& response,
SWGSDRangel::SWGErrorResponse& error __attribute__((unused))) SWGSDRangel::SWGErrorResponse& error)
{ {
(void) error;
m_mainWindow.m_dspEngine->getAudioDeviceManager()->inputInfosCleanup(); m_mainWindow.m_dspEngine->getAudioDeviceManager()->inputInfosCleanup();
response.init(); response.init();
@ -466,8 +472,9 @@ int WebAPIAdapterGUI::instanceAudioInputCleanupPatch(
int WebAPIAdapterGUI::instanceAudioOutputCleanupPatch( int WebAPIAdapterGUI::instanceAudioOutputCleanupPatch(
SWGSDRangel::SWGSuccessResponse& response, SWGSDRangel::SWGSuccessResponse& response,
SWGSDRangel::SWGErrorResponse& error __attribute__((unused))) SWGSDRangel::SWGErrorResponse& error)
{ {
(void) error;
m_mainWindow.m_dspEngine->getAudioDeviceManager()->outputInfosCleanup(); m_mainWindow.m_dspEngine->getAudioDeviceManager()->outputInfosCleanup();
response.init(); response.init();
@ -478,8 +485,9 @@ int WebAPIAdapterGUI::instanceAudioOutputCleanupPatch(
int WebAPIAdapterGUI::instanceLocationGet( int WebAPIAdapterGUI::instanceLocationGet(
SWGSDRangel::SWGLocationInformation& response, SWGSDRangel::SWGLocationInformation& response,
SWGSDRangel::SWGErrorResponse& error __attribute__((unused))) SWGSDRangel::SWGErrorResponse& error)
{ {
(void) error;
response.init(); response.init();
response.setLatitude(m_mainWindow.m_settings.getLatitude()); response.setLatitude(m_mainWindow.m_settings.getLatitude());
response.setLongitude(m_mainWindow.m_settings.getLongitude()); response.setLongitude(m_mainWindow.m_settings.getLongitude());
@ -489,8 +497,9 @@ int WebAPIAdapterGUI::instanceLocationGet(
int WebAPIAdapterGUI::instanceLocationPut( int WebAPIAdapterGUI::instanceLocationPut(
SWGSDRangel::SWGLocationInformation& response, SWGSDRangel::SWGLocationInformation& response,
SWGSDRangel::SWGErrorResponse& error __attribute__((unused))) SWGSDRangel::SWGErrorResponse& error)
{ {
(void) error;
float latitude = response.getLatitude(); float latitude = response.getLatitude();
float longitude = response.getLongitude(); float longitude = response.getLongitude();
@ -508,8 +517,9 @@ int WebAPIAdapterGUI::instanceLocationPut(
int WebAPIAdapterGUI::instanceDVSerialGet( int WebAPIAdapterGUI::instanceDVSerialGet(
SWGSDRangel::SWGDVSeralDevices& response, SWGSDRangel::SWGDVSeralDevices& response,
SWGSDRangel::SWGErrorResponse& error __attribute__((unused))) SWGSDRangel::SWGErrorResponse& error)
{ {
(void) error;
response.init(); response.init();
std::vector<std::string> deviceNames; std::vector<std::string> deviceNames;
@ -533,8 +543,9 @@ int WebAPIAdapterGUI::instanceDVSerialGet(
int WebAPIAdapterGUI::instanceDVSerialPatch( int WebAPIAdapterGUI::instanceDVSerialPatch(
bool dvserial, bool dvserial,
SWGSDRangel::SWGDVSeralDevices& response, SWGSDRangel::SWGDVSeralDevices& response,
SWGSDRangel::SWGErrorResponse& error __attribute__((unused))) SWGSDRangel::SWGErrorResponse& error)
{ {
(void) error;
m_mainWindow.m_dspEngine->setDVSerialSupport(dvserial); m_mainWindow.m_dspEngine->setDVSerialSupport(dvserial);
m_mainWindow.ui->action_DV_Serial->setChecked(dvserial); m_mainWindow.ui->action_DV_Serial->setChecked(dvserial);
response.init(); response.init();
@ -566,8 +577,9 @@ int WebAPIAdapterGUI::instanceDVSerialPatch(
int WebAPIAdapterGUI::instancePresetsGet( int WebAPIAdapterGUI::instancePresetsGet(
SWGSDRangel::SWGPresets& response, SWGSDRangel::SWGPresets& response,
SWGSDRangel::SWGErrorResponse& error __attribute__((unused))) SWGSDRangel::SWGErrorResponse& error)
{ {
(void) error;
int nbPresets = m_mainWindow.m_settings.getPresetCount(); int nbPresets = m_mainWindow.m_settings.getPresetCount();
int nbGroups = 0; int nbGroups = 0;
int nbPresetsThisGroup = 0; int nbPresetsThisGroup = 0;
@ -816,8 +828,9 @@ int WebAPIAdapterGUI::instancePresetDelete(
int WebAPIAdapterGUI::instanceDeviceSetsGet( int WebAPIAdapterGUI::instanceDeviceSetsGet(
SWGSDRangel::SWGDeviceSetList& response, SWGSDRangel::SWGDeviceSetList& response,
SWGSDRangel::SWGErrorResponse& error __attribute__((unused))) SWGSDRangel::SWGErrorResponse& error)
{ {
(void) error;
getDeviceSetList(&response); getDeviceSetList(&response);
return 200; return 200;
} }
@ -825,8 +838,9 @@ int WebAPIAdapterGUI::instanceDeviceSetsGet(
int WebAPIAdapterGUI::instanceDeviceSetPost( int WebAPIAdapterGUI::instanceDeviceSetPost(
bool tx, bool tx,
SWGSDRangel::SWGSuccessResponse& response, SWGSDRangel::SWGSuccessResponse& response,
SWGSDRangel::SWGErrorResponse& error __attribute__((unused))) SWGSDRangel::SWGErrorResponse& error)
{ {
(void) error;
MainWindow::MsgAddDeviceSet *msg = MainWindow::MsgAddDeviceSet::create(tx); MainWindow::MsgAddDeviceSet *msg = MainWindow::MsgAddDeviceSet::create(tx);
m_mainWindow.m_inputMessageQueue.push(msg); m_mainWindow.m_inputMessageQueue.push(msg);