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.
glscopegui.cpp
Go to the documentation of this file.
1 // Copyright (C) 2017 F4EXB //
3 // written by Edouard Griffiths //
4 // //
5 // This program is free software; you can redistribute it and/or modify //
6 // it under the terms of the GNU General Public License as published by //
7 // the Free Software Foundation as version 3 of the License, or //
8 // (at your option) any later version. //
9 // //
10 // This program is distributed in the hope that it will be useful, //
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of //
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
13 // GNU General Public License V3 for more details. //
14 // //
15 // You should have received a copy of the GNU General Public License //
16 // along with this program. If not, see <http://www.gnu.org/licenses/>. //
18 
19 #include <QColorDialog>
20 #include <QFileDialog>
21 #include <QMessageBox>
22 
23 #include "glscopegui.h"
24 #include "glscope.h"
25 #include "ui_glscopegui.h"
26 #include "util/simpleserializer.h"
27 
28 const double GLScopeGUI::amps[27] = {
29  2e-1, 1e-1, 5e-2,
30  2e-2, 1e-2, 5e-3,
31  2e-3, 1e-3, 5e-4,
32  2e-4, 1e-4, 5e-5,
33  2e-5, 1e-5, 5e-6,
34  2e-6, 1e-6, 5e-7,
35  2e-7, 1e-7, 5e-8,
36  2e-8, 1e-8, 5e-9,
37  2e-9, 1e-9, 5e-10,
38 };
39 
40 GLScopeGUI::GLScopeGUI(QWidget* parent) :
41  QWidget(parent),
42  ui(new Ui::GLScopeGUI),
43  m_messageQueue(0),
44  m_scopeVis(0),
45  m_glScope(0),
46  m_sampleRate(0),
47  m_timeBase(1),
48  m_timeOffset(0),
49  m_traceLenMult(1)
50 {
51  qDebug("GLScopeGUI::GLScopeGUI");
52  setEnabled(false);
53  ui->setupUi(this);
54  ui->trigDelayFine->setMaximum(ScopeVis::m_traceChunkSize / 10.0);
55  ui->traceColor->setStyleSheet("QLabel { background-color : rgb(255,255,64); }");
56  m_focusedTraceColor.setRgb(255,255,64);
57  ui->trigColor->setStyleSheet("QLabel { background-color : rgb(0,255,0); }");
58  m_focusedTriggerColor.setRgb(0,255,0);
59  ui->traceText->setText("X");
60  ui->mem->setMaximum(ScopeVis::m_nbTraceMemories - 1);
61 }
62 
64 {
65  delete ui;
66 }
67 
68 void GLScopeGUI::setBuddies(MessageQueue* messageQueue, ScopeVis* scopeVis, GLScope* glScope)
69 {
70  qDebug("GLScopeGUI::setBuddies");
71 
72  m_messageQueue = messageQueue;
73  m_scopeVis = scopeVis;
74  m_glScope = glScope;
75 
76  // initialize display combo
77  ui->onlyX->setChecked(true);
78  ui->onlyY->setChecked(false);
79  ui->horizontalXY->setChecked(false);
80  ui->verticalXY->setChecked(false);
81  ui->polar->setChecked(false);
82  ui->onlyY->setEnabled(false);
83  ui->horizontalXY->setEnabled(false);
84  ui->verticalXY->setEnabled(false);
85  ui->polar->setEnabled(false);
87 
88  // initialize trigger combo
89  ui->trigPos->setChecked(true);
90  ui->trigNeg->setChecked(false);
91  ui->trigBoth->setChecked(false);
92  ui->trigOneShot->setChecked(false);
93  ui->trigOneShot->setEnabled(false);
94  ui->freerun->setChecked(true);
95 
96  // Add a trigger
97  ScopeVis::TriggerData triggerData;
98  fillTriggerData(triggerData);
99  m_scopeVis->addTrigger(triggerData);
100 
101  // Add a trace
102  ScopeVis::TraceData traceData;
103  fillTraceData(traceData);
104  m_scopeVis->addTrace(traceData);
105 
106  setEnabled(true);
107  connect(m_glScope, SIGNAL(sampleRateChanged(int)), this, SLOT(on_scope_sampleRateChanged(int)));
108  connect(m_glScope, SIGNAL(traceSizeChanged(uint32_t)), this, SLOT(on_scope_traceSizeChanged(uint32_t)));
109  connect(m_glScope, SIGNAL(preTriggerChanged(uint32_t)), this, SLOT(on_scope_preTriggerChanged(uint32_t)));
110 
111  ui->traceMode->clear();
112  fillProjectionCombo(ui->traceMode);
113 
114  ui->trigMode->clear();
115  fillProjectionCombo(ui->trigMode);
116 
118  m_timeBase,
119  m_timeOffset*10,
120  (uint32_t) (m_glScope->getTraceSize() * (ui->trigPre->value()/100.0f)),
121  ui->freerun->isChecked());
122 
123  m_scopeVis->configure(m_traceLenMult*ScopeVis::m_traceChunkSize,
124  m_timeBase,
125  m_timeOffset*10,
126  (uint32_t) (m_glScope->getTraceSize() * (ui->trigPre->value()/100.0f)),
127  ui->freerun->isChecked());
128 
135 }
136 
137 void GLScopeGUI::setSampleRate(int sampleRate)
138 {
139  m_sampleRate = sampleRate;
140 }
141 
143 {
144  //m_sampleRate = m_glScope->getSampleRate();
145  m_sampleRate = sampleRate;
146  ui->sampleRateText->setText(tr("%1\nkS/s").arg(m_sampleRate / 1000.0f, 0, 'f', 2));
153 }
154 
156 {
157  qDebug("GLScopeGUI::on_scope_traceSizeChanged: %u", traceNbSamples);
158  m_traceLenMult = traceNbSamples / ScopeVis::m_traceChunkSize;
159  ui->traceLen->setValue(m_traceLenMult);
161 }
162 
164 {
165  qDebug("GLScopeGUI::on_scope_preTriggerChanged: %u", preTriggerNbSamples);
166  ui->trigPre->setValue(preTriggerNbSamples*100 / m_glScope->getTraceSize()); // slider position is a percentage value of the trace size
168 }
169 
171 {
172 }
173 
174 
175 QByteArray GLScopeGUI::serialize() const
176 {
177  SimpleSerializer s(1);
178 
179  // first row
180  s.writeS32(1, (int) m_glScope->getDisplayMode());
181  s.writeS32(2, ui->traceIntensity->value());
182  s.writeS32(3, ui->gridIntensity->value());
183  s.writeS32(4, ui->time->value());
184  s.writeS32(5, ui->timeOfs->value());
185  s.writeS32(6, ui->traceLen->value());
186 
187  // second row - by trace
188  const std::vector<ScopeVis::TraceData>& tracesData = m_scopeVis->getTracesData();
189  std::vector<ScopeVis::TraceData>::const_iterator traceDataIt = tracesData.begin();
190  s.writeU32(10, (uint32_t) tracesData.size());
191  int i = 0;
192 
193  for (; traceDataIt != tracesData.end(); ++traceDataIt, i++)
194  {
195  s.writeS32(20 + 16*i, (int) traceDataIt->m_projectionType);
196  s.writeU32(21 + 16*i, traceDataIt->m_ampIndex);
197  s.writeS32(22 + 16*i, traceDataIt->m_ofsCoarse);
198  s.writeS32(23 + 16*i, traceDataIt->m_ofsFine);
199  s.writeS32(24 + 16*i, traceDataIt->m_traceDelayCoarse);
200  s.writeS32(25 + 16*i, traceDataIt->m_traceDelayFine);
201  s.writeFloat(26 + 16*i, traceDataIt->m_traceColorR);
202  s.writeFloat(27 + 16*i, traceDataIt->m_traceColorG);
203  s.writeFloat(28 + 16*i, traceDataIt->m_traceColorB);
204  }
205 
206  // third row - by trigger
208  s.writeS32(201, ui->trigPre->value());
209 
210  for (unsigned int i = 0; i < m_scopeVis->getNbTriggers(); i++)
211  {
212  const ScopeVis::TriggerData& triggerData = m_scopeVis->getTriggerData(i);
213  s.writeS32(210 + 16*i, (int) triggerData.m_projectionType);
214  s.writeS32(211 + 16*i, triggerData.m_triggerRepeat);
215  s.writeBool(212 + 16*i, triggerData.m_triggerPositiveEdge);
216  s.writeBool(213 + 16*i, triggerData.m_triggerBothEdges);
217  s.writeS32(214 + 16*i, triggerData.m_triggerLevelCoarse);
218  s.writeS32(215 + 16*i, triggerData.m_triggerLevelFine);
219  s.writeS32(216 + 16*i, triggerData.m_triggerDelayCoarse);
220  s.writeS32(217 + 16*i, triggerData.m_triggerDelayFine);
221  s.writeFloat(218 + 16*i, triggerData.m_triggerColorR);
222  s.writeFloat(219 + 16*i, triggerData.m_triggerColorG);
223  s.writeFloat(220 + 16*i, triggerData.m_triggerColorB);
224  s.writeU32(221 + 16*i, triggerData.m_triggerHoldoff);
225  }
226 
227  return s.final();
228 }
229 
230 bool GLScopeGUI::deserialize(const QByteArray& data)
231 {
232  qDebug("GLScopeGUI::deserialize");
233  SimpleDeserializer d(data);
234 
235  if(!d.isValid()) {
236  resetToDefaults();
237  return false;
238  }
239 
240  if(d.getVersion() == 1)
241  {
242  TraceUIBlocker traceUIBlocker(ui);
243  TrigUIBlocker trigUIBlocker(ui);
244  int intValue;
245  uint32_t uintValue;
246  bool boolValue;
247 
248  ui->onlyX->setEnabled(false);
249  ui->onlyY->setEnabled(false);
250  ui->horizontalXY->setEnabled(false);
251  ui->verticalXY->setEnabled(false);
252  ui->polar->setEnabled(false);
253 
254  ui->traceMode->setCurrentIndex(0);
255  d.readS32(1, &intValue, (int) GLScope::DisplayX);
257 
258  ui->onlyX->setChecked(false);
259  ui->onlyY->setChecked(false);
260  ui->horizontalXY->setChecked(false);
261  ui->verticalXY->setChecked(false);
262  ui->polar->setChecked(false);
263 
264  switch (m_glScope->getDisplayMode())
265  {
266  case GLScope::DisplayY:
267  ui->onlyY->setChecked(true);
268  break;
269  case GLScope::DisplayXYH:
270  ui->horizontalXY->setChecked(true);
271  break;
272  case GLScope::DisplayXYV:
273  ui->verticalXY->setChecked(true);
274  break;
275  case GLScope::DisplayPol:
276  ui->polar->setChecked(true);
277  break;
278  case GLScope::DisplayX:
279  default:
280  ui->onlyX->setChecked(true);
281  break;
282  }
283 
284  d.readS32(2, &intValue, 50);
285  ui->traceIntensity->setValue(intValue);
286  d.readS32(3, &intValue, 10);
287  ui->gridIntensity->setValue(intValue);
288  d.readS32(4, &intValue, 1);
289  ui->time->setValue(intValue);
290  d.readS32(5, &intValue, 0);
291  ui->timeOfs->setValue(intValue);
292  d.readS32(6, &intValue, 1);
293  ui->traceLen->setValue(intValue);
294 
295  // trace stuff
296 
297  uint32_t nbTracesSaved;
298  d.readU32(10, &nbTracesSaved, 1);
299  const std::vector<ScopeVis::TraceData>& tracesData = m_scopeVis->getTracesData();
300  uint32_t iTrace = tracesData.size();
301 
302  qDebug("GLScopeGUI::deserialize: nbTracesSaved: %u tracesData.size(): %lu", nbTracesSaved, tracesData.size());
303 
304  while (iTrace > nbTracesSaved) // remove possible traces in excess
305  {
306  m_scopeVis->removeTrace(iTrace - 1);
307  iTrace--;
308  }
309 
310  for (iTrace = 0; iTrace < nbTracesSaved; iTrace++)
311  {
312  ScopeVis::TraceData traceData;
313  float r, g, b;
314 
315  d.readS32(20 + 16*iTrace, &intValue, 0);
316  ui->traceMode->setCurrentIndex(intValue);
317  d.readU32(21 + 16*iTrace, &uintValue, 0);
318  ui->amp->setValue(uintValue);
319  d.readS32(22 + 16*iTrace, &intValue, 0);
320  ui->ofsCoarse->setValue(intValue);
321  d.readS32(23 + 16*iTrace, &intValue, 0);
322  ui->ofsFine->setValue(intValue);
323  d.readS32(24 + 16*iTrace, &intValue, 0);
324  ui->traceDelayCoarse->setValue(intValue);
325  d.readS32(25 + 16*iTrace, &intValue, 0);
326  ui->traceDelayFine->setValue(intValue);
327  d.readFloat(26 + 16*iTrace, &r, 1.0f);
328  d.readFloat(27 + 16*iTrace, &g, 1.0f);
329  d.readFloat(28 + 16*iTrace, &b, 1.0f);
330  m_focusedTraceColor.setRgbF(r, g, b);
331 
332  fillTraceData(traceData);
333 
334  if (iTrace < tracesData.size()) // change existing traces
335  {
336  m_scopeVis->changeTrace(traceData, iTrace);
337  }
338  else // add new traces
339  {
340  m_scopeVis->addTrace(traceData);
341  }
342  }
343 
344 
345  ui->trace->setMaximum(nbTracesSaved-1);
346  ui->trace->setValue(nbTracesSaved-1);
347  m_glScope->setFocusedTraceIndex(nbTracesSaved-1);
348 
349  int r,g,b,a;
350  m_focusedTraceColor.getRgb(&r, &g, &b, &a);
351  ui->traceColor->setStyleSheet(tr("QLabel { background-color : rgb(%1,%2,%3); }").arg(r).arg(g).arg(b));
352 
357 
358  ui->onlyX->setEnabled(true);
359  ui->onlyY->setEnabled(nbTracesSaved > 1);
360  ui->horizontalXY->setEnabled(nbTracesSaved > 1);
361  ui->verticalXY->setEnabled(nbTracesSaved > 1);
362  ui->polar->setEnabled(nbTracesSaved > 1);
363 
364  // trigger stuff
365 
366  uint32_t nbTriggersSaved;
367  d.readU32(200, &nbTriggersSaved, 1);
368  uint32_t nbTriggers = m_scopeVis->getNbTriggers();
369  uint32_t iTrigger = nbTriggers;
370 
371  d.readS32(201, &intValue, 0);
372  ui->trigPre->setValue(intValue);
373 
374  qDebug("GLScopeGUI::deserialize: nbTriggersSaved: %u nbTriggers: %u", nbTriggersSaved, nbTriggers);
375 
376  while (iTrigger > nbTriggersSaved) // remove possible triggers in excess
377  {
378  m_scopeVis->removeTrigger(iTrigger - 1);
379  iTrigger--;
380  }
381 
382  for (iTrigger = 0; iTrigger < nbTriggersSaved; iTrigger++)
383  {
384  ScopeVis::TriggerData triggerData;
385  float r, g, b;
386 
387  d.readS32(210 + 16*iTrigger, &intValue, 0);
388  ui->trigMode->setCurrentIndex(intValue);
389  d.readS32(211 + 16*iTrigger, &intValue, 1);
390  ui->trigCount->setValue(intValue);
391  d.readBool(212 + 16*iTrigger, &boolValue, true);
392  ui->trigPos->setChecked(boolValue);
393  d.readBool(213 + 16*iTrigger, &boolValue, false);
394  ui->trigBoth->setChecked(boolValue);
395  d.readS32(214 + 16*iTrigger, &intValue, 1);
396  ui->trigLevelCoarse->setValue(intValue);
397  d.readS32(215 + 16*iTrigger, &intValue, 1);
398  ui->trigLevelFine->setValue(intValue);
399  d.readS32(216 + 16*iTrigger, &intValue, 1);
400  ui->trigDelayCoarse->setValue(intValue);
401  d.readS32(217 + 16*iTrigger, &intValue, 1);
402  ui->trigDelayFine->setValue(intValue);
403  d.readFloat(218 + 16*iTrigger, &r, 1.0f);
404  d.readFloat(219 + 16*iTrigger, &g, 1.0f);
405  d.readFloat(220 + 16*iTrigger, &b, 1.0f);
406  m_focusedTriggerColor.setRgbF(r, g, b);
407  d.readU32(221 + 16*iTrigger, &uintValue, 1);
408  ui->trigHoldoff->setValue(uintValue);
409  ui->trigHoldoffText->setText(tr("%1").arg(uintValue));
410 
411  fillTriggerData(triggerData);
412 
413  if (iTrigger < nbTriggers) // change existing triggers
414  {
415  m_scopeVis->changeTrigger(triggerData, iTrigger);
416  }
417  else // add new trigers
418  {
419  m_scopeVis->addTrigger(triggerData);
420  }
421 
422  if (iTrigger == nbTriggersSaved-1)
423  {
424  m_glScope->setFocusedTriggerData(triggerData);
425  }
426  }
427 
428  ui->trig->setMaximum(nbTriggersSaved-1);
429  ui->trig->setValue(nbTriggersSaved-1);
430 
431  m_focusedTriggerColor.getRgb(&r, &g, &b, &a);
432  ui->trigColor->setStyleSheet(tr("QLabel { background-color : rgb(%1,%2,%3); }").arg(r).arg(g).arg(b));
433 
439 
440  return true;
441  }
442  else
443  {
444  resetToDefaults();
445  return false;
446  }
447 }
448 
450 {
451  if (checked)
452  {
453  ui->onlyY->setChecked(false);
454  ui->horizontalXY->setChecked(false);
455  ui->verticalXY->setChecked(false);
456  ui->polar->setChecked(false);
458  }
459  else
460  {
461  if (!ui->onlyY->isChecked() && !ui->horizontalXY->isChecked() && !ui->verticalXY->isChecked() && !ui->polar->isChecked()) {
462  ui->polar->setChecked(true);
463  }
464  }
465 }
466 
468 {
469  if (checked)
470  {
471  ui->onlyX->setChecked(false);
472  ui->horizontalXY->setChecked(false);
473  ui->verticalXY->setChecked(false);
474  ui->polar->setChecked(false);
476  }
477  else
478  {
479  if (!ui->onlyX->isChecked() && !ui->horizontalXY->isChecked() && !ui->verticalXY->isChecked() && !ui->polar->isChecked()) {
480  ui->polar->setChecked(true);
481  }
482  }
483 }
484 
486 {
487  if (checked)
488  {
489  ui->onlyX->setChecked(false);
490  ui->onlyY->setChecked(false);
491  ui->verticalXY->setChecked(false);
492  ui->polar->setChecked(false);
494  }
495  else
496  {
497  if (!ui->onlyX->isChecked() && !ui->onlyY->isChecked() && !ui->verticalXY->isChecked() && !ui->polar->isChecked()) {
498  ui->polar->setChecked(true);
499  }
500  }
501 }
502 
504 {
505  if (checked)
506  {
507  ui->onlyX->setChecked(false);
508  ui->onlyY->setChecked(false);
509  ui->horizontalXY->setChecked(false);
510  ui->polar->setChecked(false);
512  }
513  else
514  {
515  if (!ui->onlyX->isChecked() && !ui->onlyY->isChecked() && !ui->horizontalXY->isChecked() && !ui->polar->isChecked()) {
516  ui->polar->setChecked(true);
517  }
518  }
519 }
520 
522 {
523  if (checked)
524  {
525  ui->onlyX->setChecked(false);
526  ui->onlyY->setChecked(false);
527  ui->horizontalXY->setChecked(false);
528  ui->verticalXY->setChecked(false);
530  }
531  else
532  {
533  if (!ui->onlyX->isChecked() && !ui->onlyY->isChecked() && !ui->horizontalXY->isChecked() && !ui->verticalXY->isChecked()) {
534  ui->polar->setChecked(true);
535  }
536  }
537 }
538 
540 {
541  m_glScope->setDisplayXYPoints(checked);
542 }
543 
545 {
546  ui->traceIntensity->setToolTip(QString("Trace intensity: %1").arg(value));
548 }
549 
551 {
552  ui->gridIntensity->setToolTip(QString("Grid intensity: %1").arg(value));
554 }
555 
557 {
558  m_timeBase = value;
562  m_timeBase,
563  m_timeOffset*10,
564  (uint32_t) (m_glScope->getTraceSize() * (ui->trigPre->value()/100.0f)),
565  ui->freerun->isChecked());
566 }
567 
569 {
570  if ((value < 0) || (value > 100)) {
571  return;
572  }
573 
574  m_timeOffset = value;
577  m_timeBase,
578  m_timeOffset*10,
579  (uint32_t) (m_glScope->getTraceSize() * (ui->trigPre->value()/100.0f)),
580  ui->freerun->isChecked());
581 }
582 
584 {
585  if ((value < 1) || (value > 100)) {
586  return;
587  }
588 
589  m_traceLenMult = value;
591  m_timeBase,
592  m_timeOffset*10,
593  (uint32_t) (m_glScope->getTraceSize() * (ui->trigPre->value()/100.0f)),
594  ui->freerun->isChecked());
600 }
601 
603 {
604  ui->traceText->setText(value == 0 ? "X" : QString("Y%1").arg(ui->trace->value()));
605 
606  ScopeVis::TraceData traceData;
607  m_scopeVis->getTraceData(traceData, value);
608 
609  qDebug() << "GLScopeGUI::on_trace_valueChanged:"
610  << " m_projectionType: " << (int) traceData.m_projectionType
611  << " m_amp" << traceData.m_amp
612  << " m_ofs" << traceData.m_ofs
613  << " m_traceDelay" << traceData.m_traceDelay;
614 
615  setTraceUI(traceData);
616 
617  m_scopeVis->focusOnTrace(value);
618 }
619 
621 {
622  (void) checked;
623  ScopeVis::TraceData traceData;
624  fillTraceData(traceData);
625  addTrace(traceData);
626 }
627 
629 {
630  (void) checked;
631  if (ui->trace->value() > 0) // not the X trace
632  {
633  ui->trace->setMaximum(ui->trace->maximum() - 1);
634 
635  if (ui->trace->value() == 0)
636  {
637  ui->onlyX->setChecked(true);
638  ui->onlyY->setEnabled(false);
639  ui->horizontalXY->setEnabled(false);
640  ui->verticalXY->setEnabled(false);
641  ui->polar->setEnabled(false);
643  }
644 
645  m_scopeVis->removeTrace(ui->trace->value());
647  }
648 }
649 
651 {
652  (void) checked;
653  if (ui->trace->maximum() > 0) // more than one trace
654  {
655  int newTraceIndex = (ui->trace->value() + 1) % (ui->trace->maximum()+1);
656  m_scopeVis->moveTrace(ui->trace->value(), true);
657  ui->trace->setValue(newTraceIndex); // follow trace
658  ScopeVis::TraceData traceData;
659  m_scopeVis->getTraceData(traceData, ui->trace->value());
660  setTraceUI(traceData);
661  m_scopeVis->focusOnTrace(ui->trace->value());
662  }
663 }
664 
666 {
667  (void) checked;
668  if (ui->trace->value() > 0) // not the X (lowest) trace
669  {
670  int newTraceIndex = (ui->trace->value() - 1) % (ui->trace->maximum()+1);
671  m_scopeVis->moveTrace(ui->trace->value(), false);
672  ui->trace->setValue(newTraceIndex); // follow trace
673  ScopeVis::TraceData traceData;
674  m_scopeVis->getTraceData(traceData, ui->trace->value());
675  setTraceUI(traceData);
676  m_scopeVis->focusOnTrace(ui->trace->value());
677  }
678 }
679 
681 {
682  ui->trigText->setText(tr("%1").arg(value));
683 
684  ScopeVis::TriggerData triggerData;
685  m_scopeVis->getTriggerData(triggerData, value);
686 
687  qDebug() << "GLScopeGUI::on_trig_valueChanged:"
688  << " m_projectionType: " << (int) triggerData.m_projectionType
689  << " m_triggerRepeat" << triggerData.m_triggerRepeat
690  << " m_triggerPositiveEdge" << triggerData.m_triggerPositiveEdge
691  << " m_triggerBothEdges" << triggerData.m_triggerBothEdges
692  << " m_triggerLevel" << triggerData.m_triggerLevel;
693 
694  setTriggerUI(triggerData);
695 
696  m_scopeVis->focusOnTrigger(value);
697 }
698 
700 {
701  (void) checked;
702  ScopeVis::TriggerData triggerData;
703  fillTriggerData(triggerData);
704  addTrigger(triggerData);
705 }
706 
708 {
709  (void) checked;
710  if (ui->trig->value() > 0)
711  {
712  m_scopeVis->removeTrigger(ui->trig->value());
713  ui->trig->setMaximum(ui->trig->maximum() - 1);
714  }
715 }
716 
718 {
719  (void) checked;
720  if (ui->trig->maximum() > 0) // more than one trigger
721  {
722  int newTriggerIndex = (ui->trig->value() + 1) % (ui->trig->maximum()+1);
723  m_scopeVis->moveTrigger(ui->trace->value(), true);
724  ui->trig->setValue(newTriggerIndex); // follow trigger
725  ScopeVis::TriggerData triggerData;
726  m_scopeVis->getTriggerData(triggerData, ui->trig->value());
727  setTriggerUI(triggerData);
728  m_scopeVis->focusOnTrigger(ui->trig->value());
729  }
730 }
731 
733 {
734  (void) checked;
735  if (ui->trig->value() > 0) // not the 0 (lowest) trigger
736  {
737  int newTriggerIndex = (ui->trig->value() - 1) % (ui->trig->maximum()+1);
738  m_scopeVis->moveTrigger(ui->trace->value(), false);
739  ui->trig->setValue(newTriggerIndex); // follow trigger
740  ScopeVis::TriggerData triggerData;
741  m_scopeVis->getTriggerData(triggerData, ui->trig->value());
742  setTriggerUI(triggerData);
743  m_scopeVis->focusOnTrigger(ui->trig->value());
744  }
745 }
746 
748 {
749  (void) index;
753 }
754 
756 {
757  (void) value;
760 }
761 
763 {
764  (void) value;
767 }
768 
770 {
771  (void) value;
774 }
775 
777 {
778  (void) value;
781 }
782 
784 {
785  (void) value;
788 }
789 
791 {
792  (void) checked;
794 }
795 
797 {
798  QColor newColor = QColorDialog::getColor(m_focusedTraceColor, this, tr("Select Color for trace"), QColorDialog::DontUseNativeDialog);
799 
800  if (newColor.isValid()) // user clicked OK and selected a color
801  {
802  m_focusedTraceColor = newColor;
803  int r,g,b,a;
804  m_focusedTraceColor.getRgb(&r, &g, &b, &a);
805  ui->traceColor->setStyleSheet(tr("QLabel { background-color : rgb(%1,%2,%3); }").arg(r).arg(g).arg(b));
807  }
808 }
809 
811 {
812  (void) checked;
813  QString fileName = QFileDialog::getSaveFileName(this,
814  tr("Open trace memory file"), ".", tr("Trace memory files (*.trcm)"), 0, QFileDialog::DontUseNativeDialog);
815 
816  if (fileName != "")
817  {
818  QFileInfo fileInfo(fileName);
819 
820  if (fileInfo.suffix() != "trcm") {
821  fileName += ".trcm";
822  }
823 
824  QFile exportFile(fileName);
825 
826  if (exportFile.open(QIODevice::WriteOnly | QIODevice::Text))
827  {
828  QString base64Str = m_scopeVis->serializeMemory().toBase64();
829  QTextStream outstream(&exportFile);
830  outstream << base64Str;
831  exportFile.close();
832  qDebug("GLScopeGUI::on_memorySave_clicked: saved to %s", qPrintable(fileName));
833  }
834  else
835  {
836  QMessageBox::information(this, tr("Message"), tr("Cannot open %1 file for writing").arg(fileName));
837  }
838  }
839 }
840 
842 {
843  (void) checked;
844  qDebug("GLScopeGUI::on_memoryLoad_clicked");
845 
846  QString fileName = QFileDialog::getOpenFileName(this,
847  tr("Open trace memory file"), ".", tr("Trace memory files (*.trcm)"), 0, QFileDialog::DontUseNativeDialog);
848 
849  if (fileName != "")
850  {
851  QFile exportFile(fileName);
852 
853  if (exportFile.open(QIODevice::ReadOnly | QIODevice::Text))
854  {
855  QByteArray base64Str;
856  QTextStream instream(&exportFile);
857  instream >> base64Str;
858  exportFile.close();
859  m_scopeVis->deserializeMemory(QByteArray::fromBase64(base64Str));
860  qDebug("GLScopeGUI::on_memoryLoad_clicked: loaded from %s", qPrintable(fileName));
861  }
862  else
863  {
864  QMessageBox::information(this, tr("Message"), tr("Cannot open file %1 for reading").arg(fileName));
865  }
866  }
867 }
868 
870 {
871  QString text;
872  text.sprintf("%02d", value);
873  ui->memText->setText(text);
874  disableLiveMode(value > 0); // live / memory mode toggle
875  m_scopeVis->setMemoryIndex(value);
876 }
877 
879 {
880  (void) index;
883 }
884 
886 {
887  (void) value;
890 }
891 
893 {
894  if (checked)
895  {
896  ui->trigNeg->setChecked(false);
897  ui->trigBoth->setChecked(false);
898  }
900 }
901 
903 {
904  if (checked)
905  {
906  ui->trigPos->setChecked(false);
907  ui->trigBoth->setChecked(false);
908  }
910 }
911 
913 {
914  if (checked)
915  {
916  ui->trigNeg->setChecked(false);
917  ui->trigPos->setChecked(false);
918  }
920 }
921 
923 {
924  ui->trigHoldoffText->setText(tr("%1").arg(value));
926 }
927 
929 {
930  (void) value;
933 }
934 
936 {
937  (void) value;
940 }
941 
943 {
944  (void) value;
947 }
948 
950 {
951  (void) value;
954 }
955 
957 {
958  (void) value;
961  m_timeBase,
962  m_timeOffset*10,
963  (uint32_t) (m_glScope->getTraceSize() * (ui->trigPre->value()/100.0f)),
964  ui->freerun->isChecked());
965 }
966 
968 {
969  QColor newColor = QColorDialog::getColor(m_focusedTriggerColor, this, tr("Select Color for trigger line"), QColorDialog::DontUseNativeDialog);
970 
971  if (newColor.isValid()) // user clicked "OK"
972  {
973  m_focusedTriggerColor = newColor;
974  int r,g,b,a;
975  m_focusedTriggerColor.getRgb(&r, &g, &b, &a);
976  ui->trigColor->setStyleSheet(tr("QLabel { background-color : rgb(%1,%2,%3); }").arg(r).arg(g).arg(b));
978  }
979 }
980 
982 {
983  m_scopeVis->setOneShot(checked);
984 }
985 
987 {
988  if (checked)
989  {
990  ui->trigOneShot->setChecked(false);
991  ui->trigOneShot->setEnabled(false);
992  }
993  else
994  {
995  ui->trigOneShot->setEnabled(true);
996  }
997 
999  m_timeBase,
1000  m_timeOffset*10,
1001  (uint32_t) (m_glScope->getTraceSize() * (ui->trigPre->value()/100.0f)),
1002  ui->freerun->isChecked());
1003 }
1004 
1006 {
1007  ui->traceText->setText(ui->trace->value() == 0 ? "X" : QString("Y%1").arg(ui->trace->value()));
1008 }
1009 
1011 {
1012  QString text;
1013  text.sprintf("%02d", ui->trigCount->value());
1014  ui->trigCountText->setText(text);
1015 }
1016 
1018 {
1020  unsigned int n_samples = (m_glScope->getTraceSize() * 1.0) / (double) m_timeBase;
1021  double t = (m_glScope->getTraceSize() * 1.0 / m_sampleRate) / (double) m_timeBase;
1022 
1023  if (n_samples < 1000) {
1024  ui->timeText->setToolTip(tr("%1 S").arg(n_samples));
1025  } else if (n_samples < 1000000) {
1026  ui->timeText->setToolTip(tr("%1 kS").arg(n_samples/1000.0));
1027  } else {
1028  ui->timeText->setToolTip(tr("%1 MS").arg(n_samples/1000000.0));
1029  }
1030 
1031  if(t < 0.000001)
1032  {
1033  t = round(t * 100000000000.0) / 100.0;
1034  ui->timeText->setText(tr("%1\nns").arg(t));
1035  }
1036  else if(t < 0.001)
1037  {
1038  t = round(t * 100000000.0) / 100.0;
1039  ui->timeText->setText(tr("%1\nµs").arg(t));
1040  }
1041  else if(t < 1.0)
1042  {
1043  t = round(t * 100000.0) / 100.0;
1044  ui->timeText->setText(tr("%1\nms").arg(t));
1045  }
1046  else
1047  {
1048  t = round(t * 100.0) / 100.0;
1049  ui->timeText->setText(tr("%1\ns").arg(t));
1050  }
1051 }
1052 
1054 {
1055  unsigned int n_samples = m_traceLenMult * ScopeVis::m_traceChunkSize;
1056 
1057  if (n_samples < 1000) {
1058  ui->traceLenText->setToolTip(tr("%1 S").arg(n_samples));
1059  } else if (n_samples < 1000000) {
1060  ui->traceLenText->setToolTip(tr("%1 kS").arg(n_samples/1000.0));
1061  } else {
1062  ui->traceLenText->setToolTip(tr("%1 MS").arg(n_samples/1000000.0));
1063  }
1064 
1066  double t = (m_glScope->getTraceSize() * 1.0 / m_sampleRate);
1067 
1068  if(t < 0.000001)
1069  ui->traceLenText->setText(tr("%1\nns").arg(t * 1000000000.0, 0, 'f', 2));
1070  else if(t < 0.001)
1071  ui->traceLenText->setText(tr("%1\nµs").arg(t * 1000000.0, 0, 'f', 2));
1072  else if(t < 1.0)
1073  ui->traceLenText->setText(tr("%1\nms").arg(t * 1000.0, 0, 'f', 2));
1074  else
1075  ui->traceLenText->setText(tr("%1\ns").arg(t * 1.0, 0, 'f', 2));
1076 }
1077 
1079 {
1080  unsigned int n_samples = m_glScope->getTraceSize() * (m_timeOffset/100.0);
1081  double dt = m_glScope->getTraceSize() * (m_timeOffset/100.0) / m_sampleRate;
1082 
1083  if (n_samples < 1000) {
1084  ui->timeOfsText->setToolTip(tr("%1 S").arg(n_samples));
1085  } else if (n_samples < 1000000) {
1086  ui->timeOfsText->setToolTip(tr("%1 kS").arg(n_samples/1000.0));
1087  } else {
1088  ui->timeOfsText->setToolTip(tr("%1 MS").arg(n_samples/1000000.0));
1089  }
1090 
1091  if(dt < 0.000001)
1092  ui->timeOfsText->setText(tr("%1\nns").arg(dt * 1000000000.0, 0, 'f', 2));
1093  else if(dt < 0.001)
1094  ui->timeOfsText->setText(tr("%1\nµs").arg(dt * 1000000.0, 0, 'f', 2));
1095  else if(dt < 1.0)
1096  ui->timeOfsText->setText(tr("%1\nms").arg(dt * 1000.0, 0, 'f', 2));
1097  else
1098  ui->timeOfsText->setText(tr("%1\ns").arg(dt * 1.0, 0, 'f', 2));
1099 }
1100 
1102 {
1103  Projector::ProjectionType projectionType = (Projector::ProjectionType) ui->traceMode->currentIndex();
1104  double ampValue = amps[ui->amp->value()];
1105 
1106  if (projectionType == Projector::ProjectionMagDB)
1107  {
1108  double displayValue = ampValue*500.0f;
1109 
1110  if (displayValue < 10.0f) {
1111  ui->ampText->setText(tr("%1\ndB").arg(displayValue, 0, 'f', 2));
1112  }
1113  else {
1114  ui->ampText->setText(tr("%1\ndB").arg(displayValue, 0, 'f', 1));
1115  }
1116  }
1117  else
1118  {
1119  double a = ampValue*10.0f;
1120 
1121  if(a < 0.000001)
1122  ui->ampText->setText(tr("%1\nn").arg(a * 1000000000.0));
1123  else if(a < 0.001)
1124  ui->ampText->setText(tr("%1\nµ").arg(a * 1000000.0));
1125  else if(a < 1.0)
1126  ui->ampText->setText(tr("%1\nm").arg(a * 1000.0));
1127  else
1128  ui->ampText->setText(tr("%1").arg(a * 1.0));
1129  }
1130 }
1131 
1133 {
1134  Projector::ProjectionType projectionType = (Projector::ProjectionType) ui->traceMode->currentIndex();
1135  double o = (ui->ofsCoarse->value() * 10.0f) + (ui->ofsFine->value() / 20.0f);
1136 
1137  if (projectionType == Projector::ProjectionMagDB)
1138  {
1139  ui->ofsText->setText(tr("%1\ndB").arg(o/10.0f - 100.0f, 0, 'f', 1));
1140  }
1141  else
1142  {
1143  double a;
1144 
1145  if ((projectionType == Projector::ProjectionMagLin) || (projectionType == Projector::ProjectionMagSq))
1146  {
1147  a = o/2000.0f;
1148  }
1149  else
1150  {
1151  a = o/1000.0f;
1152  }
1153 
1154  if(fabs(a) < 1e-9)
1155  ui->ofsText->setText(tr("%1\np").arg(a * 1e12));
1156  else if(fabs(a) < 1e-6)
1157  ui->ofsText->setText(tr("%1\nn").arg(a * 1e9));
1158  else if(fabs(a) < 1e-3)
1159  ui->ofsText->setText(tr("%1\nµ").arg(a * 1e6));
1160  else if(fabs(a) < 1.0f)
1161  ui->ofsText->setText(tr("%1\nm").arg(a * 1e3));
1162  else
1163  ui->ofsText->setText(tr("%1").arg(a * 1.0));
1164  }
1165 }
1166 
1168 {
1169  if (m_sampleRate > 0)
1170  {
1171  int n_samples = ui->traceDelayCoarse->value()*100 + ui->traceDelayFine->value();
1172  double t = ((double) n_samples) / m_sampleRate;
1173 
1174  if (n_samples < 1000) {
1175  ui->traceDelayText->setToolTip(tr("%1 S").arg(n_samples));
1176  } else if (n_samples < 1000000) {
1177  ui->traceDelayText->setToolTip(tr("%1 kS").arg(n_samples/1000.0));
1178  } else {
1179  ui->traceDelayText->setToolTip(tr("%1 MS").arg(n_samples/1000000.0));
1180  }
1181 
1182  if(t < 0.000001)
1183  ui->traceDelayText->setText(tr("%1\nns").arg(t * 1000000000.0, 0, 'f', 2));
1184  else if(t < 0.001)
1185  ui->traceDelayText->setText(tr("%1\nµs").arg(t * 1000000.0, 0, 'f', 2));
1186  else if(t < 1.0)
1187  ui->traceDelayText->setText(tr("%1\nms").arg(t * 1000.0, 0, 'f', 2));
1188  else
1189  ui->traceDelayText->setText(tr("%1\ns").arg(t * 1.0, 0, 'f', 2));
1190  }
1191 }
1192 
1194 {
1195  ui->trigText->setText(tr("%1").arg(ui->trig->value()));
1196 }
1197 
1199 {
1200  double t = (ui->trigLevelCoarse->value() / 100.0f) + (ui->trigLevelFine->value() / 50000.0f);
1201  Projector::ProjectionType projectionType = (Projector::ProjectionType) ui->trigMode->currentIndex();
1202 
1203  ui->trigLevelCoarse->setToolTip(QString("Trigger level coarse: %1 %").arg(ui->trigLevelCoarse->value() / 100.0f));
1204  ui->trigLevelFine->setToolTip(QString("Trigger level fine: %1 ppm").arg(ui->trigLevelFine->value() * 20));
1205 
1206  if (projectionType == Projector::ProjectionMagDB) {
1207  ui->trigLevelText->setText(tr("%1\ndB").arg(100.0 * (t - 1.0), 0, 'f', 1));
1208  }
1209  else
1210  {
1211  double a;
1212 
1213  if ((projectionType == Projector::ProjectionMagLin) || (projectionType == Projector::ProjectionMagSq)) {
1214  a = 1.0 + t;
1215  } else {
1216  a = t;
1217  }
1218 
1219  if(fabs(a) < 0.000001)
1220  ui->trigLevelText->setText(tr("%1\nn").arg(a * 1000000000.0f, 0, 'f', 2));
1221  else if(fabs(a) < 0.001)
1222  ui->trigLevelText->setText(tr("%1\nµ").arg(a * 1000000.0f, 0, 'f', 2));
1223  else if(fabs(a) < 1.0)
1224  ui->trigLevelText->setText(tr("%1\nm").arg(a * 1000.0f, 0, 'f', 2));
1225  else
1226  ui->trigLevelText->setText(tr("%1").arg(a * 1.0f, 0, 'f', 2));
1227  }
1228 }
1229 
1231 {
1232  if (m_sampleRate > 0)
1233  {
1234  double delayMult = ui->trigDelayCoarse->value() + ui->trigDelayFine->value() / (ScopeVis::m_traceChunkSize / 10.0);
1235  unsigned int n_samples_delay = m_traceLenMult * ScopeVis::m_traceChunkSize * delayMult;
1236 
1237  if (n_samples_delay < 1000) {
1238  ui->trigDelayText->setToolTip(tr("%1 S").arg(n_samples_delay));
1239  } else if (n_samples_delay < 1000000) {
1240  ui->trigDelayText->setToolTip(tr("%1 kS").arg(n_samples_delay/1000.0));
1241  } else if (n_samples_delay < 1000000000) {
1242  ui->trigDelayText->setToolTip(tr("%1 MS").arg(n_samples_delay/1000000.0));
1243  } else {
1244  ui->trigDelayText->setToolTip(tr("%1 GS").arg(n_samples_delay/1000000000.0));
1245  }
1246 
1248  double t = (n_samples_delay * 1.0f / m_sampleRate);
1249 
1250  if(t < 0.000001)
1251  ui->trigDelayText->setText(tr("%1\nns").arg(t * 1000000000.0, 0, 'f', 2));
1252  else if(t < 0.001)
1253  ui->trigDelayText->setText(tr("%1\nµs").arg(t * 1000000.0, 0, 'f', 2));
1254  else if(t < 1.0)
1255  ui->trigDelayText->setText(tr("%1\nms").arg(t * 1000.0, 0, 'f', 2));
1256  else
1257  ui->trigDelayText->setText(tr("%1\ns").arg(t * 1.0, 0, 'f', 2));
1258  }
1259 }
1260 
1262 {
1263  if (m_sampleRate > 0)
1264  {
1265  unsigned int n_samples_delay = m_glScope->getTraceSize() * (ui->trigPre->value()/100.0f);
1266  double dt = m_glScope->getTraceSize() * (ui->trigPre->value()/100.0f) / m_sampleRate;
1267 
1268  if (n_samples_delay < 1000) {
1269  ui->trigPreText->setToolTip(tr("%1 S").arg(n_samples_delay));
1270  } else if (n_samples_delay < 1000000) {
1271  ui->trigPreText->setToolTip(tr("%1 kS").arg(n_samples_delay/1000.0));
1272  } else if (n_samples_delay < 1000000000) {
1273  ui->trigPreText->setToolTip(tr("%1 MS").arg(n_samples_delay/1000000.0));
1274  } else {
1275  ui->trigPreText->setToolTip(tr("%1 GS").arg(n_samples_delay/1000000000.0));
1276  }
1277 
1278  if(dt < 0.000001)
1279  ui->trigPreText->setText(tr("%1\nns").arg(dt * 1000000000.0f, 0, 'f', 2));
1280  else if(dt < 0.001)
1281  ui->trigPreText->setText(tr("%1\nµs").arg(dt * 1000000.0f, 0, 'f', 2));
1282  else if(dt < 1.0)
1283  ui->trigPreText->setText(tr("%1\nms").arg(dt * 1000.0f, 0, 'f', 2));
1284  else
1285  ui->trigPreText->setText(tr("%1\ns").arg(dt * 1.0f, 0, 'f', 2));
1286  }
1287 }
1288 
1290 {
1291  ScopeVis::TraceData traceData;
1292  fillTraceData(traceData);
1293  uint32_t currentTraceIndex = ui->trace->value();
1294  m_scopeVis->changeTrace(traceData, currentTraceIndex);
1295 }
1296 
1298 {
1299  ScopeVis::TriggerData triggerData;
1300  fillTriggerData(triggerData);
1301  uint32_t currentTriggerIndex = ui->trig->value();
1302  m_scopeVis->changeTrigger(triggerData, currentTriggerIndex);
1303 }
1304 
1305 void GLScopeGUI::fillProjectionCombo(QComboBox* comboBox)
1306 {
1307  comboBox->addItem("Real", Projector::ProjectionReal);
1308  comboBox->addItem("Imag", Projector::ProjectionImag);
1309  comboBox->addItem("Mag", Projector::ProjectionMagLin);
1310  comboBox->addItem("MagSq", Projector::ProjectionMagSq);
1311  comboBox->addItem("MagdB", Projector::ProjectionMagDB);
1312  comboBox->addItem("Phi", Projector::ProjectionPhase);
1313  comboBox->addItem("dPhi", Projector::ProjectionDPhase);
1314  comboBox->addItem("BPSK", Projector::ProjectionBPSK);
1315  comboBox->addItem("QPSK", Projector::ProjectionQPSK);
1316  comboBox->addItem("8PSK", Projector::Projection8PSK);
1317  comboBox->addItem("16PSK", Projector::Projection16PSK);
1318 }
1319 
1321 {
1322  ui->traceLen->setEnabled(!disable);
1323  ui->trig->setEnabled(!disable);
1324  ui->trigAdd->setEnabled(!disable);
1325  ui->trigDel->setEnabled(!disable);
1326  ui->trigMode->setEnabled(!disable);
1327  ui->trigCount->setEnabled(!disable);
1328  ui->trigPos->setEnabled(!disable);
1329  ui->trigNeg->setEnabled(!disable);
1330  ui->trigBoth->setEnabled(!disable);
1331  ui->trigLevelCoarse->setEnabled(!disable);
1332  ui->trigLevelFine->setEnabled(!disable);
1333  ui->trigDelayCoarse->setEnabled(!disable);
1334  ui->trigDelayFine->setEnabled(!disable);
1335  ui->trigPre->setEnabled(!disable);
1336  ui->trigOneShot->setEnabled(!disable);
1337  ui->freerun->setEnabled(!disable);
1338  ui->memorySave->setEnabled(disable);
1339  ui->memoryLoad->setEnabled(disable);
1340 }
1341 
1343 {
1344  traceData.m_projectionType = (Projector::ProjectionType) ui->traceMode->currentIndex();
1346  traceData.m_textOverlay.clear();
1347  traceData.m_inputIndex = 0;
1348  traceData.m_amp = 0.2 / amps[ui->amp->value()];
1349  traceData.m_ampIndex = ui->amp->value();
1350 
1351  traceData.m_ofsCoarse = ui->ofsCoarse->value();
1352  traceData.m_ofsFine = ui->ofsFine->value();
1353 
1355  traceData.m_ofs = ((10.0 * ui->ofsCoarse->value()) + (ui->ofsFine->value() / 20.0)) / 2000.0f;
1356  } else {
1357  traceData.m_ofs = ((10.0 * ui->ofsCoarse->value()) + (ui->ofsFine->value() / 20.0)) / 1000.0f;
1358  }
1359 
1360  traceData.m_traceDelayCoarse = ui->traceDelayCoarse->value();
1361  traceData.m_traceDelayFine = ui->traceDelayFine->value();
1362  traceData.m_traceDelay = traceData.m_traceDelayCoarse * 100 + traceData.m_traceDelayFine;
1363  traceData.setColor(m_focusedTraceColor);
1364  traceData.m_viewTrace = ui->traceView->isChecked();
1365 }
1366 
1368 {
1369  triggerData.m_projectionType = (Projector::ProjectionType) ui->trigMode->currentIndex();
1370  triggerData.m_inputIndex = 0;
1371  triggerData.m_triggerLevel = (ui->trigLevelCoarse->value() / 100.0) + (ui->trigLevelFine->value() / 50000.0);
1372  triggerData.m_triggerLevelCoarse = ui->trigLevelCoarse->value();
1373  triggerData.m_triggerLevelFine = ui->trigLevelFine->value();
1374  triggerData.m_triggerPositiveEdge = ui->trigPos->isChecked();
1375  triggerData.m_triggerBothEdges = ui->trigBoth->isChecked();
1376  triggerData.m_triggerHoldoff = ui->trigHoldoff->value();
1377  triggerData.m_triggerRepeat = ui->trigCount->value();
1378  triggerData.m_triggerDelayMult = ui->trigDelayCoarse->value() + ui->trigDelayFine->value() / (ScopeVis::m_traceChunkSize / 10.0);
1379  triggerData.m_triggerDelay = (int) (m_traceLenMult * ScopeVis::m_traceChunkSize * triggerData.m_triggerDelayMult);
1380  triggerData.m_triggerDelayCoarse = ui->trigDelayCoarse->value();
1381  triggerData.m_triggerDelayFine = ui->trigDelayFine->value();
1382  triggerData.setColor(m_focusedTriggerColor);
1383 }
1384 
1386 {
1387  TraceUIBlocker traceUIBlocker(ui);
1388 
1389  ui->traceMode->setCurrentIndex((int) traceData.m_projectionType);
1390  ui->amp->setValue(traceData.m_ampIndex);
1392 
1393  ui->ofsCoarse->setValue(traceData.m_ofsCoarse);
1394  ui->ofsFine->setValue(traceData.m_ofsFine);
1395  setAmpOfsDisplay();
1396 
1397  ui->traceDelayCoarse->setValue(traceData.m_traceDelayCoarse);
1398  ui->traceDelayFine->setValue(traceData.m_traceDelayFine);
1400 
1401  m_focusedTraceColor = traceData.m_traceColor;
1402  int r, g, b, a;
1403  m_focusedTraceColor.getRgb(&r, &g, &b, &a);
1404  ui->traceColor->setStyleSheet(tr("QLabel { background-color : rgb(%1,%2,%3); }").arg(r).arg(g).arg(b));
1405 
1406  ui->traceView->setChecked(traceData.m_viewTrace);
1407 }
1408 
1410 {
1411  TrigUIBlocker trigUIBlocker(ui);
1412 
1413  ui->trigMode->setCurrentIndex((int) triggerData.m_projectionType);
1414  ui->trigCount->setValue(triggerData.m_triggerRepeat);
1416 
1417  ui->trigPos->setChecked(false);
1418  ui->trigNeg->setChecked(false);
1419  ui->trigPos->doToggle(false);
1420  ui->trigNeg->doToggle(false);
1421 
1422  if (triggerData.m_triggerBothEdges)
1423  {
1424  ui->trigBoth->setChecked(true);
1425  ui->trigBoth->doToggle(true);
1426  }
1427  else
1428  {
1429  ui->trigBoth->setChecked(false);
1430  ui->trigBoth->doToggle(false);
1431 
1432  if (triggerData.m_triggerPositiveEdge)
1433  {
1434  ui->trigPos->setChecked(true);
1435  ui->trigPos->doToggle(true);
1436  }
1437  else
1438  {
1439  ui->trigNeg->setChecked(true);
1440  ui->trigNeg->doToggle(true);
1441  }
1442  }
1443 
1444  ui->trigHoldoffText->setText(tr("%1").arg(triggerData.m_triggerHoldoff));
1445 
1446  ui->trigLevelCoarse->setValue(triggerData.m_triggerLevelCoarse);
1447  ui->trigLevelFine->setValue(triggerData.m_triggerLevelFine);
1449 
1450  ui->trigDelayCoarse->setValue(triggerData.m_triggerDelayCoarse);
1451  ui->trigDelayFine->setValue(triggerData.m_triggerDelayFine);
1453 
1454  m_focusedTriggerColor = triggerData.m_triggerColor;
1455  int r, g, b, a;
1456  m_focusedTriggerColor.getRgb(&r, &g, &b, &a);
1457  ui->trigColor->setStyleSheet(tr("QLabel { background-color : rgb(%1,%2,%3); }").arg(r).arg(g).arg(b));
1458 }
1459 
1461 {
1462 }
1463 
1465 {
1466  (void) message;
1467  return false;
1468 }
1469 
1471  m_ui(ui)
1472 {
1473  m_oldStateTrigMode = ui->trigMode->blockSignals(true);
1474  m_oldStateTrigCount = ui->trigCount->blockSignals(true);
1475  m_oldStateTrigPos = ui->trigPos->blockSignals(true);
1476  m_oldStateTrigNeg = ui->trigNeg->blockSignals(true);
1477  m_oldStateTrigBoth = ui->trigBoth->blockSignals(true);
1478  m_oldStateTrigLevelCoarse = ui->trigLevelCoarse->blockSignals(true);
1479  m_oldStateTrigLevelFine = ui->trigLevelFine->blockSignals(true);
1480  m_oldStateTrigDelayCoarse = ui->trigDelayCoarse->blockSignals(true);
1481  m_oldStateTrigDelayFine = ui->trigDelayFine->blockSignals(true);
1482 }
1483 
1485 {
1486  unBlock();
1487 }
1488 
1490 {
1491  m_ui->trigMode->blockSignals(m_oldStateTrigMode);
1492  m_ui->trigCount->blockSignals(m_oldStateTrigCount);
1493  m_ui->trigPos->blockSignals(m_oldStateTrigPos);
1494  m_ui->trigNeg->blockSignals(m_oldStateTrigNeg);
1495  m_ui->trigBoth->blockSignals(m_oldStateTrigBoth);
1496  m_ui->trigLevelCoarse->blockSignals(m_oldStateTrigLevelCoarse);
1497  m_ui->trigLevelFine->blockSignals(m_oldStateTrigLevelFine);
1498  m_ui->trigDelayCoarse->blockSignals(m_oldStateTrigDelayCoarse);
1499  m_ui->trigDelayFine->blockSignals(m_oldStateTrigDelayFine);
1500 }
1501 
1503  m_ui(ui)
1504 {
1505  m_oldStateTrace = m_ui->trace->blockSignals(true);
1506  m_oldStateTraceAdd = m_ui->traceAdd->blockSignals(true);
1507  m_oldStateTraceDel = m_ui->traceDel->blockSignals(true);
1508  m_oldStateTraceMode = m_ui->traceMode->blockSignals(true);
1509  m_oldStateAmp = m_ui->amp->blockSignals(true);
1510  m_oldStateOfsCoarse = m_ui->ofsCoarse->blockSignals(true);
1511  m_oldStateOfsFine = m_ui->ofsFine->blockSignals(true);
1512  m_oldStateTraceDelayCoarse = m_ui->traceDelayCoarse->blockSignals(true);
1513  m_oldStateTraceDelayFine = m_ui->traceDelayFine->blockSignals(true);
1514  m_oldStateTraceColor = m_ui->traceColor->blockSignals(true);
1515 }
1516 
1518 {
1519  unBlock();
1520 }
1521 
1523 {
1524  m_ui->trace->blockSignals(m_oldStateTrace);
1525  m_ui->traceAdd->blockSignals(m_oldStateTraceAdd);
1526  m_ui->traceDel->blockSignals(m_oldStateTraceDel);
1527  m_ui->traceMode->blockSignals(m_oldStateTraceMode);
1528  m_ui->amp->blockSignals(m_oldStateAmp);
1529  m_ui->ofsCoarse->blockSignals(m_oldStateOfsCoarse);
1530  m_ui->ofsFine->blockSignals(m_oldStateOfsFine);
1531  m_ui->traceDelayCoarse->blockSignals(m_oldStateTraceDelayCoarse);
1532  m_ui->traceDelayFine->blockSignals(m_oldStateTraceDelayFine);
1533  m_ui->traceColor->blockSignals(m_oldStateTraceColor);
1534 }
1535 
1537  m_ui(ui)
1538 {
1539  m_oldStateOnlyX = m_ui->onlyX->blockSignals(true);
1540  m_oldStateOnlyY = m_ui->onlyY->blockSignals(true);
1541  m_oldStateHorizontalXY = m_ui->horizontalXY->blockSignals(true);
1542  m_oldStateVerticalXY = m_ui->verticalXY->blockSignals(true);
1543  m_oldStatePolar = m_ui->polar->blockSignals(true);
1544 // m_oldStateTime = m_ui->time->blockSignals(true);
1545 // m_oldStateTimeOfs = m_ui->timeOfs->blockSignals(true);
1546 // m_oldStateTraceLen = m_ui->traceLen->blockSignals(true);
1547 }
1548 
1550 {
1551  unBlock();
1552 }
1553 
1555 {
1556  m_ui->onlyX->blockSignals(m_oldStateOnlyX);
1557  m_ui->onlyY->blockSignals(m_oldStateOnlyY);
1558  m_ui->horizontalXY->blockSignals(m_oldStateHorizontalXY);
1559  m_ui->verticalXY->blockSignals(m_oldStateVerticalXY);
1560  m_ui->polar->blockSignals(m_oldStatePolar);
1561 // m_ui->time->blockSignals(m_oldStateTime);
1562 // m_ui->timeOfs->blockSignals(m_oldStateTimeOfs);
1563 // m_ui->traceLen->blockSignals(m_oldStateTraceLen);
1564 }
1565 
1567 {
1568  if (ui->trace->maximum() == 0)
1569  {
1570  ui->onlyX->setChecked(true);
1571  }
1572  else
1573  {
1574  switch (displayMode)
1575  {
1576  case DisplayX:
1577  ui->onlyX->setChecked(true);
1578  break;
1579  case DisplayY:
1580  ui->onlyY->setChecked(true);
1581  break;
1582  case DisplayXYH:
1583  ui->horizontalXY->setChecked(true);
1584  break;
1585  case DisplayXYV:
1586  ui->verticalXY->setChecked(true);
1587  break;
1588  case DisplayPol:
1589  ui->polar->setChecked(true);
1590  break;
1591  default:
1592  ui->onlyX->setChecked(true);
1593  break;
1594  }
1595  }
1596 }
1597 
1599 {
1600  if ((value < ui->traceIntensity->minimum()) || (value > ui->traceIntensity->maximum())) {
1601  return;
1602  }
1603 
1604  ui->traceIntensity->setValue(value);
1605 }
1606 
1608 {
1609  if ((value < ui->gridIntensity->minimum()) || (value > ui->gridIntensity->maximum())) {
1610  return;
1611  }
1612 
1613  ui->gridIntensity->setValue(value);
1614 }
1615 
1617 {
1618  if ((step < ui->time->minimum()) || (step > ui->time->maximum())) {
1619  return;
1620  }
1621 
1622  ui->time->setValue(step);
1623 }
1624 
1626 {
1627  if ((step < ui->timeOfs->minimum()) || (step > ui->timeOfs->maximum())) {
1628  return;
1629  }
1630 
1631  ui->timeOfs->setValue(step);
1632 }
1633 
1635 {
1636  if ((step < ui->traceLen->minimum()) || (step > ui->traceLen->maximum())) {
1637  return;
1638  }
1639 
1640  ui->traceLen->setValue(step);
1641 }
1642 
1644 {
1645  if ((step < ui->trigPre->minimum()) || (step > ui->trigPre->maximum())) {
1646  return;
1647  }
1648 
1649  ui->trigPre->setValue(step);
1650 }
1651 
1652 void GLScopeGUI::changeTrace(int traceIndex, const ScopeVis::TraceData& traceData)
1653 {
1654  m_scopeVis->changeTrace(traceData, traceIndex);
1655 }
1656 
1658 {
1659  if (ui->trace->maximum() < 3)
1660  {
1661  if (ui->trace->value() == 0)
1662  {
1663  ui->onlyY->setEnabled(true);
1664  ui->horizontalXY->setEnabled(true);
1665  ui->verticalXY->setEnabled(true);
1666  ui->polar->setEnabled(true);
1667  }
1668 
1669  m_scopeVis->addTrace(traceData);
1670  ui->trace->setMaximum(ui->trace->maximum() + 1);
1671  }
1672 }
1673 
1674 void GLScopeGUI::focusOnTrace(int traceIndex)
1675 {
1676  on_trace_valueChanged(traceIndex);
1677 }
1678 
1679 void GLScopeGUI::changeTrigger(int triggerIndex, const ScopeVis::TriggerData& triggerData)
1680 {
1681  m_scopeVis->changeTrigger(triggerData, triggerIndex);
1682 }
1683 
1685 {
1686  if (ui->trig->maximum() < 9)
1687  {
1688  m_scopeVis->addTrigger(triggerData);
1689  ui->trig->setMaximum(ui->trig->maximum() + 1);
1690  }
1691 }
1692 
1693 void GLScopeGUI::focusOnTrigger(int triggerIndex)
1694 {
1695  on_trig_valueChanged(triggerIndex);
1696 }
1697 
1698 
void addTrigger(const TriggerData &triggerData)
Definition: scopevis.cpp:179
uint32_t m_triggerRepeat
Number of trigger conditions before the final decisive trigger.
Definition: scopevis.h:114
void on_onlyX_toggled(bool checked)
Definition: glscopegui.cpp:449
void changeCurrentTrace()
void on_gridIntensity_valueChanged(int value)
Definition: glscopegui.cpp:550
void on_traceIntensity_valueChanged(int value)
Definition: glscopegui.cpp:544
void on_trigUp_clicked(bool checked)
Definition: glscopegui.cpp:717
void on_traceLen_valueChanged(int value)
Definition: glscopegui.cpp:583
bool m_viewTrace
Trace visibility.
Definition: scopevis.h:67
int m_timeOffset
Definition: glscopegui.h:152
void setTimeOfsDisplay()
void getTraceData(TraceData &traceData, uint32_t traceIndex)
Definition: scopevis.h:231
bool m_triggerPositiveEdge
Trigger on the positive edge (else negative)
Definition: scopevis.h:107
void changeTrigger(const TriggerData &triggerData, uint32_t triggerIndex)
Definition: scopevis.cpp:185
void setTrigDelayDisplay()
void on_trigOneShot_toggled(bool checked)
Definition: glscopegui.cpp:981
void changeTrace(const TraceData &traceData, uint32_t traceIndex)
Definition: scopevis.cpp:145
void on_trigMode_currentIndexChanged(int index)
Definition: glscopegui.cpp:878
void changeTrigger(int triggerIndex, const ScopeVis::TriggerData &triggerData)
void on_traceDelayFine_valueChanged(int value)
Definition: glscopegui.cpp:783
static const double amps[27]
Definition: glscopegui.h:157
Ui::GLScopeGUI * ui
Definition: glscopegui.h:144
void on_trigPre_valueChanged(int value)
Definition: glscopegui.cpp:956
void setTrigLevelDisplay()
void addTrigger(const ScopeVis::TriggerData &triggerData)
bool readFloat(quint32 id, float *result, float def=0) const
void moveTrigger(uint32_t triggerIndex, bool upElseDown)
Definition: scopevis.cpp:197
void resetToDefaults()
Definition: glscopegui.cpp:170
void focusOnTrace(uint32_t traceIndex)
Definition: scopevis.cpp:173
void on_time_valueChanged(int value)
Definition: glscopegui.cpp:556
Calculate logarithmic (dB) of squared magnitude.
Definition: projector.h:31
void on_traceView_toggled(bool checked)
Definition: glscopegui.cpp:790
void removeTrace(uint32_t traceIndex)
Definition: scopevis.cpp:156
void setTraceLenDisplay()
void on_traceDelayCoarse_valueChanged(int value)
Definition: glscopegui.cpp:776
MessageQueue * m_messageQueue
Definition: glscopegui.h:146
void writeFloat(quint32 id, float value)
QByteArray serializeMemory() const
Definition: scopevis.h:174
void on_trigBoth_toggled(bool checked)
Definition: glscopegui.cpp:912
void setSampleRate(int sampleRate)
Definition: glscopegui.cpp:137
void setTraceLength(int step)
void setTimeBase(int step)
void on_traceColor_clicked()
Definition: glscopegui.cpp:796
void getTriggerData(TriggerData &triggerData, uint32_t triggerIndex)
Definition: scopevis.h:223
ProjectionType
Definition: projector.h:25
void setTrigCountDisplay()
Phase comparator 8-PSK evaluation.
Definition: projector.h:36
void setTimeScaleDisplay()
QColor m_traceColor
Trace display color.
Definition: scopevis.h:61
void setTraceIntensity(int value)
void setColor(QColor color)
Definition: scopevis.h:88
bool readU32(quint32 id, quint32 *result, quint32 def=0) const
void focusOnTrace(int traceIndex)
void on_scope_traceSizeChanged(uint32_t value)
Definition: glscopegui.cpp:155
QString m_textOverlay
Text overlay to display.
Definition: scopevis.h:66
void focusOnTrigger(int triggerIndex)
void changeTrace(int traceIndex, const ScopeVis::TraceData &traceData)
int m_timeBase
Definition: glscopegui.h:151
Phase comparator 16-PSK evaluation.
Definition: projector.h:37
void on_trace_valueChanged(int value)
Definition: glscopegui.cpp:602
void on_timeOfs_valueChanged(int value)
Definition: glscopegui.cpp:568
void setDisplayXYPoints(bool value)
Definition: glscope.h:81
void on_ofsCoarse_valueChanged(int value)
Definition: glscopegui.cpp:762
bool readBool(quint32 id, bool *result, bool def=false) const
void on_amp_valueChanged(int value)
Definition: glscopegui.cpp:755
virtual QByteArray serialize() const
Definition: glscopegui.cpp:175
void setFocusedTriggerData(ScopeVis::TriggerData &triggerData)
Definition: glscope.h:75
bool isValid() const
int m_traceDelay
Trace delay in number of samples.
Definition: scopevis.h:57
void on_trigLevelCoarse_valueChanged(int value)
Definition: glscopegui.cpp:928
unsigned int uint32_t
Definition: rtptypes_win.h:46
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
void on_polar_toggled(bool checked)
Definition: glscopegui.cpp:521
void setTimeOffset(int step)
void on_scope_preTriggerChanged(uint32_t value)
Definition: glscopegui.cpp:163
void setTraceDelayDisplay()
virtual bool deserialize(const QByteArray &data)
Definition: glscopegui.cpp:230
void setMemoryIndex(uint32_t memoryIndex)
Definition: scopevis.cpp:215
int m_traceDelayCoarse
Coarse delay slider value.
Definition: scopevis.h:58
DisplayMode getDisplayMode() const
Definition: glscope.h:80
int m_traceDelayFine
Fine delay slider value.
Definition: scopevis.h:59
void on_traceDown_clicked(bool checked)
Definition: glscopegui.cpp:665
float m_triggerColorR
Trigger line display color - red shortcut.
Definition: scopevis.h:116
void on_mem_valueChanged(int value)
Definition: glscopegui.cpp:869
void on_traceDel_clicked(bool checked)
Definition: glscopegui.cpp:628
bool readS32(quint32 id, qint32 *result, qint32 def=0) const
bool m_triggerBothEdges
Trigger on both edges (else only one)
Definition: scopevis.h:108
uint32_t m_triggerHoldoff
Trigger holdoff in number of samples.
Definition: scopevis.h:109
Phase comparator BPSK evaluation.
Definition: projector.h:34
Calculate phase.
Definition: projector.h:32
MainUIBlocker(Ui::GLScopeGUI *ui)
void configure(uint32_t traceSize, uint32_t timeBase, uint32_t timeOfsProMill, uint32_t triggerPre, bool freeRun)
Definition: scopevis.cpp:129
void focusOnTrigger(uint32_t triggerIndex)
Definition: scopevis.cpp:203
void on_trigDown_clicked(bool checked)
Definition: glscopegui.cpp:732
QColor m_triggerColor
Trigger line display color.
Definition: scopevis.h:115
void fillProjectionCombo(QComboBox *comboBox)
void moveTrace(uint32_t traceIndex, bool upElseDown)
Definition: scopevis.cpp:164
int32_t i
Definition: decimators.h:244
Ui::GLScopeGUI * m_ui
Definition: glscopegui.h:90
bool deserializeMemory(const QByteArray &data)
Definition: scopevis.h:187
void changeCurrentTrigger()
void applySettings()
int m_ofsFine
Fine offset slider value.
Definition: scopevis.h:56
void setBuddies(MessageQueue *messageQueue, ScopeVis *scopeVis, GLScope *glScope)
Definition: glscopegui.cpp:68
void setFocusedTraceIndex(uint32_t traceIndex)
Definition: glscope.cpp:983
int getTraceSize() const
Definition: glscope.h:63
int m_traceLenMult
Definition: glscopegui.h:153
void setAmpOfsDisplay()
Real m_triggerLevel
Level in real units.
Definition: scopevis.h:104
ScopeVis * m_scopeVis
Definition: glscopegui.h:147
Calculate linear magnitude or modulus.
Definition: projector.h:29
bool m_hasTextOverlay
True if a text overlay has to be displayed.
Definition: scopevis.h:65
void writeS32(quint32 id, qint32 value)
void on_trigAdd_clicked(bool checked)
Definition: glscopegui.cpp:699
void on_trigHoldoff_valueChanged(int value)
Definition: glscopegui.cpp:922
void fillTriggerData(ScopeVis::TriggerData &triggerData)
void on_scope_sampleRateChanged(int value)
Definition: glscopegui.cpp:142
quint32 getVersion() const
void setAmpScaleDisplay()
Calculate linear squared magnitude or power.
Definition: projector.h:30
void setTraceUI(const ScopeVis::TraceData &traceData)
void setDisplayMode(DisplayMode displayMode)
int m_sampleRate
Definition: glscopegui.h:150
void setOneShot(bool oneShot)
Definition: scopevis.cpp:209
void on_freerun_toggled(bool checked)
Definition: glscopegui.cpp:986
Projector::ProjectionType m_projectionType
Complex to real projection type.
Definition: scopevis.h:102
float m_amp
Amplification factor.
Definition: scopevis.h:52
void setTrigPreDisplay()
static const uint32_t m_traceChunkSize
Definition: scopevis.h:150
void setTriggerUI(const ScopeVis::TriggerData &triggerData)
void on_traceUp_clicked(bool checked)
Definition: glscopegui.cpp:650
void on_verticalXY_toggled(bool checked)
Definition: glscopegui.cpp:503
Ui::GLScopeGUI * m_ui
Definition: glscopegui.h:111
void on_polarPoints_toggled(bool checked)
Definition: glscopegui.cpp:539
QColor m_focusedTraceColor
Definition: glscopegui.h:154
int getSampleRate() const
Definition: glscope.h:62
Ui::GLScopeGUI * m_ui
Definition: glscopegui.h:133
void on_trigLevelFine_valueChanged(int value)
Definition: glscopegui.cpp:935
Calculate phase derivative i.e. instantaneous frequency scaled to sample rate.
Definition: projector.h:33
void fillTraceData(ScopeVis::TraceData &traceData)
void writeU32(quint32 id, quint32 value)
void setGridIntensity(int value)
TrigUIBlocker(Ui::GLScopeGUI *ui)
void addTrace(const ScopeVis::TraceData &traceData)
static const uint32_t m_nbTraceMemories
Definition: scopevis.h:153
void setDisplayGridIntensity(int intensity)
Definition: glscope.cpp:75
void setPreTrigger(int step)
void on_ofsFine_valueChanged(int value)
Definition: glscopegui.cpp:769
void on_traceMode_currentIndexChanged(int index)
Definition: glscopegui.cpp:747
void on_onlyY_toggled(bool checked)
Definition: glscopegui.cpp:467
uint32_t m_inputIndex
Input or feed index this trace is associated with.
Definition: scopevis.h:51
void writeBool(quint32 id, bool value)
void on_horizontalXY_toggled(bool checked)
Definition: glscopegui.cpp:485
void addTrace(const TraceData &traceData)
Definition: scopevis.cpp:135
void on_trigDelayFine_valueChanged(int value)
Definition: glscopegui.cpp:949
void setDisplayTraceIntensity(int intensity)
Definition: glscope.cpp:86
uint32_t getNbTriggers() const
Definition: scopevis.h:241
GLScope * m_glScope
Definition: glscopegui.h:148
Projector::ProjectionType m_projectionType
Complex to real projection type.
Definition: scopevis.h:50
Extract imaginary part.
Definition: projector.h:28
uint32_t m_triggerDelay
Delay before the trigger is kicked off in number of samples (trigger delay)
Definition: scopevis.h:110
QColor m_focusedTriggerColor
Definition: glscopegui.h:155
void disableLiveMode(bool disable)
void on_trig_valueChanged(int value)
Definition: glscopegui.cpp:680
void on_trigNeg_toggled(bool checked)
Definition: glscopegui.cpp:902
void setTraceIndexDisplay()
const std::vector< TraceData > & getTracesData() const
Definition: scopevis.h:240
bool handleMessage(Message *message)
void on_trigDel_clicked(bool checked)
Definition: glscopegui.cpp:707
void setDisplayMode(DisplayMode displayMode)
Definition: glscope.cpp:990
void on_trigCount_valueChanged(int value)
Definition: glscopegui.cpp:885
void on_memoryLoad_clicked(bool checked)
Definition: glscopegui.cpp:841
uint32_t m_ampIndex
Index in list of amplification factors.
Definition: scopevis.h:53
void on_trigColor_clicked()
Definition: glscopegui.cpp:967
void on_trigPos_toggled(bool checked)
Definition: glscopegui.cpp:892
uint32_t m_inputIndex
Input or feed index this trigger is associated with.
Definition: scopevis.h:103
GLScopeGUI(QWidget *parent=0)
Definition: glscopegui.cpp:40
void removeTrigger(uint32_t triggerIndex)
Definition: scopevis.cpp:191
float m_triggerColorB
Trigger line display color - blue shortcut.
Definition: scopevis.h:118
const QByteArray & final()
float m_triggerColorG
Trigger line display color - green shortcut.
Definition: scopevis.h:117
void setColor(QColor color)
Definition: scopevis.h:139
float m_ofs
Offset factor.
Definition: scopevis.h:54
DisplayMode
Definition: glscope.h:45
void on_memorySave_clicked(bool checked)
Definition: glscopegui.cpp:810
Phase comparator QPSK evaluation.
Definition: projector.h:35
TraceUIBlocker(Ui::GLScopeGUI *ui)
void setTrigIndexDisplay()
int m_ofsCoarse
Coarse offset slider value.
Definition: scopevis.h:55
Extract real part.
Definition: projector.h:27
void on_traceAdd_clicked(bool checked)
Definition: glscopegui.cpp:620
void on_trigDelayCoarse_valueChanged(int value)
Definition: glscopegui.cpp:942
double m_triggerDelayMult
Trigger delay as a multiplier of trace length.
Definition: scopevis.h:111