dd maximize button to MainSpectrum and expandible Channels and Features.

Add sizeToContents in ChannelGUI and FeatureGUI, called when widget is
rolled, so we can remove resizing code from all of the individual
channels and features.

In RollupContents, use minimumSizeHint for calculated size, so that
minimumWidth can come from .ui file.

In DeviceGUI::sizeToContents(), call adjustSize(), so Device GUIs start
out at minimum needed size (which should restore appearance prior to
last patch).

In stackSubWindows, use available space for channels if no
spectrum/features present.
In stackSubWindows, fix spectrum from being sized too big, resulting in
scroll bars appearing.
Reset user-defined channel width in stackSubWindows, when channels are
removed.
Don't stack maximized windows.

There's one hack in Channel/FeatureGUI::maximizeWindow(). It seems that
when maximimzing a window, QOpenGLWidgets aren't always paint properly
immediately afterwards, so the code forces an additional update. I can't
see why the first call to paintGL doesn't work.
pull/1510/head
Jon Beniston 2022-11-11 12:24:27 +00:00
rodzic b6e13d1e6c
commit c966f1cb5a
108 zmienionych plików z 340 dodań i 828 usunięć

Wyświetl plik

@ -16,7 +16,6 @@
///////////////////////////////////////////////////////////////////////////////////
#include <QLocale>
#include <QResizeEvent>
#include "device/deviceuiset.h"
#include "gui/basicchannelsettingsdialog.h"
@ -62,14 +61,6 @@ 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)
{
if (BeamSteeringCWMod::MsgBasebandNotification::match(message))

Wyświetl plik

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

Wyświetl plik

@ -283,18 +283,7 @@ void DOA2GUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget;
(void) rollDown;
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);
getRollupContents()->saveState(m_rollupState);
applySettings();
}

Wyświetl plik

@ -252,18 +252,7 @@ void InterferometerGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget;
(void) rollDown;
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);
getRollupContents()->saveState(m_rollupState);
applySettings();
}

Wyświetl plik

@ -458,19 +458,7 @@ void ChannelAnalyzerGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget;
(void) rollDown;
RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
int w = std::max(width(), rollupContents->minimumWidth() + gripSize() * 2);
resize(w, h);
rollupContents->saveState(m_rollupState);
getRollupContents()->saveState(m_rollupState);
applySettings();
}

Wyświetl plik

@ -372,19 +372,7 @@ void AISDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget;
(void) rollDown;
RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
int w = std::max(width(), rollupContents->minimumWidth() + gripSize() * 2);
resize(w, h);
rollupContents->saveState(m_rollupState);
getRollupContents()->saveState(m_rollupState);
applySettings();
}

Wyświetl plik

@ -18,7 +18,6 @@
#include <QDockWidget>
#include <QMainWindow>
#include <QDebug>
#include <QResizeEvent>
#include "amdemodgui.h"
#include "amdemodssbdialog.h"
@ -73,14 +72,6 @@ bool AMDemodGUI::deserialize(const QByteArray& data)
}
}
void AMDemodGUI::resizeEvent(QResizeEvent* size)
{
int maxWidth = getRollupContents()->maximumWidth();
int minHeight = getRollupContents()->minimumHeight() + getAdditionalHeight();
resize(width() < maxWidth ? width() : maxWidth, minHeight);
size->accept();
}
bool AMDemodGUI::handleMessage(const Message& message)
{
if (AMDemod::MsgConfigureAMDemod::match(message))

Wyświetl plik

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

Wyświetl plik

@ -547,19 +547,7 @@ void APTDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget;
(void) rollDown;
RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
int w = std::max(width(), rollupContents->minimumWidth() + gripSize() * 2);
resize(w, h);
rollupContents->saveState(m_rollupState);
getRollupContents()->saveState(m_rollupState);
applySettings();
}

Wyświetl plik

@ -18,7 +18,6 @@
#include <QDockWidget>
#include <QMainWindow>
#include <QResizeEvent>
#include "atvdemodgui.h"
@ -77,14 +76,6 @@ 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()
{
m_channelMarker.blockSignals(true);

Wyświetl plik

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

Wyświetl plik

@ -316,19 +316,7 @@ void BFMDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget;
(void) rollDown;
RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
int w = std::max(width(), rollupContents->minimumWidth() + gripSize() * 2);
resize(w, h);
rollupContents->saveState(m_rollupState);
getRollupContents()->saveState(m_rollupState);
applySettings();
}

Wyświetl plik

@ -329,19 +329,7 @@ void ChirpChatDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget;
(void) rollDown;
RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
int w = std::max(width(), rollupContents->minimumWidth() + gripSize() * 2);
resize(w, h);
rollupContents->saveState(m_rollupState);
getRollupContents()->saveState(m_rollupState);
applySettings();
}

Wyświetl plik

@ -392,19 +392,7 @@ void DABDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget;
(void) rollDown;
RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
int w = std::max(width(), rollupContents->minimumWidth() + gripSize() * 2);
resize(w, h);
rollupContents->saveState(m_rollupState);
getRollupContents()->saveState(m_rollupState);
applySettings();
}

Wyświetl plik

