SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
Public Member Functions | Static Public Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
LocalSourceGUI Class Reference

#include <localsourcegui.h>

+ Inheritance diagram for LocalSourceGUI:
+ Collaboration diagram for LocalSourceGUI:

Public Member Functions

virtual void destroy ()
 
void setName (const QString &name)
 
QString getName () const
 
virtual qint64 getCenterFrequency () const
 
virtual void setCenterFrequency (qint64 centerFrequency)
 
void resetToDefaults ()
 
QByteArray serialize () const
 
bool deserialize (const QByteArray &data)
 
virtual MessageQueuegetInputMessageQueue ()
 
virtual bool handleMessage (const Message &message)
 
- Public Member Functions inherited from RollupWidget
 RollupWidget (QWidget *parent=NULL)
 
void setTitleColor (const QColor &c)
 
void setHighlighted (bool highlighted)
 
- Public Member Functions inherited from PluginInstanceGUI
 PluginInstanceGUI ()
 
virtual ~PluginInstanceGUI ()
 

Static Public Member Functions

static LocalSourceGUIcreate (PluginAPI *pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *txChannel)
 

Private Slots

void handleSourceMessages ()
 
void on_interpolationFactor_currentIndexChanged (int index)
 
void on_position_valueChanged (int value)
 
void on_localDevice_currentIndexChanged (int index)
 
void on_localDevicesRefresh_clicked (bool checked)
 
void onWidgetRolled (QWidget *widget, bool rollDown)
 
void onMenuDialogCalled (const QPoint &p)
 
void tick ()
 

Private Member Functions

 LocalSourceGUI (PluginAPI *pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *txChannel, QWidget *parent=0)
 
virtual ~LocalSourceGUI ()
 
void blockApplySettings (bool block)
 
void applySettings (bool force=false)
 
void applyChannelSettings ()
 
void displaySettings ()
 
void displayRateAndShift ()
 
void updateLocalDevices ()
 
void leaveEvent (QEvent *)
 
void enterEvent (QEvent *)
 
void applyInterpolation ()
 
void applyPosition ()
 

Private Attributes

Ui::LocalSourceGUI * ui
 
PluginAPIm_pluginAPI
 
DeviceUISetm_deviceUISet
 
ChannelMarker m_channelMarker
 
LocalSourceSettings m_settings
 
int m_sampleRate
 
quint64 m_deviceCenterFrequency
 Center frequency in device. More...
 
double m_shiftFrequencyFactor
 Channel frequency shift factor. More...
 
bool m_doApplySettings
 
LocalSourcem_localSource
 
MessageQueue m_inputMessageQueue
 
QTime m_time
 
uint32_t m_tickCount
 

Additional Inherited Members

- Signals inherited from RollupWidget
void widgetRolled (QWidget *widget, bool rollDown)
 
- Protected Types inherited from RollupWidget
enum  { VersionMarker = 0xff }
 
enum  ContextMenuType { ContextMenuNone, ContextMenuChannelSettings, ContextMenuStreamSettings }
 
- Protected Member Functions inherited from RollupWidget
int arrangeRollups ()
 
QByteArray saveState (int version=0) const
 
bool restoreState (const QByteArray &state, int version=0)
 
void paintEvent (QPaintEvent *)
 
int paintRollup (QWidget *rollup, int pos, QPainter *p, bool last, const QColor &frame)
 
void resizeEvent (QResizeEvent *size)
 
void mousePressEvent (QMouseEvent *event)
 
bool event (QEvent *event)
 
bool eventFilter (QObject *object, QEvent *event)
 
void resetContextMenuType ()
 
void setStreamIndicator (const QString &indicator)
 
- Protected Attributes inherited from RollupWidget
QColor m_titleColor
 
QColor m_titleTextColor
 
bool m_highlighted
 
ContextMenuType m_contextMenuType
 
QString m_streamIndicator
 

Detailed Description

Definition at line 42 of file localsourcegui.h.

Constructor & Destructor Documentation

◆ LocalSourceGUI()

LocalSourceGUI::LocalSourceGUI ( PluginAPI pluginAPI,
DeviceUISet deviceUISet,
BasebandSampleSource txChannel,
QWidget *  parent = 0 
)
explicitprivate

Definition at line 108 of file localsourcegui.cpp.

