Massive UI revamping (v7): Fixed sizing of channel windows. Part of #1209

This commit is contained in:
f4exb 2022-04-24 12:28:56 +02:00
parent e285be84ff
commit 360b8a9753
77 changed files with 1146 additions and 440 deletions

View File

@ -16,6 +16,7 @@
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#include <QLocale> #include <QLocale>
#include <QResizeEvent>
#include "device/deviceuiset.h" #include "device/deviceuiset.h"
#include "gui/basicchannelsettingsdialog.h" #include "gui/basicchannelsettingsdialog.h"
@ -61,6 +62,14 @@ bool BeamSteeringCWModGUI::deserialize(const QByteArray& data)
} }
} }
void BeamSteeringCWModGUI::resizeEvent(QResizeEvent* size)
{
int maxWidth = getRollupContents()->maximumWidth();
int minHeight = getRollupContents()->minimumHeight() + getAdditionalHeight();
resize(width() < maxWidth ? width() : maxWidth, minHeight);
size->accept();
}
bool BeamSteeringCWModGUI::handleMessage(const Message& message) bool BeamSteeringCWModGUI::handleMessage(const Message& message)
{ {
if (BeamSteeringCWMod::MsgBasebandNotification::match(message)) if (BeamSteeringCWMod::MsgBasebandNotification::match(message))
@ -96,11 +105,13 @@ BeamSteeringCWModGUI::BeamSteeringCWModGUI(PluginAPI* pluginAPI, DeviceUISet *de
m_centerFrequency(435000000), m_centerFrequency(435000000),
m_tickCount(0) m_tickCount(0)
{ {
ui->setupUi(getRollupContents());
getRollupContents()->arrangeRollups();
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
m_helpURL = "plugins/channelmimo/beamSteeringcwmod/readme.md";
connect(getRollupContents(), SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool))); RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
m_bsCWSource = (BeamSteeringCWMod*) mimoChannel; m_bsCWSource = (BeamSteeringCWMod*) mimoChannel;

View File

@ -93,6 +93,9 @@ private:
void applyInterpolation(); void applyInterpolation();
void applyPosition(); void applyPosition();
protected:
void resizeEvent(QResizeEvent* size);
private slots: private slots:
void handleSourceMessages(); void handleSourceMessages();
void on_channelOutput_currentIndexChanged(int index); void on_channelOutput_currentIndexChanged(int index);

View File

@ -106,11 +106,13 @@ InterferometerGUI::InterferometerGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUI
m_centerFrequency(435000000), m_centerFrequency(435000000),
m_tickCount(0) m_tickCount(0)
{ {
ui->setupUi(getRollupContents());
getRollupContents()->arrangeRollups();
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
m_helpURL = "plugins/channelmimo/interferometer/readme.md";
connect(getRollupContents(), SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool))); RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
m_interferometer = (Interferometer*) channelMIMO; m_interferometer = (Interferometer*) channelMIMO;
@ -248,7 +250,18 @@ void InterferometerGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget; (void) widget;
(void) rollDown; (void) rollDown;
getRollupContents()->saveState(m_rollupState); RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
resize(width(), h);
rollupContents->saveState(m_rollupState);
applySettings(); applySettings();
} }

View File

@ -458,7 +458,18 @@ void ChannelAnalyzerGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget; (void) widget;
(void) rollDown; (void) rollDown;
getRollupContents()->saveState(m_rollupState); RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
resize(width(), h);
rollupContents->saveState(m_rollupState);
applySettings(); applySettings();
} }
@ -518,12 +529,13 @@ ChannelAnalyzerGUI::ChannelAnalyzerGUI(PluginAPI* pluginAPI, DeviceUISet *device
m_doApplySettings(true), m_doApplySettings(true),
m_basebandSampleRate(48000) m_basebandSampleRate(48000)
{ {
ui->setupUi(getRollupContents());
getRollupContents()->arrangeRollups();
m_helpURL = "plugins/channelrx/chanalyzer/readme.md";
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
m_helpURL = "plugins/channelrx/chanalyzer/readme.md";
connect(getRollupContents(), SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool))); RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
m_channelAnalyzer = (ChannelAnalyzer*) rxChannel; m_channelAnalyzer = (ChannelAnalyzer*) rxChannel;

View File

@ -2765,7 +2765,18 @@ void ADSBDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget; (void) widget;
(void) rollDown; (void) rollDown;
getRollupContents()->saveState(m_rollupState); RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
resize(width(), h);
rollupContents->saveState(m_rollupState);
applySettings(); applySettings();
} }
@ -3694,9 +3705,13 @@ ADSBDemodGUI::ADSBDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseb
m_highlightAircraft(nullptr), m_highlightAircraft(nullptr),
m_progressDialog(nullptr) m_progressDialog(nullptr)
{ {
ui->setupUi(getRollupContents()); setAttribute(Qt::WA_DeleteOnClose, true);
getRollupContents()->arrangeRollups();
m_helpURL = "plugins/channelrx/demodadsb/readme.md"; m_helpURL = "plugins/channelrx/demodadsb/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
m_osmPort = 0; // Pick a free port m_osmPort = 0; // Pick a free port
m_templateServer = new ADSBOSMTemplateServer("q2RVNAe3eFKCH4XsrE3r", m_osmPort); m_templateServer = new ADSBOSMTemplateServer("q2RVNAe3eFKCH4XsrE3r", m_osmPort);
@ -3707,9 +3722,6 @@ ADSBDemodGUI::ADSBDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseb
ui->map->rootContext()->setContextProperty("navAidModel", &m_navAidModel); ui->map->rootContext()->setContextProperty("navAidModel", &m_navAidModel);
ui->map->setSource(QUrl(QStringLiteral("qrc:/map/map.qml"))); ui->map->setSource(QUrl(QStringLiteral("qrc:/map/map.qml")));
setAttribute(Qt::WA_DeleteOnClose, true);
connect(getRollupContents(), SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
connect(&m_dlm, &HttpDownloadManager::downloadComplete, this, &ADSBDemodGUI::downloadFinished); connect(&m_dlm, &HttpDownloadManager::downloadComplete, this, &ADSBDemodGUI::downloadFinished);

View File

@ -382,7 +382,18 @@ void AISDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
} }
} }
getRollupContents()->saveState(m_rollupState); RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
resize(width(), h);
rollupContents->saveState(m_rollupState);
applySettings(); applySettings();
} }
@ -444,12 +455,13 @@ AISDemodGUI::AISDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban
m_doApplySettings(true), m_doApplySettings(true),
m_tickCount(0) m_tickCount(0)
{ {
ui->setupUi(getRollupContents());
getRollupContents()->arrangeRollups();
m_helpURL = "plugins/channelrx/demodais/readme.md";
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
connect(getRollupContents(), SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool))); m_helpURL = "plugins/channelrx/demodais/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
m_aisDemod = reinterpret_cast<AISDemod*>(rxChannel); m_aisDemod = reinterpret_cast<AISDemod*>(rxChannel);

View File

@ -542,7 +542,18 @@ void APTDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget; (void) widget;
(void) rollDown; (void) rollDown;
getRollupContents()->saveState(m_rollupState); RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
resize(width(), h);
rollupContents->saveState(m_rollupState);
applySettings(); applySettings();
} }
@ -605,12 +616,13 @@ APTDemodGUI::APTDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban
m_scene(nullptr), m_scene(nullptr),
m_pixmapItem(nullptr) m_pixmapItem(nullptr)
{ {
ui->setupUi(getRollupContents());
getRollupContents()->arrangeRollups();
m_helpURL = "plugins/channelrx/demodapt/readme.md";
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
connect(getRollupContents(), SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool))); m_helpURL = "plugins/channelrx/demodapt/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
m_aptDemod = reinterpret_cast<APTDemod*>(rxChannel); m_aptDemod = reinterpret_cast<APTDemod*>(rxChannel);

View File

@ -18,6 +18,7 @@
#include <QDockWidget> #include <QDockWidget>
#include <QMainWindow> #include <QMainWindow>
#include <QResizeEvent>
#include "atvdemodgui.h" #include "atvdemodgui.h"
@ -76,6 +77,14 @@ bool ATVDemodGUI::deserialize(const QByteArray& data)
} }
} }
void ATVDemodGUI::resizeEvent(QResizeEvent* size)
{
int maxWidth = getRollupContents()->maximumWidth();
int minHeight = getRollupContents()->minimumHeight() + getAdditionalHeight();
resize(width() < maxWidth ? width() : maxWidth, minHeight);
size->accept();
}
void ATVDemodGUI::displaySettings() void ATVDemodGUI::displaySettings()
{ {
m_channelMarker.blockSignals(true); m_channelMarker.blockSignals(true);
@ -268,11 +277,13 @@ ATVDemodGUI::ATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet, Base
m_intTickCount(0), m_intTickCount(0),
m_basebandSampleRate(48000) m_basebandSampleRate(48000)
{ {
ui->setupUi(getRollupContents());
getRollupContents()->arrangeRollups();
m_helpURL = "plugins/channelrx/demodatv/readme.md";
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
connect(getRollupContents(), SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool))); m_helpURL = "plugins/channelrx/demodatv/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
m_atvDemod = (ATVDemod*) rxChannel; m_atvDemod = (ATVDemod*) rxChannel;

View File

@ -66,6 +66,9 @@ public slots:
void channelMarkerChangedByCursor(); void channelMarkerChangedByCursor();
void channelMarkerHighlightedByCursor(); void channelMarkerHighlightedByCursor();
protected:
void resizeEvent(QResizeEvent* size);
private: private:
Ui::ATVDemodGUI* ui; Ui::ATVDemodGUI* ui;
PluginAPI* m_pluginAPI; PluginAPI* m_pluginAPI;

View File

@ -316,7 +316,18 @@ void BFMDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget; (void) widget;
(void) rollDown; (void) rollDown;
getRollupContents()->saveState(m_rollupState); RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
resize(width(), h);
rollupContents->saveState(m_rollupState);
applySettings(); applySettings();
} }
@ -379,9 +390,14 @@ BFMDemodGUI::BFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban
m_radiotext_AB_flag(false), m_radiotext_AB_flag(false),
m_rate(625000) m_rate(625000)
{ {
ui->setupUi(getRollupContents()); setAttribute(Qt::WA_DeleteOnClose, true);
getRollupContents()->arrangeRollups();
m_helpURL = "plugins/channelrx/demodbfm/readme.md"; m_helpURL = "plugins/channelrx/demodbfm/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
ui->deltaFrequencyLabel->setText(QString("%1f").arg(QChar(0x94, 0x03))); ui->deltaFrequencyLabel->setText(QString("%1f").arg(QChar(0x94, 0x03)));
ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold)); ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
ui->deltaFrequency->setValueRange(false, 8, -99999999, 99999999); ui->deltaFrequency->setValueRange(false, 8, -99999999, 99999999);
@ -390,8 +406,6 @@ BFMDemodGUI::BFMDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban
CRightClickEnabler *audioMuteRightClickEnabler = new CRightClickEnabler(ui->audioStereo); CRightClickEnabler *audioMuteRightClickEnabler = new CRightClickEnabler(ui->audioStereo);
connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect())); connect(audioMuteRightClickEnabler, SIGNAL(rightClick(const QPoint &)), this, SLOT(audioSelect()));
setAttribute(Qt::WA_DeleteOnClose, true);
connect(getRollupContents(), SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages())); connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()));