@ -20,7 +20,6 @@
#include <QDockWidget>
#include <QMainWindow>
#include <QMediaMetaData>
#include <QResizeEvent>
#include "device/deviceuiset.h"
#include "dsp/dspengine.h"
@ -93,14 +92,6 @@ 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)
{
if (DATVDemodReport::MsgReportModcodCstlnChange::match(message))

Wyświetl plik

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

Wyświetl plik

@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>540</width>
<width>556</width>
<height>476</height>
</rect>
</property>
@ -18,13 +18,13 @@
</property>
<property name="minimumSize">
<size>
<width>540</width>
<width>556</width>
<height>442</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>540</width>
<width>556</width>
<height>476</height>
</size>
</property>

Wyświetl plik

@ -82,14 +82,6 @@ bool DSDDemodGUI::deserialize(const QByteArray& data)
}
}
void DSDDemodGUI::resizeEvent(QResizeEvent* size)
{
int maxWidth = getRollupContents()->maximumWidth();
int minHeight = getRollupContents()->minimumHeight() + getAdditionalHeight();
resize(width() < maxWidth ? width() : maxWidth, minHeight);
size->accept();
}
bool DSDDemodGUI::handleMessage(const Message& message)
{
if (DSDDemod::MsgConfigureDSDDemod::match(message))

Wyświetl plik

@ -68,9 +68,6 @@ public slots:
void channelMarkerChangedByCursor();
void channelMarkerHighlightedByCursor();
protected:
void resizeEvent(QResizeEvent* size);
private:
// typedef enum
// {

Wyświetl plik

@ -248,19 +248,7 @@ void FreeDVDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget;
(void) rollDown;
RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
int w = std::max(width(), rollupContents->minimumWidth() + gripSize() * 2);
resize(w, h);
rollupContents->saveState(m_rollupState);
getRollupContents()->saveState(m_rollupState);
applySettings();
}

Wyświetl plik

@ -86,14 +86,6 @@ bool M17DemodGUI::deserialize(const QByteArray& data)
}
}
void M17DemodGUI::resizeEvent(QResizeEvent* size)
{
int maxWidth = getRollupContents()->maximumWidth();
int minHeight = getRollupContents()->minimumHeight() + getAdditionalHeight();
resize(width() < maxWidth ? width() : maxWidth, minHeight);
size->accept();
}
bool M17DemodGUI::handleMessage(const Message& message)
{
if (M17Demod::MsgConfigureM17Demod::match(message))

Wyświetl plik

@ -70,9 +70,6 @@ public slots:
void channelMarkerChangedByCursor();
void channelMarkerHighlightedByCursor();
protected:
void resizeEvent(QResizeEvent* size);
private:
struct BERPoint
{

Wyświetl plik

@ -55,14 +55,6 @@ bool NFMDemodGUI::deserialize(const QByteArray& data)
}
}
void NFMDemodGUI::resizeEvent(QResizeEvent* size)
{
int maxWidth = getRollupContents()->maximumWidth();
int minHeight = getRollupContents()->minimumHeight() + getAdditionalHeight();
resize(width() < maxWidth ? width() : maxWidth, minHeight);
size->accept();
}
bool NFMDemodGUI::handleMessage(const Message& message)
{
if (NFMDemodReport::MsgReportCTCSSFreq::match(message))

Wyświetl plik

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

Wyświetl plik

@ -374,19 +374,7 @@ void PacketDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget;
(void) rollDown;
RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
int w = std::max(width(), rollupContents->minimumWidth() + gripSize() * 2);
resize(w, h);
rollupContents->saveState(m_rollupState);
getRollupContents()->saveState(m_rollupState);
applySettings();
}

Wyświetl plik

@ -421,19 +421,7 @@ void PagerDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget;
(void) rollDown;
RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
int w = std::max(width(), rollupContents->minimumWidth() + gripSize() * 2);
resize(w, h);
rollupContents->saveState(m_rollupState);
getRollupContents()->saveState(m_rollupState);
applySettings();
}

Wyświetl plik

@ -478,19 +478,7 @@ void RadiosondeDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget;
(void) rollDown;
RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
int w = std::max(width(), rollupContents->minimumWidth() + gripSize() * 2);
resize(w, h);
rollupContents->saveState(m_rollupState);
getRollupContents()->saveState(m_rollupState);
applySettings();
}

Wyświetl plik

@ -314,19 +314,7 @@ void SSBDemodGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget;
(void) rollDown;
RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
int w = std::max(width(), rollupContents->minimumWidth() + gripSize() * 2);
resize(w, h);
rollupContents->saveState(m_rollupState);
getRollupContents()->saveState(m_rollupState);
applySettings();
}

Wyświetl plik

@ -19,7 +19,6 @@
#include <limits>
#include <QDebug>
#include <QResizeEvent>
#include "device/deviceuiset.h"
#include "dsp/dspengine.h"
@ -77,14 +76,6 @@ bool VORDemodGUI::deserialize(const QByteArray& data)
}
}
void VORDemodGUI::resizeEvent(QResizeEvent* size)
{
int maxWidth = getRollupContents()->maximumWidth();
int minHeight = getRollupContents()->minimumHeight() + getAdditionalHeight();
resize(width() < maxWidth ? width() : maxWidth, minHeight);
size->accept();
}
bool VORDemodGUI::handleMessage(const Message& message)
{
if (VORDemod::MsgConfigureVORDemod::match(message))

Wyświetl plik

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

Wyświetl plik

@ -1107,19 +1107,7 @@ void VORDemodMCGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget;
(void) rollDown;
RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
int w = std::max(width(), rollupContents->minimumWidth() + gripSize() * 2);
resize(w, h);
rollupContents->saveState(m_rollupState);
getRollupContents()->saveState(m_rollupState);
applySettings();
}

Wyświetl plik

