SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
A mode where click+dragging on the background pans the view. More...
#include <qtPanMode.h>
Public Types | |
using | Superclass = qtDiagramViewMode |
![]() | |
using | Superclass = QObject |
Public Slots | |
virtual void | zoomToAll () |
virtual void | zoomToSelected () |
Public Member Functions | |
qtPanMode (qtDiagram *diagram, qtDiagramView *view, QToolBar *toolbar, QActionGroup *modeGroup) | |
Construct a mode for diagram and add it to toolbar and modeGroup. | |
virtual void | enableSelectionSensitiveActions () |
![]() | |
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 |
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 | removeSelection () |
void | addModeButtons () |
If zoom 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. | |
![]() | |
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_zoomToAll { nullptr } |
QAction * | m_zoomToSelected { nullptr } |
![]() | |
smtk::string::Token | m_modeName |
qtDiagram * | m_diagram { nullptr } |
QAction * | m_modeAction { nullptr } |
Friends | |
class | qtDiagram |
A mode where click+dragging on the background pans the view.
Pressing the shift key will temporarily (until the shift key is released) switch into qtSelectMode and allow rubber-band selection.
|
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.
|
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.