mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-22 16:08:39 -05:00
USe DeviceUISet new struct in main window
This commit is contained in:
parent
b4fe1f64c1
commit
ec225344d3
@ -30,7 +30,7 @@ class DeviceSourceAPI;
|
|||||||
class DSPDeviceSinkEngine;
|
class DSPDeviceSinkEngine;
|
||||||
class DeviceSinkAPI;
|
class DeviceSinkAPI;
|
||||||
|
|
||||||
class DeviceUISet
|
struct DeviceUISet
|
||||||
{
|
{
|
||||||
SpectrumVis *m_spectrumVis;
|
SpectrumVis *m_spectrumVis;
|
||||||
GLSpectrum *m_spectrum;
|
GLSpectrum *m_spectrum;
|
||||||
|
@ -15,8 +15,6 @@
|
|||||||
// 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 <plugin/plugininstancegui.h>
|
|
||||||
#include <plugin/plugininstancegui.h>
|
|
||||||
#include <QInputDialog>
|
#include <QInputDialog>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
@ -27,10 +25,11 @@
|
|||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
#include <QSysInfo>
|
#include <QSysInfo>
|
||||||
|
|
||||||
#include "mainwindow.h"
|
#include <plugin/plugininstancegui.h>
|
||||||
#include "ui_mainwindow.h"
|
#include <plugin/plugininstancegui.h>
|
||||||
#include "device/devicesourceapi.h"
|
#include "device/devicesourceapi.h"
|
||||||
#include "device/devicesinkapi.h"
|
#include "device/devicesinkapi.h"
|
||||||
|
#include "device/deviceuiset.h"
|
||||||
#include "audio/audiodeviceinfo.h"
|
#include "audio/audiodeviceinfo.h"
|
||||||
#include "gui/indicator.h"
|
#include "gui/indicator.h"
|
||||||
#include "gui/presetitem.h"
|
#include "gui/presetitem.h"
|
||||||
@ -51,6 +50,9 @@
|
|||||||
#include "gui/glspectrum.h"
|
#include "gui/glspectrum.h"
|
||||||
#include "gui/glspectrumgui.h"
|
#include "gui/glspectrumgui.h"
|
||||||
|
|
||||||
|
#include "mainwindow.h"
|
||||||
|
#include "ui_mainwindow.h"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
@ -1131,34 +1133,3 @@ void MainWindow::updateStatus()
|
|||||||
{
|
{
|
||||||
m_dateTimeWidget->setText(QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss t"));
|
m_dateTimeWidget->setText(QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss t"));
|
||||||
}
|
}
|
||||||
|
|
||||||
MainWindow::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);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
MainWindow::DeviceUISet::~DeviceUISet()
|
|
||||||
{
|
|
||||||
delete m_samplingDeviceControl;
|
|
||||||
delete m_channelWindow;
|
|
||||||
delete m_spectrumGUI;
|
|
||||||
delete m_spectrumVis;
|
|
||||||
delete m_spectrum;
|
|
||||||
}
|
|
||||||
|
@ -46,6 +46,7 @@ class ChannelMarker;
|
|||||||
class PluginManager;
|
class PluginManager;
|
||||||
class DeviceSourceAPI;
|
class DeviceSourceAPI;
|
||||||
class DeviceSinkAPI;
|
class DeviceSinkAPI;
|
||||||
|
class DeviceUISet;
|
||||||
class PluginInterface;
|
class PluginInterface;
|
||||||
class QWidget;
|
class QWidget;
|
||||||
|
|
||||||
@ -57,23 +58,6 @@ class SDRANGEL_API MainWindow : public QMainWindow {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
struct 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();
|
|
||||||
};
|
|
||||||
|
|
||||||
explicit MainWindow(QWidget* parent = 0);
|
explicit MainWindow(QWidget* parent = 0);
|
||||||
~MainWindow();
|
~MainWindow();
|
||||||
static MainWindow *getInstance() { return m_instance; } // Main Window is de facto a singleton so this just returns its reference
|
static MainWindow *getInstance() { return m_instance; } // Main Window is de facto a singleton so this just returns its reference
|
||||||
|
Loading…
Reference in New Issue
Block a user