References DeviceUISet::addChannelMarker(), DeviceUISet::addRollupWidget(), applySettings(), displaySettings(), getInputMessageQueue(), handleSourceMessages(), LocalSource::m_channelIdURI, m_channelMarker, m_deviceUISet, m_localSource, LocalSourceSettings::m_rgbColor, m_settings, m_time, onMenuDialogCalled(), onWidgetRolled(), DeviceUISet::registerTxChannelInstance(), ChannelMarker::setCenterFrequency(), LocalSourceSettings::setChannelMarker(), ChannelMarker::setColor(), BasebandSampleSource::setMessageQueueToGUI(), ChannelMarker::setSourceOrSinkStream(), ChannelMarker::setTitle(), ChannelMarker::setVisible(), ui, updateLocalDevices(), and RollupWidget::widgetRolled().

Referenced by create().

108  :
109  RollupWidget(parent),
110  ui(new Ui::LocalSourceGUI),
111  m_pluginAPI(pluginAPI),
112  m_deviceUISet(deviceUISet),
113  m_sampleRate(0),
114  m_tickCount(0)
115 {
116  ui->setupUi(this);
117  setAttribute(Qt::WA_DeleteOnClose, true);
118  connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
119  connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
120 
121  m_localSource = (LocalSource*) channeltx;
123 
124  m_channelMarker.blockSignals(true);
127  m_channelMarker.setTitle("Local Source");
129  m_channelMarker.blockSignals(false);
130  m_channelMarker.setVisible(true); // activate signal on the last setting only
131 
133 
137 
138  connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages()));
139  //connect(&(m_deviceUISet->m_deviceSourceAPI->getMasterTimer()), SIGNAL(timeout()), this, SLOT(tick()));
140 
141  m_time.start();
142 
144  displaySettings();
145  applySettings(true);
146 }
void registerTxChannelInstance(const QString &channelName, PluginInstanceGUI *pluginGUI)
Definition: deviceuiset.cpp:88
ChannelMarker m_channelMarker
void handleSourceMessages()
void onMenuDialogCalled(const QPoint &p)
PluginAPI * m_pluginAPI
static const QString m_channelIdURI
Definition: localsource.h:152
void addChannelMarker(ChannelMarker *channelMarker)
Add channel marker to spectrum.
Definition: deviceuiset.cpp:72
RollupWidget(QWidget *parent=NULL)
Definition: rollupwidget.cpp:7
void applySettings(bool force=false)
uint32_t m_tickCount
void setSourceOrSinkStream(bool sourceOrSinkStream)
Definition: channelmarker.h:75
void addRollupWidget(QWidget *widget)
Add rollup widget to channel window.
Definition: deviceuiset.cpp:77
virtual void setMessageQueueToGUI(MessageQueue *queue)
void setChannelMarker(Serializable *channelMarker)
LocalSourceSettings m_settings
void setColor(const QColor &color)
virtual MessageQueue * getInputMessageQueue()
LocalSource * m_localSource
void setVisible(bool visible)
void setTitle(const QString &title)
Ui::LocalSourceGUI * ui
DeviceUISet * m_deviceUISet
void setCenterFrequency(int centerFrequency)
void onWidgetRolled(QWidget *widget, bool rollDown)
void widgetRolled(QWidget *widget, bool rollDown)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ~LocalSourceGUI()

LocalSourceGUI::~LocalSourceGUI ( )
privatevirtual

Definition at line 148 of file localsourcegui.cpp.

References m_deviceUISet, m_localSource, DeviceUISet::removeTxChannelInstance(), and ui.

149 {
151  delete m_localSource; // TODO: check this: when the GUI closes it has to delete the demodulator
152  delete ui;
153 }
void removeTxChannelInstance(PluginInstanceGUI *pluginGUI)
LocalSource * m_localSource
Ui::LocalSourceGUI * ui
DeviceUISet * m_deviceUISet
+ Here is the call graph for this function:

Member Function Documentation

◆ applyChannelSettings()

void LocalSourceGUI::applyChannelSettings ( )
private

Definition at line 171 of file localsourcegui.cpp.