View File

@ -329,7 +329,18 @@ void ChirpChatDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget; (void) widget;
(void) rollDown; (void) rollDown;
getRollupContents()->saveState(m_rollupState); RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
resize(width(), h);
rollupContents->saveState(m_rollupState);
applySettings(); applySettings();
} }
@ -391,11 +402,13 @@ ChirpChatDemodGUI::ChirpChatDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUI
m_doApplySettings(true), m_doApplySettings(true),
m_tickCount(0) m_tickCount(0)
{ {
ui->setupUi(getRollupContents());
getRollupContents()->arrangeRollups();
m_helpURL = "plugins/channelrx/demodchirpchat/readme.md";
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
connect(getRollupContents(), SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool))); m_helpURL = "plugins/channelrx/demodchirpchat/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
m_chirpChatDemod = (ChirpChatDemod*) rxChannel; m_chirpChatDemod = (ChirpChatDemod*) rxChannel;

View File

@ -392,7 +392,18 @@ void DABDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget; (void) widget;
(void) rollDown; (void) rollDown;
getRollupContents()->saveState(m_rollupState); RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
resize(width(), h);
rollupContents->saveState(m_rollupState);
applySettings(); applySettings();
} }
@ -454,12 +465,13 @@ DABDemodGUI::DABDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban
m_tickCount(0), m_tickCount(0),
m_channelFreq(0.0) m_channelFreq(0.0)
{ {
ui->setupUi(getRollupContents());
getRollupContents()->arrangeRollups();
m_helpURL = "plugins/channelrx/demoddab/readme.md";
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
connect(getRollupContents(), SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool))); m_helpURL = "plugins/channelrx/demoddab/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
m_dabDemod = reinterpret_cast<DABDemod*>(rxChannel); m_dabDemod = reinterpret_cast<DABDemod*>(rxChannel);

View File

@ -20,6 +20,7 @@
#include <QDockWidget> #include <QDockWidget>
#include <QMainWindow> #include <QMainWindow>
#include <QMediaMetaData> #include <QMediaMetaData>
#include <QResizeEvent>
#include "device/deviceuiset.h" #include "device/deviceuiset.h"
#include "dsp/dspengine.h" #include "dsp/dspengine.h"
@ -80,6 +81,14 @@ bool DATVDemodGUI::deserialize(const QByteArray& arrData)
} }
} }
void DATVDemodGUI::resizeEvent(QResizeEvent* size)
{
int maxWidth = getRollupContents()->maximumWidth();
int minHeight = getRollupContents()->minimumHeight() + getAdditionalHeight();
resize(width() < maxWidth ? width() : maxWidth, minHeight);
size->accept();
}
bool DATVDemodGUI::handleMessage(const Message& message) bool DATVDemodGUI::handleMessage(const Message& message)
{ {
if (DATVDemodReport::MsgReportModcodCstlnChange::match(message)) if (DATVDemodReport::MsgReportModcodCstlnChange::match(message))
@ -213,13 +222,17 @@ DATVDemodGUI::DATVDemodGUI(PluginAPI* objPluginAPI, DeviceUISet *deviceUISet, Ba
m_modcodCodeRateIndex(-1), m_modcodCodeRateIndex(-1),
m_cstlnSetByModcod(false) m_cstlnSetByModcod(false)
{ {
ui->setupUi(getRollupContents()); setAttribute(Qt::WA_DeleteOnClose, true);
getRollupContents()->arrangeRollups();
m_helpURL = "plugins/channelrx/demoddatv/readme.md"; m_helpURL = "plugins/channelrx/demoddatv/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
ui->screenTV->setColor(true); ui->screenTV->setColor(true);
ui->screenTV->resizeTVScreen(256,256); ui->screenTV->resizeTVScreen(256,256);
setAttribute(Qt::WA_DeleteOnClose, true);
connect(getRollupContents(), SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages())); connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()));

View File

@ -65,6 +65,9 @@ public:
static const char* const m_strChannelID; static const char* const m_strChannelID;
protected:
void resizeEvent(QResizeEvent* size);
private slots: private slots:
void channelMarkerChangedByCursor(); void channelMarkerChangedByCursor();
void channelMarkerHighlightedByCursor(); void channelMarkerHighlightedByCursor();

View File

@ -248,7 +248,18 @@ void FreeDVDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget; (void) widget;
(void) rollDown; (void) rollDown;
getRollupContents()->saveState(m_rollupState); RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
resize(width(), h);
rollupContents->saveState(m_rollupState);
applySettings(); applySettings();
} }
@ -268,11 +279,13 @@ FreeDVDemodGUI::FreeDVDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, B
m_squelchOpen(false), m_squelchOpen(false),
m_audioSampleRate(-1) m_audioSampleRate(-1)
{ {
ui->setupUi(getRollupContents());
getRollupContents()->arrangeRollups();
m_helpURL = "plugins/channelrx/demodfreedv/readme.md";
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
connect(getRollupContents(), SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool))); m_helpURL = "plugins/channelrx/demodfreedv/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
m_freeDVDemod = (FreeDVDemod*) rxChannel; m_freeDVDemod = (FreeDVDemod*) rxChannel;

View File

@ -374,7 +374,18 @@ void PacketDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget; (void) widget;
(void) rollDown; (void) rollDown;
getRollupContents()->saveState(m_rollupState); RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
resize(width(), h);
rollupContents->saveState(m_rollupState);
applySettings(); applySettings();
} }
@ -435,12 +446,13 @@ PacketDemodGUI::PacketDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, B
m_doApplySettings(true), m_doApplySettings(true),
m_tickCount(0) m_tickCount(0)
{ {
ui->setupUi(getRollupContents());
getRollupContents()->arrangeRollups();
m_helpURL = "plugins/channelrx/demodpacket/readme.md";
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
connect(getRollupContents(), SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool))); m_helpURL = "plugins/channelrx/demodpacket/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
m_packetDemod = reinterpret_cast<PacketDemod*>(rxChannel); m_packetDemod = reinterpret_cast<PacketDemod*>(rxChannel);

View File

@ -431,7 +431,18 @@ void PagerDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
} }
} }
getRollupContents()->saveState(m_rollupState); RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
resize(width(), h);
rollupContents->saveState(m_rollupState);
applySettings(); applySettings();
} }
@ -493,12 +504,13 @@ PagerDemodGUI::PagerDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Bas
m_doApplySettings(true), m_doApplySettings(true),
m_tickCount(0) m_tickCount(0)
{ {
ui->setupUi(getRollupContents());
getRollupContents()->arrangeRollups();
m_helpURL = "plugins/channelrx/demodpager/readme.md";
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
connect(getRollupContents(), SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool))); m_helpURL = "plugins/channelrx/demodpager/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
m_pagerDemod = reinterpret_cast<PagerDemod*>(rxChannel); m_pagerDemod = reinterpret_cast<PagerDemod*>(rxChannel);

View File

@ -488,7 +488,18 @@ void RadiosondeDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
} }
} }
getRollupContents()->saveState(m_rollupState); RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
resize(width(), h);
rollupContents->saveState(m_rollupState);
applySettings(); applySettings();
} }
@ -550,12 +561,13 @@ RadiosondeDemodGUI::RadiosondeDemodGUI(PluginAPI* pluginAPI, DeviceUISet *device
m_doApplySettings(true), m_doApplySettings(true),
m_tickCount(0) m_tickCount(0)
{ {
ui->setupUi(getRollupContents());
getRollupContents()->arrangeRollups();
m_helpURL = "plugins/channelrx/demodradiosonde/readme.md";
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
connect(getRollupContents(), SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool))); m_helpURL = "plugins/channelrx/demodradiosonde/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
m_radiosondeDemod = reinterpret_cast<RadiosondeDemod*>(rxChannel); m_radiosondeDemod = reinterpret_cast<RadiosondeDemod*>(rxChannel);

View File

@ -1107,7 +1107,18 @@ void VORDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget; (void) widget;
(void) rollDown; (void) rollDown;
getRollupContents()->saveState(m_rollupState); RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
resize(width(), h);
rollupContents->saveState(m_rollupState);
applySettings(); applySettings();
} }
@ -1172,9 +1183,13 @@ VORDemodGUI::VORDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban
m_vorModel(this), m_vorModel(this),
m_vors(nullptr) m_vors(nullptr)
{ {
ui->setupUi(getRollupContents()); setAttribute(Qt::WA_DeleteOnClose, true);
getRollupContents()->arrangeRollups();
m_helpURL = "plugins/channelrx/demodvor/readme.md"; m_helpURL = "plugins/channelrx/demodvor/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
ui->map->rootContext()->setContextProperty("vorModel", &m_vorModel); ui->map->rootContext()->setContextProperty("vorModel", &m_vorModel);
ui->map->setSource(QUrl(QStringLiteral("qrc:/demodvor/map/map.qml"))); ui->map->setSource(QUrl(QStringLiteral("qrc:/demodvor/map/map.qml")));
@ -1182,8 +1197,6 @@ VORDemodGUI::VORDemodGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban
m_muteIcon.addPixmap(QPixmap("://sound_off.png"), QIcon::Normal, QIcon::On); m_muteIcon.addPixmap(QPixmap("://sound_off.png"), QIcon::Normal, QIcon::On);
m_muteIcon.addPixmap(QPixmap("://sound_on.png"), QIcon::Normal, QIcon::Off); m_muteIcon.addPixmap(QPixmap("://sound_on.png"), QIcon::Normal, QIcon::Off);
setAttribute(Qt::WA_DeleteOnClose, true);
connect(getRollupContents(), SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
connect(&m_dlm, &HttpDownloadManager::downloadComplete, this, &VORDemodGUI::downloadFinished); connect(&m_dlm, &HttpDownloadManager::downloadComplete, this, &VORDemodGUI::downloadFinished);

View File

@ -19,6 +19,7 @@
#include <limits> #include <limits>
#include <QDebug> #include <QDebug>
#include <QResizeEvent>
#include "device/deviceuiset.h" #include "device/deviceuiset.h"
#include "dsp/dspengine.h" #include "dsp/dspengine.h"
@ -76,6 +77,14 @@ bool VORDemodSCGUI::deserialize(const QByteArray& data)
} }
} }
void VORDemodSCGUI::resizeEvent(QResizeEvent* size)
{
int maxWidth = getRollupContents()->maximumWidth();
int minHeight = getRollupContents()->minimumHeight() + getAdditionalHeight();
resize(width() < maxWidth ? width() : maxWidth, minHeight);
size->accept();
}
bool VORDemodSCGUI::handleMessage(const Message& message) bool VORDemodSCGUI::handleMessage(const Message& message)
{ {
if (VORDemodSC::MsgConfigureVORDemod::match(message)) if (VORDemodSC::MsgConfigureVORDemod::match(message))
@ -290,12 +299,13 @@ VORDemodSCGUI::VORDemodSCGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Bas
m_squelchOpen(false), m_squelchOpen(false),
m_tickCount(0) m_tickCount(0)
{ {
ui->setupUi(getRollupContents());
getRollupContents()->arrangeRollups();
m_helpURL = "plugins/channelrx/demodvorsc/readme.md";
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
connect(getRollupContents(), SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool))); m_helpURL = "plugins/channelrx/demodvorsc/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
m_vorDemod = reinterpret_cast<VORDemodSC*>(rxChannel); m_vorDemod = reinterpret_cast<VORDemodSC*>(rxChannel);

View File

@ -64,6 +64,9 @@ public slots:
void channelMarkerChangedByCursor(); void channelMarkerChangedByCursor();
void channelMarkerHighlightedByCursor(); void channelMarkerHighlightedByCursor();
protected:
void resizeEvent(QResizeEvent* size);
private: private:
Ui::VORDemodSCGUI* ui; Ui::VORDemodSCGUI* ui;
PluginAPI* m_pluginAPI; PluginAPI* m_pluginAPI;

View File

@ -7,11 +7,11 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>402</width> <width>402</width>
<height>189</height> <height>138</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred"> <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@ -22,6 +22,12 @@
<height>110</height> <height>110</height>
</size> </size>
</property> </property>
<property name="maximumSize">
<size>
<width>560</width>
<height>16777215</height>
</size>
</property>
<property name="font"> <property name="font">
<font> <font>
<family>Liberation Sans</family> <family>Liberation Sans</family>
@ -619,25 +625,25 @@
<header>gui/rollupcontents.h</header> <header>gui/rollupcontents.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>LevelMeterSignalDB</class>
<extends>QWidget</extends>
<header>gui/levelmeter.h</header>
<container>1</container>
</customwidget>
<customwidget> <customwidget>
<class>ValueDialZ</class> <class>ValueDialZ</class>
<extends>QWidget</extends> <extends>QWidget</extends>
<header>gui/valuedialz.h</header> <header>gui/valuedialz.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>LevelMeterSignalDB</class>
<extends>QWidget</extends>
<header>gui/levelmeter.h</header>
<container>1</container>
</customwidget>
</customwidgets> </customwidgets>
<tabstops> <tabstops>
<tabstop>audioMute</tabstop> <tabstop>audioMute</tabstop>
</tabstops> </tabstops>
<resources> <resources>
<include location="../../../sdrgui/resources/res.qrc"/> <include location="../../../sdrgui/resources/res.qrc"/>
<include location="icons.qrc"/> <include location="../../../sdrgui/resources/res.qrc"/>
</resources> </resources>
<connections/> <connections/>
</ui> </ui>

View File

@ -189,11 +189,13 @@ FileSinkGUI::FileSinkGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseban
m_fixedPosition(false), m_fixedPosition(false),
m_tickCount(0) m_tickCount(0)
{ {
ui->setupUi(getRollupContents());
getRollupContents()->arrangeRollups();
m_helpURL = "plugins/channelrx/filesink/readme.md";
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
connect(getRollupContents(), SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool))); m_helpURL = "plugins/channelrx/filesink/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
m_fileSink = (FileSink*) channelrx; m_fileSink = (FileSink*) channelrx;
@ -352,7 +354,18 @@ void FileSinkGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget; (void) widget;
(void) rollDown; (void) rollDown;
getRollupContents()->saveState(m_rollupState); RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
resize(width(), h);
rollupContents->saveState(m_rollupState);
applySettings(); applySettings();
} }

