Eneboo - Documentación para desarrolladores
Clases | Señales | Métodos públicos | Métodos protegidos
Referencia de la Clase QwtPanner

QwtPanner provides panning of a widget. Más...

#include <qwt_panner.h>

Diagrama de herencias de QwtPanner
QWidget QObject QPaintDevice QObject QPaintDevice Qt Qt Qt Qt QwtPlotPanner

Lista de todos los miembros.

Clases

class  PrivateData

Señales

void panned (int dx, int dy)
void moved (int dx, int dy)

Métodos públicos

 QwtPanner (QWidget *parent)
virtual ~QwtPanner ()
 Destructor.
void setEnabled (bool)
 En/disable the panner.
bool isEnabled () const
void setMouseButton (int button, int buttonState=Qt::NoButton)
void getMouseButton (int &button, int &buttonState) const
 Get the mouse button.
void setAbortKey (int key, int state=Qt::NoButton)
void getAbortKey (int &key, int &state) const
 Get the abort key.
void setCursor (const QCursor &)
const QCursor cursor () const
void enableOrientation (Qt::Orientation, bool enable)
bool isOrientationEnabled (Qt::Orientation) const
virtual bool eventFilter (QObject *, QEvent *)
 Event filter.

Métodos protegidos

virtual void widgetMousePressEvent (QMouseEvent *)
virtual void widgetMouseReleaseEvent (QMouseEvent *)
virtual void widgetMouseMoveEvent (QMouseEvent *)
virtual void widgetKeyPressEvent (QKeyEvent *)
virtual void widgetKeyReleaseEvent (QKeyEvent *)
virtual void paintEvent (QPaintEvent *)
 Paint event.

Descripción detallada

QwtPanner provides panning of a widget.

QwtPanner grabs the contents of a widget, that can be dragged in all directions. The offset between the start and the end position is emitted by the panned signal.

QwtPanner grabs the content of the widget into a pixmap and moves the pixmap around, without initiating any repaint events for the widget. Areas, that are not part of content are not painted while panning in in process. This makes panning fast enough for widgets, where repaints are too slow for mouse movements.

For widgets, where repaints are very fast it might be better to implement panning manually by mapping mouse events into paint events.


Documentación del constructor y destructor

QwtPanner::QwtPanner ( QWidget parent)

Creates an panner that is enabled for the left mouse button.

Parámetros:
parentParent widget to be panned
QwtPanner::~QwtPanner ( ) [virtual]

Destructor.


Documentación de las funciones miembro

const QCursor QwtPanner::cursor ( ) const
Devuelve:
Cursor that is active while panning
Ver también:
setCursor()

Reimplementado de QWidget.

void QwtPanner::enableOrientation ( Qt::Orientation  o,
bool  enable 
)
bool QwtPanner::eventFilter ( QObject o,
QEvent e 
) [virtual]

Event filter.

When isEnabled() the mouse events of the observed widget are filtered.

Ver también:
widgetMousePressEvent(), widgetMouseReleaseEvent(), widgetMouseMoveEvent()

Reimplementado de QObject.

void QwtPanner::getAbortKey ( int key,
int state 
) const

Get the abort key.

void QwtPanner::getMouseButton ( int button,
int buttonState 
) const

Get the mouse button.

bool QwtPanner::isEnabled ( ) const
Devuelve:
true when enabled, false otherwise
Ver también:
setEnabled, eventFilter()

Reimplementado de QWidget.

bool QwtPanner::isOrientationEnabled ( Qt::Orientation  o) const

Return true if a orientatio is enabled

Ver también:
orientations(), setOrientations()
void QwtPanner::moved ( int  dx,
int  dy 
) [signal]

Signal emitted, while the widget moved, but panning is not finished.

Parámetros:
dxOffset in horizontal direction
dyOffset in vertical direction
void QwtPanner::paintEvent ( QPaintEvent pe) [protected, virtual]

Paint event.

Repaint the grabbed pixmap on its current position and fill the empty spaces by the background of the parent widget.

Parámetros:
pePaint event

Reimplementado de QWidget.

void QwtPanner::panned ( int  dx,
int  dy 
) [signal]

Signal emitted, when panning is done

Parámetros:
dxOffset in horizontal direction
dyOffset in vertical direction
void QwtPanner::setAbortKey ( int  key,
int  state = Qt::NoButton 
)

Change the abort key The defaults are Qt::Key_Escape and Qt::NoButton

void QwtPanner::setCursor ( const QCursor cursor) [virtual]

Change the cursor, that is active while panning The default is the cursor of the parent widget.

Parámetros:
cursorNew cursor
Ver también:
setCursor()

Reimplementado de QWidget.

void QwtPanner::setEnabled ( bool  on) [virtual]

En/disable the panner.

When enabled is true an event filter is installed for the observed widget, otherwise the event filter is removed.

Parámetros:
ontrue or false
Ver también:
isEnabled(), eventFilter()

Reimplementado de QWidget.

void QwtPanner::setMouseButton ( int  button,
int  buttonState = Qt::NoButton 
)

Change the mouse button The defaults are Qt::LeftButton and Qt::NoButton

void QwtPanner::widgetKeyPressEvent ( QKeyEvent ke) [protected, virtual]

Handle a key press event for the observed widget.

Parámetros:
keKey event
Ver también:
eventFilter(), widgetKeyReleaseEvent()
void QwtPanner::widgetKeyReleaseEvent ( QKeyEvent ) [protected, virtual]

Handle a key release event for the observed widget.

Parámetros:
keKey event
Ver también:
eventFilter(), widgetKeyReleaseEvent()
void QwtPanner::widgetMouseMoveEvent ( QMouseEvent me) [protected, virtual]

Handle a mouse move event for the observed widget.

Parámetros:
meMouse event
Ver también:
eventFilter(), widgetMousePressEvent(), widgetMouseReleaseEvent()
void QwtPanner::widgetMousePressEvent ( QMouseEvent me) [protected, virtual]

Handle a mouse press event for the observed widget.

Parámetros:
meMouse event
Ver también:
eventFilter(), widgetMouseReleaseEvent(), widgetMouseMoveEvent(),
void QwtPanner::widgetMouseReleaseEvent ( QMouseEvent me) [protected, virtual]

Handle a mouse release event for the observed widget.

Parámetros:
meMouse event
Ver también:
eventFilter(), widgetMousePressEvent(), widgetMouseMoveEvent(),

La documentación para esta clase fue generada a partir de los siguientes ficheros:
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'