References LocalSource::MsgConfigureChannelizer::create(), BasebandSampleSource::getInputMessageQueue(), m_doApplySettings, LocalSourceSettings::m_filterChainHash, m_localSource, LocalSourceSettings::m_log2Interp, m_settings, and MessageQueue::push().

Referenced by applyPosition().

172 {
173  if (m_doApplySettings)
174  {
179  }
180 }
static MsgConfigureChannelizer * create(unsigned int m_log2Interp, unsigned int m_filterChainHash)
Definition: localsource.h:91
void push(Message *message, bool emitSignal=true)
Push message onto queue.
MessageQueue * getInputMessageQueue()
Get the queue for asynchronous inbound communication.
LocalSourceSettings m_settings
LocalSource * m_localSource
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ applyInterpolation()

void LocalSourceGUI::applyInterpolation ( )
private

Definition at line 308 of file localsourcegui.cpp.

References applyPosition(), i, LocalSourceSettings::m_filterChainHash, LocalSourceSettings::m_log2Interp, m_settings, and ui.

Referenced by displaySettings(), and on_interpolationFactor_currentIndexChanged().

309 {
310  uint32_t maxHash = 1;
311 
312  for (uint32_t i = 0; i < m_settings.m_log2Interp; i++) {
313  maxHash *= 3;
314  }
315 
316  ui->position->setMaximum(maxHash-1);
317  ui->position->setValue(m_settings.m_filterChainHash);
318  m_settings.m_filterChainHash = ui->position->value();
319  applyPosition();
320 }
unsigned int uint32_t
Definition: rtptypes_win.h:46
int32_t i
Definition: decimators.h:244
LocalSourceSettings m_settings
Ui::LocalSourceGUI * ui
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ applyPosition()

void LocalSourceGUI::applyPosition ( )
private

Definition at line 322 of file localsourcegui.cpp.

References applyChannelSettings(), arg(), HBFilterChainConverter::convertToString(), displayRateAndShift(), LocalSourceSettings::m_filterChainHash, LocalSourceSettings::m_log2Interp, m_settings, m_shiftFrequencyFactor, and ui.

Referenced by applyInterpolation(), and on_position_valueChanged().

323 {
324  ui->filterChainIndex->setText(tr("%1").arg(m_settings.m_filterChainHash));
325  QString s;
327  ui->filterChainText->setText(s);
328 
331 }
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
static double convertToString(unsigned int log2, unsigned int chainHash, QString &chainString)
void displayRateAndShift()
void applyChannelSettings()
LocalSourceSettings m_settings
Ui::LocalSourceGUI * ui
double m_shiftFrequencyFactor
Channel frequency shift factor.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ applySettings()

void LocalSourceGUI::applySettings ( bool  force = false)
private

Definition at line 160 of file localsourcegui.cpp.

References LocalSource::MsgConfigureLocalSource::create(), ChannelMarker::getColor(), BasebandSampleSource::getInputMessageQueue(), m_channelMarker, m_doApplySettings, m_localSource, m_settings, MessageQueue::push(), and RollupWidget::setTitleColor().

Referenced by deserialize(), LocalSourceGUI(), on_localDevice_currentIndexChanged(), onMenuDialogCalled(), and resetToDefaults().

161 {
162  if (m_doApplySettings)
163  {
165 
168  }
169 }
void push(Message *message, bool emitSignal=true)
Push message onto queue.
ChannelMarker m_channelMarker
static MsgConfigureLocalSource * create(const LocalSourceSettings &settings, bool force)
Definition: localsource.h:48
MessageQueue * getInputMessageQueue()
Get the queue for asynchronous inbound communication.
void setTitleColor(const QColor &c)
LocalSourceSettings m_settings
LocalSource * m_localSource
const QColor & getColor() const
Definition: channelmarker.h:64
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ blockApplySettings()

void LocalSourceGUI::blockApplySettings ( bool  block)
private

Definition at line 155 of file localsourcegui.cpp.

References m_doApplySettings.

Referenced by displaySettings(), and handleMessage().

156 {
157  m_doApplySettings = !block;
158 }
+ Here is the caller graph for this function:

◆ create()

LocalSourceGUI * LocalSourceGUI::create ( PluginAPI pluginAPI,
DeviceUISet deviceUISet,
BasebandSampleSource txChannel 
)
static

Definition at line 29 of file localsourcegui.cpp.

References LocalSourceGUI().