@ -55,14 +55,6 @@ bool WFMDemodGUI::deserialize(const QByteArray& data)
}
}
void WFMDemodGUI::resizeEvent(QResizeEvent* size)
{
int maxWidth = getRollupContents()->maximumWidth();
int minHeight = getRollupContents()->minimumHeight() + getAdditionalHeight();
resize(width() < maxWidth ? width() : maxWidth, minHeight);
size->accept();
}
bool WFMDemodGUI::handleMessage(const Message& message)
{
if (WFMDemod::MsgConfigureWFMDemod::match(message))

Wyświetl plik

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

Wyświetl plik

@ -355,19 +355,7 @@ void FileSinkGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget;
(void) rollDown;
RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
int w = std::max(width(), rollupContents->minimumWidth() + gripSize() * 2);
resize(w, h);
rollupContents->saveState(m_rollupState);
getRollupContents()->saveState(m_rollupState);
applySettings();
}

Wyświetl plik

@ -16,7 +16,6 @@
///////////////////////////////////////////////////////////////////////////////////
#include <QLocale>
#include <QResizeEvent>
#include "device/deviceuiset.h"
#include "gui/basicchannelsettingsdialog.h"
@ -69,14 +68,6 @@ 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)
{
if (DSPSignalNotification::match(message))

Wyświetl plik

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

Wyświetl plik

@ -537,19 +537,7 @@ void NoiseFigureGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget;
(void) rollDown;
RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
int w = std::max(width(), rollupContents->minimumWidth() + gripSize() * 2);
resize(w, h);
rollupContents->saveState(m_rollupState);
getRollupContents()->saveState(m_rollupState);
applySettings();
}

Wyświetl plik

@ -1906,19 +1906,7 @@ void RadioAstronomyGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget;
(void) rollDown;
RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
int w = std::max(width(), rollupContents->minimumWidth() + gripSize() * 2);
resize(w, h);
rollupContents->saveState(m_rollupState);
getRollupContents()->saveState(m_rollupState);
applySettings();
}

Wyświetl plik

@ -212,19 +212,7 @@ void RadioClockGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget;
(void) rollDown;
RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
int w = std::max(width(), rollupContents->minimumWidth() + gripSize() * 2);
resize(w, h);
rollupContents->saveState(m_rollupState);
getRollupContents()->saveState(m_rollupState);
applySettings();
}

Wyświetl plik

@ -16,7 +16,6 @@
///////////////////////////////////////////////////////////////////////////////////
#include <QLocale>
#include <QResizeEvent>
#include "device/deviceuiset.h"
#include "gui/basicchannelsettingsdialog.h"
@ -64,14 +63,6 @@ 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)
{
if (RemoteSink::MsgConfigureRemoteSink::match(message))

Wyświetl plik

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

Wyświetl plik

@ -17,7 +17,6 @@
///////////////////////////////////////////////////////////////////////////////////
#include <QLocale>
#include <QResizeEvent>
#include "device/deviceuiset.h"
#include "gui/basicchannelsettingsdialog.h"
@ -65,14 +64,6 @@ bool RemoteTCPSinkGUI::deserialize(const QByteArray& data)
}
}
void RemoteTCPSinkGUI::resizeEvent(QResizeEvent* size)
{
int maxWidth = getRollupContents()->maximumWidth();
int minHeight = getRollupContents()->minimumHeight() + getAdditionalHeight();
resize(width() < maxWidth ? width() : maxWidth, minHeight);
size->accept();
}
QString RemoteTCPSinkGUI::displayScaledF(float value, char type, int precision, bool showMult)
{
float posValue = (value < 0) ? -value : value;

Wyświetl plik

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

Wyświetl plik

@ -347,19 +347,7 @@ void SigMFFileSinkGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget;
(void) rollDown;
RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
int w = std::max(width(), rollupContents->minimumWidth() + gripSize() * 2);
resize(w, h);
rollupContents->saveState(m_rollupState);
getRollupContents()->saveState(m_rollupState);
applySettings();
}

Wyświetl plik

@ -600,19 +600,7 @@ void UDPSinkGUI::onWidgetRolled(QWidget* widget, bool rollDown)
m_udpSink->enableSpectrum(rollDown);
}
RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
int w = std::max(width(), rollupContents->minimumWidth() + gripSize() * 2);
resize(w, h);
rollupContents->saveState(m_rollupState);
getRollupContents()->saveState(m_rollupState);
applySettings();
}

Wyświetl plik

@ -18,7 +18,6 @@
#include <QFileDialog>
#include <QMessageBox>
#include <QDebug>
#include <QResizeEvent>
#include "device/deviceapi.h"
#include "device/deviceuiset.h"
@ -70,14 +69,6 @@ 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)
{
if (DSPSignalNotification::match(message))

Wyświetl plik

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

Wyświetl plik

@ -16,7 +16,6 @@
///////////////////////////////////////////////////////////////////////////////////
#include <QLocale>
#include <QResizeEvent>
#include "device/deviceuiset.h"
#include "gui/basicchannelsettingsdialog.h"
@ -64,14 +63,6 @@ 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)
{
if (DSPSignalNotification::match(message))

Wyświetl plik

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

Wyświetl plik

@ -320,19 +320,7 @@ void IEEE_802_15_4_ModGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget;
(void) rollDown;
RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
int w = std::max(width(), rollupContents->minimumWidth() + gripSize() * 2);
resize(w, h);
rollupContents->saveState(m_rollupState);
getRollupContents()->saveState(m_rollupState);
applySettings();
}

Wyświetl plik

@ -343,19 +343,7 @@ void AISModGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget;
(void) rollDown;
RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
int w = std::max(width(), rollupContents->minimumWidth() + gripSize() * 2);
resize(w, h);
rollupContents->saveState(m_rollupState);
getRollupContents()->saveState(m_rollupState);
applySettings();
}

Wyświetl plik

