1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-06-02 14:04:46 -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
+15 -4
View File
@@ -22,6 +22,7 @@
#include <QTime>
#include <QDebug>
#include <QMessageBox>
#include <QResizeEvent>
#include <cmath>
@@ -66,11 +67,13 @@ DATVModGUI::DATVModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandS
m_tickCount(0),
m_enableNavTime(false)
{
ui->setupUi(getRollupContents());
getRollupContents()->arrangeRollups();
m_helpURL = "plugins/channeltx/moddatv/readme.md";
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 &)));
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)
{
if (DATVModReport::MsgReportTsFileSourceStreamData::match(message))