Referenced by LocalSourcePlugin::createTxChannelGUI().

30 {
31  LocalSourceGUI* gui = new LocalSourceGUI(pluginAPI, deviceUISet, channelTx);
32  return gui;
33 }
LocalSourceGUI(PluginAPI *pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *txChannel, QWidget *parent=0)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deserialize()

bool LocalSourceGUI::deserialize ( const QByteArray &  data)
virtual

Implements PluginInstanceGUI.

Definition at line 71 of file localsourcegui.cpp.

References applySettings(), LocalSourceSettings::deserialize(), displaySettings(), m_settings, and resetToDefaults().

72 {
73  if(m_settings.deserialize(data)) {
75  applySettings(true);
76  return true;
77  } else {
79  return false;
80  }
81 }
void applySettings(bool force=false)
LocalSourceSettings m_settings
bool deserialize(const QByteArray &data)
+ Here is the call graph for this function:

◆ destroy()

void LocalSourceGUI::destroy ( )
virtual

Implements PluginInstanceGUI.

Definition at line 35 of file localsourcegui.cpp.

36 {
37  delete this;
38 }

◆ displayRateAndShift()

void LocalSourceGUI::displayRateAndShift ( )
private

Definition at line 201 of file localsourcegui.cpp.

References arg(), m_channelMarker, LocalSourceSettings::m_log2Interp, m_sampleRate, m_settings, m_shiftFrequencyFactor, ChannelMarker::setBandwidth(), ChannelMarker::setCenterFrequency(), and ui.

Referenced by applyPosition(), and handleMessage().

202 {
203  int shift = m_shiftFrequencyFactor * m_sampleRate;
204  double channelSampleRate = ((double) m_sampleRate) / (1<<m_settings.m_log2Interp);
205  QLocale loc;
206  ui->offsetFrequencyText->setText(tr("%1 Hz").arg(loc.toString(shift)));
207  ui->channelRateText->setText(tr("%1k").arg(QString::number(channelSampleRate / 1000.0, 'g', 5)));
209  m_channelMarker.setBandwidth(channelSampleRate);
210 }
ChannelMarker m_channelMarker
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
LocalSourceSettings m_settings
void setBandwidth(int bandwidth)
Ui::LocalSourceGUI * ui
void setCenterFrequency(int centerFrequency)
double m_shiftFrequencyFactor
Channel frequency shift factor.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ displaySettings()

void LocalSourceGUI::displaySettings ( )
private

Definition at line 182 of file localsourcegui.cpp.

References applyInterpolation(), blockApplySettings(), ChannelMarker::getTitle(), m_channelMarker, LocalSourceSettings::m_log2Interp, LocalSourceSettings::m_rgbColor, m_sampleRate, m_settings, LocalSourceSettings::m_title, ChannelMarker::setBandwidth(), ChannelMarker::setCenterFrequency(), ChannelMarker::setColor(), ChannelMarker::setMovable(), ChannelMarker::setTitle(), RollupWidget::setTitleColor(), and ui.

Referenced by deserialize(), handleMessage(), LocalSourceGUI(), and resetToDefaults().

183 {
184  m_channelMarker.blockSignals(true);
188  m_channelMarker.setMovable(false); // do not let user move the center arbitrarily
189  m_channelMarker.blockSignals(false);
190  m_channelMarker.setColor(m_settings.m_rgbColor); // activate signal on the last setting only
191 
193  setWindowTitle(m_channelMarker.getTitle());
194 
195  blockApplySettings(true);
196  ui->interpolationFactor->setCurrentIndex(m_settings.m_log2Interp);
198  blockApplySettings(false);
199 }
ChannelMarker m_channelMarker
void setMovable(bool movable)
Definition: channelmarker.h:66
void setTitleColor(const QColor &c)
const QString & getTitle() const
Definition: channelmarker.h:38
LocalSourceSettings m_settings
void setColor(const QColor &color)
void blockApplySettings(bool block)
void setBandwidth(int bandwidth)
void setTitle(const QString &title)
Ui::LocalSourceGUI * ui
void setCenterFrequency(int centerFrequency)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ enterEvent()

void LocalSourceGUI::enterEvent ( QEvent *  )
private

Definition at line 229 of file localsourcegui.cpp.