@ -20,7 +20,6 @@
#include <QFileDialog>
#include <QTime>
#include <QDebug>
#include <QResizeEvent>
#include "device/deviceuiset.h"
@ -74,14 +73,6 @@ 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)
{
if (AMMod::MsgReportFileSourceStreamData::match(message))

Wyświetl plik

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

Wyświetl plik

@ -21,7 +21,6 @@
#include <QTime>
#include <QDebug>
#include <QMessageBox>
#include <QResizeEvent>
#include <cmath>
@ -154,14 +153,6 @@ 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)
{
if (ATVModReport::MsgReportVideoFileSourceStreamData::match(message))

Wyświetl plik

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

Wyświetl plik

@ -20,7 +20,6 @@
#include <QFileDialog>
#include <QTime>
#include <QDebug>
#include <QResizeEvent>
#include "device/deviceuiset.h"
#include "plugin/pluginapi.h"
@ -75,14 +74,6 @@ 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)
{
if (ChirpChatMod::MsgConfigureChirpChatMod::match(message))

Wyświetl plik

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

Wyświetl plik

@ -22,7 +22,6 @@
#include <QTime>
#include <QDebug>
#include <QMessageBox>
#include <QResizeEvent>
#include <cmath>
@ -153,14 +152,6 @@ 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))

Wyświetl plik

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

Wyświetl plik

@ -295,19 +295,7 @@ void FreeDVModGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget;
(void) rollDown;
RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
int w = std::max(width(), rollupContents->minimumWidth() + gripSize() * 2);
resize(w, h);
rollupContents->saveState(m_rollupState);
getRollupContents()->saveState(m_rollupState);
applySettings();
}

Wyświetl plik

@ -21,7 +21,6 @@
#include <QTime>
#include <QDebug>
#include <QRegExp>
#include <QResizeEvent>
#include "device/deviceuiset.h"
#include "plugin/pluginapi.h"
@ -75,14 +74,6 @@ bool M17ModGUI::deserialize(const QByteArray& data)
}
}
void M17ModGUI::resizeEvent(QResizeEvent* size)
{
int maxWidth = getRollupContents()->maximumWidth();
int minHeight = getRollupContents()->minimumHeight() + getAdditionalHeight();
resize(width() < maxWidth ? width() : maxWidth, minHeight);
size->accept();
}
bool M17ModGUI::handleMessage(const Message& message)
{
if (M17Mod::MsgReportFileSourceStreamData::match(message))

Wyświetl plik

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

Wyświetl plik

@ -21,7 +21,6 @@
#include <QTime>
#include <QDebug>
#include <QRegExp>
#include <QResizeEvent>
#include "device/deviceuiset.h"
#include "plugin/pluginapi.h"
@ -75,14 +74,6 @@ 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)
{
if (NFMMod::MsgReportFileSourceStreamData::match(message))

Wyświetl plik

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

Wyświetl plik

@ -380,19 +380,7 @@ void PacketModGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget;
(void) rollDown;
RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
int w = std::max(width(), rollupContents->minimumWidth() + gripSize() * 2);
resize(w, h);
rollupContents->saveState(m_rollupState);
getRollupContents()->saveState(m_rollupState);
applySettings();
}

Wyświetl plik

@ -359,19 +359,7 @@ void SSBModGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) widget;
(void) rollDown;
RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
int w = std::max(width(), rollupContents->minimumWidth() + gripSize() * 2);
resize(w, h);
rollupContents->saveState(m_rollupState);
getRollupContents()->saveState(m_rollupState);
applySettings();
}

Wyświetl plik

@ -21,7 +21,6 @@
#include <QFileDialog>
#include <QTime>
#include <QDebug>
#include <QResizeEvent>
#include "device/deviceuiset.h"
#include "plugin/pluginapi.h"
@ -74,14 +73,6 @@ 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)
{
if (WFMMod::MsgReportFileSourceStreamData::match(message))

Wyświetl plik

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

Wyświetl plik

@ -16,7 +16,6 @@
///////////////////////////////////////////////////////////////////////////////////
#include <QTime>
#include <QResizeEvent>
#include "device/deviceapi.h"
#include "device/deviceuiset.h"
@ -66,14 +65,6 @@ 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))

Wyświetl plik

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

Wyświetl plik

@ -482,19 +482,7 @@ void UDPSourceGUI::onWidgetRolled(QWidget* widget, bool rollDown)
m_udpSource->setSpectrum(rollDown);
}
RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
int w = std::max(width(), rollupContents->minimumWidth() + gripSize() * 2);
resize(w, h);
rollupContents->saveState(m_rollupState);
getRollupContents()->saveState(m_rollupState);
applySettings();
}

Wyświetl plik

@ -16,7 +16,6 @@
///////////////////////////////////////////////////////////////////////////////////
#include <QMessageBox>
#include <QResizeEvent>
#include "feature/featureuiset.h"
#include "device/deviceset.h"
@ -67,14 +66,6 @@ bool AFCGUI::deserialize(const QByteArray& data)
}
}
void AFCGUI::resizeEvent(QResizeEvent* size)
{
int maxWidth = getRollupContents()->maximumWidth();
int minHeight = getRollupContents()->minimumHeight() + getAdditionalHeight();
resize(width() < maxWidth ? width() : maxWidth, minHeight);
size->accept();
}
bool AFCGUI::handleMessage(const Message& message)
{
if (AFC::MsgConfigureAFC::match(message))

Wyświetl plik

@ -48,9 +48,6 @@ public:
virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; }
virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::AFCGUI* ui;
PluginAPI* m_pluginAPI;

Wyświetl plik

