hw.taskmanager Module#
Task class#
- class Task(**kwds)#
A class representing a task.
- getPropertyDisplaytype(tag: str) str #
Method to get the task property display type.
- Parameters:
tag (str) – The tag of the property.
- getPropertyEnabled(tag) bool #
Method to get the task property enabled state.
- Parameters:
tag (str) – The tag of the property.
- getPropertyFollowupdateCommand(tag: str) str #
Method to get the task property followupdatecommand as a string.
- Parameters:
tag (str) – The tag of the property.
- getPropertyLabel(tag) str #
Method to get the task property label.
- Parameters:
tag (str) – The tag of the property.
- getPropertySetCommand(tag: str) str #
Method to get the task property setcommand as a string.
- Parameters:
tag (str) – The tag of the property.
- getPropertyValue(tag: str) str | int | float | bool #
Method to get the task property value.
- Parameters:
tag (str) – The tag of the property.
- getPropertyVisible(tag) bool #
Method to get the task property visible state.
- Parameters:
tag (str) – The tag of the property.
- setPropertyDisplaytype(tag: str, value: str)#
Method to set the task property displaytype.
- Parameters:
tag (str) – The tag of the property.
value (str) – The displaytype of the task property as string.
- setPropertyEnabled(tag: str, value: bool)#
Method to set the task property enabled state.
- Parameters:
tag (str) – The tag of the property.
value (bool) – The state to set the enabled state of the property to.
- setPropertyFollowupdateCommand(tag: str, value: str)#
Method to set the task property followupdatecommand.
- Parameters:
tag (str) – The tag of the property.
value (str) – The followupdatecommand of the task property as string.
- setPropertyLabel(tag: str, value: str)#
Method to set the task property label.
- Parameters:
tag (str) – The tag of the property.
value (str) – The label of the task property.
- setPropertySetCommand(tag: str, value: str)#
Method to set the task property setcommand.
- Parameters:
tag (str) – The tag of the property.
value (str) – The setcommand of the task property as string.
- setPropertyValue(tag: str, value: str | int | float | bool)#
Method to set the task property value.
- Parameters:
tag (str) – The tag of the property.
value (Union[str, int, float, bool]) – The tag of the property.
- setPropertyVisible(tag: str, value: bool)#
Method to set the task property visible state.
- Parameters:
tag (str) – The tag of the property.
value (bool) – The state to set the visible state of the property to.
- property applybuttonstate: bool#
Attribute to set or get the enabled state of the apply button of the task.
- Getter:
Gets the enabled state of the apply button of the task.
- Setter:
Sets the enabled state of the apply button of the task.
- Type:
bool
- property command: str#
Attribute to set or get the apply command of the task.
- Getter:
Gets the apply command of the task.
- Setter:
Sets the apply command of the task.
- Type:
str
- property enabled: bool#
Attribute to set or get if entity is enabled.
- Getter:
Gets enabled state of the entity.
- Setter:
Sets enabled state of the entity.
- Type:
bool
- property help: str#
Attribute to set or get the tooltip of the entity.
- Getter:
Gets the tooltip of the entity.
- Setter:
Sets the tooltip of the entity.
- Type:
str
- property helpdocument: str#
Attribute to set or get the helpdocument of the entity.
- Getter:
Gets the helpdocument of the entity.
- Setter:
Sets the helpdocument of the entity.
- Type:
str
- property image: str#
Attribute to set or get the icon of the entity.
- Getter:
Gets the icon of the entity.
- Setter:
Sets the icon of the entity.
- Type:
str
- property label: str#
Attribute to set or get the label of the entity.
- Getter:
Gets the label of the entity.
- Setter:
Sets the label of the entity.
- Type:
str
- property nextbuttonstate: bool#
Attribute to set or get the enabled state of the next button of the task.
- Getter:
Gets the enabled state of the next button of the task.
- Setter:
Sets the enabled state of the next button of the task.
- Type:
bool
- property postcommand: str#
Attribute to set or get the postcommand of the task.
- Getter:
Gets the postcommand of the task.
- Setter:
Sets the postcommand of the task.
- Type:
str
- property precommand: str#
Attribute to set or get the precommand of the task.
- Getter:
Gets the precommand of the task.
- Setter:
Sets the precommand of the task.
- Type:
str
- property previousbuttonstate: bool#
Attribute to set or get the enabled state of the previous button of the task.
- Getter:
Gets the enabled state of the previous button of the task.
- Setter:
Sets the enabled state of the previous button of the task.
- Type:
bool
- property status: str#
Attribute to set or get the status of the task.
‘0’ - waiting‘1’ - successful‘2’ - running‘3’ - partial‘-1’ - failed- Getter:
Gets the status of the task.
- Setter:
Sets the status of the task.
- Type:
str
- property visible: bool#
Attribute to set or get if entity is visible.
- Getter:
Gets visible state of the entity.
- Setter:
Sets visible state of the entity.
- Type:
bool
- property xml: str#
Attribute to set or get the XML file of the task.
- Getter:
Gets the XML file of the task.
- Setter:
Sets the XML file of the task.
- Type:
str
TaskCategory class#
- class TaskCategory(tmtype='TaskCategory', **kwds)#
A class representing a task category.
- property enabled: bool#
Attribute to set or get if entity is enabled.
- Getter:
Gets enabled state of the entity.
- Setter:
Sets enabled state of the entity.
- Type:
bool
- property help: str#
Attribute to set or get the tooltip of the entity.
- Getter:
Gets the tooltip of the entity.
- Setter:
Sets the tooltip of the entity.
- Type:
str
- property helpdocument: str#
Attribute to set or get the helpdocument of the entity.
- Getter:
Gets the helpdocument of the entity.
- Setter:
Sets the helpdocument of the entity.
- Type:
str
- property image: str#
Attribute to set or get the icon of the entity.
- Getter:
Gets the icon of the entity.
- Setter:
Sets the icon of the entity.
- Type:
str
- property label: str#
Attribute to set or get the label of the entity.
- Getter:
Gets the label of the entity.
- Setter:
Sets the label of the entity.
- Type:
str
- property visible: bool#
Attribute to set or get if entity is visible.
- Getter:
Gets visible state of the entity.
- Setter:
Sets visible state of the entity.
- Type:
bool
TaskManager class#
- class TaskManager#
A singleton class representing the Task Manager. The instance of the Task Manager can be retrieved using
getTaskManager
function.- addOnCloseCommand(fullcommandasstring: str)#
Method to add onClose commands.
- Parameters:
fullcommandasstring (str) – onClose command as a string
- apply()#
Method to execute current task and set the status icon according to return value of command. If successful (returns value 1), the Task Manager proceeds to next task.
- autoApply()#
Method to run all tasks sequentially starting with the current task. All previously run tasks with successful status will be ignored.
- close()#
Method to close the Task Manager and delete the content.
- closeProcess()#
Method to delete current content.
- getCurrentTask()#
Method that returns the current task or category.
- getOnCloseCommands() list #
Method that returns all added onClose commands as a list.
- getTask(tag: str | None = None) Task #
Method that returns the task or category object.
- Parameters:
tag (str) – The tag of the task or category. If set to None, the current task or category is returned.
- getTaskList() list #
Method that returns list of tasks, exluding the cateogries.
- getTaskUIDockable(value) bool #
Method to get if the window containing the task properties is dockable or not.
- getTaskUIStayOpen() bool #
Method to get if the window containing the task properties stays open when empty.
- goToNextTask()#
Method to go to the next task.
- goToPreviousTask()#
Method to go to the previous task.
- goToTask(task='', showtaskview=True)#
Method to go to a specific task.
- Parameters:
task (Task) – Task object representing the task to go to. If not specified, then all tasks are deselected.
- isProcessLoaded()#
Method to check if a process is loaded.
- openProcess(filepath=None)#
Method to open a Task Manager session file.
- Parameters:
filepath (str) – The path to the Task Manager session file. If not specified, user will be prompted to select a file.
- populate(taskmanagerfile: str | None = None)#
Method to open the Task Manager (Tasks tab) and to load the content from the task manager file (optional).
- Parameters:
taskmanagerfile (str) – The XML process template describing the Tasks.
- saveProcess(filepath=None)#
Method to save the current Task Manager progress.
- Parameters:
filepath (str) – The file path of the Task Manager session file to save. If not specified, the user will be prompted to select a file.
- setTaskUIDockable(value: bool)#
Method to set if the window containing the task properties is dockable or not.
- Parameters:
value (bool) – Set True to make the window dockable, False otherwise.
- setTaskUIStayOpen(value: bool)#
Method to set if the window containing the task properties stays open when empty. This option is usually used together with docked window.
- Parameters:
value (bool) – Set True to keep the window open, False otherwise.
- showHelp(task=None)#
Method to show a task help document.
- Parameters:
task (Task) – The task object representing the task for which to show the help document.
- whichProcessIsLoaded()#
Method to check which process is loaded.
- property saveonclose: bool#
Attribute to set or get the status of the option to prompt the user to save the process template upon closing the Tasks tab or the full application.
- Getter:
Gets the option.
- Setter:
Sets the option.
- Type:
bool
- property title#
Attribute to set or get the title of the Tasks window.
- Getter:
Gets the title.
- Setter:
Sets the title.
- Type:
bool