View File

@ -10,6 +10,12 @@
<height>458</height> <height>458</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>552</width> <width>552</width>
@ -508,7 +514,7 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="verticalLayoutWidget"> <widget class="QWidget" name="verticalWidget" native="true">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
@ -517,8 +523,11 @@
<height>351</height> <height>351</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="sizePolicy">
<string>Channel Spectrum</string> <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<layout class="QVBoxLayout" name="SpectrumLayout"> <layout class="QVBoxLayout" name="SpectrumLayout">
<property name="spacing"> <property name="spacing">
@ -526,9 +535,15 @@
</property> </property>
<item> <item>
<widget class="GLSpectrum" name="glSpectrum" native="true"> <widget class="GLSpectrum" name="glSpectrum" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>300</width>
<height>300</height> <height>300</height>
</size> </size>
</property> </property>
@ -553,17 +568,6 @@
<header>gui/rollupcontents.h</header> <header>gui/rollupcontents.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>ButtonSwitch</class>
<extends>QToolButton</extends>
<header>gui/buttonswitch.h</header>
</customwidget>
<customwidget>
<class>ValueDialZ</class>
<extends>QWidget</extends>
<header>gui/valuedialz.h</header>
<container>1</container>
</customwidget>
<customwidget> <customwidget>
<class>GLSpectrum</class> <class>GLSpectrum</class>
<extends>QWidget</extends> <extends>QWidget</extends>
@ -576,6 +580,17 @@
<header>gui/glspectrumgui.h</header> <header>gui/glspectrumgui.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>ValueDialZ</class>
<extends>QWidget</extends>
<header>gui/valuedialz.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>ButtonSwitch</class>
<extends>QToolButton</extends>
<header>gui/buttonswitch.h</header>
</customwidget>
</customwidgets> </customwidgets>
<resources> <resources>
<include location="../../../sdrgui/resources/res.qrc"/> <include location="../../../sdrgui/resources/res.qrc"/>

View File

@ -11,7 +11,7 @@
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum"> <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@ -754,6 +754,12 @@
<height>161</height> <height>161</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle"> <property name="windowTitle">
<string>Channel Spectrum</string> <string>Channel Spectrum</string>
</property> </property>
@ -775,6 +781,18 @@
</property> </property>
<item> <item>
<widget class="GLSpectrum" name="glSpectrum" native="true"> <widget class="GLSpectrum" name="glSpectrum" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>300</width>
<height>300</height>
</size>
</property>
<property name="font"> <property name="font">
<font> <font>
<family>Liberation Mono</family> <family>Liberation Mono</family>
@ -796,23 +814,6 @@
<header>gui/rollupcontents.h</header> <header>gui/rollupcontents.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>ButtonSwitch</class>
<extends>QToolButton</extends>
<header>gui/buttonswitch.h</header>
</customwidget>
<customwidget>
<class>LevelMeterSignalDB</class>
<extends>QWidget</extends>
<header>gui/levelmeter.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>ValueDialZ</class>
<extends>QWidget</extends>
<header>gui/valuedialz.h</header>
<container>1</container>
</customwidget>
<customwidget> <customwidget>
<class>GLSpectrum</class> <class>GLSpectrum</class>
<extends>QWidget</extends> <extends>QWidget</extends>
@ -825,6 +826,23 @@
<header>gui/glspectrumgui.h</header> <header>gui/glspectrumgui.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>ValueDialZ</class>
<extends>QWidget</extends>
<header>gui/valuedialz.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>LevelMeterSignalDB</class>
<extends>QWidget</extends>
<header>gui/levelmeter.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>ButtonSwitch</class>
<extends>QToolButton</extends>
<header>gui/buttonswitch.h</header>
</customwidget>
</customwidgets> </customwidgets>
<resources> <resources>
<include location="../../../sdrgui/resources/res.qrc"/> <include location="../../../sdrgui/resources/res.qrc"/>

View File

@ -16,6 +16,7 @@
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#include <QLocale> #include <QLocale>
#include <QResizeEvent>
#include "device/deviceuiset.h" #include "device/deviceuiset.h"
#include "gui/basicchannelsettingsdialog.h" #include "gui/basicchannelsettingsdialog.h"
@ -68,6 +69,14 @@ bool LocalSinkGUI::deserialize(const QByteArray& data)
} }
} }
void LocalSinkGUI::resizeEvent(QResizeEvent* size)
{
int maxWidth = getRollupContents()->maximumWidth();
int minHeight = getRollupContents()->minimumHeight() + getAdditionalHeight();
resize(width() < maxWidth ? width() : maxWidth, minHeight);
size->accept();
}
bool LocalSinkGUI::handleMessage(const Message& message) bool LocalSinkGUI::handleMessage(const Message& message)
{ {
if (DSPSignalNotification::match(message)) if (DSPSignalNotification::match(message))
@ -105,11 +114,13 @@ LocalSinkGUI::LocalSinkGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseb
m_basebandSampleRate(0), m_basebandSampleRate(0),
m_tickCount(0) m_tickCount(0)
{ {
ui->setupUi(getRollupContents());
getRollupContents()->arrangeRollups();
m_helpURL = "plugins/channelrx/localsink/readme.md";
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
connect(getRollupContents(), SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool))); m_helpURL = "plugins/channelrx/localsink/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
m_localSink = (LocalSink*) channelrx; m_localSink = (LocalSink*) channelrx;

View File

@ -60,6 +60,9 @@ public:
virtual int getStreamIndex() const { return m_settings.m_streamIndex; } virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual void setStreamIndex(int streamIndex) { m_settings.m_streamIndex = streamIndex; } virtual void setStreamIndex(int streamIndex) { m_settings.m_streamIndex = streamIndex; }
protected:
void resizeEvent(QResizeEvent* size);
private: private:
Ui::LocalSinkGUI* ui; Ui::LocalSinkGUI* ui;
PluginAPI* m_pluginAPI; PluginAPI* m_pluginAPI;

View File

@ -11,7 +11,7 @@
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum"> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@ -24,7 +24,7 @@
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>320</width> <width>560</width>
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>

View File

@ -537,7 +537,18 @@ void NoiseFigureGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget; (void) widget;
(void) rollDown; (void) rollDown;
getRollupContents()->saveState(m_rollupState); RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
resize(width(), h);
rollupContents->saveState(m_rollupState);
applySettings(); applySettings();
} }
@ -601,12 +612,13 @@ NoiseFigureGUI::NoiseFigureGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, B
m_runningTest(false), m_runningTest(false),
m_chart(nullptr) m_chart(nullptr)
{ {
ui->setupUi(getRollupContents());
getRollupContents()->arrangeRollups();
m_helpURL = "plugins/channelrx/noisefigure/readme.md";
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
connect(getRollupContents(), SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool))); m_helpURL = "plugins/channelrx/noisefigure/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
m_noiseFigure = reinterpret_cast<NoiseFigure*>(rxChannel); m_noiseFigure = reinterpret_cast<NoiseFigure*>(rxChannel);

View File

@ -1949,7 +1949,18 @@ void RadioAstronomyGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget; (void) widget;
(void) rollDown; (void) rollDown;
getRollupContents()->saveState(m_rollupState); RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
resize(width(), h);
rollupContents->saveState(m_rollupState);
applySettings(); applySettings();
} }
@ -2063,11 +2074,13 @@ RadioAstronomyGUI::RadioAstronomyGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUI
m_downloadingLAB(false) m_downloadingLAB(false)
{ {
qDebug("RadioAstronomyGUI::RadioAstronomyGUI"); qDebug("RadioAstronomyGUI::RadioAstronomyGUI");
ui->setupUi(getRollupContents());
getRollupContents()->arrangeRollups();
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
connect(getRollupContents(), SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool))); m_helpURL = "plugins/channelrx/radioastronomy/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
m_radioAstronomy = reinterpret_cast<RadioAstronomy*>(rxChannel); m_radioAstronomy = reinterpret_cast<RadioAstronomy*>(rxChannel);

