Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/progress management #350

Merged
merged 133 commits into from
Oct 8, 2023
Merged

Feature/progress management #350

merged 133 commits into from
Oct 8, 2023

Conversation

ThomasKroes
Copy link
Contributor

@ThomasKroes ThomasKroes commented Aug 4, 2023

Main subjects of this PR:

  1. New API for creating, monitoring, and interacting with tasks
  2. Revamped splash screens (application + project) which make use of the new tasks API
  3. Various bug fixes

New API for creating, monitoring, and interacting with tasks

  1. A task manager has been added to the core interface which keeps track of all the tasks in the system (see hdps::tasks())
  2. A basic set of tasks has been added (but for very specific behavior a custom task can be implemented)
  3. Each task has one of the following states:
    • Undefined tasks have not been initialized.
    • Idle tasks are operational and ready to be started.
    • Running tasks are tasks for which the amount of work is known a priori.
    • RunningIndeterminate tasks have no a priori known amount of work.
    • Finished tasks have completed all the work.
      Note: call setFinished(...) to flag a task as complete
    • Tasks are set to AboutToBeAborted just prior to them being aborted.
    • Aborting tasks are in the process of being aborted.
    • Aborted tasks have been forcefully and successfully killed.
  4. Each task has a GUI scope in which it operates (see getGuiScope(...) and getGuiScope(...)):
    • None: these tasks are not associated with any GUI context.
    • Background: The aggregated progress and status of background tasks with statuses Running, RunningIntermediate, and Finished are displayed in the ManiVault status bar as a progress bar.
    • Foreground Tasks with statuses Running, RunningIntermediate, and Finished are displayed in the ManiVault status bar as a tool button with a popup widget that shows them.
    • Modal tasks with statuses Running, RunningIntermediate, and Finished are displayed in a modal ManiVault status bar as a tool button with a popup widget that shows them.
  5. In total there are three modii with which the task progress can be computed:
    • Manual: the developer calls setProgress(...) to manually set the progress (this is the default modus).
    • Subtasks: a fixed number of tasks is assigned with setSubtasks(number_of_tasks) or setSubtasks(string_list) and subsequently flagged started with one of the setSubtaskStarted(...) overloads and flagged finished with one of the setSubtaskFinished(...) overloads. The progress percentage will be computed automatically.
      Note: the task progress mode is automatically set to Subtasks when either setSubtasks(number_of_tasks) or setSubtasks(string_list) is called.
    • Aggregate: the progress of a task is automatically computed on the basis of its child tasks (which are enabled).
      Note: the task progress mode is automatically set to Aggregate when a child task is added.
  6. For more in-depth exploration and control over tasks, a tasks plugin has been added.

Revamped splash screen API (application + project) that makes use of the new tasks API

  1. Fully customizable splash screen that can be used in various scenarios:
    • During the startup of ManiVault:
      • Shows application info (i.e., application name, version, loaded plugins, copyright notice) when loaded with project
      • Shows project information (i.e. title, description, logos) when a project is loaded during startup (with HDPS.exe -p <file_path> or HDPS.exe --project <file_path>)
    • From within the application itself (no progress bar is shown):
      • When a project is loaded: Help > About Project
      • Help > About ManiVault
  2. The splash screen has an API to add alerts (styled according to their type i.e. Info, Debug, Warning). For instance, warnings will be added if one or more plugins cannot be loaded.
  3. Restyling of background (in accordance with start page background) and some HTML text styling.

Various bug fixes

  1. The problem with slow loading of the application has been solved
  2. Other bugs here and there

Make sure correct base is called in concrete managers
[skip ci]
Work on initial version of Task class
Work on initial version of TaskHandler class
[skip ci]
Add task action
Add status bar
Work on task manager
[skip ci]
Work on task and task action class
[skip ci]
Fix bug in point data
[skip ci]
Add model and background tasks
Add model and background task handlers
Work on task manager
[skip ci]
Work on model task and handler
[skip ci]
Add file input/output task and task handler
Work on modal task and modal task handler
[skip ci]
…etween manual and subtask progress recording

[skip ci]
Use tasks action in main window
[skip ci]
Add member function task for getting progress text
Work on tasks model
[skip ci]
Work on tasks filter model
Harmonize action constructors (title argument does not have a default value anymore)
Work on tasks manager
[skip ci]
…rogress action

Work on tasks plugin
Use the progress bar action to draw the progress control in the tree widget from the tasks action
[skip ci]
Add some padding to progress bar text
[skip ci]
Remove hdps:: prefix in task type from the tasks model
Work on project manager
[skip ci]
Work on project manager
Add some convenience functions to task
[skip ci]
Extending base task class
Move task actions to seperate source group
[skip ci]
…h some project meta data

Put project compression in seperate action class
[skip ci]
Uncomment comment that was added for debugging in the modal task handler
Fix bugs in the modal task tester
[skip ci]
… tasks

Reset subtask bit array in task when setting new subtasks
[skip ci]
Finished splash screens for both application and project with some new items
[skip ci]
Fix some layout problems as well
Working on tasks model bugs
Testing if older projects still load properly
Add elided label widget label class
[skip ci]
Fix elided label problem
Change small issue in splash screen widget
Turn of debug print statement in tasks filter model
[skip ci]
Curate splash screen action and widget documentation for .h and .cpp
Work on some small bugs in splash screen
[skip ci]
… out disabled tasks

Fix some alerts
Properly configure splash screen at project startup
Small changes in splash screen widget
[skip ci]
Correctly configure project meta action at startup
Work on splash screen widget
[skip ci]
…hows 'no background tasks...' at startup rather than an empty progress bar

Small fix in tasks popup widget
Change model callback debug print statements to be more meaningful
[skip ci]
Adding font awesome 6.4
[skip ci]
…ed scope

Also adhere to the name change in the abstract tasks model and various other places in the code
Add none to task gui scope (task that has no explicit gui handler)
[skip ci]
Fix problem with task aggregation
Simplify some code in the background task handler
Remove comment from icon fonts class
[skip ci]
Add load project data and workspace tasks to the application
Hybrid support for tasks that originate from either the application or the project
Fix bug in task reparenting
Add architecture in view plugin pregister a serialization task (needed for proper workspace progress reporting during startup with project)
Simplified some code and fixed a bug in the workspace manager
[skip ci]
Add debug message when a task is added to the manager even though the core is not initialized
Remove redundant console output messages
Add serialization task to the view plugin dock widget class
[skip ci]
Ignore loading errors by default
[skip ci]
Add task to abstract manager for progress reporting
[skip]
Remove shortcut from recent files action
Simplified the core manager storage and access
Added enumeration in core interface to facilitate this
Add tasks in top-down fashion in the tasks tree model
Create task handler in task implementation(s) when the core is intitialized in stead of in the core
Add additional tasks to the application
Add task to abstract manager
[skip ci]
Call base initialization functions in all managers
[skip ci]
Do not override load project task name
Add signal to core for when managers are created
Properly close splash screen
Remove redundant serialization task from view plugin (for now)
[skip ci]
@ThomasKroes ThomasKroes merged commit 3badc48 into master Oct 8, 2023
@ThomasKroes ThomasKroes deleted the feature/progress_management branch October 8, 2023 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant