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
@@ -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;
@@ -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;