mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-02 06:04:39 -04:00
Massive UI revamping (v7): features
This commit is contained in:
@@ -114,7 +114,7 @@ void RigCtlServerGUI::onWidgetRolled(QWidget* widget, bool rollDown)
|
||||
(void) widget;
|
||||
(void) rollDown;
|
||||
|
||||
saveState(m_rollupState);
|
||||
getRollupContents()->saveState(m_rollupState);
|
||||
applySettings();
|
||||
}
|
||||
|
||||
@@ -126,11 +126,11 @@ RigCtlServerGUI::RigCtlServerGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISe
|
||||
m_doApplySettings(true),
|
||||
m_lastFeatureState(0)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->setupUi(getRollupContents());
|
||||
getRollupContents()->arrangeRollups();
|
||||
m_helpURL = "plugins/feature/rigctlserver/readme.md";
|
||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
setChannelWidget(false);
|
||||
connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
|
||||
connect(getRollupContents(), SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
|
||||
m_rigCtlServer = reinterpret_cast<RigCtlServer*>(feature);
|
||||
m_rigCtlServer->setMessageQueueToGUI(&m_inputMessageQueue);
|
||||
|
||||
@@ -146,6 +146,7 @@ RigCtlServerGUI::RigCtlServerGUI(PluginAPI* pluginAPI, FeatureUISet *featureUISe
|
||||
updateDeviceSetList();
|
||||
displaySettings();
|
||||
applySettings(true);
|
||||
makeUIConnections();
|
||||
}
|
||||
|
||||
RigCtlServerGUI::~RigCtlServerGUI()
|
||||
@@ -162,10 +163,11 @@ void RigCtlServerGUI::displaySettings()
|
||||
{
|
||||
setTitleColor(m_settings.m_rgbColor);
|
||||
setWindowTitle(m_settings.m_title);
|
||||
setTitle(m_settings.m_title);
|
||||
blockApplySettings(true);
|
||||
ui->rigCtrlPort->setValue(m_settings.m_rigCtlPort);
|
||||
ui->maxFrequencyOffset->setValue(m_settings.m_maxFrequencyOffset);
|
||||
restoreState(m_rollupState);
|
||||
getRollupContents()->restoreState(m_rollupState);
|
||||
blockApplySettings(false);
|
||||
}
|
||||
|
||||
@@ -281,7 +283,6 @@ void RigCtlServerGUI::onMenuDialogCalled(const QPoint &p)
|
||||
{
|
||||
BasicFeatureSettingsDialog dialog(this);
|
||||
dialog.setTitle(m_settings.m_title);
|
||||
dialog.setColor(m_settings.m_rgbColor);
|
||||
dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
|
||||
dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress);
|
||||
dialog.setReverseAPIPort(m_settings.m_reverseAPIPort);
|
||||
@@ -291,7 +292,6 @@ void RigCtlServerGUI::onMenuDialogCalled(const QPoint &p)
|
||||
dialog.move(p);
|
||||
dialog.exec();
|
||||
|
||||
m_settings.m_rgbColor = dialog.getColor().rgb();
|
||||
m_settings.m_title = dialog.getTitle();
|
||||
m_settings.m_useReverseAPI = dialog.useReverseAPI();
|
||||
m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress();
|
||||
@@ -398,3 +398,14 @@ void RigCtlServerGUI::applySettings(bool force)
|
||||
m_rigCtlServer->getInputMessageQueue()->push(message);
|
||||
}
|
||||
}
|
||||
|
||||
void RigCtlServerGUI::makeUIConnections()
|
||||
{
|
||||
QObject::connect(ui->startStop, &ButtonSwitch::toggled, this, &RigCtlServerGUI::on_startStop_toggled);
|
||||
QObject::connect(ui->enable, &QCheckBox::toggled, this, &RigCtlServerGUI::on_enable_toggled);
|
||||
QObject::connect(ui->devicesRefresh, &QPushButton::clicked, this, &RigCtlServerGUI::on_devicesRefresh_clicked);
|
||||
QObject::connect(ui->device, qOverload<int>(&QComboBox::currentIndexChanged), this, &RigCtlServerGUI::on_device_currentIndexChanged);
|
||||
QObject::connect(ui->channel, qOverload<int>(&QComboBox::currentIndexChanged), this, &RigCtlServerGUI::on_channel_currentIndexChanged);
|
||||
QObject::connect(ui->rigCtrlPort, qOverload<int>(&QSpinBox::valueChanged), this, &RigCtlServerGUI::on_rigCtrlPort_valueChanged);
|
||||
QObject::connect(ui->maxFrequencyOffset, qOverload<int>(&QSpinBox::valueChanged), this, &RigCtlServerGUI::on_maxFrequencyOffset_valueChanged);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user