View File

@ -222,7 +222,18 @@ void RadioClockGUI::onWidgetRolled(QWidget* widget, bool rollDown)
} }
} }
getRollupContents()->saveState(m_rollupState); RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
resize(width(), h);
rollupContents->saveState(m_rollupState);
applySettings(); applySettings();
} }
@ -284,12 +295,13 @@ RadioClockGUI::RadioClockGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Bas
m_doApplySettings(true), m_doApplySettings(true),
m_tickCount(0) m_tickCount(0)
{ {
ui->setupUi(getRollupContents());
getRollupContents()->arrangeRollups();
m_helpURL = "plugins/channelrx/radioclock/readme.md";
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
connect(getRollupContents(), SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool))); m_helpURL = "plugins/channelrx/radioclock/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
m_radioClock = reinterpret_cast<RadioClock*>(rxChannel); m_radioClock = reinterpret_cast<RadioClock*>(rxChannel);
m_radioClock->setMessageQueueToGUI(getInputMessageQueue()); m_radioClock->setMessageQueueToGUI(getInputMessageQueue());

View File

@ -16,6 +16,7 @@
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#include <QLocale> #include <QLocale>
#include <QResizeEvent>
#include "device/deviceuiset.h" #include "device/deviceuiset.h"
#include "gui/basicchannelsettingsdialog.h" #include "gui/basicchannelsettingsdialog.h"
@ -63,6 +64,14 @@ bool RemoteSinkGUI::deserialize(const QByteArray& data)
} }
} }
void RemoteSinkGUI::resizeEvent(QResizeEvent* size)
{
int maxWidth = getRollupContents()->maximumWidth();
int minHeight = getRollupContents()->minimumHeight() + getAdditionalHeight();
resize(width() < maxWidth ? width() : maxWidth, minHeight);
size->accept();
}
bool RemoteSinkGUI::handleMessage(const Message& message) bool RemoteSinkGUI::handleMessage(const Message& message)
{ {
if (RemoteSink::MsgConfigureRemoteSink::match(message)) if (RemoteSink::MsgConfigureRemoteSink::match(message))
@ -101,11 +110,13 @@ RemoteSinkGUI::RemoteSinkGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Bas
m_deviceCenterFrequency(0), m_deviceCenterFrequency(0),
m_tickCount(0) m_tickCount(0)
{ {
ui->setupUi(getRollupContents());
getRollupContents()->arrangeRollups();
m_helpURL = "plugins/channelrx/remotesink/readme.md";
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
connect(getRollupContents(), SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool))); m_helpURL = "plugins/channelrx/remotesink/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
m_remoteSink = (RemoteSink*) channelrx; m_remoteSink = (RemoteSink*) channelrx;

View File

@ -60,6 +60,9 @@ public:
virtual int getStreamIndex() const { return m_settings.m_streamIndex; } virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual void setStreamIndex(int streamIndex) { m_settings.m_streamIndex = streamIndex; } virtual void setStreamIndex(int streamIndex) { m_settings.m_streamIndex = streamIndex; }
protected:
void resizeEvent(QResizeEvent* size);
private: private:
Ui::RemoteSinkGUI* ui; Ui::RemoteSinkGUI* ui;
PluginAPI* m_pluginAPI; PluginAPI* m_pluginAPI;

View File

@ -11,7 +11,7 @@
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum"> <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@ -24,7 +24,7 @@
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>320</width> <width>360</width>
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
@ -40,8 +40,8 @@
<widget class="QWidget" name="settingsContainer" native="true"> <widget class="QWidget" name="settingsContainer" native="true">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>10</x> <x>0</x>
<y>10</y> <y>0</y>
<width>301</width> <width>301</width>
<height>141</height> <height>141</height>
</rect> </rect>

View File

@ -175,11 +175,13 @@ SigMFFileSinkGUI::SigMFFileSinkGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISe
m_fixedPosition(false), m_fixedPosition(false),
m_tickCount(0) m_tickCount(0)
{ {
ui->setupUi(getRollupContents());
getRollupContents()->arrangeRollups();
m_helpURL = "plugins/channelrx/sigmffilesink/readme.md";
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
connect(getRollupContents(), SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool))); m_helpURL = "plugins/channelrx/sigmffilesink/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
m_sigMFFileSink = (SigMFFileSink*) channelrx; m_sigMFFileSink = (SigMFFileSink*) channelrx;
@ -344,7 +346,18 @@ void SigMFFileSinkGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget; (void) widget;
(void) rollDown; (void) rollDown;
getRollupContents()->saveState(m_rollupState); RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
resize(width(), h);
rollupContents->saveState(m_rollupState);
applySettings(); applySettings();
} }

View File

@ -10,6 +10,12 @@
<height>458</height> <height>458</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>552</width> <width>552</width>
@ -505,7 +511,7 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="verticalLayoutWidget"> <widget class="QWidget" name="verticalWidget" native="true">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
@ -514,8 +520,11 @@
<height>351</height> <height>351</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="sizePolicy">
<string>Channel Spectrum</string> <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<layout class="QVBoxLayout" name="SpectrumLayout"> <layout class="QVBoxLayout" name="SpectrumLayout">
<property name="spacing"> <property name="spacing">
@ -523,9 +532,15 @@
</property> </property>
<item> <item>
<widget class="GLSpectrum" name="glSpectrum" native="true"> <widget class="GLSpectrum" name="glSpectrum" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>300</width>
<height>300</height> <height>300</height>
</size> </size>
</property> </property>
@ -550,17 +565,6 @@
<header>gui/rollupcontents.h</header> <header>gui/rollupcontents.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>ButtonSwitch</class>
<extends>QToolButton</extends>
<header>gui/buttonswitch.h</header>
</customwidget>
<customwidget>
<class>ValueDialZ</class>
<extends>QWidget</extends>
<header>gui/valuedialz.h</header>
<container>1</container>
</customwidget>
<customwidget> <customwidget>
<class>GLSpectrum</class> <class>GLSpectrum</class>
<extends>QWidget</extends> <extends>QWidget</extends>
@ -573,6 +577,17 @@
<header>gui/glspectrumgui.h</header> <header>gui/glspectrumgui.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>ValueDialZ</class>
<extends>QWidget</extends>
<header>gui/valuedialz.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>ButtonSwitch</class>
<extends>QToolButton</extends>
<header>gui/buttonswitch.h</header>
</customwidget>
</customwidgets> </customwidgets>
<resources> <resources>
<include location="../../../sdrgui/resources/res.qrc"/> <include location="../../../sdrgui/resources/res.qrc"/>

View File

@ -160,12 +160,14 @@ UDPSinkGUI::UDPSinkGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandS
m_doApplySettings(true), m_doApplySettings(true),
m_rfBandwidthChanged(false) m_rfBandwidthChanged(false)
{ {
ui->setupUi(getRollupContents());
getRollupContents()->arrangeRollups();
m_helpURL = "plugins/channelrx/udpsink/readme.md";
connect(getRollupContents(), SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
m_helpURL = "plugins/channelrx/udpsink/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
m_udpSink = (UDPSink*) rxChannel; m_udpSink = (UDPSink*) rxChannel;
m_spectrumVis = m_udpSink->getSpectrumVis(); m_spectrumVis = m_udpSink->getSpectrumVis();
@ -598,7 +600,18 @@ void UDPSinkGUI::onWidgetRolled(QWidget* widget, bool rollDown)
m_udpSink->enableSpectrum(rollDown); m_udpSink->enableSpectrum(rollDown);
} }
getRollupContents()->saveState(m_rollupState); RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
resize(width(), h);
rollupContents->saveState(m_rollupState);
applySettings(); applySettings();
} }

View File

@ -10,18 +10,18 @@
<height>355</height> <height>355</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>342</width> <width>382</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
<property name="maximumSize">
<size>
<width>400</width>
<height>16777215</height>
</size>
</property>
<property name="font"> <property name="font">
<font> <font>
<family>Liberation Sans</family> <family>Liberation Sans</family>
@ -183,6 +183,15 @@
</color> </color>
</brush> </brush>
</colorrole> </colorrole>
<colorrole role="PlaceholderText">
<brush brushstyle="NoBrush">
<color alpha="128">
<red>26</red>
<green>26</green>
<blue>26</blue>
</color>
</brush>
</colorrole>
</active> </active>
<inactive> <inactive>
<colorrole role="Text"> <colorrole role="Text">
@ -203,6 +212,15 @@
</color> </color>
</brush> </brush>
</colorrole> </colorrole>
<colorrole role="PlaceholderText">
<brush brushstyle="NoBrush">
<color alpha="128">
<red>26</red>
<green>26</green>
<blue>26</blue>
</color>
</brush>
</colorrole>
</inactive> </inactive>
<disabled> <disabled>
<colorrole role="Text"> <colorrole role="Text">
@ -223,11 +241,21 @@
</color> </color>
</brush> </brush>
</colorrole> </colorrole>
<colorrole role="PlaceholderText">
<brush brushstyle="NoBrush">
<color alpha="128">
<red>26</red>
<green>26</green>
<blue>26</blue>
</color>
</brush>
</colorrole>
</disabled> </disabled>
</palette> </palette>
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<family>Liberation Sans</family>
<pointsize>8</pointsize> <pointsize>8</pointsize>
</font> </font>
</property> </property>
@ -821,10 +849,16 @@
<rect> <rect>
<x>15</x> <x>15</x>
<y>160</y> <y>160</y>
<width>231</width> <width>361</width>
<height>156</height> <height>156</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle"> <property name="windowTitle">
<string>Channel Spectrum</string> <string>Channel Spectrum</string>
</property> </property>
@ -846,6 +880,18 @@
</property> </property>
<item> <item>
<widget class="GLSpectrum" name="glSpectrum" native="true"> <widget class="GLSpectrum" name="glSpectrum" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>300</width>
<height>300</height>
</size>
</property>
<property name="font"> <property name="font">
<font> <font>
<family>Liberation Mono</family> <family>Liberation Mono</family>

View File

