Heart
1.4.918.d927d9c
Heart is base back end library for your c++ Qt projects.
Toggle main menu visibility
Loading...
Searching...
No Matches
asynclauncher.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2021-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 ASYNCLAUNCHER_H
9
#define ASYNCLAUNCHER_H
10
11
#include <
async.h
>
12
13
class
QThread;
14
15
namespace
QH
{
16
31
class
HEARTSHARED_EXPORT
AsyncLauncher
final:
public
Async
32
{
33
Q_OBJECT
34
public
:
40
AsyncLauncher
(QThread *thread);
41
48
bool
run
(
const
Job
&action,
bool
wait =
false
);
49
54
bool
stop
();
55
60
bool
waitForStop
();
61
62
};
63
64
}
65
#endif
// ASYNCLAUNCHER_H
async.h
QH::AsyncLauncher::run
bool run(const Job &action, bool wait=false)
run This method run the action function in the work thread of this object.
Definition
asynclauncher.cpp:18
QH::AsyncLauncher::stop
bool stop()
stop This method stop the work thread of this object.
Definition
asynclauncher.cpp:26
QH::AsyncLauncher::waitForStop
bool waitForStop()
waitForStop This method wait for the thread of this object is stopped.
Definition
asynclauncher.cpp:34
QH::AsyncLauncher::AsyncLauncher
AsyncLauncher(QThread *thread)
AsyncLauncher This is base constructor of the AsyncLauncher object.
Definition
asynclauncher.cpp:13
QH::Async::Job
std::function< bool()> Job
Definition
async.h:34
QH::Async::Async
Async(QThread *thread)
Async This is default constructor of the async object.
Definition
async.cpp:38
QH
The QH namespace - QuasarApp Heart namespace. This namespace contains all classes of the Heart librar...
Definition
heart.cpp:13
src
public
asynclauncher.h
Generated by
1.18.0