@ -169,16 +169,6 @@ void AISGUI::onWidgetRolled(QWidget* widget, bool rollDown)
RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
int w = std::max(width(), rollupContents->minimumWidth() + gripSize() * 2);
resize(w, h);
rollupContents->saveState(m_rollupState);
applySettings();
}
@ -196,7 +186,6 @@ AISGUI::AISGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISet, Feature *featur
m_helpURL = "plugins/feature/ais/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));

Wyświetl plik

@ -46,7 +46,6 @@ AMBEGUI::AMBEGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISet, Feature *feat
m_helpURL = "plugins/feature/ambe/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
@ -103,14 +102,6 @@ void AMBEGUI::setWorkspaceIndex(int index)
m_feature->setWorkspaceIndex(index);
}
void AMBEGUI::resizeEvent(QResizeEvent* size)
{
int maxWidth = getRollupContents()->maximumWidth();
int minHeight = getRollupContents()->minimumHeight() + getAdditionalHeight();
resize(width() < maxWidth ? width() : maxWidth, minHeight);
size->accept();
}
void AMBEGUI::onWidgetRolled(QWidget* widget, bool rollDown)
{
(void) widget;

Wyświetl plik

@ -52,9 +52,6 @@ public:
virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; }
virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::AMBEGUI* ui;
AMBE *m_ambe;

Wyświetl plik

@ -71,12 +71,6 @@ bool AntennaToolsGUI::deserialize(const QByteArray& data)
}
}
void AntennaToolsGUI::resizeEvent(QResizeEvent* size)
{
adjustSize();
size->accept();
}
bool AntennaToolsGUI::handleMessage(const Message& message)
{
if (AntennaTools::MsgConfigureAntennaTools::match(message))
@ -113,16 +107,6 @@ void AntennaToolsGUI::onWidgetRolled(QWidget* widget, bool rollDown)
RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
int w = std::max(width(), rollupContents->minimumWidth() + gripSize() * 2);
resize(w, h);
rollupContents->saveState(m_rollupState);
applySettings();
}
@ -140,7 +124,6 @@ AntennaToolsGUI::AntennaToolsGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISe
m_helpURL = "plugins/feature/antennatools/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));

Wyświetl plik

@ -51,9 +51,6 @@ public:
virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; }
virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::AntennaToolsGUI* ui;
PluginAPI* m_pluginAPI;

Wyświetl plik

@ -11,7 +11,7 @@
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>

Wyświetl plik

@ -436,7 +436,6 @@ APRSGUI::APRSGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISet, Feature *feat
m_helpURL = "plugins/feature/aprs/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
@ -670,12 +669,13 @@ void APRSGUI::updateChannelList()
ui->sourcePipes->blockSignals(false);
}
void APRSGUI::resizeEvent(QResizeEvent*)
void APRSGUI::resizeEvent(QResizeEvent* event)
{
// Replot graphs to ensure Axis are visible
plotWeather();
plotTelemetry();
plotMotion();
FeatureGUI::resizeEvent(event);
}
void APRSGUI::onMenuDialogCalled(const QPoint &p)

Wyświetl plik