References m_channelMarker, and ChannelMarker::setHighlighted().

230 {
232 }
ChannelMarker m_channelMarker
void setHighlighted(bool highlighted)
+ Here is the call graph for this function:

◆ getCenterFrequency()

qint64 LocalSourceGUI::getCenterFrequency ( ) const
virtual

Implements PluginInstanceGUI.

Definition at line 50 of file localsourcegui.cpp.

50  {
51  return 0;
52 }

◆ getInputMessageQueue()

virtual MessageQueue* LocalSourceGUI::getInputMessageQueue ( )
inlinevirtual

Implements PluginInstanceGUI.

Definition at line 56 of file localsourcegui.h.

Referenced by handleSourceMessages(), and LocalSourceGUI().

56 { return &m_inputMessageQueue; }
MessageQueue m_inputMessageQueue
+ Here is the caller graph for this function:

◆ getName()

QString LocalSourceGUI::getName ( ) const
virtual

Implements PluginInstanceGUI.

Definition at line 45 of file localsourcegui.cpp.

46 {
47  return objectName();
48 }

◆ handleMessage()

bool LocalSourceGUI::handleMessage ( const Message message)
virtual

Implements PluginInstanceGUI.

Definition at line 83 of file localsourcegui.cpp.

References blockApplySettings(), displayRateAndShift(), displaySettings(), LocalSource::MsgSampleRateNotification::getSampleRate(), LocalSource::MsgConfigureLocalSource::getSettings(), m_sampleRate, m_settings, and Message::match().

Referenced by handleSourceMessages().

84 {
86  {
88  //m_channelMarker.setBandwidth(notif.getSampleRate());
89  m_sampleRate = notif.getSampleRate();
91  return true;
92  }
94  {
96  m_settings = cfg.getSettings();
97  blockApplySettings(true);
99  blockApplySettings(false);
100  return true;
101  }
102  else
103  {
104  return false;
105  }
106 }
const LocalSourceSettings & getSettings() const
Definition: localsource.h:45
void displayRateAndShift()
static bool match(const Message *message)
Definition: message.cpp:45
LocalSourceSettings m_settings
void blockApplySettings(bool block)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleSourceMessages

void LocalSourceGUI::handleSourceMessages ( )
privateslot

Definition at line 234 of file localsourcegui.cpp.

References getInputMessageQueue(), and handleMessage().

Referenced by LocalSourceGUI().

235 {
236  Message* message;
237 
238  while ((message = getInputMessageQueue()->pop()) != 0)
239  {
240  if (handleMessage(*message))
241  {
242  delete message;
243  }
244  }
245 }
virtual bool handleMessage(const Message &message)
virtual MessageQueue * getInputMessageQueue()
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ leaveEvent()

void LocalSourceGUI::leaveEvent ( QEvent *  )
private

Definition at line 224 of file localsourcegui.cpp.

References m_channelMarker, and ChannelMarker::setHighlighted().

225 {
227 }
ChannelMarker m_channelMarker
void setHighlighted(bool highlighted)
+ Here is the call graph for this function:

◆ on_interpolationFactor_currentIndexChanged

void LocalSourceGUI::on_interpolationFactor_currentIndexChanged ( int  index)
privateslot

Definition at line 284 of file localsourcegui.cpp.

References applyInterpolation(), LocalSourceSettings::m_log2Interp, and m_settings.

285 {
286  m_settings.m_log2Interp = index;
288 }
LocalSourceSettings m_settings
+ Here is the call graph for this function:

◆ on_localDevice_currentIndexChanged

void LocalSourceGUI::on_localDevice_currentIndexChanged ( int  index)
privateslot

Definition at line 296 of file localsourcegui.cpp.

References applySettings(), LocalSourceSettings::m_localDeviceIndex, m_settings, and ui.

297 {
298  m_settings.m_localDeviceIndex = ui->localDevice->itemData(index).toInt();
299  applySettings();
300 }
void applySettings(bool force=false)
LocalSourceSettings m_settings
Ui::LocalSourceGUI * ui
+ Here is the call graph for this function:

◆ on_localDevicesRefresh_clicked

void LocalSourceGUI::on_localDevicesRefresh_clicked ( bool  checked)
privateslot

Definition at line 302 of file localsourcegui.cpp.

