16 Q_ASSERT_X(
hasStarted(), Q_FUNC_INFO,
"Thread was not started yet!");
21 std::chrono::milliseconds periodicTime)
23 m_initialTime = initialTime;
24 m_periodicTime = periodicTime;
27 void CThreadedReaderPeriodic::doWork()
34 using namespace std::chrono_literals;
35 Q_ASSERT(m_periodicTime.load() > 0ms);
CThreadedReader(const CThreadedReader &)=delete
Copy constructor.
bool doWorkCheck() const
Still enabled etc.?
CThreadedReaderPeriodic(QObject *owner, const QString &name)
Constructor.
virtual void doWorkImpl()=0
This method does the actual work in the derived class.
void setInitialAndPeriodicTime(std::chrono::milliseconds initialTime, std::chrono::milliseconds periodicTime)
Set initial and periodic times Changes only apply after the next time the timer restarts.
void startReader()
Starts the reader.
const QObject * owner() const
Owner of the worker.
void startTimer(std::chrono::milliseconds ms)
Start updating (start timer).
void timeout()
Timer timed out.
bool hasStarted() const
True if the worker has started.
Backend services of the swift project, like dealing with the network or the simulators.
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)