SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
10 #ifndef smtk_extension_qtDiagramGenerator_h
11 #define smtk_extension_qtDiagramGenerator_h
13 #include "smtk/extension/qt/Exports.h"
15 #include "smtk/view/Information.h"
17 #include "smtk/operation/Operation.h"
19 #include "smtk/common/Managers.h"
20 #include "smtk/common/TypeContainer.h"
22 #include <QDragEnterEvent>
23 #include <QDragLeaveEvent>
24 #include <QDragMoveEvent>
28 #include <unordered_set>
36 class qtDiagramLegendEntry;
49 using ArcLegendEntries = std::unordered_map<smtk::string::Token, qtDiagramLegendEntry*>;
71 virtual void updateScene(
72 std::unordered_set<smtk::resource::PersistentObject*>& created,
73 std::unordered_set<smtk::resource::PersistentObject*>& modified,
74 std::unordered_set<smtk::resource::PersistentObject*>& expunged,
76 const smtk::operation::Operation::Result& result) = 0;
107 virtual void abortDrop(QDragLeaveEvent* event) { (void)event; }
145 #endif // smtk_extension_qtDiagramGenerator_h
The main namespace for the Simulation Modeling Tool Kit (SMTK).
Definition: doc.h:33
#define smtkTypenameMacroBase(...)
Add typedefs to a class for identifcation.
Definition: SharedFromThis.h:94
virtual void abortDrop(QDragLeaveEvent *event)
Clean up any drop preview; the user has aborted the drag-and-drop.
Definition: qtDiagramGenerator.h:107
virtual void moveDropPoint(QDragMoveEvent *event)
Update any drop preview to the location in the provided event.
Definition: qtDiagramGenerator.h:102
std::unordered_map< smtk::string::Token, qtDiagramLegendEntry * > ArcLegendEntries
Subclasses may use this to pass information about arc types registered with the legend.
Definition: qtDiagramGenerator.h:49
Operation is a base class for all SMTK operations.
Definition: Operation.h:61
A widget that displays diagrams of SMTK resources.
Definition: qtDiagram.h:70
virtual bool acceptDrop(QDropEvent *event)
Return true if this generator accepts the drag-and-drop data at the finalized location.
Definition: qtDiagramGenerator.h:112
#define smtkSuperclassMacro(...)
Add a typedef to the superclass of this class.
Definition: SharedFromThis.h:147
Configure one item in a view, which may contain children.
Definition: Configuration.h:32
qtDiagram * diagram() const
Return the diagram this generator inserts content into.
Definition: qtDiagramGenerator.h:60
virtual bool addConfiguration(nlohmann::json &config) const
Save/load diagram state.
Definition: qtDiagramGenerator.h:124
virtual bool acceptDropProposal(QDragEnterEvent *event)
Drag-and-drop support.
Definition: qtDiagramGenerator.h:93
virtual bool configure(const nlohmann::json &config)
Fetch configuration data for this generator from the diagram's overall config.
Definition: qtDiagramGenerator.h:131
A base class that maintains a diagram in the face of operations which modify the state of the diagram...
Definition: qtDiagramGenerator.h:41