1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-01 13:47:01 -04: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
@@ -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;
@@ -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;