@ -18,6 +18,7 @@
#include <QFileDialog> #include <QFileDialog>
#include <QMessageBox> #include <QMessageBox>
#include <QDebug> #include <QDebug>
#include <QResizeEvent>
#include "device/deviceapi.h" #include "device/deviceapi.h"
#include "device/deviceuiset.h" #include "device/deviceuiset.h"
@ -69,6 +70,14 @@ bool FileSourceGUI::deserialize(const QByteArray& data)
} }
} }
void FileSourceGUI::resizeEvent(QResizeEvent* size)
{
int maxWidth = getRollupContents()->maximumWidth();
int minHeight = getRollupContents()->minimumHeight() + getAdditionalHeight();
resize(width() < maxWidth ? width() : maxWidth, minHeight);
size->accept();
}
bool FileSourceGUI::handleMessage(const Message& message) bool FileSourceGUI::handleMessage(const Message& message)
{ {
if (DSPSignalNotification::match(message)) if (DSPSignalNotification::match(message))
@ -181,17 +190,17 @@ FileSourceGUI::FileSourceGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Bas
m_doApplySettings(true), m_doApplySettings(true),
m_tickCount(0) m_tickCount(0)
{ {
(void) channelTx;
ui->setupUi(getRollupContents());
getRollupContents()->arrangeRollups();
m_helpURL = "plugins/channeltx/filesource/readme.md";
ui->channelPowerMeter->setColorTheme(LevelMeterSignalDB::ColorGreenAndBlue);
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
connect(getRollupContents(), SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool))); m_helpURL = "plugins/channeltx/filesource/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
ui->channelPowerMeter->setColorTheme(LevelMeterSignalDB::ColorGreenAndBlue);
m_fileSource = (FileSource*) channelTx; m_fileSource = (FileSource*) channelTx;
m_fileSource->setMessageQueueToGUI(getInputMessageQueue()); m_fileSource->setMessageQueueToGUI(getInputMessageQueue());

View File

@ -60,6 +60,9 @@ public:
public slots: public slots:
void channelMarkerChangedByCursor(); void channelMarkerChangedByCursor();
protected:
void resizeEvent(QResizeEvent* size);
private: private:
Ui::FileSourceGUI* ui; Ui::FileSourceGUI* ui;
PluginAPI* m_pluginAPI; PluginAPI* m_pluginAPI;

View File

@ -11,7 +11,7 @@
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@ -22,6 +22,12 @@
<height>140</height> <height>140</height>
</size> </size>
</property> </property>
<property name="maximumSize">
<size>
<width>560</width>
<height>16777215</height>
</size>
</property>
<property name="font"> <property name="font">
<font> <font>
<family>Liberation Sans</family> <family>Liberation Sans</family>
@ -416,6 +422,7 @@
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<family>Liberation Sans</family>
<pointsize>9</pointsize> <pointsize>9</pointsize>
</font> </font>
</property> </property>
@ -447,6 +454,7 @@
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<family>Liberation Sans</family>
<pointsize>9</pointsize> <pointsize>9</pointsize>
</font> </font>
</property> </property>
@ -472,6 +480,7 @@
<widget class="QLabel" name="crcLabel"> <widget class="QLabel" name="crcLabel">
<property name="font"> <property name="font">
<font> <font>
<family>Liberation Sans</family>
<pointsize>9</pointsize> <pointsize>9</pointsize>
</font> </font>
</property> </property>
@ -701,17 +710,17 @@
<header>gui/rollupcontents.h</header> <header>gui/rollupcontents.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>ButtonSwitch</class>
<extends>QToolButton</extends>
<header>gui/buttonswitch.h</header>
</customwidget>
<customwidget> <customwidget>
<class>LevelMeterSignalDB</class> <class>LevelMeterSignalDB</class>
<extends>QWidget</extends> <extends>QWidget</extends>
<header>gui/levelmeter.h</header> <header>gui/levelmeter.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>ButtonSwitch</class>
<extends>QToolButton</extends>
<header>gui/buttonswitch.h</header>
</customwidget>
</customwidgets> </customwidgets>
<resources> <resources>
<include location="../../../sdrgui/resources/res.qrc"/> <include location="../../../sdrgui/resources/res.qrc"/>

View File

@ -16,6 +16,7 @@
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#include <QLocale> #include <QLocale>
#include <QResizeEvent>
#include "device/deviceuiset.h" #include "device/deviceuiset.h"
#include "gui/basicchannelsettingsdialog.h" #include "gui/basicchannelsettingsdialog.h"
@ -63,6 +64,14 @@ bool LocalSourceGUI::deserialize(const QByteArray& data)
} }
} }
void LocalSourceGUI::resizeEvent(QResizeEvent* size)
{
int maxWidth = getRollupContents()->maximumWidth();
int minHeight = getRollupContents()->minimumHeight() + getAdditionalHeight();
resize(width() < maxWidth ? width() : maxWidth, minHeight);
size->accept();
}
bool LocalSourceGUI::handleMessage(const Message& message) bool LocalSourceGUI::handleMessage(const Message& message)
{ {
if (DSPSignalNotification::match(message)) if (DSPSignalNotification::match(message))
@ -99,11 +108,13 @@ LocalSourceGUI::LocalSourceGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, B
m_deviceCenterFrequency(0), m_deviceCenterFrequency(0),
m_tickCount(0) m_tickCount(0)
{ {
ui->setupUi(getRollupContents());
getRollupContents()->arrangeRollups();
m_helpURL = "plugins/channeltx/localsource/readme.md";
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
connect(getRollupContents(), SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool))); m_helpURL = "plugins/channeltx/localsource/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
m_localSource = (LocalSource*) channeltx; m_localSource = (LocalSource*) channeltx;

View File

@ -60,6 +60,9 @@ public:
virtual int getStreamIndex() const { return m_settings.m_streamIndex; } virtual int getStreamIndex() const { return m_settings.m_streamIndex; }
virtual void setStreamIndex(int streamIndex) { m_settings.m_streamIndex = streamIndex; } virtual void setStreamIndex(int streamIndex) { m_settings.m_streamIndex = streamIndex; }
protected:
void resizeEvent(QResizeEvent* size);
private: private:
Ui::LocalSourceGUI* ui; Ui::LocalSourceGUI* ui;
PluginAPI* m_pluginAPI; PluginAPI* m_pluginAPI;

View File

@ -11,7 +11,7 @@
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum"> <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@ -24,7 +24,7 @@
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>320</width> <width>560</width>
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>

View File

@ -320,7 +320,18 @@ void IEEE_802_15_4_ModGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget; (void) widget;
(void) rollDown; (void) rollDown;
getRollupContents()->saveState(m_rollupState); RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
resize(width(), h);
rollupContents->saveState(m_rollupState);
applySettings(); applySettings();
} }
@ -381,12 +392,13 @@ IEEE_802_15_4_ModGUI::IEEE_802_15_4_ModGUI(PluginAPI* pluginAPI, DeviceUISet *de
m_doApplySettings(true), m_doApplySettings(true),
m_basebandSampleRate(12000000) m_basebandSampleRate(12000000)
{ {
ui->setupUi(getRollupContents());
getRollupContents()->arrangeRollups();
m_helpURL = "plugins/channeltx/mod802.15.4/readme.md";
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
m_helpURL = "plugins/channeltx/mod802.15.4/readme.md";
connect(getRollupContents(), SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool))); RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
m_IEEE_802_15_4_Mod = (IEEE_802_15_4_Mod*) channelTx; m_IEEE_802_15_4_Mod = (IEEE_802_15_4_Mod*) channelTx;

View File

@ -11,7 +11,7 @@
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum"> <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@ -701,6 +701,12 @@
<height>284</height> <height>284</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>598</width> <width>598</width>
@ -761,17 +767,6 @@
<header>gui/rollupcontents.h</header> <header>gui/rollupcontents.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>ButtonSwitch</class>
<extends>QToolButton</extends>
<header>gui/buttonswitch.h</header>
</customwidget>
<customwidget>
<class>ValueDialZ</class>
<extends>QWidget</extends>
<header>gui/valuedialz.h</header>
<container>1</container>
</customwidget>
<customwidget> <customwidget>
<class>GLSpectrum</class> <class>GLSpectrum</class>
<extends>QWidget</extends> <extends>QWidget</extends>
@ -784,12 +779,6 @@
<header>gui/glspectrumgui.h</header> <header>gui/glspectrumgui.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>LevelMeterVU</class>
<extends>QWidget</extends>
<header>gui/levelmeter.h</header>
<container>1</container>
</customwidget>
<customwidget> <customwidget>
<class>GLScope</class> <class>GLScope</class>
<extends>QWidget</extends> <extends>QWidget</extends>
@ -802,6 +791,23 @@
<header>gui/glscopegui.h</header> <header>gui/glscopegui.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>ValueDialZ</class>
<extends>QWidget</extends>
<header>gui/valuedialz.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>ButtonSwitch</class>
<extends>QToolButton</extends>
<header>gui/buttonswitch.h</header>
</customwidget>
<customwidget>
<class>LevelMeterVU</class>
<extends>QWidget</extends>
<header>gui/levelmeter.h</header>
<container>1</container>
</customwidget>
</customwidgets> </customwidgets>
<tabstops> <tabstops>
<tabstop>deltaFrequency</tabstop> <tabstop>deltaFrequency</tabstop>

View File

@ -343,7 +343,18 @@ void AISModGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget; (void) widget;
(void) rollDown; (void) rollDown;
getRollupContents()->saveState(m_rollupState); RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
resize(width(), h);
rollupContents->saveState(m_rollupState);
applySettings(); applySettings();
} }
@ -404,12 +415,13 @@ AISModGUI::AISModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSam
m_basebandSampleRate(1), m_basebandSampleRate(1),
m_doApplySettings(true) m_doApplySettings(true)
{ {
ui->setupUi(getRollupContents());
getRollupContents()->arrangeRollups();
m_helpURL = "plugins/channeltx/modais/readme.md";
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
m_helpURL = "plugins/channeltx/modais/readme.md";
connect(getRollupContents(), SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool))); RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
m_aisMod = (AISMod*) channelTx; m_aisMod = (AISMod*) channelTx;

View File

@ -11,7 +11,7 @@
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Expanding"> <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@ -1010,15 +1010,21 @@
<x>0</x> <x>0</x>
<y>290</y> <y>290</y>
<width>431</width> <width>431</width>
<height>141</height> <height>200</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding"> <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize">
<size>
<width>0</width>
<height>200</height>
</size>
</property>
<property name="windowTitle"> <property name="windowTitle">
<string>Transmitted Messages</string> <string>Transmitted Messages</string>
</property> </property>
@ -1056,6 +1062,12 @@
<height>331</height> <height>331</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle"> <property name="windowTitle">
<string>Baseband Spectrum</string> <string>Baseband Spectrum</string>
</property> </property>
@ -1077,6 +1089,12 @@
</property> </property>
<item> <item>
<widget class="GLSpectrum" name="glSpectrum" native="true"> <widget class="GLSpectrum" name="glSpectrum" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>200</width> <width>200</width>
@ -1105,6 +1123,12 @@
<height>311</height> <height>311</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle"> <property name="windowTitle">
<string>IQ Waveforms</string> <string>IQ Waveforms</string>
</property> </property>
@ -1126,6 +1150,12 @@
</property> </property>
<item> <item>
<widget class="GLScope" name="glScope" native="true"> <widget class="GLScope" name="glScope" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>200</width> <width>200</width>
@ -1154,9 +1184,15 @@
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget> <customwidget>
<class>ValueDialZ</class> <class>GLSpectrum</class>
<extends>QWidget</extends> <extends>QWidget</extends>
<header>gui/valuedialz.h</header> <header>gui/glspectrum.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>GLSpectrumGUI</class>
<extends>QWidget</extends>
<header>gui/glspectrumgui.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget> <customwidget>
@ -1171,23 +1207,17 @@
<header>gui/glscopegui.h</header> <header>gui/glscopegui.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>ValueDialZ</class>
<extends>QWidget</extends>
<header>gui/valuedialz.h</header>
<container>1</container>
</customwidget>
<customwidget> <customwidget>
<class>ButtonSwitch</class> <class>ButtonSwitch</class>
<extends>QToolButton</extends> <extends>QToolButton</extends>
<header>gui/buttonswitch.h</header> <header>gui/buttonswitch.h</header>
</customwidget> </customwidget>
<customwidget>
<class>GLSpectrum</class>
<extends>QWidget</extends>
<header>gui/glspectrum.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>GLSpectrumGUI</class>
<extends>QWidget</extends>
<header>gui/glspectrumgui.h</header>
<container>1</container>
</customwidget>
<customwidget> <customwidget>
<class>LevelMeterVU</class> <class>LevelMeterVU</class>
<extends>QWidget</extends> <extends>QWidget</extends>

