2017-10-22 13:12:43 -04:00
|
|
|
///////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Copyright (C) 2012 maintech GmbH, Otto-Hahn-Str. 15, 97204 Hoechberg, Germany //
|
|
|
|
// written by Christian Daniel //
|
|
|
|
// //
|
|
|
|
// 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 //
|
2019-04-11 08:43:33 -04:00
|
|
|
// (at your option) any later version. //
|
2017-10-22 13:12:43 -04:00
|
|
|
// //
|
|
|
|
// 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 INCLUDE_MAINWINDOW_H
|
|
|
|
#define INCLUDE_MAINWINDOW_H
|
|
|
|
|
|
|
|
#include <QMainWindow>
|
|
|
|
#include <QTimer>
|
|
|
|
#include <QList>
|
|
|
|
|
|
|
|
#include "settings/mainsettings.h"
|
2017-11-25 10:08:18 -05:00
|
|
|
#include "util/message.h"
|
2017-10-22 13:12:43 -04:00
|
|
|
#include "util/messagequeue.h"
|
2018-03-20 08:49:21 -04:00
|
|
|
#include "export.h"
|
2017-11-17 23:06:43 -05:00
|
|
|
#include "mainparser.h"
|
2017-10-22 13:12:43 -04:00
|
|
|
|
|
|
|
class QLabel;
|
|
|
|
class QTreeWidgetItem;
|
|
|
|
class QDir;
|
|
|
|
|
|
|
|
class DSPEngine;
|
|
|
|
class DSPDeviceSourceEngine;
|
|
|
|
class DSPDeviceSinkEngine;
|
|
|
|
class Indicator;
|
|
|
|
class GLSpectrumGUI;
|
|
|
|
class PluginAPI;
|
2020-10-04 00:16:15 -04:00
|
|
|
class ChannelGUI;
|
2017-10-22 13:12:43 -04:00
|
|
|
class ChannelMarker;
|
|
|
|
class PluginManager;
|
2019-05-08 16:11:53 -04:00
|
|
|
class DeviceAPI;
|
2017-10-24 12:34:39 -04:00
|
|
|
class DeviceUISet;
|
2020-09-19 19:06:34 -04:00
|
|
|
class FeatureUISet;
|
2017-10-22 13:12:43 -04:00
|
|
|
class PluginInterface;
|
|
|
|
class QWidget;
|
2017-11-17 02:52:15 -05:00
|
|
|
class WebAPIRequestMapper;
|
|
|
|
class WebAPIServer;
|
2017-11-18 13:34:47 -05:00
|
|
|
class WebAPIAdapterGUI;
|
2018-01-04 05:11:53 -05:00
|
|
|
class Preset;
|
|
|
|
class Command;
|
2020-09-23 23:38:05 -04:00
|
|
|
class FeatureSetPreset;
|
2018-01-04 23:05:12 -05:00
|
|
|
class CommandKeyReceiver;
|
2017-10-22 13:12:43 -04:00
|
|
|
|
2017-11-11 04:29:32 -05:00
|
|
|
namespace qtwebapp {
|
2017-11-11 20:23:55 -05:00
|
|
|
class LoggerWithFile;
|
2017-11-11 04:29:32 -05:00
|
|
|
}
|
|
|
|
|
2017-10-22 13:12:43 -04:00
|
|
|
namespace Ui {
|
|
|
|
class MainWindow;
|
|
|
|
}
|
|
|
|
|
2018-03-03 14:23:38 -05:00
|
|
|
class SDRGUI_API MainWindow : public QMainWindow {
|
2017-10-22 13:12:43 -04:00
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2020-01-21 12:05:14 -05:00
|
|
|
class MsgDeviceSetFocus : public Message {
|
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
|
|
|
int getDeviceSetIndex() const { return m_deviceSetIndex; }
|
|
|
|
|
|
|
|
static MsgDeviceSetFocus* create(int deviceSetIndex)
|
|
|
|
{
|
|
|
|
return new MsgDeviceSetFocus(deviceSetIndex);
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
int m_deviceSetIndex;
|
|
|
|
|
|
|
|
MsgDeviceSetFocus(int deviceSetIndex) :
|
|
|
|
Message(),
|
|
|
|
m_deviceSetIndex(deviceSetIndex)
|
|
|
|
{ }
|
|
|
|
};
|
|
|
|
|
2017-11-17 23:06:43 -05:00
|
|
|
explicit MainWindow(qtwebapp::LoggerWithFile *logger, const MainParser& parser, QWidget* parent = 0);
|
2017-10-22 13:12:43 -04:00
|
|
|
~MainWindow();
|
2017-10-24 07:45:10 -04:00
|
|
|
static MainWindow *getInstance() { return m_instance; } // Main Window is de facto a singleton so this just returns its reference
|
2017-10-22 13:12:43 -04:00
|
|
|
|
|
|
|
MessageQueue* getInputMessageQueue() { return &m_inputMessageQueue; }
|
|
|
|
|
|
|
|
void addViewAction(QAction* action);
|
|
|
|
|
2019-05-18 05:59:56 -04:00
|
|
|
void setDeviceGUI(int deviceTabIndex, QWidget* gui, const QString& deviceDisplayName, int deviceType = 0);
|
2017-10-22 13:12:43 -04:00
|
|
|
|
|
|
|
const QTimer& getMasterTimer() const { return m_masterTimer; }
|
|
|
|
const MainSettings& getMainSettings() const { return m_settings; }
|
2019-08-01 12:50:21 -04:00
|
|
|
const PluginManager *getPluginManager() const { return m_pluginManager; }
|
2020-01-21 12:05:14 -05:00
|
|
|
std::vector<DeviceUISet*>& getDeviceUISets() { return m_deviceUIs; }
|
2019-07-29 12:54:50 -04:00
|
|
|
void commandKeysConnect(QObject *object, const char *slot);
|
|
|
|
void commandKeysDisconnect(QObject *object, const char *slot);
|
2020-09-09 20:43:28 -04:00
|
|
|
const QString& getAPIHost() const { return m_apiHost; }
|
|
|
|
int getAPIPort() const { return m_apiPort; }
|
2017-10-22 13:12:43 -04:00
|
|
|
|
2017-11-18 13:34:47 -05:00
|
|
|
friend class WebAPIAdapterGUI;
|
|
|
|
|
2017-10-22 13:12:43 -04:00
|
|
|
private:
|
2017-11-25 10:08:18 -05:00
|
|
|
class MsgLoadPreset : public Message {
|
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
|
|
|
const Preset *getPreset() const { return m_preset; }
|
|
|
|
int getDeviceSetIndex() const { return m_deviceSetIndex; }
|
|
|
|
|
|
|
|
static MsgLoadPreset* create(const Preset *preset, int deviceSetIndex)
|
|
|
|
{
|
|
|
|
return new MsgLoadPreset(preset, deviceSetIndex);
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
const Preset *m_preset;
|
|
|
|
int m_deviceSetIndex;
|
|
|
|
|
|
|
|
MsgLoadPreset(const Preset *preset, int deviceSetIndex) :
|
|
|
|
Message(),
|
|
|
|
m_preset(preset),
|
|
|
|
m_deviceSetIndex(deviceSetIndex)
|
|
|
|
{ }
|
|
|
|
};
|
|
|
|
|
2017-11-25 10:47:13 -05:00
|
|
|
class MsgSavePreset : public Message {
|
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
|
|
|
Preset *getPreset() const { return m_preset; }
|
|
|
|
int getDeviceSetIndex() const { return m_deviceSetIndex; }
|
|
|
|
bool isNewPreset() const { return m_newPreset; }
|
|
|
|
|
|
|
|
static MsgSavePreset* create(Preset *preset, int deviceSetIndex, bool newPreset)
|
|
|
|
{
|
|
|
|
return new MsgSavePreset(preset, deviceSetIndex, newPreset);
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
Preset *m_preset;
|
|
|
|
int m_deviceSetIndex;
|
|
|
|
bool m_newPreset;
|
|
|
|
|
|
|
|
MsgSavePreset(Preset *preset, int deviceSetIndex, bool newPreset) :
|
|
|
|
Message(),
|
|
|
|
m_preset(preset),
|
|
|
|
m_deviceSetIndex(deviceSetIndex),
|
|
|
|
m_newPreset(newPreset)
|
|
|
|
{ }
|
|
|
|
};
|
|
|
|
|
2017-11-25 13:42:56 -05:00
|
|
|
class MsgDeletePreset : public Message {
|
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
|
|
|
const Preset *getPreset() const { return m_preset; }
|
|
|
|
|
|
|
|
static MsgDeletePreset* create(const Preset *preset)
|
|
|
|
{
|
|
|
|
return new MsgDeletePreset(preset);
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
const Preset *m_preset;
|
|
|
|
|
|
|
|
MsgDeletePreset(const Preset *preset) :
|
|
|
|
Message(),
|
|
|
|
m_preset(preset)
|
|
|
|
{ }
|
|
|
|
};
|
|
|
|
|
2020-09-23 23:38:05 -04:00
|
|
|
class MsgLoadFeatureSetPreset : public Message {
|
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
|
|
|
const FeatureSetPreset *getPreset() const { return m_preset; }
|
|
|
|
int getFeatureSetIndex() const { return m_featureSetIndex; }
|
|
|
|
|
|
|
|
static MsgLoadFeatureSetPreset* create(const FeatureSetPreset *preset, int featureSetIndex)
|
|
|
|
{
|
|
|
|
return new MsgLoadFeatureSetPreset(preset, featureSetIndex);
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
const FeatureSetPreset *m_preset;
|
|
|
|
int m_featureSetIndex;
|
|
|
|
|
|
|
|
MsgLoadFeatureSetPreset(const FeatureSetPreset *preset, int featureSetIndex) :
|
|
|
|
Message(),
|
|
|
|
m_preset(preset),
|
|
|
|
m_featureSetIndex(featureSetIndex)
|
|
|
|
{ }
|
|
|
|
};
|
|
|
|
|
|
|
|
class MsgSaveFeatureSetPreset : public Message {
|
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
|
|
|
FeatureSetPreset *getPreset() const { return m_preset; }
|
|
|
|
int getFeatureSetIndex() const { return m_featureSetIndex; }
|
|
|
|
bool isNewPreset() const { return m_newPreset; }
|
|
|
|
|
|
|
|
static MsgSaveFeatureSetPreset* create(FeatureSetPreset *preset, int featureSetIndex, bool newPreset)
|
|
|
|
{
|
|
|
|
return new MsgSaveFeatureSetPreset(preset, featureSetIndex, newPreset);
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
FeatureSetPreset *m_preset;
|
|
|
|
int m_featureSetIndex;
|
|
|
|
bool m_newPreset;
|
|
|
|
|
|
|
|
MsgSaveFeatureSetPreset(FeatureSetPreset *preset, int featureSetIndex, bool newPreset) :
|
|
|
|
Message(),
|
|
|
|
m_preset(preset),
|
|
|
|
m_featureSetIndex(featureSetIndex),
|
|
|
|
m_newPreset(newPreset)
|
|
|
|
{ }
|
|
|
|
};
|
|
|
|
|
|
|
|
class MsgDeleteFeatureSetPreset : public Message {
|
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
|
|
|
const FeatureSetPreset *getPreset() const { return m_preset; }
|
|
|
|
|
|
|
|
static MsgDeleteFeatureSetPreset* create(const FeatureSetPreset *preset)
|
|
|
|
{
|
|
|
|
return new MsgDeleteFeatureSetPreset(preset);
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
const FeatureSetPreset *m_preset;
|
|
|
|
|
|
|
|
MsgDeleteFeatureSetPreset(const FeatureSetPreset *preset) :
|
|
|
|
Message(),
|
|
|
|
m_preset(preset)
|
|
|
|
{ }
|
|
|
|
};
|
|
|
|
|
2017-11-25 16:52:24 -05:00
|
|
|
class MsgAddDeviceSet : public Message {
|
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
2019-05-08 19:12:40 -04:00
|
|
|
int getDirection() const { return m_direction; }
|
2017-11-25 16:52:24 -05:00
|
|
|
|
2019-05-08 19:12:40 -04:00
|
|
|
static MsgAddDeviceSet* create(int direction)
|
2017-11-25 16:52:24 -05:00
|
|
|
{
|
2019-05-08 19:12:40 -04:00
|
|
|
return new MsgAddDeviceSet(direction);
|
2017-11-25 16:52:24 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
2019-05-08 19:12:40 -04:00
|
|
|
int m_direction;
|
2017-11-25 16:52:24 -05:00
|
|
|
|
2019-05-08 19:12:40 -04:00
|
|
|
MsgAddDeviceSet(int direction) :
|
2017-11-25 16:52:24 -05:00
|
|
|
Message(),
|
2019-05-08 19:12:40 -04:00
|
|
|
m_direction(direction)
|
2017-11-25 16:52:24 -05:00
|
|
|
{ }
|
|
|
|
};
|
|
|
|
|
|
|
|
class MsgRemoveLastDeviceSet : public Message {
|
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
|
|
|
static MsgRemoveLastDeviceSet* create()
|
|
|
|
{
|
|
|
|
return new MsgRemoveLastDeviceSet();
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
MsgRemoveLastDeviceSet() :
|
|
|
|
Message()
|
|
|
|
{ }
|
|
|
|
};
|
|
|
|
|
2017-11-27 02:14:07 -05:00
|
|
|
class MsgSetDevice : public Message {
|
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
|
|
|
int getDeviceSetIndex() const { return m_deviceSetIndex; }
|
|
|
|
int getDeviceIndex() const { return m_deviceIndex; }
|
2019-05-18 00:30:37 -04:00
|
|
|
int getDeviceType() const { return m_deviceType; }
|
2017-11-27 02:14:07 -05:00
|
|
|
|
2019-12-29 00:01:14 -05:00
|
|
|
static MsgSetDevice* create(int deviceSetIndex, int deviceIndex, int deviceType)
|
2017-11-27 02:14:07 -05:00
|
|
|
{
|
2019-12-29 00:01:14 -05:00
|
|
|
return new MsgSetDevice(deviceSetIndex, deviceIndex, deviceType);
|
2017-11-27 02:14:07 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
int m_deviceSetIndex;
|
|
|
|
int m_deviceIndex;
|
2019-05-18 00:30:37 -04:00
|
|
|
int m_deviceType;
|
2017-11-27 02:14:07 -05:00
|
|
|
|
2019-05-18 00:30:37 -04:00
|
|
|
MsgSetDevice(int deviceSetIndex, int deviceIndex, int deviceType) :
|
2017-11-27 02:14:07 -05:00
|
|
|
Message(),
|
|
|
|
m_deviceSetIndex(deviceSetIndex),
|
|
|
|
m_deviceIndex(deviceIndex),
|
2019-05-18 00:30:37 -04:00
|
|
|
m_deviceType(deviceType)
|
2017-11-27 02:14:07 -05:00
|
|
|
{ }
|
|
|
|
};
|
|
|
|
|
2017-12-10 19:18:10 -05:00
|
|
|
class MsgAddChannel : public Message {
|
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
|
|
|
int getDeviceSetIndex() const { return m_deviceSetIndex; }
|
|
|
|
int getChannelRegistrationIndex() const { return m_channelRegistrationIndex; }
|
|
|
|
bool isTx() const { return m_tx; }
|
|
|
|
|
|
|
|
static MsgAddChannel* create(int deviceSetIndex, int channelRegistrationIndex, bool tx)
|
|
|
|
{
|
|
|
|
return new MsgAddChannel(deviceSetIndex, channelRegistrationIndex, tx);
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
int m_deviceSetIndex;
|
|
|
|
int m_channelRegistrationIndex;
|
|
|
|
bool m_tx;
|
|
|
|
|
|
|
|
MsgAddChannel(int deviceSetIndex, int channelRegistrationIndex, bool tx) :
|
|
|
|
Message(),
|
|
|
|
m_deviceSetIndex(deviceSetIndex),
|
|
|
|
m_channelRegistrationIndex(channelRegistrationIndex),
|
|
|
|
m_tx(tx)
|
|
|
|
{ }
|
|
|
|
};
|
|
|
|
|
2017-12-23 17:41:37 -05:00
|
|
|
class MsgDeleteChannel : public Message {
|
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
|
|
|
int getDeviceSetIndex() const { return m_deviceSetIndex; }
|
|
|
|
int getChannelIndex() const { return m_channelIndex; }
|
|
|
|
|
2019-09-07 18:44:56 -04:00
|
|
|
static MsgDeleteChannel* create(int deviceSetIndex, int channelIndex)
|
2017-12-23 17:41:37 -05:00
|
|
|
{
|
2019-09-07 18:44:56 -04:00
|
|
|
return new MsgDeleteChannel(deviceSetIndex, channelIndex);
|
2017-12-23 17:41:37 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
int m_deviceSetIndex;
|
|
|
|
int m_channelIndex;
|
|
|
|
|
2019-09-07 18:44:56 -04:00
|
|
|
MsgDeleteChannel(int deviceSetIndex, int channelIndex) :
|
2017-12-23 17:41:37 -05:00
|
|
|
Message(),
|
|
|
|
m_deviceSetIndex(deviceSetIndex),
|
2019-09-07 18:44:56 -04:00
|
|
|
m_channelIndex(channelIndex)
|
2017-12-23 17:41:37 -05:00
|
|
|
{ }
|
|
|
|
};
|
|
|
|
|
2020-09-20 21:13:36 -04:00
|
|
|
class MsgAddFeature : public Message {
|
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
|
|
|
int getFeatureSetIndex() const { return m_featureSetIndex; }
|
|
|
|
int getFeatureRegistrationIndex() const { return m_featureRegistrationIndex; }
|
|
|
|
|
|
|
|
static MsgAddFeature* create(int featureSetIndex, int featureRegistrationIndex)
|
|
|
|
{
|
|
|
|
return new MsgAddFeature(featureSetIndex, featureRegistrationIndex);
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
int m_featureSetIndex;
|
|
|
|
int m_featureRegistrationIndex;
|
|
|
|
|
|
|
|
MsgAddFeature(int featureSetIndex, int featureRegistrationIndex) :
|
|
|
|
Message(),
|
|
|
|
m_featureSetIndex(featureSetIndex),
|
|
|
|
m_featureRegistrationIndex(featureRegistrationIndex)
|
|
|
|
{ }
|
|
|
|
};
|
|
|
|
|
|
|
|
class MsgDeleteFeature : public Message {
|
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
|
|
|
int getFeatureSetIndex() const { return m_featureSetIndex; }
|
|
|
|
int getFeatureIndex() const { return m_featureIndex; }
|
|
|
|
|
|
|
|
static MsgDeleteFeature* create(int m_featureSetIndex, int m_featureIndex) {
|
|
|
|
return new MsgDeleteFeature(m_featureSetIndex, m_featureIndex);
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
int m_featureSetIndex;
|
|
|
|
int m_featureIndex;
|
|
|
|
|
|
|
|
MsgDeleteFeature(int m_featureSetIndex, int m_featureIndex) :
|
|
|
|
Message(),
|
|
|
|
m_featureSetIndex(m_featureSetIndex),
|
|
|
|
m_featureIndex(m_featureIndex)
|
|
|
|
{ }
|
|
|
|
};
|
|
|
|
|
2017-11-25 13:42:56 -05:00
|
|
|
enum {
|
2017-10-22 13:12:43 -04:00
|
|
|
PGroup,
|
|
|
|
PItem
|
|
|
|
};
|
|
|
|
|
|
|
|
struct DeviceWidgetTabData
|
|
|
|
{
|
|
|
|
QWidget *gui;
|
|
|
|
QString displayName;
|
|
|
|
QString tabName;
|
|
|
|
};
|
|
|
|
|
2019-08-10 19:27:19 -04:00
|
|
|
class MsgApplySettings : public Message {
|
|
|
|
MESSAGE_CLASS_DECLARATION
|
|
|
|
|
|
|
|
public:
|
|
|
|
static MsgApplySettings* create() {
|
|
|
|
return new MsgApplySettings();
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
MsgApplySettings() :
|
|
|
|
Message()
|
|
|
|
{ }
|
|
|
|
};
|
|
|
|
|
2017-10-24 07:45:10 -04:00
|
|
|
static MainWindow *m_instance;
|
2017-10-22 13:12:43 -04:00
|
|
|
Ui::MainWindow* ui;
|
|
|
|
MessageQueue m_inputMessageQueue;
|
|
|
|
MainSettings m_settings;
|
|
|
|
std::vector<DeviceUISet*> m_deviceUIs;
|
2020-09-19 19:06:34 -04:00
|
|
|
std::vector<FeatureUISet*> m_featureUIs;
|
2017-10-22 13:12:43 -04:00
|
|
|
QList<DeviceWidgetTabData> m_deviceWidgetTabs;
|
|
|
|
int m_masterTabIndex;
|
|
|
|
|
|
|
|
DSPEngine* m_dspEngine;
|
|
|
|
PluginManager* m_pluginManager;
|
|
|
|
|
|
|
|
QTimer m_masterTimer;
|
|
|
|
QTimer m_statusTimer;
|
|
|
|
int m_lastEngineState;
|
|
|
|
|
|
|
|
QLabel* m_dateTimeWidget;
|
|
|
|
QLabel* m_showSystemWidget;
|
|
|
|
|
|
|
|
QWidget* m_inputGUI;
|
|
|
|
|
|
|
|
int m_sampleRate;
|
|
|
|
quint64 m_centerFrequency;
|
|
|
|
std::string m_sampleFileName;
|
|
|
|
|
2017-11-11 20:23:55 -05:00
|
|
|
qtwebapp::LoggerWithFile *m_logger;
|
2017-11-11 04:29:32 -05:00
|
|
|
|
2017-11-17 02:52:15 -05:00
|
|
|
WebAPIRequestMapper *m_requestMapper;
|
|
|
|
WebAPIServer *m_apiServer;
|
2017-11-18 13:34:47 -05:00
|
|
|
WebAPIAdapterGUI *m_apiAdapter;
|
2018-01-11 18:57:05 -05:00
|
|
|
QString m_apiHost;
|
|
|
|
int m_apiPort;
|
2017-11-17 02:52:15 -05:00
|
|
|
|
2018-01-04 23:05:12 -05:00
|
|
|
CommandKeyReceiver *m_commandKeyReceiver;
|
|
|
|
|
2017-10-22 13:12:43 -04:00
|
|
|
void loadSettings();
|
|
|
|
void loadPresetSettings(const Preset* preset, int tabIndex);
|
|
|
|
void savePresetSettings(Preset* preset, int tabIndex);
|
2020-09-23 23:38:05 -04:00
|
|
|
void loadFeatureSetPresetSettings(const FeatureSetPreset* preset, int featureSetIndex);
|
|
|
|
void saveFeatureSetPresetSettings(FeatureSetPreset* preset, int featureSetIndex);
|
2018-01-05 05:54:05 -05:00
|
|
|
void saveCommandSettings();
|
2017-10-22 13:12:43 -04:00
|
|
|
|
|
|
|
void createStatusBar();
|
|
|
|
void closeEvent(QCloseEvent*);
|
|
|
|
void updatePresetControls();
|
|
|
|
QTreeWidgetItem* addPresetToTree(const Preset* preset);
|
2018-01-04 05:11:53 -05:00
|
|
|
QTreeWidgetItem* addCommandToTree(const Command* command);
|
2017-10-22 13:12:43 -04:00
|
|
|
void applySettings();
|
|
|
|
|
2017-12-25 03:10:19 -05:00
|
|
|
void addSourceDevice(int deviceIndex);
|
2017-10-22 13:12:43 -04:00
|
|
|
void addSinkDevice();
|
|
|
|
void removeLastDevice();
|
2020-09-19 19:06:34 -04:00
|
|
|
void addFeatureSet();
|
|
|
|
void removeFeatureSet(int tabIndex);
|
|
|
|
void removeAllFeatureSets();
|
2017-12-23 17:41:37 -05:00
|
|
|
void deleteChannel(int deviceSetIndex, int channelIndex);
|
2020-09-13 11:50:24 -04:00
|
|
|
void sampleSourceChanged(int tabIndex, int newDeviceIndex);
|
|
|
|
void sampleSinkChanged(int tabIndex, int newDeviceIndex);
|
2020-09-20 21:13:36 -04:00
|
|
|
void deleteFeature(int featureSetIndex, int featureIndex);
|
2017-10-22 13:12:43 -04:00
|
|
|
|
2017-12-18 07:56:10 -05:00
|
|
|
void setLoggingOptions();
|
2017-11-11 13:26:23 -05:00
|
|
|
|
2017-11-25 10:08:18 -05:00
|
|
|
bool handleMessage(const Message& cmd);
|
|
|
|
|
2017-10-22 13:12:43 -04:00
|
|
|
private slots:
|
|
|
|
void handleMessages();
|
|
|
|
void updateStatus();
|
|
|
|
void on_action_View_Fullscreen_toggled(bool checked);
|
|
|
|
void on_presetSave_clicked();
|
|
|
|
void on_presetUpdate_clicked();
|
2018-01-05 05:45:20 -05:00
|
|
|
void on_presetEdit_clicked();
|
2017-10-22 13:12:43 -04:00
|
|
|
void on_presetExport_clicked();
|
|
|
|
void on_presetImport_clicked();
|
|
|
|
void on_settingsSave_clicked();
|
|
|
|
void on_presetLoad_clicked();
|
|
|
|
void on_presetDelete_clicked();
|
|
|
|
void on_presetTree_currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous);
|
|
|
|
void on_presetTree_itemActivated(QTreeWidgetItem *item, int column);
|
2018-01-04 05:11:53 -05:00
|
|
|
void on_commandNew_clicked();
|
|
|
|
void on_commandDuplicate_clicked();
|
|
|
|
void on_commandEdit_clicked();
|
|
|
|
void on_commandDelete_clicked();
|
2018-01-04 14:15:33 -05:00
|
|
|
void on_commandRun_clicked();
|
|
|
|
void on_commandOutput_clicked();
|
2018-01-05 05:54:05 -05:00
|
|
|
void on_commandsSave_clicked();
|
2018-01-04 23:05:12 -05:00
|
|
|
void on_commandKeyboardConnect_toggled(bool checked);
|
2017-10-22 13:12:43 -04:00
|
|
|
void on_action_Audio_triggered();
|
2017-11-11 13:26:23 -05:00
|
|
|
void on_action_Logging_triggered();
|
2019-07-19 12:38:03 -04:00
|
|
|
void on_action_AMBE_triggered();
|
2020-01-11 19:10:51 -05:00
|
|
|
void on_action_LimeRFE_triggered();
|
2017-10-22 13:12:43 -04:00
|
|
|
void on_action_My_Position_triggered();
|
2019-06-12 12:50:53 -04:00
|
|
|
void on_action_DeviceUserArguments_triggered();
|
2020-09-13 11:50:24 -04:00
|
|
|
void samplingDeviceChanged(int deviceType, int tabIndex, int newDeviceIndex);
|
2020-09-12 04:37:16 -04:00
|
|
|
void channelAddClicked(int channelIndex);
|
2020-09-19 19:06:34 -04:00
|
|
|
void featureAddClicked(int featureIndex);
|
2017-10-22 13:12:43 -04:00
|
|
|
void on_action_Loaded_Plugins_triggered();
|
|
|
|
void on_action_About_triggered();
|
|
|
|
void on_action_addSourceDevice_triggered();
|
|
|
|
void on_action_addSinkDevice_triggered();
|
2019-05-18 05:59:56 -04:00
|
|
|
void on_action_addMIMODevice_triggered();
|
2017-10-22 13:12:43 -04:00
|
|
|
void on_action_removeLastDevice_triggered();
|
|
|
|
void tabInputViewIndexChanged();
|
2020-09-12 04:37:16 -04:00
|
|
|
void tabChannelsIndexChanged();
|
2018-01-04 23:05:12 -05:00
|
|
|
void commandKeyPressed(Qt::Key key, Qt::KeyboardModifiers keyModifiers, bool release);
|
2017-10-22 13:12:43 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // INCLUDE_MAINWINDOW_H
|