1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-25 01:18:38 -05:00

Device GUIs: Constain window size via minimumSize/maximumSize, rather than handling resizeEvent. Add maximum button. Hide size buttons when window size is fixed

This commit is contained in:
Jon Beniston 2022-11-09 15:53:44 +00:00
parent b551a20302
commit ee8b8ade88
88 changed files with 102 additions and 436 deletions

View File

@ -23,7 +23,6 @@
#include <QString>
#include <QMessageBox>
#include <QFileDialog>
#include <QResizeEvent>
#include "plugin/pluginapi.h"
#include "device/deviceapi.h"
@ -68,7 +67,7 @@ BladeRF2MIMOGui::BladeRF2MIMOGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_deviceUISet = deviceUISet;
setAttribute(Qt::WA_DeleteOnClose, true);
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizeToContents();
getContents()->setStyleSheet("#BladeRF2MIMOGui { background-color: rgb(64, 64, 64); }");
m_helpURL = "plugins/samplemimo/bladerf2mimo/readme.md";
m_sampleMIMO = (BladeRF2MIMO*) m_deviceUISet->m_deviceAPI->getSampleMIMO();
@ -145,12 +144,6 @@ bool BladeRF2MIMOGui::deserialize(const QByteArray& data)
}
}
void BladeRF2MIMOGui::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
void BladeRF2MIMOGui::displaySettings()
{
updateFrequencyLimits();

View File

@ -45,9 +45,6 @@ public:
bool deserialize(const QByteArray& data);
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::BladeRF2MIMOGui* ui;

View File

@ -22,7 +22,6 @@
#include <QString>
#include <QMessageBox>
#include <QFileDialog>
#include <QResizeEvent>
#include "plugin/pluginapi.h"
#include "device/deviceapi.h"
@ -70,7 +69,7 @@ LimeSDRMIMOGUI::LimeSDRMIMOGUI(DeviceUISet *deviceUISet, QWidget* parent) :
m_deviceUISet = deviceUISet;
setAttribute(Qt::WA_DeleteOnClose, true);
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizeToContents();
getContents()->setStyleSheet("#LimeSDRMIMOGUI { background-color: rgb(64, 64, 64); }");
m_helpURL = "plugins/samplemimo/limesdrmimo/readme.md";
m_limeSDRMIMO = (LimeSDRMIMO*) m_deviceUISet->m_deviceAPI->getSampleMIMO();
@ -145,12 +144,6 @@ bool LimeSDRMIMOGUI::deserialize(const QByteArray& data)
}
}
void LimeSDRMIMOGUI::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
void LimeSDRMIMOGUI::handleInputMessages()
{
Message* message;

View File

@ -45,9 +45,6 @@ public:
bool deserialize(const QByteArray& data);
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::LimeSDRMIMOGUI* ui;

View File

@ -22,7 +22,6 @@
#include <QString>
#include <QMessageBox>
#include <QFileDialog>
#include <QResizeEvent>
#include "plugin/pluginapi.h"
#include "device/deviceapi.h"
@ -58,7 +57,7 @@ MetisMISOGui::MetisMISOGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_txSampleRate = 48000;
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizeToContents();
getContents()->setStyleSheet("#MetisMISOGui { background-color: rgb(64, 64, 64); }");
m_helpURL = "plugins/samplemimo/metismiso/readme.md";
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
@ -113,12 +112,6 @@ void MetisMISOGui::setCenterFrequency(qint64 centerFrequency)
sendSettings();
}
void MetisMISOGui::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
QByteArray MetisMISOGui::serialize() const
{
return m_settings.serialize();

View File

@ -46,9 +46,6 @@ public:
bool deserialize(const QByteArray& data);
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::MetisMISOGui* ui;

View File

@ -21,7 +21,6 @@
#include <QDateTime>
#include <QString>
#include <QMessageBox>
#include <QResizeEvent>
#include "plugin/pluginapi.h"
#include "device/deviceapi.h"
@ -70,7 +69,7 @@ PlutoSDRMIMOGUI::PlutoSDRMIMOGUI(DeviceUISet *deviceUISet, QWidget* parent) :
m_deviceUISet = deviceUISet;
setAttribute(Qt::WA_DeleteOnClose, true);
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizeToContents();
getContents()->setStyleSheet("#PlutoSDRMIMOGUI { background-color: rgb(64, 64, 64); }");
m_helpURL = "plugins/samplemimo/plutosdrmimo/readme.md";
m_sampleMIMO = (PlutoSDRMIMO*) m_deviceUISet->m_deviceAPI->getSampleMIMO();
@ -146,12 +145,6 @@ bool PlutoSDRMIMOGUI::deserialize(const QByteArray& data)
}
}
void PlutoSDRMIMOGUI::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
void PlutoSDRMIMOGUI::displaySettings()
{
if (m_rxElseTx)

View File

@ -45,9 +45,6 @@ public:
bool deserialize(const QByteArray& data);
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::PlutoSDRMIMOGUI* ui;

View File

@ -22,7 +22,6 @@
#include <QString>
#include <QMessageBox>
#include <QFileDialog>
#include <QResizeEvent>
#include "plugin/pluginapi.h"
#include "device/deviceapi.h"
@ -57,7 +56,7 @@ TestMIGui::TestMIGui(DeviceUISet *deviceUISet, QWidget* parent) :
setAttribute(Qt::WA_DeleteOnClose, true);
m_helpURL = "plugins/samplemimo/testmi/readme.md";
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizeToContents();
getContents()->setStyleSheet("#TestMIGui { background-color: rgb(64, 64, 64); }");
m_sampleMIMO = m_deviceUISet->m_deviceAPI->getSampleMIMO();
@ -126,12 +125,6 @@ bool TestMIGui::deserialize(const QByteArray& data)
}
}
void TestMIGui::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
void TestMIGui::on_startStop_toggled(bool checked)
{
if (m_doApplySettings)

View File

@ -46,9 +46,6 @@ public:
bool deserialize(const QByteArray& data);
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::TestMIGui* ui;

View File

@ -54,7 +54,7 @@ TestMOSyncGui::TestMOSyncGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_helpURL = "plugins/samplemimo/testmosync/readme.md";
QWidget *contents = getContents();
ui->setupUi(contents);
setSizePolicy(contents->sizePolicy());
sizeToContents();
getContents()->setStyleSheet("#TestMOSyncGui { background-color: rgb(64, 64, 64); }");
m_sampleMIMO = (TestMOSync*) m_deviceUISet->m_deviceAPI->getSampleMIMO();

View File

@ -20,7 +20,6 @@
#include <QString>
#include <QMessageBox>
#include <QFileDialog>
#include <QResizeEvent>
#include "plugin/pluginapi.h"
#include "device/deviceapi.h"
@ -67,7 +66,7 @@ XTRXMIMOGUI::XTRXMIMOGUI(DeviceUISet *deviceUISet, QWidget* parent) :
m_deviceUISet = deviceUISet;
setAttribute(Qt::WA_DeleteOnClose, true);
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizeToContents();
getContents()->setStyleSheet("#XTRXMIMOGUI { background-color: rgb(64, 64, 64); }");
m_helpURL = "plugins/samplemimo/xtrxmimo/readme.md";
m_xtrxMIMO = (XTRXMIMO*) m_deviceUISet->m_deviceAPI->getSampleMIMO();
@ -142,12 +141,6 @@ bool XTRXMIMOGUI::deserialize(const QByteArray& data)
}
}
void XTRXMIMOGUI::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
void XTRXMIMOGUI::handleInputMessages()
{
Message* message;

View File

@ -45,9 +45,6 @@ public:
bool deserialize(const QByteArray& data);
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::XTRXMIMOGUI* ui;

View File

@ -17,7 +17,6 @@
#include <QMessageBox>
#include <QFileDialog>
#include <QResizeEvent>
#include "ui_audiooutputgui.h"
#include "gui/colormapper.h"
@ -44,7 +43,7 @@ AudioOutputGui::AudioOutputGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_audioOutput = (AudioOutput*) m_deviceUISet->m_deviceAPI->getSampleSink();
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizeToContents();
getContents()->setStyleSheet("#AudioOutputGui { background-color: rgb(64, 64, 64); }");
m_helpURL = "plugins/samplesink/audiooutput/readme.md";
@ -103,12 +102,6 @@ bool AudioOutputGui::deserialize(const QByteArray& data)
}
}
void AudioOutputGui::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
bool AudioOutputGui::handleMessage(const Message& message)
{
if (AudioOutput::MsgConfigureAudioOutput::match(message))

View File

@ -46,9 +46,6 @@ public:
bool deserialize(const QByteArray& data);
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::AudioOutputGui* ui;

View File

@ -17,7 +17,6 @@
#include <QDebug>
#include <QMessageBox>
#include <QResizeEvent>
#include <libbladeRF.h>
@ -47,7 +46,7 @@ Bladerf1OutputGui::Bladerf1OutputGui(DeviceUISet *deviceUISet, QWidget* parent)
m_deviceSampleSink = (Bladerf1Output*) m_deviceUISet->m_deviceAPI->getSampleSink();
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizeToContents();
getContents()->setStyleSheet("#Bladerf1OutputGui { background-color: rgb(64, 64, 64); }");
m_helpURL = "/plugins/samplesink/bladerf1output/readme.md"; ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
ui->centerFrequency->setValueRange(7, BLADERF_FREQUENCY_MIN_XB200/1000, BLADERF_FREQUENCY_MAX/1000);
@ -115,12 +114,6 @@ bool Bladerf1OutputGui::deserialize(const QByteArray& data)
}
}
void Bladerf1OutputGui::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
bool Bladerf1OutputGui::handleMessage(const Message& message)
{
if (Bladerf1Output::MsgConfigureBladerf1::match(message))

View File

@ -46,9 +46,6 @@ public:
bool deserialize(const QByteArray& data);
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::Bladerf1OutputGui* ui;

View File

@ -17,7 +17,6 @@
#include <QDebug>
#include <QMessageBox>
#include <QResizeEvent>
#include <libbladeRF.h>
@ -50,7 +49,7 @@ BladeRF2OutputGui::BladeRF2OutputGui(DeviceUISet *deviceUISet, QWidget* parent)
uint64_t f_min, f_max;
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizeToContents();
getContents()->setStyleSheet("#BladeRF2OutputGui { background-color: rgb(64, 64, 64); }");
m_helpURL = "plugins/samplesink/bladerf2output/readme.md"; ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
@ -127,12 +126,6 @@ bool BladeRF2OutputGui::deserialize(const QByteArray& data)
}
}
void BladeRF2OutputGui::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
void BladeRF2OutputGui::updateFrequencyLimits()
{
// values in kHz

View File

@ -47,9 +47,6 @@ public:
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
virtual bool handleMessage(const Message& message);
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::BladeRF2OutputGui* ui;

View File

@ -22,7 +22,6 @@
#include <QString>
#include <QFileDialog>
#include <QMessageBox>
#include <QResizeEvent>
#include "ui_fileoutputgui.h"
#include "plugin/pluginapi.h"
@ -55,7 +54,7 @@ FileOutputGui::FileOutputGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_deviceUISet = deviceUISet;
setAttribute(Qt::WA_DeleteOnClose, true);
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizeToContents();
getContents()->setStyleSheet("#FileOutputGui { background-color: rgb(64, 64, 64); }");
m_helpURL = "plugins/samplesink/fileoutput/readme.md";
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
@ -119,12 +118,6 @@ bool FileOutputGui::deserialize(const QByteArray& data)
}
}
void FileOutputGui::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
bool FileOutputGui::handleMessage(const Message& message)
{
if (FileOutput::MsgConfigureFileOutput::match(message))

View File

@ -48,9 +48,6 @@ public:
bool deserialize(const QByteArray& data);
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::FileOutputGui* ui;

View File

@ -17,7 +17,6 @@
#include <QDebug>
#include <QMessageBox>
#include <QResizeEvent>
#include <libhackrf/hackrf.h>
@ -49,7 +48,7 @@ HackRFOutputGui::HackRFOutputGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_deviceSampleSink = (HackRFOutput*) m_deviceUISet->m_deviceAPI->getSampleSink();
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizeToContents();
getContents()->setStyleSheet("#HackRFOutputGui { background-color: rgb(64, 64, 64); }");
m_helpURL = "plugins/samplesink/hackrfoutput/readme.md";
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
@ -113,12 +112,6 @@ bool HackRFOutputGui::deserialize(const QByteArray& data)
}
}
void HackRFOutputGui::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
void HackRFOutputGui::blockApplySettings(bool block)
{
m_doApplySettings = !block;

View File

@ -56,9 +56,6 @@ public:
bool deserialize(const QByteArray& data);
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::HackRFOutputGui* ui;

View File

@ -17,7 +17,6 @@
#include <QDebug>
#include <QMessageBox>
#include <QResizeEvent>
#include "ui_limesdroutputgui.h"
#include "gui/colormapper.h"
@ -46,7 +45,7 @@ LimeSDROutputGUI::LimeSDROutputGUI(DeviceUISet *deviceUISet, QWidget* parent) :
m_limeSDROutput = (LimeSDROutput*) m_deviceUISet->m_deviceAPI->getSampleSink();
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizeToContents();
getContents()->setStyleSheet("#LimeSDROutputGUI { background-color: rgb(64, 64, 64); }");
m_helpURL = "plugins/samplesink/limesdroutput/readme.md";
@ -140,12 +139,6 @@ bool LimeSDROutputGUI::deserialize(const QByteArray& data)
}
}
void LimeSDROutputGUI::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
void LimeSDROutputGUI::updateFrequencyLimits()
{
// values in kHz

View File

@ -46,9 +46,6 @@ public:
bool deserialize(const QByteArray& data);
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::LimeSDROutputGUI* ui;

View File

@ -28,7 +28,6 @@
#include <QNetworkReply>
#include <QJsonParseError>
#include <QJsonObject>
#include <QResizeEvent>
#include "ui_localoutputgui.h"
#include "gui/colormapper.h"
@ -63,7 +62,7 @@ LocalOutputGui::LocalOutputGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_paletteWhiteText.setColor(QPalette::WindowText, Qt::white);
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizeToContents();
getContents()->setStyleSheet("#LocalOutputGui { background-color: rgb(64, 64, 64); }");
m_helpURL = "plugins/samplesink/localoutput/readme.md";
@ -133,12 +132,6 @@ bool LocalOutputGui::deserialize(const QByteArray& data)
}
}
void LocalOutputGui::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
bool LocalOutputGui::handleMessage(const Message& message)
{
if (LocalOutput::MsgConfigureLocalOutput::match(message))

View File

@ -47,9 +47,6 @@ public:
bool deserialize(const QByteArray& data);
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::LocalOutputGui* ui;

View File

@ -18,7 +18,6 @@
#include <stdio.h>
#include <QDebug>
#include <QMessageBox>
#include <QResizeEvent>
#include "dsp/dspengine.h"
#include "dsp/dspcommands.h"
@ -49,7 +48,7 @@ PlutoSDROutputGUI::PlutoSDROutputGUI(DeviceUISet *deviceUISet, QWidget* parent)
m_sampleSink = (PlutoSDROutput*) m_deviceUISet->m_deviceAPI->getSampleSink();
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizeToContents();
getContents()->setStyleSheet("#PlutoSDROutputGUI { background-color: rgb(64, 64, 64); }");
m_helpURL = "plugins/samplesink/plutosdroutput/readme.md";
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
@ -125,12 +124,6 @@ bool PlutoSDROutputGUI::deserialize(const QByteArray& data)
}
}
void PlutoSDROutputGUI::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
bool PlutoSDROutputGUI::handleMessage(const Message& message)
{
(void) message;

View File

@ -48,9 +48,6 @@ public:
virtual bool deserialize(const QByteArray& data);
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::PlutoSDROutputGUI* ui;
PlutoSDROutputSettings m_settings;

View File

@ -20,7 +20,6 @@
#include <QDateTime>
#include <QString>
#include <QMessageBox>
#include <QResizeEvent>
#include <boost/algorithm/string.hpp>
#include <boost/lexical_cast.hpp>
@ -68,7 +67,7 @@ RemoteOutputSinkGui::RemoteOutputSinkGui(DeviceUISet *deviceUISet, QWidget* pare
m_paletteWhiteText.setColor(QPalette::WindowText, Qt::white);
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizeToContents();
getContents()->setStyleSheet("#RemoteOutputGui { background-color: rgb(64, 64, 64); }");
m_helpURL = "plugins/samplesink/remoteoutput/readme.md";
@ -145,12 +144,6 @@ bool RemoteOutputSinkGui::deserialize(const QByteArray& data)
}
}
void RemoteOutputSinkGui::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
bool RemoteOutputSinkGui::handleMessage(const Message& message)
{
if (RemoteOutput::MsgConfigureRemoteOutput::match(message))

View File

@ -78,9 +78,6 @@ public:
bool deserialize(const QByteArray& data);
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::RemoteOutputGui* ui;

View File

@ -60,7 +60,7 @@ SoapySDROutputGui::SoapySDROutputGui(DeviceUISet *deviceUISet, QWidget* parent)
setAttribute(Qt::WA_DeleteOnClose, true);
m_sampleSink = (SoapySDROutput*) m_deviceUISet->m_deviceAPI->getSampleSink();
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);
sizeToContents();
getContents()->setStyleSheet("#SoapySDROutputGui { background-color: rgb(64, 64, 64); }");
m_helpURL = "plugins/samplesink/soapysdroutput/readme.md";

