27 clonePrimitives(other);
47 qDebug() <<
"Programming error, copy constructor failed due to unknown primitive type";
58 clonePrimitives(other);
59 mValidity = other.mValidity;
61 mCursorTime = other.mCursorTime;
62 mCursorXpos = other.mCursorXpos;
63 mCursorValue = other.mCursorValue;
81 wfp->
paint(y0,painter);
101 if (wfp->
x1() <= wfp->
x0())
continue;
113 if (!grp)
return false;
114 bool firstWave =
true;
120 if (iwave<0)
return false;
136 if (testXmax > xmax) xmax = testXmax;
144 transitionValue[it.key()].setValue(mask,it.value());
150 bool firstLoop =
true;
153 transitionValue[xmax] = lastValue;
155 bool refreshCursor = transitionValue.
isEmpty() ? false : mCursorTime >= transitionValue.
constBegin().
key();
158 int nextX = it.key();
163 int val = lastValue.
value();
168 else if (val != nextValue.
value())
173 if (refreshCursor && nextX > 0 && (
u64) nextX > mCursorTime)
177 refreshCursor =
false;
181 if (updateX) lastX = nextX;
182 lastValue = nextValue;
194 if (!wdBool)
return false;
195 bool firstWave =
true;
202 if (iwave<0)
return false;
223 if (testXmax > xmax) xmax = testXmax;
231 transitionValue[it.key()].setValue(mask,it.value());
237 bool firstLoop =
true;
240 transitionValue[xmax] = lastValue;
242 bool refreshCursor = transitionValue.
isEmpty() ? false : mCursorTime >= transitionValue.
constBegin().
key();
245 int nextX = it.key();
250 int val = lastValue.
value();
255 else if (val != nextValue.
value())
260 int val = (tt[j] & (1<<k)) ? 1 : 0;
266 if (refreshCursor && nextX > 0 && (
u64) nextX > mCursorTime)
270 refreshCursor =
false;
274 if (updateX) lastX = nextX;
275 lastValue = nextValue;
286 quint64 tleft = sbar->
tLeftI();
287 bool refreshCursor = (mCursorTime >= tleft);
296 if (refreshCursor && tuple.
mTime >= mCursorTime)
298 if (tuple.
mTime == mCursorTime)
302 refreshCursor =
false;
320 quint64 tleft = sbar->
tLeftI();
321 bool refreshCursor = (mCursorTime >= tleft);
325 int valNext = startval.
mValue;
327 quint64 tNext = trans->
tMin();
335 while (*loop && xNext <= xMax)
337 quint64 tLast = tNext;
339 int valLast = valNext;
351 xNext = sbar->
xPosF(tNext);
360 if (refreshCursor && (tNext > mCursorTime || !loop))
362 mCursorValue = valLast;
363 refreshCursor =
false;
369 if (dt < mShortestToggle) mShortestToggle = dt;
372 if (xNext - xLast > 2.)
374 if (pendingTransition)
376 mPrimitives.append(pendingTransition);
377 pendingTransition =
nullptr;
391 if (pendingTransition)
394 if (lastFilled) filled->
add(*lastFilled);
395 delete pendingTransition;
397 pendingTransition = filled;
399 if (loop && valLast >= 0 && valNext >= 0 && valLast != valNext && !pendingTransition && !wdp->
isGroup())
404 if (pendingTransition)
405 mPrimitives.append(pendingTransition);
410 if (mPrimitives.isEmpty())
return -1;
411 auto it = mPrimitives.constBegin();
412 float retval = (*it)->x0();
413 while (++it != mPrimitives.constEnd())
414 if ((*it)->x0() < retval)
415 retval = (*it)->x0();
421 if (mPrimitives.isEmpty())
return -1;
422 auto it = mPrimitives.constBegin();
423 float retval = (*it)->x1();
424 while (++it != mPrimitives.constEnd())
425 if ((*it)->x1() > retval)
426 retval = (*it)->x1();
432 mCursorTime = tCursor;
440 if (tCursor != mCursorTime || xpos != mCursorXpos)
453 if (fabs(wfp->
x0()-xpos)<0.5)
456 mCursorTime = tCursor;
470 mCursorTime = tCursor;
472 mCursorValue = tmpValue;
static const int sReadError
Fake data value to indicate all kind of errors.
uint64_t mTime
Transition time.
bool readError() const
Indicates that there was an error and no data was returned.
bool operator<(const TimeInterval &other) const
QList< WaveData * > children() const
const char * truthTable() const
QList< int > childrenWaveIndex() const
virtual int bits() const override
virtual SaleaeDataTuple nextPoint()=0
virtual SaleaeDataTuple startValue(u64 t)=0
static const int sTooManyTransitions
const T value(const Key &key) const const
const Key & key() const const
QMap::const_iterator constBegin() const const
QMap::const_iterator constEnd() const const
QMap::iterator insert(const Key &key, const T &value)
bool isEmpty() const const