3 #include "ui_qxrdsynchronizedacquisitiondialog.h"
20 printf(
"QxrdSynchronizedAcquisitionDialog::QxrdSynchronizedAcquisitionDialog(%p)\n",
this);
28 m_WaveformPlot->init(set->synchronizedAcquisitionPlotSettings());
36 m_SyncAcqMode -> addItem(
"None");
37 m_SyncAcqMode -> addItem(
"Stepped Output");
38 m_SyncAcqMode -> addItem(
"Continuous Output");
40 m_SyncAcqWfm -> addItem(
"Square");
41 m_SyncAcqWfm -> addItem(
"Sine");
42 m_SyncAcqWfm -> addItem(
"Triangle");
43 m_SyncAcqWfm -> addItem(
"Sawtooth");
44 m_SyncAcqWfm -> addItem(
"Bipolar Triangle");
46 m_SyncAcqMinimum -> setMinimum(-10.0);
47 m_SyncAcqMinimum -> setMaximum(10.0);
48 m_SyncAcqMinimum -> setSingleStep(0.1);
50 m_SyncAcqMaximum -> setMinimum(-10.0);
51 m_SyncAcqMaximum -> setMaximum(10.0);
52 m_SyncAcqMaximum -> setSingleStep(0.1);
54 m_SyncAcqSymmetry -> setMinimum(-1.0);
55 m_SyncAcqSymmetry -> setMaximum(1.0);
56 m_SyncAcqSymmetry -> setSingleStep(0.1);
58 m_SyncAcqPhaseShift -> setMinimum(-100.0);
59 m_SyncAcqPhaseShift -> setMaximum(100.0);
60 m_SyncAcqPhaseShift -> setSingleStep(1);
68 QStringList devices = nidaq->deviceNames();
70 foreach(QString device, devices) {
71 QString desc = nidaq->deviceType(device);
72 int isSim = nidaq->deviceIsSimulated(device);
74 QString item = device+
" : "+desc;
77 item +=
" [simulated]";
80 m_SyncAcqOutDevice->addItem(item, device);
84 sync -> prop_SyncAcquisitionMode() -> linkTo(m_SyncAcqMode);
85 sync -> prop_SyncAcquisitionWaveform() -> linkTo(m_SyncAcqWfm);
86 sync -> prop_SyncAcquisitionOutputDevice() -> linkTo(m_SyncAcqOutDevice);
87 sync -> prop_SyncAcquisitionOutputChannel() -> linkTo(m_SyncAcqOutChan);
89 sync -> prop_SyncAcquisitionMinimum() -> linkTo(m_SyncAcqMinimum);
90 sync -> prop_SyncAcquisitionMaximum() -> linkTo(m_SyncAcqMaximum);
91 sync -> prop_SyncAcquisitionSymmetry() -> linkTo(m_SyncAcqSymmetry);
92 sync -> prop_SyncAcquisitionPhaseShift() -> linkTo(m_SyncAcqPhaseShift);
93 sync -> prop_SyncAcquisitionManualValue() -> linkTo(m_ManualOutputVolts);
119 printf(
"QxrdSynchronizedAcquisitionDialog::~QxrdSynchronizedAcquisitionDialog(%p)\n",
this);
125 QDockWidget::changeEvent(e);
127 case QEvent::LanguageChange:
143 QStringList aoChannels = nidaq->deviceAOChannels(sync->get_SyncAcquisitionOutputDevice());
145 bool blocked = m_SyncAcqOutChan->blockSignals(
true);
146 m_SyncAcqOutChan->clear();
148 foreach(QString chan, aoChannels) {
149 m_SyncAcqOutChan->addItem(chan, chan);
152 m_SyncAcqOutChan->blockSignals(blocked);
166 sync->prepareForAcquisition(parms);
168 m_WaveformPlot->detachItems(QwtPlotItem::Rtti_PlotCurve);
169 m_WaveformPlot->detachItems(QwtPlotItem::Rtti_PlotMarker);
171 if (sync -> get_SyncAcquisitionMode() && (parms->nphases() >= 1)) {
174 pc->setSamples(sync->outputTimes(), sync->outputVoltage());
176 pc->attach(m_WaveformPlot);
179 m_WaveformPlot->updateZoomer();
180 m_WaveformPlot->replot();
182 sync->finishedAcquisition();
qint64 qcepDebug(int cond)
void valueChanged(QString val, int index)
QSharedPointer< QxrdAcquisition > QxrdAcquisitionPtr
QxrdSynchronizedAcquisitionDialog(QxrdSynchronizedAcquisitionDialogSettingsWPtr settings, QWidget *parent, QxrdAcquisitionWPtr acq)
QWeakPointer< QxrdSynchronizedAcquisitionDialogSettings > QxrdSynchronizedAcquisitionDialogSettingsWPtr
QxrdAcquisitionWPtr m_Acquisition
QSharedPointer< QxrdSynchronizedAcquisition > QxrdSynchronizedAcquisitionPtr
void changeEvent(QEvent *e)
~QxrdSynchronizedAcquisitionDialog()
A class which draws piecewise curves.
QxrdSynchronizedAcquisitionWPtr m_SynchronizedAcquisition
QxrdSynchronizedAcquisitionDialogSettingsWPtr m_DialogSettings
QSharedPointer< QxrdNIDAQPluginInterface > QxrdNIDAQPluginInterfacePtr
QWeakPointer< QxrdAcquisition > QxrdAcquisitionWPtr
QSharedPointer< QxrdSynchronizedAcquisitionDialogSettings > QxrdSynchronizedAcquisitionDialogSettingsPtr
void valueChanged(double val, int index)
QSharedPointer< QxrdAcquisitionParameterPack > QxrdAcquisitionParameterPackPtr
void valueChanged(int val, int index)