mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-25 17:28:50 -05:00
Massive UI revamping (v7): fixed widget size handling: features. Part of #1209
This commit is contained in:
parent
5a265d7fe3
commit
90386842ca
@ -16,6 +16,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <QMessageBox>
|
||||
#include <QResizeEvent>
|
||||
|
||||
#include "feature/featureuiset.h"
|
||||
#include "device/deviceset.h"
|
||||
@ -65,6 +66,12 @@ bool AFCGUI::deserialize(const QByteArray& data)
|
||||
}
|
||||
}
|
||||
|
||||
void AFCGUI::resizeEvent(QResizeEvent* size)
|
||||
{
|
||||
adjustSize();
|
||||
size->accept();
|
||||
}
|
||||
|
||||
bool AFCGUI::handleMessage(const Message& message)
|
||||
{
|
||||
if (AFC::MsgConfigureAFC::match(message))
|
||||
@ -131,6 +138,7 @@ AFCGUI::AFCGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISet, Feature *featur
|
||||
m_lastFeatureState(0)
|
||||
{
|
||||
ui->setupUi(getRollupContents());
|
||||
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||
getRollupContents()->arrangeRollups();
|
||||
m_helpURL = "plugins/feature/afc/readme.md";
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
|
@ -48,6 +48,9 @@ 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;
|
||||
|
@ -6,19 +6,25 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>340</width>
|
||||
<height>160</height>
|
||||
<width>320</width>
|
||||
<height>100</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>340</width>
|
||||
<width>320</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>320</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
@ -37,7 +43,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>340</width>
|
||||
<height>151</height>
|
||||
<height>111</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -18,6 +18,8 @@
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include <QResizeEvent>
|
||||
|
||||
#include "feature/featureuiset.h"
|
||||
#include "gui/basicfeaturesettingsdialog.h"
|
||||
#include "channel/channelwebapiutils.h"
|
||||
@ -68,6 +70,12 @@ 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))
|
||||
@ -115,6 +123,7 @@ AntennaToolsGUI::AntennaToolsGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISe
|
||||
m_deviceSets(0)
|
||||
{
|
||||
ui->setupUi(getRollupContents());
|
||||
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||
getRollupContents()->arrangeRollups();
|
||||
m_helpURL = "plugins/feature/antennatools/readme.md";
|
||||
|
||||
|
@ -51,6 +51,9 @@ 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;
|
||||
|
@ -6,20 +6,26 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>394</width>
|
||||
<height>523</height>
|
||||
<width>374</width>
|
||||
<height>584</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>360</width>
|
||||
<height>0</height>
|
||||
<width>374</width>
|
||||
<height>584</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>374</width>
|
||||
<height>584</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
@ -37,10 +43,10 @@
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>16</x>
|
||||
<y>19</y>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>371</width>
|
||||
<height>481</height>
|
||||
<height>581</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include <cmath>
|
||||
#include <QMessageBox>
|
||||
#include <QSerialPortInfo>
|
||||
#include <QResizeEvent>
|
||||
|
||||
#include "SWGTargetAzimuthElevation.h"
|
||||
|
||||
@ -70,6 +71,12 @@ bool GS232ControllerGUI::deserialize(const QByteArray& data)
|
||||
}
|
||||
}
|
||||
|
||||
void GS232ControllerGUI::resizeEvent(QResizeEvent* size)
|
||||
{
|
||||
adjustSize();
|
||||
size->accept();
|
||||
}
|
||||
|
||||
bool GS232ControllerGUI::handleMessage(const Message& message)
|
||||
{
|
||||
if (GS232Controller::MsgConfigureGS232Controller::match(message))
|
||||
@ -141,6 +148,7 @@ GS232ControllerGUI::GS232ControllerGUI(PluginAPI* pluginAPI, FeatureUISet *featu
|
||||
m_lastOnTarget(false)
|
||||
{
|
||||
ui->setupUi(getRollupContents());
|
||||
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||
getRollupContents()->arrangeRollups();
|
||||
m_helpURL = "plugins/feature/gs232controller/readme.md";
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
|
@ -50,6 +50,9 @@ 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;
|
||||
|
@ -11,7 +11,7 @@
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
|
@ -17,6 +17,7 @@
|
||||
|
||||
#include <QMessageBox>
|
||||
#include <QMouseEvent>
|
||||
#include <QResizeEvent>
|
||||
|
||||
#include "feature/featureuiset.h"
|
||||
#include "gui/basicfeaturesettingsdialog.h"
|
||||
@ -66,6 +67,12 @@ bool JogdialControllerGUI::deserialize(const QByteArray& data)
|
||||
}
|
||||
}
|
||||
|
||||
void JogdialControllerGUI::resizeEvent(QResizeEvent* size)
|
||||
{
|
||||
adjustSize();
|
||||
size->accept();
|
||||
}
|
||||
|
||||
bool JogdialControllerGUI::handleMessage(const Message& message)
|
||||
{
|
||||
if (JogdialController::MsgConfigureJogdialController::match(message))
|
||||
@ -146,6 +153,7 @@ JogdialControllerGUI::JogdialControllerGUI(PluginAPI* pluginAPI, FeatureUISet *f
|
||||
m_selectedChannel(nullptr)
|
||||
{
|
||||
ui->setupUi(getRollupContents());
|
||||
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||
getRollupContents()->arrangeRollups();
|
||||
m_helpURL = "plugins/feature/jogdialcontroller/readme.md";
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
|
@ -55,6 +55,7 @@ public:
|
||||
protected:
|
||||
void focusInEvent(QFocusEvent* e);
|
||||
void focusOutEvent(QFocusEvent *e);
|
||||
void resizeEvent(QResizeEvent* size);
|
||||
|
||||
private:
|
||||
Ui::JogdialControllerGUI* ui;
|
||||
|
@ -6,12 +6,12 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>365</width>
|
||||
<height>105</height>
|
||||
<width>340</width>
|
||||
<height>50</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@ -19,7 +19,13 @@
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>340</width>
|
||||
<height>100</height>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>340</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
@ -37,7 +43,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>360</width>
|
||||
<height>81</height>
|
||||
<height>51</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
@ -172,23 +178,6 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="targetLayout">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include <cmath>
|
||||
#include <QMessageBox>
|
||||
#include <QLineEdit>
|
||||
#include <QResizeEvent>
|
||||
|
||||
#include "feature/featureuiset.h"
|
||||
#include "gui/basicfeaturesettingsdialog.h"
|
||||
@ -68,6 +69,12 @@ bool PERTesterGUI::deserialize(const QByteArray& data)
|
||||
}
|
||||
}
|
||||
|
||||
void PERTesterGUI::resizeEvent(QResizeEvent* size)
|
||||
{
|
||||
adjustSize();
|
||||
size->accept();
|
||||
}
|
||||
|
||||
bool PERTesterGUI::handleMessage(const Message& message)
|
||||
{
|
||||
if (PERTester::MsgConfigurePERTester::match(message))
|
||||
@ -127,6 +134,7 @@ PERTesterGUI::PERTesterGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISet, Fea
|
||||
m_lastFeatureState(0)
|
||||
{
|
||||
ui->setupUi(getRollupContents());
|
||||
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||
getRollupContents()->arrangeRollups();
|
||||
m_helpURL = "plugins/feature/pertester/readme.md";
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
|
@ -50,6 +50,9 @@ 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;
|
||||
|
@ -6,26 +6,26 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>350</width>
|
||||
<height>430</height>
|
||||
<width>335</width>
|
||||
<height>472</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>320</width>
|
||||
<height>100</height>
|
||||
<width>335</width>
|
||||
<height>472</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>350</width>
|
||||
<height>16777215</height>
|
||||
<width>335</width>
|
||||
<height>472</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
@ -40,10 +40,10 @@
|
||||
<widget class="QWidget" name="settingsContainer" native="true">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<x>2</x>
|
||||
<y>2</y>
|
||||
<width>331</width>
|
||||
<height>291</height>
|
||||
<height>341</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -157,6 +157,12 @@
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="packetCountLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Packets</string>
|
||||
</property>
|
||||
@ -456,10 +462,10 @@ Substitutions:
|
||||
<widget class="QWidget" name="statsContainer" native="true">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>310</y>
|
||||
<x>2</x>
|
||||
<y>352</y>
|
||||
<width>331</width>
|
||||
<height>91</height>
|
||||
<height>117</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -17,6 +17,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <QMessageBox>
|
||||
#include <QResizeEvent>
|
||||
|
||||
#include "feature/featureuiset.h"
|
||||
#include "gui/basicfeaturesettingsdialog.h"
|
||||
@ -68,6 +69,12 @@ bool RigCtlServerGUI::deserialize(const QByteArray& data)
|
||||
}
|
||||
}
|
||||
|
||||
void RigCtlServerGUI::resizeEvent(QResizeEvent* size)
|
||||
{
|
||||
adjustSize();
|
||||
size->accept();
|
||||
}
|
||||
|
||||
bool RigCtlServerGUI::handleMessage(const Message& message)
|
||||
{
|
||||
if (RigCtlServer::MsgConfigureRigCtlServer::match(message))
|
||||
@ -127,6 +134,7 @@ RigCtlServerGUI::RigCtlServerGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISe
|
||||
m_lastFeatureState(0)
|
||||
{
|
||||
ui->setupUi(getRollupContents());
|
||||
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||
getRollupContents()->arrangeRollups();
|
||||
m_helpURL = "plugins/feature/rigctlserver/readme.md";
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
|
@ -50,6 +50,9 @@ 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;
|
||||
|
@ -6,26 +6,26 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>320</width>
|
||||
<height>189</height>
|
||||
<width>304</width>
|
||||
<height>173</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>320</width>
|
||||
<height>100</height>
|
||||
<width>304</width>
|
||||
<height>173</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>320</width>
|
||||
<height>16777215</height>
|
||||
<width>304</width>
|
||||
<height>173</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
@ -40,9 +40,9 @@
|
||||
<widget class="QWidget" name="settingsContainer" native="true">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>301</width>
|
||||
<x>2</x>
|
||||
<y>2</y>
|
||||
<width>300</width>
|
||||
<height>171</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -16,6 +16,7 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <QMessageBox>
|
||||
#include <QResizeEvent>
|
||||
|
||||
#include "feature/featureuiset.h"
|
||||
#include "gui/basicfeaturesettingsdialog.h"
|
||||
@ -69,6 +70,12 @@ bool SimplePTTGUI::deserialize(const QByteArray& data)
|
||||
}
|
||||
}
|
||||
|
||||
void SimplePTTGUI::resizeEvent(QResizeEvent* size)
|
||||
{
|
||||
adjustSize();
|
||||
size->accept();
|
||||
}
|
||||
|
||||
bool SimplePTTGUI::handleMessage(const Message& message)
|
||||
{
|
||||
if (SimplePTT::MsgConfigureSimplePTT::match(message))
|
||||
@ -151,6 +158,7 @@ SimplePTTGUI::SimplePTTGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISet, Fea
|
||||
m_lastFeatureState(0)
|
||||
{
|
||||
ui->setupUi(getRollupContents());
|
||||
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||
getRollupContents()->arrangeRollups();
|
||||
m_helpURL = "plugins/feature/simpleptt/readme.md";
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
|
@ -49,6 +49,9 @@ 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;
|
||||
|
@ -6,26 +6,26 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>320</width>
|
||||
<height>181</height>
|
||||
<width>304</width>
|
||||
<height>155</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>320</width>
|
||||
<height>100</height>
|
||||
<width>304</width>
|
||||
<height>155</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>320</width>
|
||||
<height>16777215</height>
|
||||
<width>304</width>
|
||||
<height>155</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="font">
|
||||
@ -40,9 +40,9 @@
|
||||
<widget class="QWidget" name="settingsContainer" native="true">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>301</width>
|
||||
<x>2</x>
|
||||
<y>2</y>
|
||||
<width>300</width>
|
||||
<height>151</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
Loading…
Reference in New Issue
Block a user