mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-07-31 21:12:28 -04:00
Multi device support: added missing sanmple device UI class
This commit is contained in:
parent
f2872ae0ed
commit
ba34b39309
48
sdrbase/gui/samplingdevicecontrol.cpp
Normal file
48
sdrbase/gui/samplingdevicecontrol.cpp
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Copyright (C) 2015 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 "gui/samplingdevicecontrol.h"
|
||||||
|
#include "gui/pluginsdialog.h"
|
||||||
|
#include "plugin/pluginmanager.h"
|
||||||
|
#include "ui_samplingdevicecontrol.h"
|
||||||
|
|
||||||
|
|
||||||
|
SamplingDeviceControl::SamplingDeviceControl(QWidget* parent) :
|
||||||
|
QWidget(parent),
|
||||||
|
ui(new Ui::SamplingDeviceControl),
|
||||||
|
m_pluginManager(0)
|
||||||
|
{
|
||||||
|
ui->setupUi(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
SamplingDeviceControl::~SamplingDeviceControl()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
|
|
||||||
|
QComboBox *SamplingDeviceControl::getDeviceSelector()
|
||||||
|
{
|
||||||
|
return ui->deviceSelect;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SamplingDeviceControl::on_showLoadedPlugins_clicked(bool checked)
|
||||||
|
{
|
||||||
|
if (m_pluginManager)
|
||||||
|
{
|
||||||
|
PluginsDialog pluginsDialog(m_pluginManager, this);
|
||||||
|
pluginsDialog.exec();
|
||||||
|
}
|
||||||
|
}
|
52
sdrbase/gui/samplingdevicecontrol.h
Normal file
52
sdrbase/gui/samplingdevicecontrol.h
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Copyright (C) 2015 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 SDRBASE_GUI_SAMPLINGDEVICECONTROL_H_
|
||||||
|
#define SDRBASE_GUI_SAMPLINGDEVICECONTROL_H_
|
||||||
|
|
||||||
|
|
||||||
|
#include <QWidget>
|
||||||
|
#include <QComboBox>
|
||||||
|
|
||||||
|
#include "util/export.h"
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class SamplingDeviceControl;
|
||||||
|
}
|
||||||
|
|
||||||
|
class ChannelMarker;
|
||||||
|
class PluginManager;
|
||||||
|
|
||||||
|
class SDRANGEL_API SamplingDeviceControl : public QWidget {
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit SamplingDeviceControl(QWidget* parent = NULL);
|
||||||
|
~SamplingDeviceControl();
|
||||||
|
|
||||||
|
void setPluginManager(PluginManager *pluginManager) { m_pluginManager = pluginManager; }
|
||||||
|
QComboBox *getDeviceSelector();
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::SamplingDeviceControl* ui;
|
||||||
|
PluginManager *m_pluginManager;
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void on_showLoadedPlugins_clicked(bool checked);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* SDRBASE_GUI_SAMPLINGDEVICECONTROL_H_ */
|
103
sdrbase/gui/samplingdevicecontrol.ui
Normal file
103
sdrbase/gui/samplingdevicecontrol.ui
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>SamplingDeviceControl</class>
|
||||||
|
<widget class="QWidget" name="SamplingDeviceControl">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>300</width>
|
||||||
|
<height>76</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>300</width>
|
||||||
|
<height>76</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Sans Serif</family>
|
||||||
|
<pointsize>9</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Title & Color</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="deviceSelectLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="deviceSelectLabel">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>22</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Dev</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="deviceSelect">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Select sampling device</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="channelSelectLabel">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>30</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Chan</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="channelSelect">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Add a new channel</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="showLoadedPlugins">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Show loaded plugins</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>?</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
Loading…
x
Reference in New Issue
Block a user