@ -128,16 +128,6 @@ void DemodAnalyzerGUI::onWidgetRolled(QWidget* widget, bool rollDown)
RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
int w = std::max(width(), rollupContents->minimumWidth() + gripSize() * 2);
resize(w, h);
rollupContents->saveState(m_rollupState);
applySettings();
}
@ -157,7 +147,6 @@ DemodAnalyzerGUI::DemodAnalyzerGUI(PluginAPI* pluginAPI, FeatureUISet *featureUI
m_helpURL = "plugins/feature/demodanalyzer/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));

Wyświetl plik

@ -19,7 +19,6 @@
#include <cmath>
#include <QMessageBox>
#include <QSerialPortInfo>
#include <QResizeEvent>
#include "SWGTargetAzimuthElevation.h"
@ -72,14 +71,6 @@ bool GS232ControllerGUI::deserialize(const QByteArray& data)
}
}
void GS232ControllerGUI::resizeEvent(QResizeEvent* size)
{
int maxWidth = getRollupContents()->maximumWidth();
int minHeight = getRollupContents()->minimumHeight() + getAdditionalHeight();
resize(width() < maxWidth ? width() : maxWidth, minHeight);
size->accept();
}
bool GS232ControllerGUI::handleMessage(const Message& message)
{
if (GS232Controller::MsgConfigureGS232Controller::match(message))
@ -137,6 +128,7 @@ void GS232ControllerGUI::onWidgetRolled(QWidget* widget, bool rollDown)
{
(void) widget;
(void) rollDown;
getRollupContents()->saveState(m_rollupState);
applySettings();
}
@ -155,7 +147,6 @@ GS232ControllerGUI::GS232ControllerGUI(PluginAPI* pluginAPI, FeatureUISet *featu
m_helpURL = "plugins/feature/gs232controller/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));

Wyświetl plik

@ -50,9 +50,6 @@ public:
virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; }
virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::GS232ControllerGUI* ui;
PluginAPI* m_pluginAPI;

Wyświetl plik

@ -17,7 +17,6 @@
#include <QMessageBox>
#include <QMouseEvent>
#include <QResizeEvent>
#include "feature/featureuiset.h"
#include "gui/basicfeaturesettingsdialog.h"
@ -68,14 +67,6 @@ bool JogdialControllerGUI::deserialize(const QByteArray& data)
}
}
void JogdialControllerGUI::resizeEvent(QResizeEvent* size)
{
int maxWidth = getRollupContents()->maximumWidth();
int minHeight = getRollupContents()->minimumHeight() + getAdditionalHeight();
resize(width() < maxWidth ? width() : maxWidth, minHeight);
size->accept();
}
bool JogdialControllerGUI::handleMessage(const Message& message)
{
if (JogdialController::MsgConfigureJogdialController::match(message))
@ -160,7 +151,6 @@ JogdialControllerGUI::JogdialControllerGUI(PluginAPI* pluginAPI, FeatureUISet *f
m_helpURL = "plugins/feature/jogdialcontroller/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));

Wyświetl plik

@ -55,7 +55,6 @@ public:
protected:
void focusInEvent(QFocusEvent* e);
void focusOutEvent(QFocusEvent *e);
void resizeEvent(QResizeEvent* size);
private:
Ui::JogdialControllerGUI* ui;

Wyświetl plik

@ -74,14 +74,6 @@ void LimeRFEGUI::setWorkspaceIndex(int index)
m_feature->setWorkspaceIndex(index);
}
void LimeRFEGUI::resizeEvent(QResizeEvent* size)
{
int maxWidth = getRollupContents()->maximumWidth();
int minHeight = getRollupContents()->minimumHeight() + getAdditionalHeight();
resize(width() < maxWidth ? width() : maxWidth, minHeight);
size->accept();
}
void LimeRFEGUI::onWidgetRolled(QWidget* widget, bool rollDown)
{
(void) widget;
@ -141,7 +133,6 @@ LimeRFEGUI::LimeRFEGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISet, Feature
m_helpURL = "plugins/feature/limerfe/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));

Wyświetl plik

@ -54,9 +54,6 @@ public:
virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; }
virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::LimeRFEGUI* ui;
PluginAPI* m_pluginAPI;

Wyświetl plik

@ -19,7 +19,6 @@
#include <cmath>
#include <QMessageBox>
#include <QLineEdit>
#include <QResizeEvent>
#include "feature/featureuiset.h"
#include "gui/basicfeaturesettingsdialog.h"
@ -70,14 +69,6 @@ bool PERTesterGUI::deserialize(const QByteArray& data)
}
}
void PERTesterGUI::resizeEvent(QResizeEvent* size)
{
int maxWidth = getRollupContents()->maximumWidth();
int minHeight = getRollupContents()->minimumHeight() + getAdditionalHeight();
resize(width() < maxWidth ? width() : maxWidth, minHeight);
size->accept();
}
bool PERTesterGUI::handleMessage(const Message& message)
{
if (PERTester::MsgConfigurePERTester::match(message))
@ -141,7 +132,6 @@ PERTesterGUI::PERTesterGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISet, Fea
m_helpURL = "plugins/feature/pertester/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));

Wyświetl plik

@ -50,9 +50,6 @@ public:
virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; }
virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::PERTesterGUI* ui;
PluginAPI* m_pluginAPI;

Wyświetl plik

@ -119,17 +119,6 @@ void RadiosondeGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) rollDown;
RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
int w = std::max(width(), rollupContents->minimumWidth() + gripSize() * 2);
resize(w, h);
rollupContents->saveState(m_rollupState);
applySettings();
}
@ -147,7 +136,6 @@ RadiosondeGUI::RadiosondeGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISet, F
m_helpURL = "plugins/feature/radiosonde/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));

Wyświetl plik

@ -135,7 +135,6 @@ RemoteControlGUI::RemoteControlGUI(PluginAPI* pluginAPI, FeatureUISet *featureUI
m_helpURL = "plugins/feature/remotecontrol/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));

Wyświetl plik

@ -17,7 +17,6 @@
///////////////////////////////////////////////////////////////////////////////////
#include <QMessageBox>
#include <QResizeEvent>
#include "feature/featureuiset.h"
#include "gui/basicfeaturesettingsdialog.h"
@ -68,14 +67,6 @@ bool RigCtlServerGUI::deserialize(const QByteArray& data)
}
}
void RigCtlServerGUI::resizeEvent(QResizeEvent* size)
{
int maxWidth = getRollupContents()->maximumWidth();
int minHeight = getRollupContents()->minimumHeight() + getAdditionalHeight();
resize(width() < maxWidth ? width() : maxWidth, minHeight);
size->accept();
}
bool RigCtlServerGUI::handleMessage(const Message& message)
{
if (RigCtlServer::MsgConfigureRigCtlServer::match(message))
@ -139,7 +130,6 @@ RigCtlServerGUI::RigCtlServerGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISe
m_helpURL = "plugins/feature/rigctlserver/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));

Wyświetl plik

@ -50,9 +50,6 @@ public:
virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; }
virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::RigCtlServerGUI* ui;
PluginAPI* m_pluginAPI;

Wyświetl plik

