1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-01 21:54:55 -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
@@ -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)
@@ -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;
@@ -24,7 +24,7 @@
</property>
<property name="maximumSize">
<size>
<width>386</width>
<width>380</width>
<height>343</height>
</size>
</property>