|
SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
A widget that displays SMTK tasks available to users in a diagram. More...
#include <qtTaskEditor.h>
Classes | |
| class | Internal |
Public Member Functions | |
| smtkTypenameMacro (smtk::extension::qtTaskEditor) | |
| smtkSuperclassMacro (smtk::extension::qtDiagramGenerator) | |
| qtTaskEditor (const smtk::view::Information &info, const smtk::view::Configuration::Component &config, qtDiagram *parent) | |
| void | updateSceneNodes (std::unordered_set< smtk::resource::PersistentObject * > &created, std::unordered_set< smtk::resource::PersistentObject * > &modified, std::unordered_set< smtk::resource::PersistentObject * > &expunged, const smtk::operation::Operation &operation, const smtk::operation::Operation::Result &result) override |
| Diagram update methodsCalled when an operation completes. More... | |
| void | updateSceneArcs (std::unordered_set< smtk::resource::PersistentObject * > &created, std::unordered_set< smtk::resource::PersistentObject * > &modified, std::unordered_set< smtk::resource::PersistentObject * > &expunged, const smtk::operation::Operation &operation, const smtk::operation::Operation::Result &result) override |
| Diagram update methodsCalled when an operation completes. More... | |
| bool | addWorklet (const std::string &workletName, std::array< double, 2 > location) |
| This is called when a worklet is dropped on the qtDiagram. | |
| bool | acceptDropProposal (QDragEnterEvent *event) override |
| Returns true if the event proposes to drop a worklet. | |
| void | moveDropPoint (QDragMoveEvent *event) override |
| Update any drop preview to the location in the provided event. | |
| void | abortDrop (QDragLeaveEvent *event) override |
| Clean up any drop preview; the user has aborted the drag-and-drop. | |
| bool | acceptDrop (QDropEvent *event) override |
| Return true if we can accept the drag-and-drop data at the finalized location. | |
| qtBaseTaskNode * | findTaskNode (const smtk::task::Task *task) const |
| Return the qtBaseTaskNode that corresponds to a Task. | |
| smtk::task::Manager * | manager () const |
| Return the task manager associated with the editor. | |
| void | updateVisibility (const smtk::task::Task *prevTailTask, const smtk::task::Task *nextTailTask) |
| Update the visibility of tasks, ports and related arcs. More... | |
| const qtTaskPath * | taskPath () const |
| Return the task-editor's task breadcrumb. | |
| qtTaskPath * | taskPath () |
| bool | snapPortsToTask () const |
| Controls if external task port nodes should be snapped with respected to their task nodes using the snap offset. | |
| void | setSnapPortsToTask (bool val) |
| Controls if external task port nodes should be snapped with respected to their task nodes using the snap offset. | |
| double | snapPortOffset () const |
| Get/set the offset to be used when snapping task ports nodes with respect to their task nodes. More... | |
| void | setSnapPortOffset (double val) |
| Get/set the offset to be used when snapping task ports nodes with respect to their task nodes. More... | |
| bool | drawPortsToTaskCurves () const |
| Controls if external task port nodes should have a curve connecting it to their task nodes. | |
| void | setDrawPortsToTaskCurves (bool val) |
| Controls if external task port nodes should have a curve connecting it to their task nodes. | |
Public Member Functions inherited from smtk::extension::qtDiagramGenerator | |
| smtkTypenameMacroBase (qtDiagramGenerator) | |
| smtkSuperclassMacro (QObject) | |
| qtDiagramGenerator (const smtk::view::Information &info, const smtk::view::Configuration::Component &config, qtDiagram *parent) | |
| Create a generator from configuration information. | |
| qtDiagram * | diagram () const |
| Return the diagram this generator inserts content into. | |
| void | sceneCleared () |
| Called by subclasses to notify qtDiagramViewMode instances that the generator's items have been cleared. More... | |
| virtual void | updateScene (std::unordered_set< smtk::resource::PersistentObject * > &, std::unordered_set< smtk::resource::PersistentObject * > &, std::unordered_set< smtk::resource::PersistentObject * > &, const smtk::operation::Operation &, const smtk::operation::Operation::Result &) |
| Diagram update methodsCalled when an operation completes. More... | |
| virtual bool | addConfiguration (nlohmann::json &config) const |
| Save/load diagram state. More... | |
| virtual bool | configure (const nlohmann::json &config) |
| Fetch configuration data for this generator from the diagram's overall config. | |
Static Public Member Functions | |
| static std::shared_ptr< smtk::view::Configuration > | defaultConfiguration () |
| Return a qtDiagram configuration that will create a bare task editor. | |
Protected Member Functions | |
| template<bool RemoveUnusedArcs> | |
| bool | updateArcs (smtk::resource::PersistentObject *object, QRectF &modBounds, ArcLegendEntries &legendInfo) |
| Used to create/destroy arcs incident to the node for object. More... | |
| void | updateArcStatus (qtBaseArc *arc) |
| Determine visibility and pickability based on the current interaction mode and the current task-path. | |
Protected Member Functions inherited from smtk::extension::qtDiagramGenerator | |
| void | addArcsOfNodeRecursive (qtBaseNode *node, std::unordered_set< qtBaseArc * > &arcs) |
| Used by updateArcsOfNodeRecursive to find arcs attached to node and all its children. | |
Protected Attributes | |
| Internal * | m_p |
| qtTaskPath * | m_taskPath { nullptr } |
| bool | m_snapPortsToTask { false } |
| double | m_snapPortOffset { 0.0 } |
| bool | m_drawPortsToTaskCurves { true } |
Protected Attributes inherited from smtk::extension::qtDiagramGenerator | |
| qtDiagram * | m_diagram { nullptr } |
| The parent diagram. | |
Additional Inherited Members | |
Public Types inherited from smtk::extension::qtDiagramGenerator | |
| using | ArcLegendEntries = std::unordered_map< smtk::string::Token, qtDiagramLegendEntry * > |
| Subclasses may use this to pass information about arc types registered with the legend. | |
Public Slots inherited from smtk::extension::qtDiagramGenerator | |
| void | updateArcsOfSendingNodeRecursive () |
| Identify arcs that need updating when a node is moved. More... | |
| void | updateArcsOfNodeRecursive (qtBaseNode *node) |
| Identify arcs that need updating when a node (not necessarily a leaf node) is moved. | |
A widget that displays SMTK tasks available to users in a diagram.
|
inline |
Get/set the offset to be used when snapping task ports nodes with respect to their task nodes.
Note that the offset should be a positive value.
|
inline |
Get/set the offset to be used when snapping task ports nodes with respect to their task nodes.
Note that the offset should be a positive value.
|
protected |
Used to create/destroy arcs incident to the node for object.
As this method creates arcs, it will call updateArcStatus() on them to ensure they match the current diagram mode/state.
|
overridevirtual |
Diagram update methodsCalled when an operation completes.
Each diagram generator is invoked with the same values and a generator prior to this instance may already have created or expunged items in the scene corresponding to the created or expunged objects; be sure to check the diagram's node index before blindly adding/removing scene items.
Implements smtk::extension::qtDiagramGenerator.
|
overridevirtual |
Diagram update methodsCalled when an operation completes.
Each diagram generator is invoked with the same values and a generator prior to this instance may already have created or expunged items in the scene corresponding to the created or expunged objects; be sure to check the diagram's node index before blindly adding/removing scene items.
Reimplemented from smtk::extension::qtDiagramGenerator.
| void smtk::extension::qtTaskEditor::updateVisibility | ( | const smtk::task::Task * | prevTailTask, |
| const smtk::task::Task * | nextTailTask | ||
| ) |
Update the visibility of tasks, ports and related arcs.
This is called when the active task is changed.
1.8.17