1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-09 01:56:05 -05:00
sdrangel/plugins/samplesource/rtlsdr/rtlsdrgui.h

65 lines
1.4 KiB
C
Raw Normal View History

#ifndef INCLUDE_RTLSDRGUI_H
#define INCLUDE_RTLSDRGUI_H
#include <QTimer>
#include "plugin/plugingui.h"
#include "rtlsdrinput.h"
class PluginAPI;
namespace Ui {
class RTLSDRGui;
class RTLSDRSampleRates;
}
class RTLSDRGui : public QWidget, public PluginGUI {
Q_OBJECT
public:
explicit RTLSDRGui(PluginAPI* pluginAPI, QWidget* parent = NULL);
2015-08-17 02:29:34 -04:00
virtual ~RTLSDRGui();
void destroy();
void setName(const QString& name);
QString getName() const;
void resetToDefaults();
qint64 getCenterFrequency() const;
QByteArray serialize() const;
bool deserialize(const QByteArray& data);
2015-08-17 02:29:34 -04:00
virtual bool handleMessage(const Message& message);
private:
Ui::RTLSDRGui* ui;
PluginAPI* m_pluginAPI;
RTLSDRInput::Settings m_settings;
QTimer m_updateTimer;
std::vector<int> m_gains;
SampleSource* m_sampleSource;
void displaySettings();
void sendSettings();
private slots:
void on_centerFrequency_changed(quint64 value);
2015-05-09 10:44:26 -04:00
void on_decim_valueChanged(int value);
2015-05-08 18:54:01 -04:00
void on_ppm_valueChanged(int value);
void on_gain_valueChanged(int value);
2014-11-08 18:42:43 -05:00
void on_samplerate_valueChanged(int value);
2014-11-07 14:26:02 -05:00
void on_checkBox_stateChanged(int state);
void updateHardware();
void handleSourceMessages();
};
class RTLSDRSampleRates {
public:
static unsigned int getRate(unsigned int rate_index);
static unsigned int getRateIndex(unsigned int rate);
private:
static unsigned int m_rates[6];
static unsigned int m_nb_rates;
};
#endif // INCLUDE_RTLSDRGUI_H