@ -231,17 +231,6 @@ void SatelliteTrackerGUI::onWidgetRolled(QWidget* widget, bool rollDown)
(void) rollDown;
RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
int w = std::max(width(), rollupContents->minimumWidth() + gripSize() * 2);
resize(w, h);
rollupContents->saveState(m_rollupState);
applySettings();
}
@ -265,7 +254,6 @@ SatelliteTrackerGUI::SatelliteTrackerGUI(PluginAPI* pluginAPI, FeatureUISet *fea
m_helpURL = "plugins/feature/satellitetracker/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));

Wyświetl plik

@ -16,7 +16,6 @@
///////////////////////////////////////////////////////////////////////////////////
#include <QMessageBox>
#include <QResizeEvent>
#include "feature/featureuiset.h"
#include "gui/basicfeaturesettingsdialog.h"
@ -71,14 +70,6 @@ bool SimplePTTGUI::deserialize(const QByteArray& data)
}
}
void SimplePTTGUI::resizeEvent(QResizeEvent* size)
{
int maxWidth = getRollupContents()->maximumWidth();
int minHeight = getRollupContents()->minimumHeight() + getAdditionalHeight();
resize(width() < maxWidth ? width() : maxWidth, minHeight);
size->accept();
}
bool SimplePTTGUI::handleMessage(const Message& message)
{
if (SimplePTT::MsgConfigureSimplePTT::match(message))
@ -165,7 +156,6 @@ SimplePTTGUI::SimplePTTGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISet, Fea
m_helpURL = "plugins/feature/simpleptt/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));

Wyświetl plik

@ -49,9 +49,6 @@ public:
virtual void setGeometryBytes(const QByteArray& blob) { m_settings.m_geometryBytes = blob; }
virtual QByteArray getGeometryBytes() const { return m_settings.m_geometryBytes; }
protected:
void resizeEvent(QResizeEvent* size);
private:
Ui::SimplePTTGUI* ui;
PluginAPI* m_pluginAPI;

Wyświetl plik

@ -227,16 +227,6 @@ void StarTrackerGUI::onWidgetRolled(QWidget* widget, bool rollDown)
RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
int w = std::max(width(), rollupContents->minimumWidth() + gripSize() * 2);
resize(w, h);
rollupContents->saveState(m_rollupState);
applySettings();
}
@ -272,7 +262,6 @@ StarTrackerGUI::StarTrackerGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISet,
m_helpURL = "plugins/feature/startracker/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));

Wyświetl plik

@ -800,16 +800,6 @@ void VORLocalizerGUI::onWidgetRolled(QWidget* widget, bool rollDown)
RollupContents *rollupContents = getRollupContents();
if (rollupContents->hasExpandableWidgets()) {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
int h = rollupContents->height() + getAdditionalHeight();
int w = std::max(width(), rollupContents->minimumWidth() + gripSize() * 2);
resize(w, h);
rollupContents->saveState(m_rollupState);
applySettings();
}
@ -945,7 +935,6 @@ VORLocalizerGUI::VORLocalizerGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISe
m_helpURL = "plugins/feature/vorlocalizer/readme.md";
RollupContents *rollupContents = getRollupContents();
ui->setupUi(rollupContents);
setSizePolicy(rollupContents->sizePolicy());
rollupContents->arrangeRollups();
connect(rollupContents, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));

Wyświetl plik

