Some more progress:
- Nodes vary in width so the task title can be shown with a color swatch showing the task status to the left (also in the tool-tip):
- Nodes that are unavailable may be dragged but the tool-button title cannot be triggered, so they cannot be marked active.
- Nodes that are incomplete or better do expose a menu at the right of their title:
Note that in the screenshot above – because “Load a model and attribute” is incomplete – the task cannot be marked completed. - Marking a task complete is possible from the GUI.
- Switching the active task is possible from the GUI.
Finally, here’s a simplified wind-tunnel example from John.
Remaining Work
There’s still a lot left to do. Here are some suggestions if people want to work on things related to tasks:
-
@aron.helser Add reactions (especially setting the active view in the attribute editor) when switching active tasks. Hints for implementing:
- Add a
styles()
method tosmtk::task::Manager
that returns a JSON object like the example here. - Have the attribute editor panel observe the project manager. When a project is available, have it observe the “active” task on project’s task-manager (see
smtk::task::Active::Observers
). - When the active task changes, examine the new task’s styles and, if any has an
attribute-editor
entry, parse that to discover a view name.
- Add a
Lay out nodes automatically.-
@johnt Save/restore user-edited node layout.
- The placement of tasks in the task-panel exists only in the Qt layer (each
qtTaskNode
has a position and is held by theqtTaskScene
, in turn held by aqtTaskEditor
, in turn held by apqSMTKTaskPanel
). Either we need to move node placement to be part of thesmtk::task::Task
instance or we need an API with no Qt dependencies to query where nodes are placed in a view. Hints for implementing: - The most expedient solution is simply to add ivars to
smtk::task::Task
and haveqtTaskNode
set these each time its layout is changed. Then,smtk/task/json/jsonTask.cxx
could include the nodal locations in its own serialization (and deserialize as needed). - Beyond that, the automatic layout that currently occurs when a new project becomes active in the task panel would need to be omitted if nodal locations already exist.
- The placement of tasks in the task-panel exists only in the Qt layer (each
- Provide some UI for GatherResources that lets users select from among a project’s resources. Hints for implementing:
- Create a new
qtGatherResources
which inheritsqtBaseView
. - Register the class with the
smtk::view::Manager
’sviewWidgetFactory
. - Extend
qtTaskNode
to create a view widget for its “contents” and display it inside them_controls
groupBox (this group box is declared insmtk/extension/qt/task/TaskNode.ui
). - This should probably be done after the “Add reactions…” item above since the name of the view configuration for a task node should be part of the task’s style.
- Create a new
- Fix a bug that prevents task adaptors from running properly (UUIDs of gathered resources are not communicated to other tasks).
- Handle groups of tasks more gracefully. (Choose a layout strategy.)
- Streamline interactions with task-nodes for usability (e.g., click or double-click task title button to activate without using a pop-up menu; click a task status “completable” swatch to mark completed). Implementation hints:
- Decide on a set of improved interactions. Suggestions include
- Clicking on the task title should make it active if possible.
- Clicking on the task status swatch should mark it completed/completable if it was completable/completed to begin with. (Other states should have no effect.)
- When a task becomes active, if it has a
node-view
style, them_controls
widget should be shown. When a task is no longer active, itsm_controls
widget should be hidden (i.e., always auto-expand the active task and auto-collapse inactive ones). This does not prevent users from re-expanding nodes later. - Hovering over a task should display a tool-tip with the task’s status followed by its brief description.
- A task should have some affordance to show a complete description to users.
- Decide whether to stick with Qt widgets embedded in a
QGraphicsItem
or to subclass aQGraphicsItem
that draws the title, state-swatch, drag-handle, and context-menu button. The latter seems like more maintenance but with more intuitive interaction.
- Decide on a set of improved interactions. Suggestions include
- Implement resource schemas (i.e., renaming the attribute resource’s
template
andtemplateVersion
methods toschema
andschemaVersion
respectively, then moving them up tosmtk::resource::Resource
). By making resource schemas a “thing,” we can put task definitions in objects that are progenitors to resources.