1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-07-17 08:14:07 -04:00

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

This commit is contained in:
f4exb
2022-04-21 21:44:57 +02:00
parent f3f504c88d
commit 5a265d7fe3
20 changed files with 187 additions and 66 deletions
+8
View File
@@ -22,6 +22,7 @@
#include <QString>
#include <QMessageBox>
#include <QFileDialog>
#include <QResizeEvent>
#include "plugin/pluginapi.h"
#include "device/deviceapi.h"
@@ -62,6 +63,7 @@ TestMIGui::TestMIGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_deviceSampleRates.push_back(m_settings.m_streams[1].m_sampleRate / (1<<m_settings.m_streams[1].m_log2Decim));
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
getContents()->setStyleSheet(QString(tr("#TestMIGui { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplemimo/testmi/readme.md";
@@ -124,6 +126,12 @@ bool TestMIGui::deserialize(const QByteArray& data)
}
}
void TestMIGui::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
void TestMIGui::on_startStop_toggled(bool checked)
{
if (m_doApplySettings)
+3
View File
@@ -46,6 +46,9 @@ public:
bool deserialize(const QByteArray& data);
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::TestMIGui* ui;
+16 -10
View File
@@ -6,20 +6,26 @@
<rect>
<x>0</x>
<y>0</y>
<width>360</width>
<height>368</height>
<width>370</width>
<height>297</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>360</width>
<height>0</height>
<width>370</width>
<height>297</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>370</width>
<height>297</height>
</size>
</property>
<property name="font">
@@ -1057,17 +1063,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>ValueDialZ</class>
<extends>QWidget</extends>