SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
Public Types | Public Slots | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
smtk::extension::qtSelectMode Class Reference

A mode where click+dragging on the background rubber-band selects nodes. More...

#include <qtSelectMode.h>

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

Public Types

using Superclass = qtDiagramViewMode
 
- Public Types inherited from smtk::extension::qtDiagramViewMode
using Superclass = QObject
 

Public Slots

virtual void alignLeft ()
 Horizontally align selected nodes.
 
virtual void alignHCenter ()
 
virtual void alignRight ()
 
virtual void alignTop ()
 Vertically align selected nodes.
 
virtual void alignVCenter ()
 
virtual void alignBottom ()
 
virtual void distributeHCenters ()
 Distribute selected nodes horizontally.
 
virtual void distributeHGaps ()
 
virtual void distributeVCenters ()
 Distribute selected nodes vertically.
 
virtual void distributeVGaps ()
 
virtual void layoutSelectedNodesWithTheirArcs ()
 Use graphviz to lay out selected nodes based on arcs between them (if built with graphviz).
 
virtual void enableSelectionSensitiveActions ()
 Called when the set of selected nodes changes.
 

Public Member Functions

 qtSelectMode (qtDiagram *diagram, qtDiagramView *view, QToolBar *toolbar, QActionGroup *modeGroup)
 Construct a mode for diagram and add it to toolbar and modeGroup.
 
- Public Member Functions inherited from smtk::extension::qtDiagramViewMode
 qtDiagramViewMode (smtk::string::Token modeName, qtDiagram *diagram, QToolBar *toolbar, QActionGroup *modeGroup)
 Construct a mode for diagram and add it to toolbar and modeGroup.
 
QAction * modeAction () const
 
bool isModeActive () const
 

Protected Member Functions

bool eventFilter (QObject *obj, QEvent *event) override
 Overriden to capture key presses that modulate modes and delete nodes.
 
void enterMode () override
 This method is called by the diagram as the mode is being changed to this class. More...
 
void exitMode () override
 This method is called by the diagram as the mode is being changed away from this class. More...
 
void addModeButtons ()
 If alignment/distribution actions do not exist, create them.
 
void showModeButtons (bool show=true)
 Called when this mode is entered/exited to show/hide alignment/distribution actions.
 
void changeSelectionSensitiveActions (bool enable)
 Called when the SMTK selection is updated to enable/disable actions that require a selection.
 
- Protected Member Functions inherited from smtk::extension::qtDiagramViewMode
virtual void sceneCleared (qtDiagramGenerator *=nullptr)
 This method is called by diagram generators as the scene is cleared. More...
 
virtual void updateFromOperation (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)
 This method is called by the diagram when an operation is observed. More...
 
bool removeSelectedObjects ()
 A method subclasses may call to invoke deleters on the view's selection.
 

Protected Attributes

QAction * m_alignLeft { nullptr }
 
QAction * m_alignHCenter { nullptr }
 
QAction * m_alignRight { nullptr }
 
QAction * m_alignTop { nullptr }
 
QAction * m_alignVCenter { nullptr }
 
QAction * m_alignBottom { nullptr }
 
QAction * m_distributeHCenters { nullptr }
 
QAction * m_distributeHGaps { nullptr }
 
QAction * m_distributeVCenters { nullptr }
 
QAction * m_distributeVGaps { nullptr }
 
QAction * m_relayoutNodes { nullptr }
 
QAction * m_resetViewportToBounds { nullptr }
 
smtk::view::SelectionObservers::Key m_selectionObserver
 
- Protected Attributes inherited from smtk::extension::qtDiagramViewMode
smtk::string::Token m_modeName
 
qtDiagramm_diagram { nullptr }
 
QAction * m_modeAction { nullptr }
 

Detailed Description

A mode where click+dragging on the background rubber-band selects nodes.

This mode does not select arcs.

See also
qtDisconnectMode to select arcs.

Member Function Documentation

◆ enterMode()

void smtk::extension::qtSelectMode::enterMode ( )
overrideprotectedvirtual

This method is called by the diagram as the mode is being changed to this class.

Subclasses should override this method to prepare the scene (such as enabling/disabling items in the scene, adding items to be drawn while the mode is active, etc.)

Reimplemented from smtk::extension::qtDiagramViewMode.

◆ exitMode()

void smtk::extension::qtSelectMode::exitMode ( )
overrideprotectedvirtual

This method is called by the diagram as the mode is being changed away from this class.

Subclasses should override this method to prepare the scene (such as enabling/disabling items in the scene, removing items drawn while the mode was active, etc.)

Reimplemented from smtk::extension::qtDiagramViewMode.


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