|
NorMIT-nav
22.09
An IGT application
|
Go to the documentation of this file.
24 mStartTime = QDateTime::currentDateTime();
30 connect(mTimer, SIGNAL(timeout()),
this, SLOT(timeoutSlot()));
31 mTimer->setInterval(40);
52 return mTimer->isActive();
57 mPlayStart = QDateTime::currentDateTime();
58 mLastPlayOffset = mOffset;
80 if (mTimer->isActive())
83 qint64 offset = mPlayStart.msecsTo(QDateTime::currentDateTime());
84 return mLastPlayOffset + mSpeed * offset;
92 void PlaybackTime::timeoutSlot()
169 mOffset = std::max<quint64>(0, val);
196 mTimer->setInterval(val);
201 return mTimer->interval();
220 return fabs(time - m) < std::max(w, tol_ms)/2;
229 return fabs(m1-m0) < (w1+w0)/2;
void initialize(QDateTime start, qint64 length)
TemporaryPausePlay(PlaybackTime *base)
void setSpeed(double val)
set speed as a ratio of real time. 1 is real time, less is slower, more is faster.
void forward(qint64 msecs)
jump forward in ms
Namespace for all CustusX production code.
void start()
start playing.
bool isOverlap(const TimelineEvent &rhs) const
qint64 getLength() const
length of recording in ms
bool operator<(const TimelineEvent &rhs) const
Description of one event in time.
RealScalar length() const
void pause()
pause playing
void moveOffset(qint64 delta)
change the offset with an amount
void setTime(QDateTime time)
Controller for historic time, playback etc.
void setResolution(qint64 val)
set resolution in ms (signals are emitted with this spacing)
QDateTime getStartTime() const
void rewind(qint64 msecs)
jump backward in ms
void setOffset(qint64 val)
set time as an offset from start
QDateTime getTime() const
bool similar(const CameraInfo &lhs, const CameraInfo &rhs, double tol)
bool isInside(double time, double tol_ms=0) const
void stop()
stop playing and reset to start