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

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
@@ -16,6 +16,7 @@
///////////////////////////////////////////////////////////////////////////////////
#include <QTime>
#include <QResizeEvent>
#include "device/deviceapi.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)
{
if (DSPSignalNotification::match(message))
@@ -172,11 +181,13 @@ RemoteSourceGUI::RemoteSourceGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet,
m_resetCounts(true),
m_tickCount(0)
{
ui->setupUi(getRollupContents());
getRollupContents()->arrangeRollups();
m_helpURL = "plugins/channeltx/remotesource/readme.md";
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 &)));
m_remoteSrc = (RemoteSource*) channelTx;