SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
smtk::extension::qtTaskEditor Class Reference

A widget that displays SMTK tasks available to users in a diagram. More...

#include <qtTaskEditor.h>

Inheritance diagram for smtk::extension::qtTaskEditor:
[legend]
Collaboration diagram for smtk::extension::qtTaskEditor:
[legend]

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 updateScene (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.
 
- 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.
 
qtDiagramdiagram () 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 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::ConfigurationdefaultConfiguration ()
 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)
 

Protected Attributes

Internalm_p
 
- Protected Attributes inherited from smtk::extension::qtDiagramGenerator
qtDiagramm_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.
 

Detailed Description

A widget that displays SMTK tasks available to users in a diagram.

Member Function Documentation

◆ updateScene()

void smtk::extension::qtTaskEditor::updateScene ( 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 
)
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.


The documentation for this class was generated from the following files: