mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-08-14 07:23:38 -04:00
Massive UI revamping (v7): fixed widget size handling: sample sinks. Part of #1209
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
|
||||
#include <QDebug>
|
||||
#include <QMessageBox>
|
||||
#include <QResizeEvent>
|
||||
|
||||
#include "ui_usrpoutputgui.h"
|
||||
#include "gui/colormapper.h"
|
||||
@@ -46,6 +47,7 @@ USRPOutputGUI::USRPOutputGUI(DeviceUISet *deviceUISet, QWidget* parent) :
|
||||
m_usrpOutput = (USRPOutput*) m_deviceUISet->m_deviceAPI->getSampleSink();
|
||||
|
||||
ui->setupUi(getContents());
|
||||
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||
getContents()->setStyleSheet(QString(tr("#USRPOutputGUI { border: 1px solid %1 }")
|
||||
.arg(palette().highlight().color().darker(115).name())));
|
||||
m_helpURL = "plugins/samplesink/usrpoutput/readme.md";
|
||||
@@ -151,6 +153,12 @@ bool USRPOutputGUI::deserialize(const QByteArray& data)
|
||||
}
|
||||
}
|
||||
|
||||
void USRPOutputGUI::resizeEvent(QResizeEvent* size)
|
||||
{
|
||||
adjustSize();
|
||||
size->accept();
|
||||
}
|
||||
|
||||
void USRPOutputGUI::updateFrequencyLimits()
|
||||
{
|
||||
// values in kHz
|
||||
|
||||
@@ -53,6 +53,9 @@ public:
|
||||
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
|
||||
virtual bool handleMessage(const Message& message);
|
||||
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent* size);
|
||||
|
||||
private:
|
||||
Ui::USRPOutputGUI* ui;
|
||||
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>360</width>
|
||||
<height>214</height>
|
||||
<height>163</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>163</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>360</width>
|
||||
<height>163</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
@@ -708,6 +714,11 @@
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>ButtonSwitch</class>
|
||||
<extends>QToolButton</extends>
|
||||
<header>gui/buttonswitch.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>ValueDial</class>
|
||||
<extends>QWidget</extends>
|
||||
@@ -715,21 +726,16 @@
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>ButtonSwitch</class>
|
||||
<extends>QToolButton</extends>
|
||||
<header>gui/buttonswitch.h</header>
|
||||
<class>ValueDialZ</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>gui/valuedialz.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>TransverterButton</class>
|
||||
<extends>QPushButton</extends>
|
||||
<header>gui/transverterbutton.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>ValueDialZ</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>gui/valuedialz.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../../../sdrgui/resources/res.qrc"/>
|
||||
|
||||
Reference in New Issue
Block a user