QtTaskTree::QSequentialTaskTreeRunner Class
class QtTaskTree::QSequentialTaskTreeRunnerシーケンシャルなタスクツリー実行コントローラ。詳細...
| ヘッダー: | #include <qtasktreerunner.h> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS TaskTree) target_link_libraries(mytarget PRIVATE Qt6::TaskTree) |
| qmake: | QT += tasktree |
| 以下のように: | Qt 6.11 |
| ステータス: | テクノロジープレビュー |
このクラスはテクノロジープレビュー段階にあり、変更される可能性があります。
パブリック関数
| QSequentialTaskTreeRunner() | |
| ~QSequentialTaskTreeRunner() | |
| void | cancel() |
| void | cancelCurrent() |
| void | enqueue(const QtTaskTree::Group &recipe, SetupHandler &&setupHandler = {}, DoneHandler &&doneHandler = {}, QtTaskTree::CallDone callDone = QtTaskTree::CallDoneFlag::Always) |
| bool | isRunning() const |
| void | reset() |
| void | resetCurrent() |
詳細な説明
タスクツリーの順次実行を管理します。enqueue() メソッドを使用して、指定されたレシピの実行をスケジュールします。任意の時点で実行中のタスクツリーは最大 1 つであることが保証されています。
「Task Tree Runners」も参照してください 。
メンバー関数のドキュメント
QSequentialTaskTreeRunner::QSequentialTaskTreeRunner()
シーケンシャルなタスクツリーランナーを構築します。
[noexcept] QSequentialTaskTreeRunner::~QSequentialTaskTreeRunner()
シーケンシャル・タスクツリー・ランナーを破棄します。実行中の可能性のあるタスクツリーが削除され、キューに登録されているタスクが削除されます。どのタスクツリーの完了ハンドラも呼び出されません。
~QTaskTree()も参照してください 。
void QSequentialTaskTreeRunner::cancel()
実行中のタスクツリーをキャンセルします。DoneWith::Cancel を使用して、タスクツリーの「done」ハンドラを呼び出します。キューに格納されているすべてのタスクが削除されます。
void QSequentialTaskTreeRunner::cancelCurrent()
実行中のタスクツリーをキャンセルします。DoneWith::Cancel を使用して、タスクツリーの「done」ハンドラを呼び出します。キューに登録されているレシピがある場合、キューから取り出されたレシピが実行されます。
template <typename SetupHandler = QtTaskTree::TreeSetupHandler, typename DoneHandler = QtTaskTree::TreeDoneHandler> void QSequentialTaskTreeRunner::enqueue(const QtTaskTree::Group &recipe, SetupHandler &&setupHandler = {}, DoneHandler &&doneHandler = {}, QtTaskTree::CallDone callDone = QtTaskTree::CallDoneFlag::Always)
recipe の実行をスケジュールします。実行中のタスクツリーがない場合、ランナーは新しいタスクツリーを同期的に開始します。それ以外の場合は、recipe がキューに入れられます。現在実行中のタスクツリーが終了すると、ランナーはキューから取り出されたレシピを使用して新しいタスクツリーを開始します。新しいタスクツリーの開始直前に、setupHandler を呼び出します。 タスクツリーが終了した際に、doneHandler を呼び出します。doneHandler は、渡されたcallDone に従って呼び出されます。
bool QSequentialTaskTreeRunner::isRunning() const
シーケンシャル・タスクツリー・ランナーが現在タスクツリーを実行中であるかどうかを返します。
void QSequentialTaskTreeRunner::reset()
実行中のタスクツリーをリセットします。どのタスクツリーの完了ハンドラも呼び出されません。キューに登録されているすべてのタスクが削除されます。
void QSequentialTaskTreeRunner::resetCurrent()
実行中のタスクツリーをリセットします。どのタスクツリーの完了ハンドラも呼び出されません。キューに登録されているレシピがある場合、キューから取り出されたレシピが実行されます。
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.