Mouse manager for the Qt4 graphics framework.
Mouse management for the Qt4 graphics framework is implemented by a set of MouseMode objects, that provide specific event handlers and behave like a descriptor, and a manager object that catches mouse events and dispatch them to the appropriate hendler.
The MouseManager provides methods for eddeing/removing mouse modes, making the system expandible, and also methods to register objects (QGraphicsScene and QGraphicsView) to be controlled.
Classes
MouseManager([parent, stdmodes]) | |
MouseMode | Base class for mouse mode desctiptors. |
PointerMode | |
RubberBandMode | Mouse mode for rubber band selection. |
ScrollHandMode |
Bases: PyQt4.QtCore.QObject
mouse mode name
SIGNAL: it is emitted when the mouse mode is changed
C++ signature: | void modeChanged(const QString&) |
---|
Bases: PyQt4.QtCore.QObject
Base class for mouse mode desctiptors.
Qt Graphics Framework mouse mode descriptors define some basic property for mouse related matters:
The first three properties (not to be intender as python progremming language property) are strongly characterizing of the way the mouse works.
In particular the eventFilter method is used to filter all events coming from graphics scenes an graphics views.
Note
in order to work properly the eventFilter should be installed on both graphics scene and view and also on the scrollbars of the graphics view. So please always use the register method of MouseManager for a proper installaton of al event filters.
Basic implementation of the eventFilter method.
The dafault implementation makes some basic operation such setting the mouse cursor anc dispatch the event to specific methods:
In most of the cases derived classes only need to specialize one or more of this specific methods.
Bases: gsdview.mousemanager.MouseMode
Bases: gsdview.mousemanager.MouseMode
Mouse mode for rubber band selection.
Signals : |
---|
SIGNAL: it is emitted when a rectangular area is selected
C++ signature: | void rubberBandSeclection(const QRectF&) |
---|