1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-25 17:28:50 -05:00

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

This commit is contained in:
f4exb 2022-04-21 19:24:40 +02:00
parent 90d331675a
commit f3f504c88d
39 changed files with 312 additions and 94 deletions

View File

@ -17,6 +17,7 @@
#include <QMessageBox>
#include <QFileDialog>
#include <QResizeEvent>
#include "ui_audiooutputgui.h"
#include "gui/colormapper.h"
@ -43,6 +44,7 @@ AudioOutputGui::AudioOutputGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_audioOutput = (AudioOutput*) m_deviceUISet->m_deviceAPI->getSampleSink();
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
getContents()->setStyleSheet(QString(tr("#AudioOutputGui { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesink/audiooutput/readme.md";
@ -100,6 +102,12 @@ bool AudioOutputGui::deserialize(const QByteArray& data)
}
}
void AudioOutputGui::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
bool AudioOutputGui::handleMessage(const Message& message)
{
if (AudioOutput::MsgConfigureAudioOutput::match(message))

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::AudioOutputGui* ui;

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>360</width>
<height>149</height>
<height>106</height>
</rect>
</property>
<property name="sizePolicy">
@ -19,7 +19,13 @@
<property name="minimumSize">
<size>
<width>360</width>
<height>0</height>
<height>106</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>360</width>
<height>106</height>
</size>
</property>
<property name="font">
@ -161,13 +167,6 @@
</property>
</widget>
</item>
<item>
<widget class="Line" name="line_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>

View File

@ -17,6 +17,7 @@
#include <QDebug>
#include <QMessageBox>
#include <QResizeEvent>
#include <libbladeRF.h>
@ -46,6 +47,7 @@ Bladerf1OutputGui::Bladerf1OutputGui(DeviceUISet *deviceUISet, QWidget* parent)
m_deviceSampleSink = (Bladerf1Output*) m_deviceUISet->m_deviceAPI->getSampleSink();
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
getContents()->setStyleSheet(QString(tr("#Bladerf1OutputGui { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "/plugins/samplesink/bladerf1output/readme.md"; ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
@ -108,6 +110,12 @@ bool Bladerf1OutputGui::deserialize(const QByteArray& data)
}
}
void Bladerf1OutputGui::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
bool Bladerf1OutputGui::handleMessage(const Message& message)
{
if (Bladerf1Output::MsgConfigureBladerf1::match(message))

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::Bladerf1OutputGui* ui;

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>360</width>
<height>214</height>
<height>159</height>
</rect>
</property>
<property name="sizePolicy">
@ -19,7 +19,13 @@
<property name="minimumSize">
<size>
<width>360</width>
<height>0</height>
<height>159</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>360</width>
<height>159</height>
</size>
</property>
<property name="font">
@ -551,17 +557,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>
</customwidgets>
<resources>
<include location="../../../sdrgui/resources/res.qrc"/>

View File

@ -17,6 +17,7 @@
#include <QDebug>
#include <QMessageBox>
#include <QResizeEvent>
#include <libbladeRF.h>
@ -49,6 +50,7 @@ BladeRF2OutputGui::BladeRF2OutputGui(DeviceUISet *deviceUISet, QWidget* parent)
uint64_t f_min, f_max;
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
getContents()->setStyleSheet(QString(tr("#BladeRF2OutputGui { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesink/bladerf2output/readme.md"; ui->centerFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
@ -123,6 +125,12 @@ bool BladeRF2OutputGui::deserialize(const QByteArray& data)
}
}
void BladeRF2OutputGui::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
void BladeRF2OutputGui::updateFrequencyLimits()
{
// values in kHz

View File

@ -47,6 +47,9 @@ public:
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
virtual bool handleMessage(const Message& message);
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::BladeRF2OutputGui* ui;

View File

@ -7,11 +7,11 @@
<x>0</x>
<y>0</y>
<width>360</width>
<height>202</height>
<height>165</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>165</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>360</width>
<height>165</height>
</size>
</property>
<property name="font">
@ -490,17 +496,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>

View File

@ -22,6 +22,7 @@
#include <QString>
#include <QFileDialog>
#include <QMessageBox>
#include <QResizeEvent>
#include "ui_fileoutputgui.h"
#include "plugin/pluginapi.h"
@ -54,6 +55,7 @@ FileOutputGui::FileOutputGui(DeviceUISet *deviceUISet, QWidget* parent) :
{
setAttribute(Qt::WA_DeleteOnClose, true);
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
getContents()->setStyleSheet(QString(tr("#FileOutputGui { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesink/fileoutput/readme.md";
@ -115,6 +117,12 @@ bool FileOutputGui::deserialize(const QByteArray& data)
}
}
void FileOutputGui::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
bool FileOutputGui::handleMessage(const Message& message)
{
if (FileOutput::MsgConfigureFileOutput::match(message))

View File

@ -48,6 +48,9 @@ public:
bool deserialize(const QByteArray& data);
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::FileOutputGui* ui;

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>360</width>
<height>144</height>
<height>106</height>
</rect>
</property>
<property name="sizePolicy">
@ -19,7 +19,13 @@
<property name="minimumSize">
<size>
<width>360</width>
<height>0</height>
<height>106</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>360</width>
<height>106</height>
</size>
</property>
<property name="font">
@ -367,17 +373,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>
</customwidgets>
<resources>
<include location="../../../sdrgui/resources/res.qrc"/>

View File

@ -17,6 +17,7 @@
#include <QDebug>
#include <QMessageBox>
#include <QResizeEvent>
#include <libhackrf/hackrf.h>
@ -48,6 +49,7 @@ HackRFOutputGui::HackRFOutputGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_deviceSampleSink = (HackRFOutput*) m_deviceUISet->m_deviceAPI->getSampleSink();
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
getContents()->setStyleSheet(QString(tr("#HackRFOutputGui { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesink/hackrfoutput/readme.md";
@ -109,6 +111,12 @@ bool HackRFOutputGui::deserialize(const QByteArray& data)
}
}
void HackRFOutputGui::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
void HackRFOutputGui::blockApplySettings(bool block)
{
m_doApplySettings = !block;

View File

@ -56,6 +56,9 @@ public:
bool deserialize(const QByteArray& data);
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::HackRFOutputGui* ui;

View File

@ -7,11 +7,11 @@
<x>0</x>
<y>0</y>
<width>360</width>
<height>207</height>
<height>151</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>151</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>360</width>
<height>151</height>
</size>
</property>
<property name="font">
@ -540,17 +546,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>

View File

@ -17,6 +17,7 @@
#include <QDebug>
#include <QMessageBox>
#include <QResizeEvent>
#include "ui_limesdroutputgui.h"
#include "gui/colormapper.h"
@ -45,6 +46,7 @@ LimeSDROutputGUI::LimeSDROutputGUI(DeviceUISet *deviceUISet, QWidget* parent) :
m_limeSDROutput = (LimeSDROutput*) m_deviceUISet->m_deviceAPI->getSampleSink();
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
getContents()->setStyleSheet(QString(tr("#LimeSDROutputGUI { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesink/limesdroutput/readme.md";
@ -136,6 +138,12 @@ bool LimeSDROutputGUI::deserialize(const QByteArray& data)
}
}
void LimeSDROutputGUI::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
void LimeSDROutputGUI::updateFrequencyLimits()
{
// values in kHz

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::LimeSDROutputGUI* ui;

View File

@ -7,11 +7,11 @@
<x>0</x>
<y>0</y>
<width>360</width>
<height>264</height>
<height>209</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>209</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>360</width>
<height>209</height>
</size>
</property>
<property name="font">
@ -928,6 +934,11 @@ QToolTip{background-color: white; color: black;}</string>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>ButtonSwitch</class>
<extends>QToolButton</extends>
<header>gui/buttonswitch.h</header>
</customwidget>
<customwidget>
<class>ValueDial</class>
<extends>QWidget</extends>
@ -935,21 +946,16 @@ QToolTip{background-color: white; color: black;}</string>
<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>
<customwidget>
<class>ExternalClockButton</class>
<extends>QToolButton</extends>

View File

@ -28,6 +28,7 @@
#include <QNetworkReply>
#include <QJsonParseError>
#include <QJsonObject>
#include <QResizeEvent>
#include "ui_localoutputgui.h"
#include "gui/colormapper.h"
@ -62,6 +63,7 @@ LocalOutputGui::LocalOutputGui(DeviceUISet *deviceUISet, QWidget* parent) :
m_paletteWhiteText.setColor(QPalette::WindowText, Qt::white);
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
getContents()->setStyleSheet(QString(tr("#LocalOutputGui { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesink/localoutput/readme.md";
@ -130,6 +132,12 @@ bool LocalOutputGui::deserialize(const QByteArray& data)
}
}
void LocalOutputGui::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
bool LocalOutputGui::handleMessage(const Message& message)
{
if (LocalOutput::MsgConfigureLocalOutput::match(message))

View File

@ -47,6 +47,9 @@ public:
bool deserialize(const QByteArray& data);
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::LocalOutputGui* ui;

View File

@ -7,13 +7,25 @@
<x>0</x>
<y>0</y>
<width>360</width>
<height>68</height>
<height>47</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>360</width>
<height>0</height>
<height>47</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>360</width>
<height>47</height>
</size>
</property>
<property name="font">

View File

@ -18,6 +18,7 @@
#include <stdio.h>
#include <QDebug>
#include <QMessageBox>
#include <QResizeEvent>
#include "dsp/dspengine.h"
#include "dsp/dspcommands.h"
@ -48,6 +49,7 @@ PlutoSDROutputGUI::PlutoSDROutputGUI(DeviceUISet *deviceUISet, QWidget* parent)
m_sampleSink = (PlutoSDROutput*) m_deviceUISet->m_deviceAPI->getSampleSink();
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
getContents()->setStyleSheet(QString(tr("#PlutoSDROutputGUI { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesink/plutosdroutput/readme.md";
@ -120,6 +122,12 @@ bool PlutoSDROutputGUI::deserialize(const QByteArray& data)
}
}
void PlutoSDROutputGUI::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
bool PlutoSDROutputGUI::handleMessage(const Message& message)
{
(void) message;

View File

@ -48,6 +48,9 @@ public:
virtual bool deserialize(const QByteArray& data);
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::PlutoSDROutputGUI* ui;
DeviceUISet* m_deviceUISet;

View File

@ -7,11 +7,11 @@
<x>0</x>
<y>0</y>
<width>360</width>
<height>250</height>
<height>197</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>197</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>360</width>
<height>197</height>
</size>
</property>
<property name="font">
@ -769,17 +775,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>

View File

@ -20,6 +20,7 @@
#include <QDateTime>
#include <QString>
#include <QMessageBox>
#include <QResizeEvent>
#include <boost/algorithm/string.hpp>
#include <boost/lexical_cast.hpp>
@ -67,6 +68,7 @@ RemoteOutputSinkGui::RemoteOutputSinkGui(DeviceUISet *deviceUISet, QWidget* pare
m_paletteWhiteText.setColor(QPalette::WindowText, Qt::white);
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
getContents()->setStyleSheet(QString(tr("#RemoteOutputGui { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesink/remoteoutput/readme.md";
@ -141,6 +143,12 @@ bool RemoteOutputSinkGui::deserialize(const QByteArray& data)
}
}
void RemoteOutputSinkGui::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
bool RemoteOutputSinkGui::handleMessage(const Message& message)
{
if (RemoteOutput::MsgConfigureRemoteOutput::match(message))

View File

@ -78,6 +78,9 @@ public:
bool deserialize(const QByteArray& data);
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::RemoteOutputGui* ui;

View File

@ -9,20 +9,26 @@
<rect>
<x>0</x>
<y>0</y>
<width>360</width>
<height>284</height>
<width>380</width>
<height>231</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>380</width>
<height>231</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>380</width>
<height>231</height>
</size>
</property>
<property name="font">

View File

@ -17,6 +17,7 @@
#include <QMessageBox>
#include <QCheckBox>
#include <QResizeEvent>
#include "dsp/dspengine.h"
#include "dsp/dspcommands.h"
@ -59,6 +60,7 @@ SoapySDROutputGui::SoapySDROutputGui(DeviceUISet *deviceUISet, QWidget* parent)
setAttribute(Qt::WA_DeleteOnClose, true);
m_sampleSink = (SoapySDROutput*) m_deviceUISet->m_deviceAPI->getSampleSink();
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);
getContents()->setStyleSheet(QString(tr("#SoapySDROutputGui { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesink/soapysdroutput/readme.md";
@ -443,6 +445,11 @@ bool SoapySDROutputGui::deserialize(const QByteArray& data)
}
}
void SoapySDROutputGui::resizeEvent(QResizeEvent* size)
{
resize(360, height());
size->accept();
}
bool SoapySDROutputGui::handleMessage(const Message& message)
{

View File

@ -54,6 +54,9 @@ public:
virtual bool deserialize(const QByteArray& data);
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
protected:
void resizeEvent(QResizeEvent* size);
private:
void createRangesControl(
ItemSettingGUI **settingGUI,

View File

@ -10,10 +10,16 @@
<height>236</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>360</width>
<height>0</height>
<height>236</height>
</size>
</property>
<property name="font">
@ -301,6 +307,18 @@
</item>
<item>
<widget class="QScrollArea" name="scrollArea">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>356</width>
<height>0</height>
</size>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
@ -336,17 +354,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>

View File

@ -51,6 +51,8 @@ TestSinkGui::TestSinkGui(DeviceUISet *deviceUISet, QWidget* parent) :
{
setAttribute(Qt::WA_DeleteOnClose, true);
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
setMinimumSize(m_MinimumWidth, m_MinimumHeight);
getContents()->setStyleSheet(QString(tr("#TestSinkGui { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesink/testsink/readme.md";

View File

@ -67,6 +67,8 @@ private:
int m_lastEngineState;
MessageQueue m_inputMessageQueue;
SpectrumVis* m_spectrumVis;
static const int m_MinimumWidth = 360;
static const int m_MinimumHeight = 200 + 20 + 10 + 4*22 + 5;
void blockApplySettings(bool block) { m_doApplySettings = !block; }
void displaySettings();

View File

@ -11,7 +11,7 @@
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -316,7 +316,7 @@
<item>
<widget class="GLSpectrumGUI" name="spectrumGUI" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>

View File

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

View File

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

View File

@ -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"/>

View File

@ -19,6 +19,7 @@
#include <QDebug>
#include <QMessageBox>
#include <QResizeEvent>
#include "ui_xtrxoutputgui.h"
#include "gui/colormapper.h"
@ -47,6 +48,7 @@ XTRXOutputGUI::XTRXOutputGUI(DeviceUISet *deviceUISet, QWidget* parent) :
m_XTRXOutput = (XTRXOutput*) m_deviceUISet->m_deviceAPI->getSampleSink();
ui->setupUi(getContents());
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
getContents()->setStyleSheet(QString(tr("#XTRXOutputGUI { border: 1px solid %1 }")
.arg(palette().highlight().color().darker(115).name())));
m_helpURL = "plugins/samplesink/xtrxoutput/readme.md";
@ -119,6 +121,12 @@ bool XTRXOutputGUI::deserialize(const QByteArray& data)
}
}
void XTRXOutputGUI::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
bool XTRXOutputGUI::handleMessage(const Message& message)
{

View File

@ -45,6 +45,9 @@ public:
bool deserialize(const QByteArray& data);
virtual MessageQueue *getInputMessageQueue() { return &m_inputMessageQueue; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::XTRXOutputGUI* ui;

View File

@ -7,11 +7,11 @@
<x>0</x>
<y>0</y>
<width>360</width>
<height>264</height>
<height>207</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>207</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>360</width>
<height>207</height>
</size>
</property>
<property name="font">
@ -880,17 +886,17 @@ QToolTip{background-color: white; color: black;}</string>
</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>