View File

@ -20,6 +20,7 @@
#include <QFileDialog> #include <QFileDialog>
#include <QTime> #include <QTime>
#include <QDebug> #include <QDebug>
#include <QResizeEvent>
#include "device/deviceuiset.h" #include "device/deviceuiset.h"
@ -73,6 +74,14 @@ bool AMModGUI::deserialize(const QByteArray& data)
} }
} }
void AMModGUI::resizeEvent(QResizeEvent* size)
{
int maxWidth = getRollupContents()->maximumWidth();
int minHeight = getRollupContents()->minimumHeight() + getAdditionalHeight();
resize(width() < maxWidth ? width() : maxWidth, minHeight);
size->accept();
}
bool AMModGUI::handleMessage(const Message& message) bool AMModGUI::handleMessage(const Message& message)
{ {
if (AMMod::MsgReportFileSourceStreamData::match(message)) if (AMMod::MsgReportFileSourceStreamData::match(message))
@ -351,11 +360,13 @@ AMModGUI::AMModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampl
m_tickCount(0), m_tickCount(0),
m_enableNavTime(false) m_enableNavTime(false)
{ {
ui->setupUi(getRollupContents());
getRollupContents()->arrangeRollups();
m_helpURL = "plugins/channeltx/modam/readme.md";
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
connect(getRollupContents(), SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool))); m_helpURL = "plugins/channeltx/modam/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
m_amMod = (AMMod*) channelTx; m_amMod = (AMMod*) channelTx;

View File

@ -63,6 +63,9 @@ public:
public slots: public slots:
void channelMarkerChangedByCursor(); void channelMarkerChangedByCursor();
protected:
void resizeEvent(QResizeEvent* size);
private: private:
Ui::AMModGUI* ui; Ui::AMModGUI* ui;
PluginAPI* m_pluginAPI; PluginAPI* m_pluginAPI;

View File

@ -11,7 +11,7 @@
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum"> <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@ -22,6 +22,12 @@
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
<property name="maximumSize">
<size>
<width>560</width>
<height>16777215</height>
</size>
</property>
<property name="font"> <property name="font">
<font> <font>
<family>Liberation Sans</family> <family>Liberation Sans</family>
@ -736,17 +742,17 @@
<header>gui/rollupcontents.h</header> <header>gui/rollupcontents.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>ButtonSwitch</class>
<extends>QToolButton</extends>
<header>gui/buttonswitch.h</header>
</customwidget>
<customwidget> <customwidget>
<class>ValueDialZ</class> <class>ValueDialZ</class>
<extends>QWidget</extends> <extends>QWidget</extends>
<header>gui/valuedialz.h</header> <header>gui/valuedialz.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>ButtonSwitch</class>
<extends>QToolButton</extends>
<header>gui/buttonswitch.h</header>
</customwidget>
<customwidget> <customwidget>
<class>LevelMeterVU</class> <class>LevelMeterVU</class>
<extends>QWidget</extends> <extends>QWidget</extends>

View File

@ -21,6 +21,7 @@
#include <QTime> #include <QTime>
#include <QDebug> #include <QDebug>
#include <QMessageBox> #include <QMessageBox>
#include <QResizeEvent>
#include <cmath> #include <cmath>
@ -66,11 +67,13 @@ ATVModGUI::ATVModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSam
m_camBusyFPSMessageBox(0), m_camBusyFPSMessageBox(0),
m_rfSliderDivisor(100000) m_rfSliderDivisor(100000)
{ {
ui->setupUi(getRollupContents());
getRollupContents()->arrangeRollups();
m_helpURL = "plugins/channeltx/modatv/readme.md";
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
connect(getRollupContents(), SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool))); m_helpURL = "plugins/channeltx/modatv/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
m_atvMod = (ATVMod*) channelTx; m_atvMod = (ATVMod*) channelTx;
@ -151,6 +154,14 @@ bool ATVModGUI::deserialize(const QByteArray& data)
} }
} }
void ATVModGUI::resizeEvent(QResizeEvent* size)
{
int maxWidth = getRollupContents()->maximumWidth();
int minHeight = getRollupContents()->minimumHeight() + getAdditionalHeight();
resize(width() < maxWidth ? width() : maxWidth, minHeight);
size->accept();
}
bool ATVModGUI::handleMessage(const Message& message) bool ATVModGUI::handleMessage(const Message& message)
{ {
if (ATVModReport::MsgReportVideoFileSourceStreamData::match(message)) if (ATVModReport::MsgReportVideoFileSourceStreamData::match(message))

View File

@ -62,6 +62,9 @@ public:
public slots: public slots:
void channelMarkerChangedByCursor(); void channelMarkerChangedByCursor();
protected:
void resizeEvent(QResizeEvent* size);
private: private:
Ui::ATVModGUI* ui; Ui::ATVModGUI* ui;
PluginAPI* m_pluginAPI; PluginAPI* m_pluginAPI;

View File

@ -11,7 +11,7 @@
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@ -22,6 +22,12 @@
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
<property name="maximumSize">
<size>
<width>760</width>
<height>16777215</height>
</size>
</property>
<property name="font"> <property name="font">
<font> <font>
<family>Liberation Sans</family> <family>Liberation Sans</family>
@ -1310,9 +1316,9 @@
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget> <customwidget>
<class>LevelMeterVU</class> <class>ValueDialZ</class>
<extends>QWidget</extends> <extends>QWidget</extends>
<header>gui/levelmeter.h</header> <header>gui/valuedialz.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget> <customwidget>
@ -1321,9 +1327,9 @@
<header>gui/buttonswitch.h</header> <header>gui/buttonswitch.h</header>
</customwidget> </customwidget>
<customwidget> <customwidget>
<class>ValueDialZ</class> <class>LevelMeterVU</class>
<extends>QWidget</extends> <extends>QWidget</extends>
<header>gui/valuedialz.h</header> <header>gui/levelmeter.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
</customwidgets> </customwidgets>

View File

@ -20,6 +20,7 @@
#include <QFileDialog> #include <QFileDialog>
#include <QTime> #include <QTime>
#include <QDebug> #include <QDebug>
#include <QResizeEvent>
#include "device/deviceuiset.h" #include "device/deviceuiset.h"
#include "plugin/pluginapi.h" #include "plugin/pluginapi.h"
@ -74,6 +75,14 @@ bool ChirpChatModGUI::deserialize(const QByteArray& data)
} }
} }
void ChirpChatModGUI::resizeEvent(QResizeEvent* size)
{
int maxWidth = getRollupContents()->maximumWidth();
int minHeight = getRollupContents()->minimumHeight() + getAdditionalHeight();
resize(width() < maxWidth ? width() : maxWidth, minHeight);
size->accept();
}
bool ChirpChatModGUI::handleMessage(const Message& message) bool ChirpChatModGUI::handleMessage(const Message& message)
{ {
if (ChirpChatMod::MsgConfigureChirpChatMod::match(message)) if (ChirpChatMod::MsgConfigureChirpChatMod::match(message))
@ -425,12 +434,13 @@ ChirpChatModGUI::ChirpChatModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet,
m_doApplySettings(true), m_doApplySettings(true),
m_tickCount(0) m_tickCount(0)
{ {
ui->setupUi(getRollupContents());
getRollupContents()->arrangeRollups();
m_helpURL = "plugins/channeltx/modchirpchat/readme.md";
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
m_helpURL = "plugins/channeltx/modchirpchat/readme.md";
connect(getRollupContents(), SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool))); RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
m_chirpChatMod = (ChirpChatMod*) channelTx; m_chirpChatMod = (ChirpChatMod*) channelTx;

View File

@ -61,6 +61,9 @@ public:
public slots: public slots:
void channelMarkerChangedByCursor(); void channelMarkerChangedByCursor();
protected:
void resizeEvent(QResizeEvent* size);
private: private:
Ui::ChirpChatModGUI* ui; Ui::ChirpChatModGUI* ui;
PluginAPI* m_pluginAPI; PluginAPI* m_pluginAPI;

View File

@ -10,12 +10,24 @@
<height>573</height> <height>573</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>392</width> <width>392</width>
<height>180</height> <height>180</height>
</size> </size>
</property> </property>
<property name="maximumSize">
<size>
<width>560</width>
<height>16777215</height>
</size>
</property>
<property name="font"> <property name="font">
<font> <font>
<family>Liberation Sans</family> <family>Liberation Sans</family>
@ -26,9 +38,6 @@
<string>ChirpChat Modulator</string> <string>ChirpChat Modulator</string>
</property> </property>
<widget class="QWidget" name="verticalLayoutWidget"> <widget class="QWidget" name="verticalLayoutWidget">
<property name="windowTitle">
<string>RF/mod/coder settings</string>
</property>
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
@ -37,6 +46,9 @@
<height>131</height> <height>131</height>
</rect> </rect>
</property> </property>
<property name="windowTitle">
<string>RF/mod/coder settings</string>
</property>
<layout class="QVBoxLayout" name="settingsLayout"> <layout class="QVBoxLayout" name="settingsLayout">
<property name="spacing"> <property name="spacing">
<number>2</number> <number>2</number>
@ -498,9 +510,6 @@
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="verticalLayoutWidget_2"> <widget class="QWidget" name="verticalLayoutWidget_2">
<property name="windowTitle">
<string>Payload</string>
</property>
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
@ -509,6 +518,9 @@
<height>401</height> <height>401</height>
</rect> </rect>
</property> </property>
<property name="windowTitle">
<string>Payload</string>
</property>
<layout class="QVBoxLayout" name="messageLayout"> <layout class="QVBoxLayout" name="messageLayout">
<property name="spacing"> <property name="spacing">
<number>2</number> <number>2</number>
@ -1180,19 +1192,6 @@
</item> </item>
</layout> </layout>
</item> </item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</widget> </widget>
</widget> </widget>

View File

@ -22,6 +22,7 @@
#include <QTime> #include <QTime>
#include <QDebug> #include <QDebug>
#include <QMessageBox> #include <QMessageBox>
#include <QResizeEvent>
#include <cmath> #include <cmath>
@ -66,11 +67,13 @@ DATVModGUI::DATVModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandS
m_tickCount(0), m_tickCount(0),
m_enableNavTime(false) m_enableNavTime(false)
{ {
ui->setupUi(getRollupContents());
getRollupContents()->arrangeRollups();
m_helpURL = "plugins/channeltx/moddatv/readme.md";
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
connect(getRollupContents(), SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool))); m_helpURL = "plugins/channeltx/moddatv/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
m_datvMod = (DATVMod*) channelTx; m_datvMod = (DATVMod*) channelTx;
@ -150,6 +153,14 @@ bool DATVModGUI::deserialize(const QByteArray& data)
} }
} }
void DATVModGUI::resizeEvent(QResizeEvent* size)
{
int maxWidth = getRollupContents()->maximumWidth();
int minHeight = getRollupContents()->minimumHeight() + getAdditionalHeight();
resize(width() < maxWidth ? width() : maxWidth, minHeight);
size->accept();
}
bool DATVModGUI::handleMessage(const Message& message) bool DATVModGUI::handleMessage(const Message& message)
{ {
if (DATVModReport::MsgReportTsFileSourceStreamData::match(message)) if (DATVModReport::MsgReportTsFileSourceStreamData::match(message))

View File

@ -63,6 +63,9 @@ public:
public slots: public slots:
void channelMarkerChangedByCursor(); void channelMarkerChangedByCursor();
protected:
void resizeEvent(QResizeEvent* size);
private: private:
Ui::DATVModGUI* ui; Ui::DATVModGUI* ui;
PluginAPI* m_pluginAPI; PluginAPI* m_pluginAPI;

View File

@ -11,7 +11,7 @@
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@ -22,6 +22,12 @@
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
<property name="maximumSize">
<size>
<width>700</width>
<height>16777215</height>
</size>
</property>
<property name="font"> <property name="font">
<font> <font>
<family>Liberation Sans</family> <family>Liberation Sans</family>
@ -799,17 +805,17 @@
<header>gui/rollupcontents.h</header> <header>gui/rollupcontents.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>ButtonSwitch</class>
<extends>QToolButton</extends>
<header>gui/buttonswitch.h</header>
</customwidget>
<customwidget> <customwidget>
<class>ValueDialZ</class> <class>ValueDialZ</class>
<extends>QWidget</extends> <extends>QWidget</extends>
<header>gui/valuedialz.h</header> <header>gui/valuedialz.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>ButtonSwitch</class>
<extends>QToolButton</extends>
<header>gui/buttonswitch.h</header>
</customwidget>
</customwidgets> </customwidgets>
<resources> <resources>
<include location="../../../sdrgui/resources/res.qrc"/> <include location="../../../sdrgui/resources/res.qrc"/>

View File

@ -295,7 +295,18 @@ void FreeDVModGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget; (void) widget;
(void) rollDown; (void) rollDown;
getRollupContents()->saveState(m_rollupState); RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
resize(width(), h);
rollupContents->saveState(m_rollupState);
applySettings(); applySettings();
} }
@ -363,11 +374,13 @@ FreeDVModGUI::FreeDVModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseb
m_tickCount(0), m_tickCount(0),
m_enableNavTime(false) m_enableNavTime(false)
{ {
ui->setupUi(getRollupContents());
getRollupContents()->arrangeRollups();
m_helpURL = "plugins/channeltx/modfreedv/readme.md";
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
connect(getRollupContents(), SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool))); m_helpURL = "plugins/channeltx/modfreedv/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
m_freeDVMod = (FreeDVMod*) channelTx; m_freeDVMod = (FreeDVMod*) channelTx;