References updateLocalDevices().

303 {
304  (void) checked;
306 }
+ Here is the call graph for this function:

◆ on_position_valueChanged

void LocalSourceGUI::on_position_valueChanged ( int  value)
privateslot

Definition at line 290 of file localsourcegui.cpp.

References applyPosition(), LocalSourceSettings::m_filterChainHash, and m_settings.

291 {
293  applyPosition();
294 }
LocalSourceSettings m_settings
+ Here is the call graph for this function:

◆ onMenuDialogCalled

void LocalSourceGUI::onMenuDialogCalled ( const QPoint &  p)
privateslot

Definition at line 253 of file localsourcegui.cpp.

References applySettings(), RollupWidget::ContextMenuChannelSettings, ChannelMarker::getColor(), BasicChannelSettingsDialog::getReverseAPIAddress(), BasicChannelSettingsDialog::getReverseAPIChannelIndex(), BasicChannelSettingsDialog::getReverseAPIDeviceIndex(), BasicChannelSettingsDialog::getReverseAPIPort(), ChannelMarker::getTitle(), m_channelMarker, RollupWidget::m_contextMenuType, LocalSourceSettings::m_reverseAPIAddress, LocalSourceSettings::m_reverseAPIChannelIndex, LocalSourceSettings::m_reverseAPIDeviceIndex, LocalSourceSettings::m_reverseAPIPort, LocalSourceSettings::m_rgbColor, m_settings, LocalSourceSettings::m_title, LocalSourceSettings::m_useReverseAPI, RollupWidget::resetContextMenuType(), BasicChannelSettingsDialog::setReverseAPIAddress(), BasicChannelSettingsDialog::setReverseAPIChannelIndex(), BasicChannelSettingsDialog::setReverseAPIDeviceIndex(), BasicChannelSettingsDialog::setReverseAPIPort(), RollupWidget::setTitleColor(), BasicChannelSettingsDialog::setUseReverseAPI(), and BasicChannelSettingsDialog::useReverseAPI().

Referenced by LocalSourceGUI().

254 {
256  {
258  dialog.setUseReverseAPI(m_settings.m_useReverseAPI);
259  dialog.setReverseAPIAddress(m_settings.m_reverseAPIAddress);
260  dialog.setReverseAPIPort(m_settings.m_reverseAPIPort);
261  dialog.setReverseAPIDeviceIndex(m_settings.m_reverseAPIDeviceIndex);
262  dialog.setReverseAPIChannelIndex(m_settings.m_reverseAPIChannelIndex);
263 
264  dialog.move(p);
265  dialog.exec();
266 
269  m_settings.m_useReverseAPI = dialog.useReverseAPI();
270  m_settings.m_reverseAPIAddress = dialog.getReverseAPIAddress();
271  m_settings.m_reverseAPIPort = dialog.getReverseAPIPort();
272  m_settings.m_reverseAPIDeviceIndex = dialog.getReverseAPIDeviceIndex();
273  m_settings.m_reverseAPIChannelIndex = dialog.getReverseAPIChannelIndex();
274 
275  setWindowTitle(m_settings.m_title);
277 
278  applySettings();
279  }
280 
282 }
ChannelMarker m_channelMarker
void resetContextMenuType()
Definition: rollupwidget.h:50
ContextMenuType m_contextMenuType
Definition: rollupwidget.h:33
void applySettings(bool force=false)
void setTitleColor(const QColor &c)
const QString & getTitle() const
Definition: channelmarker.h:38
LocalSourceSettings m_settings
const QColor & getColor() const
Definition: channelmarker.h:64
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ onWidgetRolled

void LocalSourceGUI::onWidgetRolled ( QWidget *  widget,
bool  rollDown 
)
privateslot

Definition at line 247 of file localsourcegui.cpp.

Referenced by LocalSourceGUI().

248 {
249  (void) widget;
250  (void) rollDown;
251 }
+ Here is the caller graph for this function:

◆ resetToDefaults()

void LocalSourceGUI::resetToDefaults ( )
virtual

Implements PluginInstanceGUI.

Definition at line 59 of file localsourcegui.cpp.

References applySettings(), displaySettings(), m_settings, and LocalSourceSettings::resetToDefaults().

Referenced by deserialize().