View File

@ -53,7 +53,7 @@ TestSinkGui::TestSinkGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_helpURL = "plugins/samplesink/testsink/readme.md";
QWidget *contents = getContents();
ui->setupUi(contents);
setSizePolicy(contents->sizePolicy());
sizeToContents();
setMinimumSize(m_MinimumWidth, m_MinimumHeight);
getContents()->setStyleSheet("#TestSinkGui { background-color: rgb(64, 64, 64); }");
m_sampleSink = (TestSinkOutput*) m_deviceUISet->m_deviceAPI->getSampleSink();

View File

@ -18,7 +18,6 @@
#include <QDebug>
#include <QMessageBox>
#include <QResizeEvent>
#include "ui_usrpoutputgui.h"
#include "gui/colormapper.h"
@ -47,7 +46,7 @@ USRPOutputGUI::USRPOutputGUI(DeviceUISet *deviceUISet, QWidget* parent) :
m_usrpOutput = (USRPOutput*) m_deviceUISet->m_deviceAPI->getSampleSink();
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizeToContents();
getContents()->setStyleSheet("#USRPOutputGUI { background-color: rgb(64, 64, 64); }");
m_helpURL = "plugins/samplesink/usrpoutput/readme.md";
@ -154,12 +153,6 @@ bool USRPOutputGUI::deserialize(const QByteArray& data)
}
}
void USRPOutputGUI::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
void USRPOutputGUI::updateFrequencyLimits()
{
// values in kHz

View File

@ -53,9 +53,6 @@ public:
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
virtual bool handleMessage(const Message& message);
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::USRPOutputGUI* ui;

View File

@ -19,7 +19,6 @@
#include <QDebug>
#include <QMessageBox>
#include <QResizeEvent>
#include "ui_xtrxoutputgui.h"
#include "gui/colormapper.h"
@ -48,7 +47,7 @@ XTRXOutputGUI::XTRXOutputGUI(DeviceUISet *deviceUISet, QWidget* parent) :
m_XTRXOutput = (XTRXOutput*) m_deviceUISet->m_deviceAPI->getSampleSink();
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizeToContents();
getContents()->setStyleSheet("#XTRXOutputGUI { background-color: rgb(64, 64, 64); }");
m_helpURL = "plugins/samplesink/xtrxoutput/readme.md";
@ -123,12 +122,6 @@ bool XTRXOutputGUI::deserialize(const QByteArray& data)
}
}
void XTRXOutputGUI::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
bool XTRXOutputGUI::handleMessage(const Message& message)
{

View File

@ -45,9 +45,6 @@ public:
bool deserialize(const QByteArray& data);
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::XTRXOutputGUI* ui;

View File

@ -18,7 +18,6 @@
#include <QDebug>
#include <QMessageBox>
#include <QFileDialog>
#include <QResizeEvent>
#include <libairspy/airspy.h>
@ -48,7 +47,7 @@ AirspyGui::AirspyGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_sampleSource = (AirspyInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizeToContents();
getContents()->setStyleSheet("#AirspyGui { background-color: rgb(64, 64, 64); }");
m_helpURL = "plugins/samplesource/airspy/readme.md";
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
@ -109,12 +108,6 @@ bool AirspyGui::deserialize(const QByteArray& data)
}
}
void AirspyGui::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
bool AirspyGui::handleMessage(const Message& message)
{
if (AirspyInput::MsgConfigureAirspy::match(message))

View File

@ -48,9 +48,6 @@ public:
uint32_t getDevSampleRate(unsigned int index);
int getDevSampleRateIndex(uint32_t sampleRate);
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::AirspyGui* ui;

View File

@ -18,7 +18,6 @@
#include <QDebug>
#include <QMessageBox>
#include <QFileDialog>
#include <QResizeEvent>
#include <libairspyhf/airspyhf.h>
@ -47,7 +46,7 @@ AirspyHFGui::AirspyHFGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_sampleSource = (AirspyHFInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizeToContents();
getContents()->setStyleSheet("#AirspyHFGui { background-color: rgb(64, 64, 64); }");
m_helpURL = "plugins/samplesource/airspyhf/readme.md";
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
@ -108,12 +107,6 @@ bool AirspyHFGui::deserialize(const QByteArray& data)
}
}
void AirspyHFGui::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
bool AirspyHFGui::handleMessage(const Message& message)
{
if (AirspyHFInput::MsgConfigureAirspyHF::match(message))

View File

@ -49,9 +49,6 @@ public:
uint32_t getDevSampleRate(unsigned int index);
int getDevSampleRateIndex(uint32_t sampleRate);
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::AirspyHFGui* ui;

View File

@ -18,7 +18,6 @@
#include <QMessageBox>
#include <QFileDialog>
#include <QResizeEvent>
#include "ui_audioinputgui.h"
#include "gui/colormapper.h"
@ -44,7 +43,7 @@ AudioInputGui::AudioInputGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_sampleSource = (AudioInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizeToContents();
getContents()->setStyleSheet("#AudioInputGui { background-color: rgb(64, 64, 64); }");
m_helpURL = "plugins/samplesource/audioinput/readme.md";
@ -98,12 +97,6 @@ bool AudioInputGui::deserialize(const QByteArray& data)
}
}
void AudioInputGui::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
bool AudioInputGui::handleMessage(const Message& message)
{
if (AudioInput::MsgConfigureAudioInput::match(message))

View File

@ -47,9 +47,6 @@ public:
bool deserialize(const QByteArray& data);
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::AudioInputGui* ui;

View File

@ -18,7 +18,6 @@
#include <QDebug>
#include <QMessageBox>
#include <QFileDialog>
#include <QResizeEvent>
#include <libbladeRF.h>
@ -49,7 +48,7 @@ Bladerf1InputGui::Bladerf1InputGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_sampleSource = (Bladerf1Input*) m_deviceUISet->m_deviceAPI->getSampleSource();
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizeToContents();
getContents()->setStyleSheet("#Bladerf1InputGui { background-color: rgb(64, 64, 64); }");
m_helpURL = "plugins/samplesource/bladerf1input/readme.md";
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
@ -118,12 +117,6 @@ bool Bladerf1InputGui::deserialize(const QByteArray& data)
}
}
void Bladerf1InputGui::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
bool Bladerf1InputGui::handleMessage(const Message& message)
{
if (Bladerf1Input::MsgConfigureBladerf1::match(message))

View File

@ -72,9 +72,6 @@ private:
bool handleMessage(const Message& message);
void makeUIConnections();
protected:
void resizeEvent(QResizeEvent* size);
private slots:
void handleInputMessages();
void on_centerFrequency_changed(quint64 value);

View File

@ -18,7 +18,6 @@
#include <QDebug>
#include <QMessageBox>
#include <QFileDialog>
#include <QResizeEvent>
#include <libbladeRF.h>
@ -52,7 +51,7 @@ BladeRF2InputGui::BladeRF2InputGui(DeviceUISet *deviceUISet, QWidget* parent) :
uint64_t f_min, f_max;
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizeToContents();
getContents()->setStyleSheet("#Bladerf2InputGui { background-color: rgb(64, 64, 64); }");
m_helpURL = "plugins/samplesource/bladerf2input/readme.md";
@ -140,12 +139,6 @@ bool BladeRF2InputGui::deserialize(const QByteArray& data)
}
}
void BladeRF2InputGui::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
void BladeRF2InputGui::updateFrequencyLimits()
{
// values in kHz

View File

@ -79,9 +79,6 @@ private:
bool handleMessage(const Message& message);
void makeUIConnections();
protected:
void resizeEvent(QResizeEvent* size);
private slots:
void handleInputMessages();
void on_centerFrequency_changed(quint64 value);

View File

@ -17,7 +17,6 @@
#include <QMessageBox>
#include <QFileDialog>
#include <QResizeEvent>
#include "ui_fcdprogui.h"
#include "gui/colormapper.h"
@ -45,7 +44,7 @@ FCDProGui::FCDProGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_sampleSource = (FCDProInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizeToContents();
getContents()->setStyleSheet("#FCDProGui { background-color: rgb(64, 64, 64); }");
m_helpURL = "plugins/samplesource/fcdpro/readme.md";
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
@ -200,12 +199,6 @@ bool FCDProGui::deserialize(const QByteArray& data)
}
}
void FCDProGui::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
bool FCDProGui::handleMessage(const Message& message)
{
if (FCDProInput::MsgConfigureFCDPro::match(message))

View File

@ -70,9 +70,6 @@ private:
bool handleMessage(const Message& message);
void makeUIConnections();
protected:
void resizeEvent(QResizeEvent* size);
private slots:
void handleInputMessages();
void on_centerFrequency_changed(quint64 value);

View File

@ -18,7 +18,6 @@
#include <QDebug>
#include <QMessageBox>
#include <QFileDialog>
#include <QResizeEvent>
#include "ui_fcdproplusgui.h"
#include "gui/colormapper.h"
@ -46,7 +45,7 @@ FCDProPlusGui::FCDProPlusGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_sampleSource = (FCDProPlusInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizeToContents();
getContents()->setStyleSheet("#FCDProPlusGui { background-color: rgb(64, 64, 64); }");
m_helpURL = "plugins/samplesource/fcdproplus/readme.md";
@ -119,12 +118,6 @@ bool FCDProPlusGui::deserialize(const QByteArray& data)
}
}
void FCDProPlusGui::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
bool FCDProPlusGui::handleMessage(const Message& message)
{
if (FCDProPlusInput::MsgConfigureFCDProPlus::match(message))

View File

@ -69,9 +69,6 @@ private:
bool handleMessage(const Message& message);
void makeUIConnections();
protected:
void resizeEvent(QResizeEvent* size);
private slots:
void handleInputMessages();
void on_centerFrequency_changed(quint64 value);

View File

@ -22,7 +22,6 @@
#include <QString>
#include <QFileDialog>
#include <QMessageBox>
#include <QResizeEvent>
#include "ui_fileinputgui.h"
#include "plugin/pluginapi.h"
@ -57,7 +56,7 @@ FileInputGUI::FileInputGUI(DeviceUISet *deviceUISet, QWidget* parent) :
m_deviceUISet = deviceUISet;
setAttribute(Qt::WA_DeleteOnClose, true);
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizeToContents();
getContents()->setStyleSheet("#FileInputGUI { background-color: rgb(64, 64, 64); }");
m_helpURL = "plugins/samplesource/fileinput/readme.md";
ui->crcLabel->setStyleSheet("QLabel { background:rgb(79,79,79); }");
@ -119,12 +118,6 @@ bool FileInputGUI::deserialize(const QByteArray& data)
}
}
void FileInputGUI::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
void FileInputGUI::handleInputMessages()
{
Message* message;

View File

@ -47,9 +47,6 @@ public:
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
virtual bool handleMessage(const Message& message);
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::FileInputGUI* ui;

View File

@ -20,7 +20,6 @@
#include <QDebug>
#include <QMessageBox>
#include <QFileDialog>
#include <QResizeEvent>
#include <libhackrf/hackrf.h>
@ -50,7 +49,7 @@ HackRFInputGui::HackRFInputGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_sampleSource = (HackRFInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizeToContents();
getContents()->setStyleSheet("#HackRFInputGui { background-color: rgb(64, 64, 64); }");
m_helpURL = "plugins/samplesource/hackrfinput/readme.md";
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
@ -118,12 +117,6 @@ bool HackRFInputGui::deserialize(const QByteArray& data)
}
}
void HackRFInputGui::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
bool HackRFInputGui::handleMessage(const Message& message)
{
if (HackRFInput::MsgConfigureHackRF::match(message))

View File

@ -55,9 +55,6 @@ public:
bool deserialize(const QByteArray& data);
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::HackRFInputGui* ui;

View File

@ -23,7 +23,6 @@
#include <QString>
#include <QMessageBox>
#include <QFileDialog>
#include <QResizeEvent>
#include "ui_kiwisdrgui.h"
#include "plugin/pluginapi.h"
@ -68,7 +67,7 @@ KiwiSDRGui::KiwiSDRGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_statusColors.push_back("rgb(232, 85, 232)"); // Disconnected (magenta)
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizeToContents();
getContents()->setStyleSheet("#KiwiSDRGui { background-color: rgb(64, 64, 64); }");
m_helpURL = "plugins/samplesource/kiwisdr/readme.md";
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
@ -123,12 +122,6 @@ bool KiwiSDRGui::deserialize(const QByteArray& data)
}
}
void KiwiSDRGui::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
void KiwiSDRGui::on_startStop_toggled(bool checked)
{
if (m_doApplySettings)

View File

@ -47,9 +47,6 @@ public:
bool deserialize(const QByteArray& data);
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::KiwiSDRGui* ui;

View File

@ -20,7 +20,6 @@
#include <QDebug>
#include <QMessageBox>
#include <QFileDialog>
#include <QResizeEvent>
#include <algorithm>
@ -50,7 +49,7 @@ LimeSDRInputGUI::LimeSDRInputGUI(DeviceUISet *deviceUISet, QWidget* parent) :
m_limeSDRInput = (LimeSDRInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizeToContents();
getContents()->setStyleSheet("#LimeSDRInputGUI { background-color: rgb(64, 64, 64); }");
m_helpURL = "plugins/samplesource/limesdrinput/readme.md";
@ -146,12 +145,6 @@ bool LimeSDRInputGUI::deserialize(const QByteArray& data)
}
}
void LimeSDRInputGUI::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
bool LimeSDRInputGUI::handleMessage(const Message& message)
{
if (LimeSDRInput::MsgConfigureLimeSDR::match(message))

View File

@ -45,9 +45,6 @@ public:
bool deserialize(const QByteArray& data);
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::LimeSDRInputGUI* ui;

View File

@ -29,7 +29,6 @@
#include <QNetworkReply>
#include <QJsonParseError>
#include <QJsonObject>
#include <QResizeEvent>
#include "ui_localinputgui.h"
#include "gui/colormapper.h"
@ -76,7 +75,7 @@ LocalInputGui::LocalInputGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_startingTimeStampms = 0;
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizeToContents();
getContents()->setStyleSheet("#LocalInputGui { background-color: rgb(64, 64, 64); }");
m_helpURL = "plugins/samplesource/localinput/readme.md";
@ -146,12 +145,6 @@ bool LocalInputGui::deserialize(const QByteArray& data)
}
}
void LocalInputGui::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
bool LocalInputGui::handleMessage(const Message& message)
{
if (LocalInput::MsgConfigureLocalInput::match(message))

View File

@ -47,9 +47,6 @@ public:
bool deserialize(const QByteArray& data);
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::LocalInputGui* ui;

View File

@ -18,7 +18,6 @@
#include <QDebug>
#include <QMessageBox>
#include <QFileDialog>
#include <QResizeEvent>
#include "device/deviceapi.h"
#include "device/deviceuiset.h"
@ -45,7 +44,7 @@ PerseusGui::PerseusGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_sampleSource = (PerseusInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizeToContents();
getContents()->setStyleSheet("#PerseusGui { background-color: rgb(64, 64, 64); }");
m_helpURL = "plugins/samplesource/perseus/readme.md";
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
@ -106,13 +105,6 @@ bool PerseusGui::deserialize(const QByteArray& data)
}
}
void PerseusGui::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
bool PerseusGui::handleMessage(const Message& message)
{
// Returned messages to update the GUI (usually from web interface)

View File

@ -48,9 +48,6 @@ public:
uint32_t getDevSampleRate(unsigned int index);
int getDevSampleRateIndex(uint32_t sampleRate);
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::PerseusGui* ui;

View File

@ -19,7 +19,6 @@
#include <QDebug>
#include <QMessageBox>
#include <QFileDialog>
#include <QResizeEvent>
#include "dsp/dspengine.h"
#include "dsp/dspcommands.h"
@ -50,7 +49,7 @@ PlutoSDRInputGui::PlutoSDRInputGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_sampleSource = (PlutoSDRInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizeToContents();
getContents()->setStyleSheet("#PlutoSDRInputGUI { background-color: rgb(64, 64, 64); }");
m_helpURL = "plugins/samplesource/plutosdrinput/readme.md";
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
@ -129,12 +128,6 @@ bool PlutoSDRInputGui::deserialize(const QByteArray& data)
}
}
void PlutoSDRInputGui::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
bool PlutoSDRInputGui::handleMessage(const Message& message)
{
if (PlutoSDRInput::MsgConfigurePlutoSDR::match(message))

View File

@ -48,9 +48,6 @@ public:
virtual bool deserialize(const QByteArray& data);
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::PlutoSDRInputGUI* ui;
PlutoSDRInputSettings m_settings;

View File

@ -25,7 +25,6 @@
#include <QTime>
#include <QDateTime>
#include <QString>
#include <QResizeEvent>
#include "ui_remoteinputgui.h"
#include "gui/colormapper.h"
@ -73,7 +72,7 @@ RemoteInputGui::RemoteInputGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_startingTimeStampms = 0;
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizeToContents();
getContents()->setStyleSheet("#RemoteInputGui { background-color: rgb(64, 64, 64); }");
m_helpURL = "plugins/samplesource/remoteinput/readme.md";
@ -152,12 +151,6 @@ bool RemoteInputGui::deserialize(const QByteArray& data)
}
}
void RemoteInputGui::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
bool RemoteInputGui::handleMessage(const Message& message)
{
if (RemoteInput::MsgConfigureRemoteInput::match(message))

View File

@ -49,9 +49,6 @@ public:
bool deserialize(const QByteArray& data);
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::RemoteInputGui* ui;

View File

@ -20,7 +20,6 @@
#include <QMessageBox>
#include <QDateTime>
#include <QString>
#include <QResizeEvent>
#include "ui_remotetcpinputgui.h"
#include "gui/colormapper.h"
@ -54,7 +53,7 @@ RemoteTCPInputGui::RemoteTCPInputGui(DeviceUISet *deviceUISet, QWidget* parent)
setAttribute(Qt::WA_DeleteOnClose, true);
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizeToContents();
getContents()->setStyleSheet("#RemoteTCPInputGui { background-color: rgb(64, 64, 64); }");
m_helpURL = "plugins/samplesource/remotetcpinput/readme.md";
@ -138,12 +137,6 @@ bool RemoteTCPInputGui::deserialize(const QByteArray& data)
}
}
void RemoteTCPInputGui::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
bool RemoteTCPInputGui::handleMessage(const Message& message)
{
if (RemoteTCPInput::MsgConfigureRemoteTCPInput::match(message))

View File

@ -96,9 +96,6 @@ public:
bool deserialize(const QByteArray& data);
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::RemoteTCPInputGui* ui;

View File

@ -18,7 +18,6 @@
#include <QDebug>
#include <QMessageBox>
#include <QFileDialog>
#include <QResizeEvent>
#include "rtlsdrgui.h"
@ -46,7 +45,7 @@ RTLSDRGui::RTLSDRGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_sampleSource = (RTLSDRInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizeToContents();
getContents()->setStyleSheet("#RTLSDRGui { background-color: rgb(64, 64, 64); }");
m_helpURL = "plugins/samplesource/rtlsdr/readme.md";
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
@ -128,12 +127,6 @@ bool RTLSDRGui::deserialize(const QByteArray& data)
}
}
void RTLSDRGui::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
bool RTLSDRGui::handleMessage(const Message& message)
{
if (RTLSDRInput::MsgConfigureRTLSDR::match(message))

View File

@ -47,9 +47,6 @@ public:
bool deserialize(const QByteArray& data);
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::RTLSDRGui* ui;

View File

@ -18,7 +18,6 @@
#include <QDebug>
#include <QMessageBox>
#include <QFileDialog>
#include <QResizeEvent>
#include "sdrplaygui.h"
@ -44,7 +43,7 @@ SDRPlayGui::SDRPlayGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_sampleSource = (SDRPlayInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizeToContents();
getContents()->setStyleSheet("#SDRPlayGui { background-color: rgb(64, 64, 64); }");
m_helpURL = "plugins/samplesource/sdrplay/readme.md";
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
@ -128,12 +127,6 @@ bool SDRPlayGui::deserialize(const QByteArray& data)
}
}
void SDRPlayGui::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
bool SDRPlayGui::handleMessage(const Message& message)
{
if (SDRPlayInput::MsgConfigureSDRPlay::match(message))

View File

@ -47,9 +47,6 @@ public:
virtual bool deserialize(const QByteArray& data);
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::SDRPlayGui* ui;

View File

@ -18,7 +18,6 @@
#include <QDebug>
#include <QMessageBox>
#include <QResizeEvent>
#include "sdrplayv3gui.h"
#include "sdrplayv3input.h"
@ -44,7 +43,7 @@ SDRPlayV3Gui::SDRPlayV3Gui(DeviceUISet *deviceUISet, QWidget* parent) :
m_sdrPlayV3Input = (SDRPlayV3Input*) m_deviceUISet->m_deviceAPI->getSampleSource();
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizeToContents();
getContents()->setStyleSheet("#SDRPlayV3Gui { background-color: rgb(64, 64, 64); }");
m_helpURL = "plugins/samplesource/sdrplayv3/readme.md";
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
@ -164,12 +163,6 @@ bool SDRPlayV3Gui::deserialize(const QByteArray& data)
}
}
void SDRPlayV3Gui::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
bool SDRPlayV3Gui::handleMessage(const Message& message)
{
if (SDRPlayV3Input::MsgConfigureSDRPlayV3::match(message))

View File

@ -47,9 +47,6 @@ public:
virtual bool deserialize(const QByteArray& data);
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::SDRPlayV3Gui* ui;

View File

@ -22,7 +22,6 @@
#include <QString>
#include <QFileDialog>
#include <QMessageBox>
#include <QResizeEvent>
#include "ui_sigmffileinputgui.h"
#include "plugin/pluginapi.h"
@ -66,7 +65,7 @@ SigMFFileInputGUI::SigMFFileInputGUI(DeviceUISet *deviceUISet, QWidget* parent)
m_helpURL = "plugins/samplesource/sigmffileinput/readme.md";
QWidget *contents = getContents();
ui->setupUi(contents);
setSizePolicy(contents->sizePolicy());
sizeToContents();
contents->setStyleSheet("#SigMFFileInputGUI { background-color: rgb(64, 64, 64); }");
ui->fileNameText->setText(m_metaFileName);

View File

@ -22,7 +22,6 @@
#include <QString>
#include <QMessageBox>
#include <QFileDialog>
#include <QResizeEvent>
#include "ui_testsourcegui.h"
#include "plugin/pluginapi.h"
@ -55,7 +54,7 @@ TestSourceGui::TestSourceGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_sampleSource = m_deviceUISet->m_deviceAPI->getSampleSource();
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizeToContents();
getContents()->setStyleSheet("#TestSourceGui { background-color: rgb(64, 64, 64); }");
m_helpURL = "plugins/samplesource/testsource/readme.md";
ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
@ -120,12 +119,6 @@ bool TestSourceGui::deserialize(const QByteArray& data)
}
}
void TestSourceGui::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
void TestSourceGui::on_startStop_toggled(bool checked)
{
if (m_doApplySettings)

View File

@ -46,9 +46,6 @@ public:
bool deserialize(const QByteArray& data);
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::TestSourceGui* ui;

View File

@ -24,7 +24,7 @@
</property>
<property name="maximumSize">
<size>
<width>386</width>
<width>380</width>
<height>343</height>
</size>
</property>

View File

@ -21,7 +21,6 @@
#include <QDebug>
#include <QMessageBox>
#include <QFileDialog>
#include <QResizeEvent>
#include <algorithm>
@ -51,7 +50,7 @@ USRPInputGUI::USRPInputGUI(DeviceUISet *deviceUISet, QWidget* parent) :
m_usrpInput = (USRPInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizeToContents();
getContents()->setStyleSheet("#USRPInputGUI { background-color: rgb(64, 64, 64); }");
m_helpURL = "plugins/samplesource/usrpinput/readme.md";
@ -157,12 +156,6 @@ bool USRPInputGUI::deserialize(const QByteArray& data)
}
}
void USRPInputGUI::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
bool USRPInputGUI::handleMessage(const Message& message)
{
if (USRPInput::MsgConfigureUSRP::match(message))

View File

@ -51,9 +51,6 @@ public:
bool deserialize(const QByteArray& data);
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::USRPInputGUI* ui;

View File

@ -21,7 +21,6 @@
#include <QDebug>
#include <QMessageBox>
#include <QFileDialog>
#include <QResizeEvent>
#include <algorithm>
@ -51,7 +50,7 @@ XTRXInputGUI::XTRXInputGUI(DeviceUISet *deviceUISet, QWidget* parent) :
m_XTRXInput = (XTRXInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizeToContents();
getContents()->setStyleSheet("#XTRXInputGUI { background-color: rgb(64, 64, 64); }");
m_helpURL = "plugins/samplesource/xtrxinput/readme.md";
@ -126,12 +125,6 @@ bool XTRXInputGUI::deserialize(const QByteArray& data)
}
}
void XTRXInputGUI::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
bool XTRXInputGUI::handleMessage(const Message& message)
{

View File

@ -46,9 +46,6 @@ public:
bool deserialize(const QByteArray& data);
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::XTRXInputGUI* ui;

View File

@ -111,6 +111,12 @@ DeviceGUI::DeviceGUI(QWidget *parent) :
m_shrinkButton->setIcon(shrinkIcon);
m_shrinkButton->setToolTip("Adjust window to minimum size");
m_maximizeButton = new QPushButton();
m_maximizeButton->setFixedSize(20, 20);
QIcon maximizeIcon(":/maximize.png");
m_maximizeButton->setIcon(maximizeIcon);
m_maximizeButton->setToolTip("Adjust window to maximum size");
m_closeButton = new QPushButton();
m_closeButton->setFixedSize(20, 20);
QIcon closeIcon(":/cross.png");
@ -153,6 +159,7 @@ DeviceGUI::DeviceGUI(QWidget *parent) :
m_topLayout->addWidget(m_helpButton);
m_topLayout->addWidget(m_moveButton);
m_topLayout->addWidget(m_shrinkButton);
m_topLayout->addWidget(m_maximizeButton);
m_topLayout->addWidget(m_closeButton);
m_centerLayout = new QHBoxLayout();
@ -186,6 +193,7 @@ DeviceGUI::DeviceGUI(QWidget *parent) :
connect(m_helpButton, SIGNAL(clicked()), this, SLOT(showHelp()));
connect(m_moveButton, SIGNAL(clicked()), this, SLOT(openMoveToWorkspaceDialog()));
connect(m_shrinkButton, SIGNAL(clicked()), this, SLOT(shrinkWindow()));
connect(m_maximizeButton, SIGNAL(clicked()), this, SLOT(maximizeWindow()));
connect(this, SIGNAL(forceShrink()), this, SLOT(shrinkWindow()));
connect(m_closeButton, SIGNAL(clicked()), this, SLOT(close()));
connect(m_showSpectrumButton, SIGNAL(clicked()), this, SLOT(showSpectrumHandler()));
@ -214,6 +222,7 @@ DeviceGUI::~DeviceGUI()
delete m_statusLabel;
delete m_closeButton;
delete m_shrinkButton;
delete m_maximizeButton;
delete m_moveButton;
delete m_helpButton;
delete m_titleLabel;
@ -226,6 +235,37 @@ DeviceGUI::~DeviceGUI()
qDebug("DeviceGUI::~DeviceGUI: end");
}
// Size the window according to the size of the m_contents widget
// This allows the window min/max size and size policy to be set by the .ui file
void DeviceGUI::sizeToContents()
{
// Set window size policy to the size policy of m_contents widget
QSizePolicy policy = getContents()->sizePolicy();
setSizePolicy(policy);
// If size policy is fixed, hide widgets that resize the window
if ((policy.verticalPolicy() == QSizePolicy::Fixed) && (policy.horizontalPolicy() == QSizePolicy::Fixed))
{
m_shrinkButton->hide();
m_maximizeButton->hide();
// The resize grip can magically reappear after being maximized, so delete it, to prevent this
delete m_sizeGripBottomRight;
m_sizeGripBottomRight = nullptr;
}
// Calculate min/max size for window. This is min/max size of contents, plus
// extra needed for window frame and title bar
QSize size;
size = getContents()->maximumSize();
size.setHeight(std::min(size.height() + getAdditionalHeight(), QWIDGETSIZE_MAX));
size.setWidth(std::min(size.width() + m_resizer.m_gripSize * 2, QWIDGETSIZE_MAX));
setMaximumSize(size);
size = getContents()->minimumSize();
size.setHeight(std::min(size.height() + getAdditionalHeight(), QWIDGETSIZE_MAX));
size.setWidth(std::min(size.width() + m_resizer.m_gripSize * 2, QWIDGETSIZE_MAX));
setMinimumSize(size);
}
void DeviceGUI::setWorkspaceIndex(int index)
{
m_workspaceIndex = index;
@ -352,9 +392,15 @@ void DeviceGUI::showAllChannelsHandler()
void DeviceGUI::shrinkWindow()
{
qDebug("DeviceGUI::shrinkWindow");
showNormal(); // In case it had been maximized
adjustSize();
}
void DeviceGUI::maximizeWindow()
{
showMaximized();
}
void DeviceGUI::deviceSetPresetsDialog()
{
QPoint p = mapFromGlobal(QCursor::pos());

View File

@ -68,6 +68,7 @@ public:
virtual MessageQueue* getInputMessageQueue() = 0;
QWidget *getContents() { return m_contents; }
void sizeToContents();
void setDeviceType(DeviceType type);
DeviceType getDeviceType() const { return m_deviceType; }
void setTitle(const QString& title);
@ -97,6 +98,7 @@ protected:
protected slots:
void shrinkWindow();
void maximizeWindow();
private:
bool isOnMovingPad();
@ -113,6 +115,7 @@ private:
QPushButton *m_helpButton;
QPushButton *m_moveButton;
QPushButton *m_shrinkButton;
QPushButton *m_maximizeButton;
QPushButton *m_closeButton;
QPushButton *m_showSpectrumButton;
QPushButton *m_showAllChannelsButton;

View File

@ -444,6 +444,14 @@ void Workspace::stackSubWindows()
// Spacing between windows
const int spacing = 2;
// Shrink devices to minimum size, in case they have been maximized
for (auto window : devices)
{
QSize size = window->minimumSizeHint();
size.expandedTo(window->minimumSize());
window->resize(size);
}
// Calculate width and height needed for devices
int deviceMinWidth = 0;
int deviceTotalMinHeight = 0;

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -142,6 +142,7 @@
<file>dock.png</file>
<file>help.png</file>
<file>shrink.png</file>
<file>maximize.png</file>
<file>exit.png</file>
<file>hide.png</file>
<file>channels.png</file>