View File

@ -11,7 +11,7 @@
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Preferred"> <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@ -675,6 +675,12 @@
<height>284</height> <height>284</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle"> <property name="windowTitle">
<string>Channel Spectrum</string> <string>Channel Spectrum</string>
</property> </property>
@ -696,6 +702,12 @@
</property> </property>
<item> <item>
<widget class="GLSpectrum" name="glSpectrum" native="true"> <widget class="GLSpectrum" name="glSpectrum" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>200</width> <width>200</width>
@ -736,9 +748,9 @@
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget> <customwidget>
<class>LevelMeterVU</class> <class>ValueDialZ</class>
<extends>QWidget</extends> <extends>QWidget</extends>
<header>gui/levelmeter.h</header> <header>gui/valuedialz.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget> <customwidget>
@ -747,15 +759,15 @@
<header>gui/buttonswitch.h</header> <header>gui/buttonswitch.h</header>
</customwidget> </customwidget>
<customwidget> <customwidget>
<class>CWKeyerGUI</class> <class>LevelMeterVU</class>
<extends>QWidget</extends> <extends>QWidget</extends>
<header>gui/cwkeyergui.h</header> <header>gui/levelmeter.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget> <customwidget>
<class>ValueDialZ</class> <class>CWKeyerGUI</class>
<extends>QWidget</extends> <extends>QWidget</extends>
<header>gui/valuedialz.h</header> <header>gui/cwkeyergui.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
</customwidgets> </customwidgets>

View File