60 {
63  applySettings(true);
64 }
void applySettings(bool force=false)
LocalSourceSettings m_settings
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ serialize()

QByteArray LocalSourceGUI::serialize ( ) const
virtual

Implements PluginInstanceGUI.

Definition at line 66 of file localsourcegui.cpp.

References m_settings, and LocalSourceSettings::serialize().

67 {
68  return m_settings.serialize();
69 }
QByteArray serialize() const
LocalSourceSettings m_settings
+ Here is the call graph for this function:

◆ setCenterFrequency()

void LocalSourceGUI::setCenterFrequency ( qint64  centerFrequency)
virtual

Implements PluginInstanceGUI.

Definition at line 54 of file localsourcegui.cpp.

55 {
56  (void) centerFrequency;
57 }

◆ setName()

void LocalSourceGUI::setName ( const QString &  name)
virtual

Implements PluginInstanceGUI.

Definition at line 40 of file localsourcegui.cpp.

41 {
42  setObjectName(name);
43 }

◆ tick

void LocalSourceGUI::tick ( )
privateslot

Definition at line 333 of file localsourcegui.cpp.

References m_tickCount.

334 {
335  if (++m_tickCount == 20) { // once per second
336  m_tickCount = 0;
337  }
338 }
uint32_t m_tickCount

◆ updateLocalDevices()

void LocalSourceGUI::updateLocalDevices ( )
private

Definition at line 212 of file localsourcegui.cpp.

References arg(), LocalSource::getLocalDevices(), m_localSource, and ui.

Referenced by LocalSourceGUI(), and on_localDevicesRefresh_clicked().

213 {
214  std::vector<uint32_t> localDevicesIndexes;
215  m_localSource->getLocalDevices(localDevicesIndexes);
216  ui->localDevice->clear();
217  std::vector<uint32_t>::const_iterator it = localDevicesIndexes.begin();
218 
219  for (; it != localDevicesIndexes.end(); ++it) {
220  ui->localDevice->addItem(tr("%1").arg(*it), QVariant(*it));
221  }
222 }
void getLocalDevices(std::vector< uint32_t > &indexes)
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
LocalSource * m_localSource
Ui::LocalSourceGUI * ui
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_channelMarker

ChannelMarker LocalSourceGUI::m_channelMarker
private

◆ m_deviceCenterFrequency

quint64 LocalSourceGUI::m_deviceCenterFrequency
private

Center frequency in device.

Definition at line 66 of file localsourcegui.h.

◆ m_deviceUISet

DeviceUISet* LocalSourceGUI::m_deviceUISet
private

Definition at line 62 of file localsourcegui.h.

Referenced by LocalSourceGUI(), and ~LocalSourceGUI().

◆ m_doApplySettings

bool LocalSourceGUI::m_doApplySettings
private

Definition at line 68 of file localsourcegui.h.

Referenced by applyChannelSettings(), applySettings(), and blockApplySettings().

◆ m_inputMessageQueue

MessageQueue LocalSourceGUI::m_inputMessageQueue
private

Definition at line 71 of file localsourcegui.h.

◆ m_localSource

LocalSource* LocalSourceGUI::m_localSource
private

◆ m_pluginAPI

PluginAPI* LocalSourceGUI::m_pluginAPI
private

Definition at line 61 of file localsourcegui.h.

◆ m_sampleRate

int LocalSourceGUI::m_sampleRate
private

Definition at line 65 of file localsourcegui.h.

Referenced by displayRateAndShift(), displaySettings(), and handleMessage().

◆ m_settings

LocalSourceSettings LocalSourceGUI::m_settings
private

◆ m_shiftFrequencyFactor

double LocalSourceGUI::m_shiftFrequencyFactor
private

Channel frequency shift factor.

Definition at line 67 of file localsourcegui.h.

Referenced by applyPosition(), and displayRateAndShift().

◆ m_tickCount

uint32_t LocalSourceGUI::m_tickCount
private

Definition at line 74 of file localsourcegui.h.

Referenced by tick().

◆ m_time

QTime LocalSourceGUI::m_time
private

Definition at line 73 of file localsourcegui.h.

Referenced by LocalSourceGUI().

◆ ui

Ui::LocalSourceGUI* LocalSourceGUI::ui
private

The documentation for this class was generated from the following files: