mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-02-03 09:44:01 -05:00
Created a DeviceUISet class in its own right
This commit is contained in:
parent
f4e214a235
commit
b4fe1f64c1
@ -45,6 +45,7 @@ set(sdrgui_SOURCES
|
||||
|
||||
device/devicesourceapi.cpp
|
||||
device/devicesinkapi.cpp
|
||||
device/deviceuiset.cpp
|
||||
|
||||
plugin/pluginapi.cpp
|
||||
plugin/pluginmanager.cpp
|
||||
@ -96,6 +97,7 @@ set(sdrgui_HEADERS
|
||||
|
||||
device/devicesourceapi.h
|
||||
device/devicesinkapi.h
|
||||
device/deviceuiset.h
|
||||
|
||||
plugin/pluginapi.h
|
||||
plugin/pluginmanager.h
|
||||
|
64
sdrgui/device/deviceuiset.cpp
Normal file
64
sdrgui/device/deviceuiset.cpp
Normal file
@ -0,0 +1,64 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2016 Edouard Griffiths, F4EXB //
|
||||
// //
|
||||
// This program is free software; you can redistribute it and/or modify //
|
||||
// it under the terms of the GNU General Public License as published by //
|
||||
// the Free Software Foundation as version 3 of the License, or //
|
||||
// //
|
||||
// This program is distributed in the hope that it will be useful, //
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
||||
// GNU General Public License V3 for more details. //
|
||||
// //
|
||||
// You should have received a copy of the GNU General Public License //
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <QFont>
|
||||
|
||||
#include "gui/glspectrum.h"
|
||||
#include "dsp/spectrumvis.h"
|
||||
#include "gui/glspectrumgui.h"
|
||||
#include "gui/channelwindow.h"
|
||||
#include "gui/samplingdevicecontrol.h"
|
||||
#include "dsp/dspdevicesourceengine.h"
|
||||
#include "dsp/dspdevicesinkengine.h"
|
||||
#include "device/devicesourceapi.h"
|
||||
#include "device/devicesinkapi.h"
|
||||
|
||||
#include "deviceuiset.h"
|
||||
|
||||
DeviceUISet::DeviceUISet(QTimer& timer)
|
||||
{
|
||||
m_spectrum = new GLSpectrum;
|
||||
m_spectrumVis = new SpectrumVis(m_spectrum);
|
||||
m_spectrum->connectTimer(timer);
|
||||
m_spectrumGUI = new GLSpectrumGUI;
|
||||
m_spectrumGUI->setBuddies(m_spectrumVis->getInputMessageQueue(), m_spectrumVis, m_spectrum);
|
||||
m_channelWindow = new ChannelWindow;
|
||||
m_samplingDeviceControl = new SamplingDeviceControl;
|
||||
m_deviceSourceEngine = 0;
|
||||
m_deviceSourceAPI = 0;
|
||||
m_deviceSinkEngine = 0;
|
||||
m_deviceSinkAPI = 0;
|
||||
|
||||
// m_spectrum needs to have its font to be set since it cannot be inherited from the main window
|
||||
QFont font;
|
||||
font.setFamily(QStringLiteral("Sans Serif"));
|
||||
font.setPointSize(9);
|
||||
m_spectrum->setFont(font);
|
||||
|
||||
}
|
||||
|
||||
DeviceUISet::~DeviceUISet()
|
||||
{
|
||||
delete m_samplingDeviceControl;
|
||||
delete m_channelWindow;
|
||||
delete m_spectrumGUI;
|
||||
delete m_spectrumVis;
|
||||
delete m_spectrum;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
53
sdrgui/device/deviceuiset.h
Normal file
53
sdrgui/device/deviceuiset.h
Normal file
@ -0,0 +1,53 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright (C) 2016 Edouard Griffiths, F4EXB //
|
||||
// //
|
||||
// This program is free software; you can redistribute it and/or modify //
|
||||
// it under the terms of the GNU General Public License as published by //
|
||||
// the Free Software Foundation as version 3 of the License, or //
|
||||
// //
|
||||
// This program is distributed in the hope that it will be useful, //
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
||||
// GNU General Public License V3 for more details. //
|
||||
// //
|
||||
// You should have received a copy of the GNU General Public License //
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef SDRGUI_DEVICE_DEVICEUISET_H_
|
||||
#define SDRGUI_DEVICE_DEVICEUISET_H_
|
||||
|
||||
#include <QTimer>
|
||||
#include <QByteArray>
|
||||
|
||||
class SpectrumVis;
|
||||
class GLSpectrum;
|
||||
class GLSpectrumGUI;
|
||||
class ChannelWindow;
|
||||
class SamplingDeviceControl;
|
||||
class DSPDeviceSourceEngine;
|
||||
class DeviceSourceAPI;
|
||||
class DSPDeviceSinkEngine;
|
||||
class DeviceSinkAPI;
|
||||
|
||||
class DeviceUISet
|
||||
{
|
||||
SpectrumVis *m_spectrumVis;
|
||||
GLSpectrum *m_spectrum;
|
||||
GLSpectrumGUI *m_spectrumGUI;
|
||||
ChannelWindow *m_channelWindow;
|
||||
SamplingDeviceControl *m_samplingDeviceControl;
|
||||
DSPDeviceSourceEngine *m_deviceSourceEngine;
|
||||
DeviceSourceAPI *m_deviceSourceAPI;
|
||||
DSPDeviceSinkEngine *m_deviceSinkEngine;
|
||||
DeviceSinkAPI *m_deviceSinkAPI;
|
||||
QByteArray m_mainWindowState;
|
||||
|
||||
DeviceUISet(QTimer& timer);
|
||||
~DeviceUISet();
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
#endif /* SDRGUI_DEVICE_DEVICEUISET_H_ */
|
@ -36,6 +36,7 @@ CONFIG(macx):INCLUDEPATH += "../../../boost_1_64_0"
|
||||
SOURCES += mainwindow.cpp\
|
||||
device/devicesourceapi.cpp\
|
||||
device/devicesinkapi.cpp\
|
||||
device/deviceuiset.cpp\
|
||||
dsp/spectrumscopecombovis.cpp\
|
||||
dsp/spectrumscopengcombovis.cpp\
|
||||
dsp/scopevis.cpp\
|
||||
@ -79,6 +80,7 @@ SOURCES += mainwindow.cpp\
|
||||
HEADERS += mainwindow.h\
|
||||
device/devicesourceapi.h\
|
||||
device/devicesinkapi.h\
|
||||
device/deviceuiset.h\
|
||||
dsp/spectrumscopecombovis.h\
|
||||
dsp/spectrumscopengcombovis.h\
|
||||
dsp/scopevis.h\
|
||||
|
Loading…
Reference in New Issue
Block a user