@ -21,6 +21,7 @@
#include <QTime> #include <QTime>
#include <QDebug> #include <QDebug>
#include <QRegExp> #include <QRegExp>
#include <QResizeEvent>
#include "device/deviceuiset.h" #include "device/deviceuiset.h"
#include "plugin/pluginapi.h" #include "plugin/pluginapi.h"
@ -74,6 +75,14 @@ bool NFMModGUI::deserialize(const QByteArray& data)
} }
} }
void NFMModGUI::resizeEvent(QResizeEvent* size)
{
int maxWidth = getRollupContents()->maximumWidth();
int minHeight = getRollupContents()->minimumHeight() + getAdditionalHeight();
resize(width() < maxWidth ? width() : maxWidth, minHeight);
size->accept();
}
bool NFMModGUI::handleMessage(const Message& message) bool NFMModGUI::handleMessage(const Message& message)
{ {
if (NFMMod::MsgReportFileSourceStreamData::match(message)) if (NFMMod::MsgReportFileSourceStreamData::match(message))
@ -424,10 +433,13 @@ NFMModGUI::NFMModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSam
m_enableNavTime(false), m_enableNavTime(false),
m_dcsCodeValidator(QRegExp("[0-7]{1,3}")) m_dcsCodeValidator(QRegExp("[0-7]{1,3}"))
{ {
ui->setupUi(getRollupContents());
getRollupContents()->arrangeRollups();
m_helpURL = "plugins/channeltx/modnfm/readme.md";
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
m_helpURL = "plugins/channeltx/modnfm/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
ui->channelSpacing->blockSignals(true); ui->channelSpacing->blockSignals(true);
ui->channelSpacing->clear(); ui->channelSpacing->clear();
@ -439,7 +451,6 @@ NFMModGUI::NFMModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSam
ui->channelSpacing->setCurrentIndex(NFMModSettings::getChannelSpacingIndex(25000)); ui->channelSpacing->setCurrentIndex(NFMModSettings::getChannelSpacingIndex(25000));
ui->channelSpacing->blockSignals(false); ui->channelSpacing->blockSignals(false);
connect(getRollupContents(), SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
m_nfmMod = (NFMMod*) channelTx; m_nfmMod = (NFMMod*) channelTx;

View File

@ -63,6 +63,9 @@ public:
public slots: public slots:
void channelMarkerChangedByCursor(); void channelMarkerChangedByCursor();
protected:
void resizeEvent(QResizeEvent* size);
private: private:
Ui::NFMModGUI* ui; Ui::NFMModGUI* ui;
PluginAPI* m_pluginAPI; PluginAPI* m_pluginAPI;

View File

@ -11,7 +11,7 @@
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum"> <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@ -22,6 +22,12 @@
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
<property name="maximumSize">
<size>
<width>560</width>
<height>16777215</height>
</size>
</property>
<property name="font"> <property name="font">
<font> <font>
<family>Liberation Sans</family> <family>Liberation Sans</family>
@ -933,17 +939,17 @@
<header>gui/rollupcontents.h</header> <header>gui/rollupcontents.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>ButtonSwitch</class>
<extends>QToolButton</extends>
<header>gui/buttonswitch.h</header>
</customwidget>
<customwidget> <customwidget>
<class>ValueDialZ</class> <class>ValueDialZ</class>
<extends>QWidget</extends> <extends>QWidget</extends>
<header>gui/valuedialz.h</header> <header>gui/valuedialz.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>ButtonSwitch</class>
<extends>QToolButton</extends>
<header>gui/buttonswitch.h</header>
</customwidget>
<customwidget> <customwidget>
<class>LevelMeterVU</class> <class>LevelMeterVU</class>
<extends>QWidget</extends> <extends>QWidget</extends>

View File

@ -380,7 +380,18 @@ void PacketModGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget; (void) widget;
(void) rollDown; (void) rollDown;
getRollupContents()->saveState(m_rollupState); RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
resize(width(), h);
rollupContents->saveState(m_rollupState);
applySettings(); applySettings();
} }
@ -441,12 +452,13 @@ PacketModGUI::PacketModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseb
m_basebandSampleRate(1), m_basebandSampleRate(1),
m_doApplySettings(true) m_doApplySettings(true)
{ {
ui->setupUi(getRollupContents());
getRollupContents()->arrangeRollups();
m_helpURL = "plugins/channeltx/modpacket/readme.md";
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
m_helpURL = "plugins/channeltx/modpacket/readme.md";
connect(getRollupContents(), SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool))); RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
m_packetMod = (PacketMod*) channelTx; m_packetMod = (PacketMod*) channelTx;

View File

@ -11,7 +11,7 @@
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Expanding"> <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@ -828,6 +828,12 @@ APRS examples:
<height>284</height> <height>284</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle"> <property name="windowTitle">
<string>Baseband Spectrum</string> <string>Baseband Spectrum</string>
</property> </property>
@ -849,6 +855,12 @@ APRS examples:
</property> </property>
<item> <item>
<widget class="GLSpectrum" name="glSpectrum" native="true"> <widget class="GLSpectrum" name="glSpectrum" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>200</width> <width>200</width>
@ -876,17 +888,6 @@ APRS examples:
<header>gui/rollupcontents.h</header> <header>gui/rollupcontents.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>ValueDialZ</class>
<extends>QWidget</extends>
<header>gui/valuedialz.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>ButtonSwitch</class>
<extends>QToolButton</extends>
<header>gui/buttonswitch.h</header>
</customwidget>
<customwidget> <customwidget>
<class>GLSpectrum</class> <class>GLSpectrum</class>
<extends>QWidget</extends> <extends>QWidget</extends>
@ -899,6 +900,17 @@ APRS examples:
<header>gui/glspectrumgui.h</header> <header>gui/glspectrumgui.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>ValueDialZ</class>
<extends>QWidget</extends>
<header>gui/valuedialz.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>ButtonSwitch</class>
<extends>QToolButton</extends>
<header>gui/buttonswitch.h</header>
</customwidget>
<customwidget> <customwidget>
<class>LevelMeterVU</class> <class>LevelMeterVU</class>
<extends>QWidget</extends> <extends>QWidget</extends>

View File

@ -359,7 +359,18 @@ void SSBModGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget; (void) widget;
(void) rollDown; (void) rollDown;
getRollupContents()->saveState(m_rollupState); RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
resize(width(), h);
rollupContents->saveState(m_rollupState);
applySettings(); applySettings();
} }
@ -428,11 +439,13 @@ SSBModGUI::SSBModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSam
m_tickCount(0), m_tickCount(0),
m_enableNavTime(false) m_enableNavTime(false)
{ {
ui->setupUi(getRollupContents());
getRollupContents()->arrangeRollups();
m_helpURL = "plugins/channeltx/modssb/readme.md";
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
connect(getRollupContents(), SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool))); m_helpURL = "plugins/channeltx/modssb/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
m_ssbMod = (SSBMod*) channelTx; m_ssbMod = (SSBMod*) channelTx;

View File

@ -1235,6 +1235,12 @@
</property> </property>
<item> <item>
<widget class="GLSpectrum" name="glSpectrum" native="true"> <widget class="GLSpectrum" name="glSpectrum" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>200</width> <width>200</width>
@ -1262,17 +1268,6 @@
<header>gui/rollupcontents.h</header> <header>gui/rollupcontents.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>ButtonSwitch</class>
<extends>QToolButton</extends>
<header>gui/buttonswitch.h</header>
</customwidget>
<customwidget>
<class>ValueDialZ</class>
<extends>QWidget</extends>
<header>gui/valuedialz.h</header>
<container>1</container>
</customwidget>
<customwidget> <customwidget>
<class>GLSpectrum</class> <class>GLSpectrum</class>
<extends>QWidget</extends> <extends>QWidget</extends>
@ -1286,9 +1281,15 @@
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget> <customwidget>
<class>TickedSlider</class> <class>ValueDialZ</class>
<extends>QSlider</extends> <extends>QWidget</extends>
<header>gui/tickedslider.h</header> <header>gui/valuedialz.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>ButtonSwitch</class>
<extends>QToolButton</extends>
<header>gui/buttonswitch.h</header>
</customwidget> </customwidget>
<customwidget> <customwidget>
<class>LevelMeterVU</class> <class>LevelMeterVU</class>
@ -1302,6 +1303,11 @@
<header>gui/cwkeyergui.h</header> <header>gui/cwkeyergui.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>TickedSlider</class>
<extends>QSlider</extends>
<header>gui/tickedslider.h</header>
</customwidget>
</customwidgets> </customwidgets>
<resources> <resources>
<include location="../../../sdrgui/resources/res.qrc"/> <include location="../../../sdrgui/resources/res.qrc"/>

View File

@ -21,6 +21,7 @@
#include <QFileDialog> #include <QFileDialog>
#include <QTime> #include <QTime>
#include <QDebug> #include <QDebug>
#include <QResizeEvent>
#include "device/deviceuiset.h" #include "device/deviceuiset.h"
#include "plugin/pluginapi.h" #include "plugin/pluginapi.h"
@ -73,6 +74,14 @@ bool WFMModGUI::deserialize(const QByteArray& data)
} }
} }
void WFMModGUI::resizeEvent(QResizeEvent* size)
{
int maxWidth = getRollupContents()->maximumWidth();
int minHeight = getRollupContents()->minimumHeight() + getAdditionalHeight();
resize(width() < maxWidth ? width() : maxWidth, minHeight);
size->accept();
}
bool WFMModGUI::handleMessage(const Message& message) bool WFMModGUI::handleMessage(const Message& message)
{ {
if (WFMMod::MsgReportFileSourceStreamData::match(message)) if (WFMMod::MsgReportFileSourceStreamData::match(message))
@ -357,10 +366,13 @@ WFMModGUI::WFMModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSam
m_tickCount(0), m_tickCount(0),
m_enableNavTime(false) m_enableNavTime(false)
{ {
ui->setupUi(getRollupContents());
getRollupContents()->arrangeRollups();
m_helpURL = "plugins/channeltx/modwfm/readme.md";
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
m_helpURL = "plugins/channeltx/modwfm/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
blockApplySettings(true); blockApplySettings(true);
@ -372,7 +384,6 @@ WFMModGUI::WFMModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSam
blockApplySettings(false); blockApplySettings(false);
connect(getRollupContents(), SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
m_wfmMod = (WFMMod*) channelTx; m_wfmMod = (WFMMod*) channelTx;

View File

@ -61,6 +61,9 @@ public:
public slots: public slots:
void channelMarkerChangedByCursor(); void channelMarkerChangedByCursor();
protected:
void resizeEvent(QResizeEvent* size);
private: private:
Ui::WFMModGUI* ui; Ui::WFMModGUI* ui;
PluginAPI* m_pluginAPI; PluginAPI* m_pluginAPI;

View File

@ -6,22 +6,28 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>298</width> <width>360</width>
<height>300</height> <height>300</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred"> <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>360</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
<property name="maximumSize">
<size>
<width>560</width>
<height>16777215</height>
</size>
</property>
<property name="font"> <property name="font">
<font> <font>
<family>Liberation Sans</family> <family>Liberation Sans</family>
@ -771,9 +777,9 @@
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget> <customwidget>
<class>LevelMeterVU</class> <class>ValueDialZ</class>
<extends>QWidget</extends> <extends>QWidget</extends>
<header>gui/levelmeter.h</header> <header>gui/valuedialz.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget> <customwidget>
@ -782,15 +788,15 @@
<header>gui/buttonswitch.h</header> <header>gui/buttonswitch.h</header>
</customwidget> </customwidget>
<customwidget> <customwidget>
<class>CWKeyerGUI</class> <class>LevelMeterVU</class>
<extends>QWidget</extends> <extends>QWidget</extends>
<header>gui/cwkeyergui.h</header> <header>gui/levelmeter.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget> <customwidget>
<class>ValueDialZ</class> <class>CWKeyerGUI</class>
<extends>QWidget</extends> <extends>QWidget</extends>
<header>gui/valuedialz.h</header> <header>gui/cwkeyergui.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
</customwidgets> </customwidgets>

View File

@ -16,6 +16,7 @@
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#include <QTime> #include <QTime>
#include <QResizeEvent>
#include "device/deviceapi.h" #include "device/deviceapi.h"
#include "device/deviceuiset.h" #include "device/deviceuiset.h"
@ -65,6 +66,14 @@ bool RemoteSourceGUI::deserialize(const QByteArray& data)
} }
} }
void RemoteSourceGUI::resizeEvent(QResizeEvent* size)
{
int maxWidth = getRollupContents()->maximumWidth();
int minHeight = getRollupContents()->minimumHeight() + getAdditionalHeight();
resize(width() < maxWidth ? width() : maxWidth, minHeight);
size->accept();
}
bool RemoteSourceGUI::handleMessage(const Message& message) bool RemoteSourceGUI::handleMessage(const Message& message)
{ {
if (DSPSignalNotification::match(message)) if (DSPSignalNotification::match(message))
@ -172,11 +181,13 @@ RemoteSourceGUI::RemoteSourceGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet,
m_resetCounts(true), m_resetCounts(true),
m_tickCount(0) m_tickCount(0)
{ {
ui->setupUi(getRollupContents());
getRollupContents()->arrangeRollups();
m_helpURL = "plugins/channeltx/remotesource/readme.md";
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
connect(getRollupContents(), SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool))); m_helpURL = "plugins/channeltx/remotesource/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
m_remoteSrc = (RemoteSource*) channelTx; m_remoteSrc = (RemoteSource*) channelTx;

View File

@ -62,6 +62,9 @@ public:
public slots: public slots:
void channelMarkerChangedByCursor(); void channelMarkerChangedByCursor();
protected:
void resizeEvent(QResizeEvent* size);
private: private:
Ui::RemoteSourceGUI* ui; Ui::RemoteSourceGUI* ui;
PluginAPI* m_pluginAPI; PluginAPI* m_pluginAPI;

View File

@ -11,7 +11,7 @@
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum"> <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@ -24,7 +24,7 @@
</property> </property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>320</width> <width>560</width>
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
@ -40,8 +40,8 @@
<widget class="QWidget" name="settingsContainer" native="true"> <widget class="QWidget" name="settingsContainer" native="true">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>10</x> <x>0</x>
<y>10</y> <y>0</y>
<width>301</width> <width>301</width>
<height>191</height> <height>191</height>
</rect> </rect>
@ -571,19 +571,6 @@
</item> </item>
</layout> </layout>
</item> </item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</widget> </widget>
</widget> </widget>

View File

@ -120,12 +120,14 @@ UDPSourceGUI::UDPSourceGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, Baseb
m_rfBandwidthChanged(false), m_rfBandwidthChanged(false),
m_doApplySettings(true) m_doApplySettings(true)
{ {
ui->setupUi(getRollupContents());
getRollupContents()->arrangeRollups();
m_helpURL = "plugins/channeltx/udpsource/readme.md";
connect(getRollupContents(), SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
setAttribute(Qt::WA_DeleteOnClose, true); setAttribute(Qt::WA_DeleteOnClose, true);
m_helpURL = "plugins/channeltx/udpsource/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
m_udpSource = (UDPSource*) channelTx; m_udpSource = (UDPSource*) channelTx;
m_spectrumVis = m_udpSource->getSpectrumVis(); m_spectrumVis = m_udpSource->getSpectrumVis();
@ -480,7 +482,18 @@ void UDPSourceGUI::onWidgetRolled(QWidget* widget, bool rollDown)
m_udpSource->setSpectrum(rollDown); m_udpSource->setSpectrum(rollDown);
} }
getRollupContents()->saveState(m_rollupState); RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
resize(width(), h);
rollupContents->saveState(m_rollupState);
applySettings(); applySettings();
} }

View File

@ -6,7 +6,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>414</width> <width>420</width>
<height>400</height> <height>400</height>
</rect> </rect>
</property> </property>
@ -18,16 +18,10 @@
</property> </property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>395</width> <width>420</width>
<height>0</height> <height>0</height>
</size> </size>
</property> </property>
<property name="maximumSize">
<size>
<width>414</width>
<height>16777215</height>
</size>
</property>
<property name="font"> <property name="font">
<font> <font>
<family>Liberation Sans</family> <family>Liberation Sans</family>
@ -1091,17 +1085,6 @@
<header>gui/rollupcontents.h</header> <header>gui/rollupcontents.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>ButtonSwitch</class>
<extends>QToolButton</extends>
<header>gui/buttonswitch.h</header>
</customwidget>
<customwidget>
<class>ValueDialZ</class>
<extends>QWidget</extends>
<header>gui/valuedialz.h</header>
<container>1</container>
</customwidget>
<customwidget> <customwidget>
<class>GLSpectrum</class> <class>GLSpectrum</class>
<extends>QWidget</extends> <extends>QWidget</extends>
@ -1114,6 +1097,17 @@
<header>gui/glspectrumgui.h</header> <header>gui/glspectrumgui.h</header>
<container>1</container> <container>1</container>
</customwidget> </customwidget>
<customwidget>
<class>ValueDialZ</class>
<extends>QWidget</extends>
<header>gui/valuedialz.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>ButtonSwitch</class>
<extends>QToolButton</extends>
<header>gui/buttonswitch.h</header>
</customwidget>
<customwidget> <customwidget>
<class>LevelMeterVU</class> <class>LevelMeterVU</class>
<extends>QWidget</extends> <extends>QWidget</extends>