QtTaskTree::QMappedTaskTreeRunner Class
template <typename Key> class QtTaskTree::QMappedTaskTreeRunner指定されたキー型を持つ、マッピング済みのタスクツリー実行コントローラ。詳細...
| ヘッダー: | #include <qtasktreerunner.h> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS TaskTree) target_link_libraries(mytarget PRIVATE Qt6::TaskTree) |
| qmake: | QT += tasktree |
| 以下のように: | Qt 6.11 |
| ステータス: | テクノロジープレビュー |
このクラスはテクノロジープレビュー段階にあり、変更される可能性があります。
パブリック関数
| QMappedTaskTreeRunner() | |
| ~QMappedTaskTreeRunner() | |
| void | cancel() |
| void | cancelKey(const Key &key) |
| bool | isKeyRunning(const Key &key) const |
| bool | isRunning() const |
| void | reset() |
| void | resetKey(const Key &key) |
| void | start(const Key &key, const QtTaskTree::Group &recipe, SetupHandler &&setupHandler = {}, DoneHandler &&doneHandler = {}, QtTaskTree::CallDone callDone = QtTaskTree::CallDoneFlag::Always) |
詳細な説明
Key 型を使用して、マップされたタスクツリーの実行を管理します。start() メソッドを使用すると、指定されたキーのレシピを無条件に実行し、同じキーで実行中のタスクツリーがある場合はそれをリセットし、異なるキーで実行中の他のタスクツリーは並行して実行し続けます。
Task Tree Runnersも参照してください 。
メンバ関数のドキュメント
[default] QMappedTaskTreeRunner::QMappedTaskTreeRunner()
マップされたタスクツリーランナーを構築します。タスクツリーのマッピングには、Key 型が使用されます。
[default] QMappedTaskTreeRunner::~QMappedTaskTreeRunner()
マップされたタスクツリーのランナーを破棄します。実行中のすべてのタスクツリーが削除されます。どのタスクツリーの完了ハンドラも呼び出されません。
~QTaskTree()も参照してください 。
void QMappedTaskTreeRunner::cancel()
実行中のすべてのタスクツリーをキャンセルします。DoneWith::Cancel を使用して、各タスクツリーのdoneハンドラを呼び出します。タスクツリーのキャンセル順序はランダムです。
void QMappedTaskTreeRunner::cancelKey(const Key &key)
key で開始された、実行中の可能性のあるタスクツリーをキャンセルします。DoneWith::Cancel を使用して、タスクツリーのdoneハンドラを呼び出します。
bool QMappedTaskTreeRunner::isKeyRunning(const Key &key) const
マッピングされたタスクツリーランナーが、key で開始されたタスクツリーを現在実行中であるかどうかを返します。
bool QMappedTaskTreeRunner::isRunning() const
マップされたタスクツリーランナーが、現在少なくとも1つのタスクツリーを実行しているかどうかを返します。
void QMappedTaskTreeRunner::reset()
実行中のすべてのタスクツリーをリセットします。どのタスクツリーの完了ハンドラも呼び出されません。
void QMappedTaskTreeRunner::resetKey(const Key &key)
key で開始された、実行中の可能性があるタスクツリーをリセットします。タスクツリーのdoneハンドラは呼び出されません。
template <typename SetupHandler = QtTaskTree::TreeSetupHandler, typename DoneHandler = QtTaskTree::TreeDoneHandler> void QMappedTaskTreeRunner::start(const Key &key, const QtTaskTree::Group &recipe, SetupHandler &&setupHandler = {}, DoneHandler &&doneHandler = {}, QtTaskTree::CallDone callDone = QtTaskTree::CallDoneFlag::Always)
指定されたkey に対して、recipe を無条件に開始します。これにより、同じキーを持つ実行中のタスクツリーがある場合はそれをリセットし、異なるキーを持つ他の実行中のタスクツリーは並行して維持します。新しいタスクツリーの開始直前にsetupHandler を呼び出します。タスクツリーが終了した際にdoneHandler を呼び出します。doneHandler は、渡されたcallDone に従って呼び出されます。
© 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.