@ -25,6 +25,7 @@
#include <QTextEdit>
#include <QObjectCleanupHandler>
#include <QDesktopServices>
#include <QOpenGLWidget>
#include "mainwindow.h"
#include "gui/workspaceselectiondialog.h"
@ -40,7 +41,8 @@ ChannelGUI::ChannelGUI(QWidget *parent) :
m_channelIndex(0),
m_contextMenuType(ContextMenuNone),
m_drag(false),
m_resizer(this)
m_resizer(this),
m_disableResize(false)
{
qDebug("ChannelGUI::ChannelGUI");
setWindowFlags(windowFlags() | Qt::FramelessWindowHint);
@ -86,6 +88,12 @@ ChannelGUI::ChannelGUI(QWidget *parent) :
m_shrinkButton->setIcon(shrinkIcon);
m_shrinkButton->setToolTip("Adjust window to minimum size");
m_maximizeButton = new QPushButton();
m_maximizeButton->setFixedSize(20, 20);
QIcon maximizeIcon(":/maximize.png");
m_maximizeButton->setIcon(maximizeIcon);
m_maximizeButton->setToolTip("Adjust window to maximum size");
m_hideButton = new QPushButton();
m_hideButton->setFixedSize(20, 20);
QIcon hideIcon(":/hide.png");
@ -141,6 +149,7 @@ ChannelGUI::ChannelGUI(QWidget *parent) :
m_topLayout->addWidget(m_helpButton);
m_topLayout->addWidget(m_moveButton);
m_topLayout->addWidget(m_shrinkButton);
m_topLayout->addWidget(m_maximizeButton);
m_topLayout->addWidget(m_hideButton);
m_topLayout->addWidget(m_closeButton);
@ -172,6 +181,7 @@ ChannelGUI::ChannelGUI(QWidget *parent) :
connect(m_helpButton, SIGNAL(clicked()), this, SLOT(showHelp()));
connect(m_moveButton, SIGNAL(clicked()), this, SLOT(openMoveToWorkspaceDialog()));
connect(m_shrinkButton, SIGNAL(clicked()), this, SLOT(shrinkWindow()));
connect(m_maximizeButton, SIGNAL(clicked()), this, SLOT(maximizeWindow()));
connect(this, SIGNAL(forceShrink()), this, SLOT(shrinkWindow()));
connect(m_hideButton, SIGNAL(clicked()), this, SLOT(hide()));
connect(m_closeButton, SIGNAL(clicked()), this, SLOT(close()));
@ -203,6 +213,7 @@ ChannelGUI::~ChannelGUI()
delete m_closeButton;
delete m_hideButton;
delete m_shrinkButton;
delete m_maximizeButton;
delete m_moveButton;
delete m_helpButton;
delete m_titleLabel;
@ -293,18 +304,81 @@ void ChannelGUI::openMoveToWorkspaceDialog()
void ChannelGUI::onWidgetRolled(QWidget *widget, bool show)
{
if (show)
sizeToContents(); // set min/max constraints before trying to resize
// When a window is maximized or returns from maximized to normal,
// RolledContents gets QEvent::Hide and QEvent::Show events, which results in
// onWidgetRolled being called twice.
// We need to make sure we don't save widget heights while this occurs. The
// window manager will take care of maximizing/restoring the window size.
if (!m_disableResize)
{
// qDebug("ChannelGUI::onWidgetRolled: show: %d %d", m_rollupContents.height(), widget->height());
int dh = m_heightsMap.contains(widget) ? m_heightsMap[widget] - widget->height() : widget->minimumHeight();
resize(width(), 52 + 3 + m_rollupContents->height() + dh);
if (show)
{
// qDebug("ChannelGUI::onWidgetRolled: show: %d %d", m_rollupContents.height(), widget->height());
int dh = m_heightsMap.contains(widget) ? m_heightsMap[widget] - widget->height() : widget->minimumHeight();
resize(width(), 52 + 3 + m_rollupContents->height() + dh);
}
else
{
// qDebug("ChannelGUI::onWidgetRolled: hide: %d %d", m_rollupContents.height(), widget->height());
m_heightsMap[widget] = widget->height();
resize(width(), 52 + 3 + m_rollupContents->height());
}
}
}
// Size the window according to the size of rollup widget
void ChannelGUI::sizeToContents()
{
// Adjust policy depending on which widgets are currently visible
if (getRollupContents()->hasExpandableWidgets()) {
setSizePolicy(getRollupContents()->sizePolicy().horizontalPolicy(), QSizePolicy::Expanding);
} else {
setSizePolicy(getRollupContents()->sizePolicy().horizontalPolicy(), QSizePolicy::Fixed);
}
// If size policy is fixed, hide widgets that resize the window
if ((sizePolicy().verticalPolicy() == QSizePolicy::Fixed) && (sizePolicy().horizontalPolicy() == QSizePolicy::Fixed))
{
m_shrinkButton->hide();
m_maximizeButton->hide();
m_sizeGripBottomRight->hide();
}
else if ((sizePolicy().verticalPolicy() == QSizePolicy::Fixed) || (sizePolicy().horizontalPolicy() == QSizePolicy::Fixed))
{
m_shrinkButton->show();
m_maximizeButton->hide();
m_sizeGripBottomRight->show();
}
else
{
// qDebug("ChannelGUI::onWidgetRolled: hide: %d %d", m_rollupContents.height(), widget->height());
m_heightsMap[widget] = widget->height();
resize(width(), 52 + 3 + m_rollupContents->height());
m_shrinkButton->show();
m_maximizeButton->show();
m_sizeGripBottomRight->show();
}
// Calculate min/max size for window. This is min/max size of contents, plus
// extra needed for window frame and title bar
QSize size;
size = getRollupContents()->maximumSize();
size.setHeight(std::min(size.height() + getAdditionalHeight(), QWIDGETSIZE_MAX));
size.setWidth(std::min(size.width() + m_resizer.m_gripSize * 2, QWIDGETSIZE_MAX));
setMaximumSize(size);
// m_resizer uses minimumSizeHint(), m_sizeGripBottomRight uses minimumSize()
// QWidget docs says: If minimumSize() is set, the minimum size hint will be ignored.
// However, we use maximum of both:
// - minimumSize.width() to respect minimumWidth set in .ui file
// - minimumSizeHint.width() to ensure widgets are fully displayed when larger than above
// which may be the case when we have widgets hidden in a rollup, as the width
// set in .ui file may just be for the smallest of widgets
size = getRollupContents()->minimumSize();
size = size.expandedTo(getRollupContents()->minimumSizeHint());
size = size.expandedTo(m_topLayout->minimumSize());
size.setHeight(size.height() + getAdditionalHeight());
size.setWidth(size.width() + m_resizer.m_gripSize * 2);
setMinimumSize(size);
}
void ChannelGUI::duplicateChannel()
@ -322,11 +396,32 @@ void ChannelGUI::openMoveToDeviceSetDialog()
}
}
void ChannelGUI::maximizeWindow()
{
m_disableResize = true;
showMaximized();
m_disableResize = false;
// QOpenGLWidget widgets don't always paint properly first time after being maximized,
// so force an update. Should really fix why they aren't painted properly in the first place
QList<QOpenGLWidget *> widgets = findChildren<QOpenGLWidget *>();
for (auto widget : widgets) {
widget->update();
}
}
void ChannelGUI::shrinkWindow()
{
qDebug("ChannelGUI::shrinkWindow");
adjustSize();
resize(width(), m_rollupContents->height() + getAdditionalHeight());
if (isMaximized())
{
m_disableResize = true;
showNormal();
m_disableResize = false;
}
else
{
adjustSize();
}
}
void ChannelGUI::setTitle(const QString& title)

Wyświetl plik

@ -74,6 +74,7 @@ public:
virtual MessageQueue* getInputMessageQueue() = 0;
RollupContents *getRollupContents() { return m_rollupContents; }
void sizeToContents();
void setTitle(const QString& title);
void setTitleColor(const QColor& c);
void setDeviceType(DeviceType type);
@ -109,6 +110,7 @@ protected:
protected slots:
void shrinkWindow();
void maximizeWindow();
private:
bool isOnMovingPad();
@ -121,6 +123,7 @@ private:
QPushButton *m_helpButton;
QPushButton *m_moveButton;
QPushButton *m_shrinkButton;
QPushButton *m_maximizeButton;
QPushButton *m_hideButton;
QPushButton *m_closeButton;
QPushButton *m_duplicateButton;
@ -136,6 +139,7 @@ private:
QPoint m_DragPosition;
QMap<QWidget*, int> m_heightsMap;
FramelessWindowResizer m_resizer;
bool m_disableResize;
private slots:
void activateSettingsDialog();

Some files were not shown because too many files have changed in this diff Show More