mirror of
				https://github.com/f4exb/sdrangel.git
				synced 2025-11-04 05:30:32 -05:00 
			
		
		
		
	AM modulator: Web API: fixed set windows title
This commit is contained in:
		
							parent
							
								
									889712b457
								
							
						
					
					
						commit
						8723bfb74b
					
				@ -33,6 +33,7 @@
 | 
				
			|||||||
#include "dsp/dspengine.h"
 | 
					#include "dsp/dspengine.h"
 | 
				
			||||||
#include "gui/crightclickenabler.h"
 | 
					#include "gui/crightclickenabler.h"
 | 
				
			||||||
#include "gui/audioselectdialog.h"
 | 
					#include "gui/audioselectdialog.h"
 | 
				
			||||||
 | 
					#include "gui/basicchannelsettingsdialog.h"
 | 
				
			||||||
#include "mainwindow.h"
 | 
					#include "mainwindow.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
AMModGUI* AMModGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx)
 | 
					AMModGUI* AMModGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx)
 | 
				
			||||||
@ -272,6 +273,22 @@ void AMModGUI::onWidgetRolled(QWidget* widget __attribute__((unused)), bool roll
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void AMModGUI::onMenuDialogCalled(const QPoint &p)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    BasicChannelSettingsDialog dialog(&m_channelMarker, this);
 | 
				
			||||||
 | 
					    dialog.move(p);
 | 
				
			||||||
 | 
					    dialog.exec();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    m_settings.m_inputFrequencyOffset = m_channelMarker.getCenterFrequency();
 | 
				
			||||||
 | 
					    m_settings.m_rgbColor = m_channelMarker.getColor().rgb();
 | 
				
			||||||
 | 
					    m_settings.m_title = m_channelMarker.getTitle();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    setWindowTitle(m_settings.m_title);
 | 
				
			||||||
 | 
					    setTitleColor(m_settings.m_rgbColor);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    applySettings();
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
AMModGUI::AMModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx, QWidget* parent) :
 | 
					AMModGUI::AMModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx, QWidget* parent) :
 | 
				
			||||||
	RollupWidget(parent),
 | 
						RollupWidget(parent),
 | 
				
			||||||
	ui(new Ui::AMModGUI),
 | 
						ui(new Ui::AMModGUI),
 | 
				
			||||||
@ -288,6 +305,7 @@ AMModGUI::AMModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampl
 | 
				
			|||||||
	ui->setupUi(this);
 | 
						ui->setupUi(this);
 | 
				
			||||||
	setAttribute(Qt::WA_DeleteOnClose, true);
 | 
						setAttribute(Qt::WA_DeleteOnClose, true);
 | 
				
			||||||
	connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
 | 
						connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
 | 
				
			||||||
 | 
						connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	m_amMod = (AMMod*) channelTx; //new AMMod(m_deviceUISet->m_deviceSinkAPI);
 | 
						m_amMod = (AMMod*) channelTx; //new AMMod(m_deviceUISet->m_deviceSinkAPI);
 | 
				
			||||||
	m_amMod->setMessageQueueToGUI(getInputMessageQueue());
 | 
						m_amMod->setMessageQueueToGUI(getInputMessageQueue());
 | 
				
			||||||
@ -364,6 +382,7 @@ void AMModGUI::displaySettings()
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    m_channelMarker.blockSignals(true);
 | 
					    m_channelMarker.blockSignals(true);
 | 
				
			||||||
    m_channelMarker.setCenterFrequency(m_settings.m_inputFrequencyOffset);
 | 
					    m_channelMarker.setCenterFrequency(m_settings.m_inputFrequencyOffset);
 | 
				
			||||||
 | 
					    m_channelMarker.setTitle(m_settings.m_title);
 | 
				
			||||||
    m_channelMarker.setBandwidth(m_settings.m_rfBandwidth);
 | 
					    m_channelMarker.setBandwidth(m_settings.m_rfBandwidth);
 | 
				
			||||||
    m_channelMarker.blockSignals(false);
 | 
					    m_channelMarker.blockSignals(false);
 | 
				
			||||||
    m_channelMarker.setColor(m_settings.m_rgbColor); // activate signal on the last setting only
 | 
					    m_channelMarker.setColor(m_settings.m_rgbColor); // activate signal on the last setting only
 | 
				
			||||||
 | 
				
			|||||||
@ -107,6 +107,7 @@ private slots:
 | 
				
			|||||||
    void on_showFileDialog_clicked(bool checked);
 | 
					    void on_showFileDialog_clicked(bool checked);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    void onWidgetRolled(QWidget* widget, bool rollDown);
 | 
					    void onWidgetRolled(QWidget* widget, bool rollDown);
 | 
				
			||||||
 | 
					    void onMenuDialogCalled(const QPoint& p);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    void configureFileName();
 | 
					    void configureFileName();
 | 
				
			||||||
    void audioSelect();
 | 
					    void audioSelect();
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user