| 
									
										
										
										
											2015-06-21 12:46:47 +02:00
										 |  |  | #include <QtPlugin>
 | 
					
						
							|  |  |  | #include "plugin/pluginapi.h"
 | 
					
						
							|  |  |  | #include "chanalyzergui.h"
 | 
					
						
							|  |  |  | #include "chanalyzerplugin.h"
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | const PluginDescriptor ChannelAnalyzerPlugin::m_pluginDescriptor = { | 
					
						
							|  |  |  | 	QString("Channel Analyzer"), | 
					
						
							| 
									
										
										
										
											2015-09-02 01:16:40 +02:00
										 |  |  | 	QString("---"), | 
					
						
							|  |  |  | 	QString("(c) Edouard Griffiths, F4EXB"), | 
					
						
							|  |  |  | 	QString("https://github.com/f4exb/sdrangel"), | 
					
						
							| 
									
										
										
										
											2015-06-21 12:46:47 +02:00
										 |  |  | 	true, | 
					
						
							| 
									
										
										
										
											2015-09-02 01:16:40 +02:00
										 |  |  | 	QString("https://github.com/f4exb/sdrangel") | 
					
						
							| 
									
										
										
										
											2015-06-21 12:46:47 +02:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ChannelAnalyzerPlugin::ChannelAnalyzerPlugin(QObject* parent) : | 
					
						
							|  |  |  | 	QObject(parent) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | const PluginDescriptor& ChannelAnalyzerPlugin::getPluginDescriptor() const | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	return m_pluginDescriptor; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | void ChannelAnalyzerPlugin::initPlugin(PluginAPI* pluginAPI) | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 	m_pluginAPI = pluginAPI; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// register demodulator
 | 
					
						
							| 
									
										
										
										
											2016-05-14 20:57:43 +02:00
										 |  |  | 	m_pluginAPI->registerChannel("org.f4exb.sdrangelove.channel.chanalyzer", this); | 
					
						
							| 
									
										
										
										
											2015-06-21 12:46:47 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-05-16 03:21:21 +02:00
										 |  |  | PluginGUI* ChannelAnalyzerPlugin::createChannel(const QString& channelName, DeviceAPI *deviceAPI) | 
					
						
							| 
									
										
										
										
											2015-06-21 12:46:47 +02:00
										 |  |  | { | 
					
						
							|  |  |  | 	if(channelName == "org.f4exb.sdrangelove.channel.chanalyzer") { | 
					
						
							| 
									
										
										
										
											2016-05-16 03:21:21 +02:00
										 |  |  | 		ChannelAnalyzerGUI* gui = ChannelAnalyzerGUI::create(m_pluginAPI, deviceAPI); | 
					
						
							| 
									
										
										
										
											2015-06-21 12:46:47 +02:00
										 |  |  | 		m_pluginAPI->registerChannelInstance("org.f4exb.sdrangelove.channel.chanalyzer", gui); | 
					
						
							| 
									
										
										
										
											2016-05-16 10:05:09 +02:00
										 |  |  | //		m_pluginAPI->addChannelRollup(gui);
 | 
					
						
							| 
									
										
										
										
											2015-06-21 12:46:47 +02:00
										 |  |  | 		return gui; | 
					
						
							|  |  |  | 	} else { | 
					
						
							|  |  |  | 		return NULL; | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-05-16 03:21:21 +02:00
										 |  |  | void ChannelAnalyzerPlugin::createInstanceChannelAnalyzer(DeviceAPI *deviceAPI) | 
					
						
							| 
									
										
										
										
											2015-06-21 12:46:47 +02:00
										 |  |  | { | 
					
						
							| 
									
										
										
										
											2016-05-16 03:21:21 +02:00
										 |  |  | 	ChannelAnalyzerGUI* gui = ChannelAnalyzerGUI::create(m_pluginAPI, deviceAPI); | 
					
						
							| 
									
										
										
										
											2015-06-21 12:46:47 +02:00
										 |  |  | 	m_pluginAPI->registerChannelInstance("org.f4exb.sdrangelove.channel.chanalyzer", gui); | 
					
						
							| 
									
										
										
										
											2016-05-16 10:05:09 +02:00
										 |  |  | //	m_pluginAPI->addChannelRollup(gui);
 | 
					
						
							| 
									
										
										
										
											2015-06-21 12:46:47 +02:00
										 |  |  | } |