SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
A widget that holds a Qt scene graph. More...
#include <qtDiagramView.h>
Classes | |
class | Internal |
Public Types | |
using | Superclass = QGraphicsView |
Public Member Functions | |
qtDiagramView (qtDiagramScene *scene, qtDiagram *widget=nullptr) | |
qtDiagram * | diagram () const |
void | addModeSnapback (Qt::Key snapBackOnReleaseKey, smtk::string::Token snapToMode) |
Temporarily change modes until snapBackOnReleaseKey is released. More... | |
Protected Attributes | |
Internal * | m_p |
A widget that holds a Qt scene graph.
void smtk::extension::qtDiagramView::addModeSnapback | ( | Qt::Key | snapBackOnReleaseKey, |
smtk::string::Token | snapToMode | ||
) |
Temporarily change modes until snapBackOnReleaseKey is released.
When qtDiagramViewMode classes capture key presses (and only presses, not releases) in order to use modifier keys to switch modes temporarily, they can call this method on the view and, when the key is released by the user, the mode will revert from the snapToMode back to the mode before addModeSnapback was invoked.