Heart 1.3.851.58f1cb2
Heart is base back end library for your c++ Qt projects.
asyncrenderloop.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2025-2025 QuasarApp.
3 * Distributed under the lgplv3 software license, see the accompanying
4 * Everyone is permitted to copy and distribute verbatim copies
5 * of this license document, but changing it is not allowed.
6*/
7
8#ifndef ASYNCRENDERLOOP_H
9#define ASYNCRENDERLOOP_H
10
11#include "async.h"
12
13namespace QH {
14
40{
41 Q_OBJECT
42public:
43 AsyncRenderLoop(QThread* thread, QObject* ptr = nullptr);
45
49 virtual void run();
50
54 virtual void stop();
55
60 bool isRun() const;
61
62protected:
63
71 virtual void renderIteration(int msec) = 0;
72
73private slots:
74 void renderLoopPrivate();
75
76private:
77 bool m_run = false;
78 quint64 _lastIterationTime = 0;
79
80};
81}
82#endif // ASYNCRENDERLOOP_H
virtual void renderIteration(int msec)=0
renderIteration This method is called in each iteration of the render loop. This method must be imple...
The Async class This is bundle of async templates and async wrappers.
Definition async.h:25
#define HEARTSHARED_EXPORT
The QH namespace - QuasarApp Heart namespace. This namespace contains all classes of the Heart librar...
Definition heart.cpp:13