1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-01 13:47:01 -04:00

Massive UI revamping (v7): fixed widget size handling: sample sources. Part ofs #1209

This commit is contained in:
f4exb
2022-04-21 07:53:36 +02:00
parent 62ca8f8b29
commit 90d331675a
69 changed files with 695 additions and 225 deletions
@@ -20,6 +20,7 @@
#include <QDebug>
#include <QMessageBox>
#include <QFileDialog>
#include <QResizeEvent>
#include <libhackrf/hackrf.h>
@@ -49,6 +50,7 @@ HackRFInputGui::HackRFInputGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_sampleSource = (HackRFInput*) m_deviceUISet->m_deviceAPI->getSampleSource();
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
getContents()->setStyleSheet(QString(tr("#HackRFInputGui { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesource/hackrfinput/readme.md";
@@ -114,6 +116,12 @@ 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))
@@ -55,6 +55,9 @@ public:
bool deserialize(const QByteArray& data);
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::HackRFInputGui* ui;
@@ -7,11 +7,11 @@
<x>0</x>
<y>0</y>
<width>360</width>
<height>272</height>
<height>230</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@@ -19,7 +19,13 @@
<property name="minimumSize">
<size>
<width>360</width>
<height>0</height>
<height>230</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>360</width>
<height>230</height>
</size>
</property>
<property name="font">
@@ -116,7 +122,7 @@
<property name="minimumSize">
<size>
<width>32</width>
<height>50</height>
<height>0</height>
</size>
</property>
<property name="font">
@@ -661,17 +667,17 @@
</layout>
</widget>
<customwidgets>
<customwidget>
<class>ButtonSwitch</class>
<extends>QToolButton</extends>
<header>gui/buttonswitch.h</header>
</customwidget>
<customwidget>
<class>ValueDial</class>
<extends>QWidget</extends>
<header>gui/valuedial.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>ButtonSwitch</class>
<extends>QToolButton</extends>
<header>gui/buttonswitch.h</header>
</customwidget>
<customwidget>
<class>TransverterButton</class>
<extends>QPushButton</extends>