mirror of
				https://github.com/f4exb/sdrangel.git
				synced 2025-11-04 05:30:32 -05:00 
			
		
		
		
	UDP source: changed marker color
This commit is contained in:
		
							parent
							
								
									f9fc22c234
								
							
						
					
					
						commit
						ba9d8cdc1c
					
				@ -309,11 +309,12 @@ UDPSrcGUI::UDPSrcGUI(PluginAPI* pluginAPI, DeviceSourceAPI *deviceAPI, QWidget*
 | 
				
			|||||||
	m_channelMarker.setBandwidth(16000);
 | 
						m_channelMarker.setBandwidth(16000);
 | 
				
			||||||
	m_channelMarker.setCenterFrequency(0);
 | 
						m_channelMarker.setCenterFrequency(0);
 | 
				
			||||||
	m_channelMarker.setTitle("UDP Sample Source");
 | 
						m_channelMarker.setTitle("UDP Sample Source");
 | 
				
			||||||
	m_channelMarker.setColor(Qt::green);
 | 
					 | 
				
			||||||
	m_channelMarker.setUDPAddress("127.0.0.1");
 | 
						m_channelMarker.setUDPAddress("127.0.0.1");
 | 
				
			||||||
	m_channelMarker.setUDPSendPort(9999);
 | 
						m_channelMarker.setUDPSendPort(9999);
 | 
				
			||||||
	m_channelMarker.setUDPReceivePort(9998);
 | 
						m_channelMarker.setUDPReceivePort(9998);
 | 
				
			||||||
	m_channelMarker.setVisible(true);
 | 
						m_channelMarker.setVisible(true);
 | 
				
			||||||
 | 
					    m_channelMarker.setColor(m_settings.m_rgbColor);
 | 
				
			||||||
 | 
					    setTitleColor(m_channelMarker.getColor());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	m_settings.setChannelMarker(&m_channelMarker);
 | 
						m_settings.setChannelMarker(&m_channelMarker);
 | 
				
			||||||
	m_settings.setSpectrumGUI(ui->spectrumGUI);
 | 
						m_settings.setSpectrumGUI(ui->spectrumGUI);
 | 
				
			||||||
 | 
				
			|||||||
@ -14,6 +14,8 @@
 | 
				
			|||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.          //
 | 
					// along with this program. If not, see <http://www.gnu.org/licenses/>.          //
 | 
				
			||||||
///////////////////////////////////////////////////////////////////////////////////
 | 
					///////////////////////////////////////////////////////////////////////////////////
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include <QColor>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "dsp/dspengine.h"
 | 
					#include "dsp/dspengine.h"
 | 
				
			||||||
#include "util/simpleserializer.h"
 | 
					#include "util/simpleserializer.h"
 | 
				
			||||||
#include "settings/serializable.h"
 | 
					#include "settings/serializable.h"
 | 
				
			||||||
@ -46,6 +48,7 @@ void UDPSrcSettings::resetToDefaults()
 | 
				
			|||||||
    m_udpAddress = "127.0.0.1";
 | 
					    m_udpAddress = "127.0.0.1";
 | 
				
			||||||
    m_udpPort = 9999;
 | 
					    m_udpPort = 9999;
 | 
				
			||||||
    m_audioPort = 9998;
 | 
					    m_audioPort = 9998;
 | 
				
			||||||
 | 
					    m_rgbColor = QColor(225, 25, 99).rgb();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
QByteArray UDPSrcSettings::serialize() const
 | 
					QByteArray UDPSrcSettings::serialize() const
 | 
				
			||||||
@ -65,6 +68,7 @@ QByteArray UDPSrcSettings::serialize() const
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    s.writeS32(8, m_gain*10.0);
 | 
					    s.writeS32(8, m_gain*10.0);
 | 
				
			||||||
 | 
					    s.writeU32(9, m_rgbColor);
 | 
				
			||||||
    s.writeBool(11, m_audioActive);
 | 
					    s.writeBool(11, m_audioActive);
 | 
				
			||||||
    s.writeS32(12, m_volume);
 | 
					    s.writeS32(12, m_volume);
 | 
				
			||||||
    s.writeBool(14, m_audioStereo);
 | 
					    s.writeBool(14, m_audioStereo);
 | 
				
			||||||
@ -118,6 +122,7 @@ bool UDPSrcSettings::deserialize(const QByteArray& data)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        d.readS32(8, &s32tmp, 10);
 | 
					        d.readS32(8, &s32tmp, 10);
 | 
				
			||||||
        m_gain = s32tmp / 10.0;
 | 
					        m_gain = s32tmp / 10.0;
 | 
				
			||||||
 | 
					        d.readU32(9, &m_rgbColor);
 | 
				
			||||||
        d.readBool(11, &m_audioActive, false);
 | 
					        d.readBool(11, &m_audioActive, false);
 | 
				
			||||||
        d.readS32(12, &m_volume, 20);
 | 
					        d.readS32(12, &m_volume, 20);
 | 
				
			||||||
        d.readBool(14, &m_audioStereo, false);
 | 
					        d.readBool(14, &m_audioStereo, false);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user