7 #include <QMutexLocker>
11 #include "utils_global.h"
13 class QTCREATOR_UTILS_EXPORT LogFile
: public QIODevice
{
16 explicit LogFile(QObject
*parent
= 0);
17 qint64
bytesAvailable() const;
18 qint64
bytesToWrite() const
20 return m_file
.bytesToWrite();
22 bool open(OpenMode mode
);
23 void setFileName(QString name
)
25 m_file
.setFileName(name
);
28 qint64
writeData(const char *data
, qint64 dataSize
);
29 qint64
readData(char *data
, qint64 maxlen
);
33 void useProvidedTimeStamp(bool useProvidedTimeStamp
)
35 m_useProvidedTimeStamp
= useProvidedTimeStamp
;
38 void setNextTimeStamp(quint32 nextTimestamp
)
40 m_nextTimeStamp
= nextTimestamp
;
44 void setReplaySpeed(double val
)
46 m_playbackSpeed
= val
;
47 qDebug() << "Playback speed is now" << m_playbackSpeed
;
58 void replayFinished();
61 QByteArray m_dataBuffer
;
65 qint32 m_lastTimeStamp
;
71 double m_playbackSpeed
;
74 quint32 m_nextTimeStamp
;
75 bool m_useProvidedTimeStamp
;