3#include <NDEVR/TranslatedString.h>
36 for (
const auto& iter :
m_tasks)
38 if (iter.second.is_active && !iter.second.allow_application_close)
48 for (
const auto& iter :
m_tasks)
50 if (iter.second.is_active && !iter.second.allow_open_project)
60 for (
const auto& iter :
m_tasks)
62 if (iter.second.is_active && !iter.second.allow_import_file)
Manages all active and inactive tasks for a DesignObjectLookup.
virtual void removeTask(const UUID &id)
Removes a task from the manager by its UUID.
virtual bool canImportFile() const
Checks whether importing a file is allowed based on active tasks.
virtual void updateTask(const DesignTask &task)
Updates an existing task in the manager, replacing it by its UUID.
DesignTask task(const UUID &id) const
Retrieves a copy of a task by its UUID.
Dictionary< UUID, DesignTask > m_tasks
Thread-safe dictionary of all managed tasks, keyed by UUID.
virtual bool canOpenProject() const
Checks whether opening a project is allowed based on active tasks.
virtual bool canExitApplication() const
Checks whether the application is allowed to exit based on active tasks.
virtual void addTask(const DesignTask &task)
Adds a new task to the manager.
A hash-based key-value store, useful for quick associative lookups.
Used to lock a particular variable for reading.
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
Used to lock a particular variable for writing.
The primary namespace for the NDEVR SDK.
double fltp08
Defines an alias representing an 8 byte floating-point number.
A task which is to be executed by a DesignObjectLookup.
fltp08 progress
Current progress of the task (Invalid when indeterminate).
bool allow_application_close
Whether the application may close while this task is active.
bool allow_open_project
Whether opening a project is permitted while this task is active.
bool is_active
Whether this task is currently active.
TranslatedString name
Display name of the task.
TranslatedString description
Detailed description of the task.
UUID id
Unique identifier for this task.
bool allow_import_file
Whether file imports are permitted while this task is active.
DesignTask()
Constructs a DesignTask with a newly generated UUID.