21 QVector<QwtPicker *> pickers;
23 QObjectList children = w->children();
24 for (
int i = 0;
i < children.size();
i++ )
91 setAttribute( Qt::WA_TransparentForMouseEvents );
92 setAttribute( Qt::WA_NoSystemBackground );
93 setFocusPolicy( Qt::NoFocus );
110 Qt::KeyboardModifiers modifiers )
118 Qt::KeyboardModifiers &modifiers )
const 132 Qt::KeyboardModifiers modifiers )
140 Qt::KeyboardModifiers &modifiers )
const 171 if ( parentWidget() )
172 return parentWidget()->cursor();
193 QWidget *
w = parentWidget();
198 w->installEventFilter(
this );
202 w->removeEventFilter(
this );
258 r.moveCenter( QPoint( r.center().x() + dx, r.center().y() + dy ) );
260 QPixmap pm(
size() );
263 QPainter painter( &pm );
269 painter.drawPixmap( r, masked );
281 painter.begin(
this );
282 painter.setClipRegion( pe->region() );
283 painter.drawPixmap( 0, 0, pm );
306 #if QT_VERSION >= 0x050000 307 return parentWidget()->grab( parentWidget()->rect() );
309 return QPixmap::grabWidget( parentWidget() );
330 if (
object == NULL ||
object != parentWidget() )
333 switch ( event->type() )
335 case QEvent::MouseButtonPress:
340 case QEvent::MouseMove:
345 case QEvent::MouseButtonRelease:
350 case QEvent::KeyPress:
355 case QEvent::KeyRelease:
387 QWidget *
w = parentWidget();
397 setGeometry( parentWidget()->rect() );
401 for (
int i = 0;
i < pickers.size();
i++ )
407 for (
int i = 0;
i < pickers.size();
i++ )
424 QPoint pos = mouseEvent->pos();
430 if ( pos !=
d_data->
pos && rect().contains( pos ) )
456 QPoint pos = mouseEvent->pos();
502 Q_UNUSED( keyEvent );
511 QWidget *
w = parentWidget();
519 if ( w->testAttribute( Qt::WA_SetCursor ) )
const QCursor cursor() const
virtual void widgetKeyReleaseEvent(QKeyEvent *)
QwtPanner(QWidget *parent)
static void fillPixmap(const QWidget *, QPixmap &, const QPoint &offset=QPoint())
void setCursor(const QCursor &)
void setOrientations(Qt::Orientations)
void setAbortKey(int key, Qt::KeyboardModifiers=Qt::NoModifier)
virtual QBitmap contentsMask() const
Calculate a mask for the contents of the panned widget.
void moved(int dx, int dy)
virtual void widgetMouseMoveEvent(QMouseEvent *)
virtual void widgetMouseReleaseEvent(QMouseEvent *)
Qt::KeyboardModifiers abortKeyModifiers
bool isOrientationEnabled(Qt::Orientation) const
virtual void paintEvent(QPaintEvent *)
Paint event.
virtual void widgetKeyPressEvent(QKeyEvent *)
void update(const std::string &key, const XmlRpc::XmlRpcValue &v)
Qt::Orientations orientations
virtual void widgetMousePressEvent(QMouseEvent *)
void panned(int dx, int dy)
Qt::Orientations orientations() const
Return the orientation, where paning is enabled.
void getAbortKey(int &key, Qt::KeyboardModifiers &) const
Get the abort key and modifiers.
virtual QPixmap grab() const
virtual ~QwtPanner()
Destructor.
TFSIMD_FORCE_INLINE const tfScalar & w() const
Qt::KeyboardModifiers buttonModifiers
static QVector< QwtPicker * > qwtActivePickers(QWidget *w)
void setMouseButton(Qt::MouseButton, Qt::KeyboardModifiers=Qt::NoModifier)
virtual bool eventFilter(QObject *, QEvent *)
Event filter.
void setEnabled(bool)
En/disable the panner.
QwtPicker provides selections on a widget.
void getMouseButton(Qt::MouseButton &button, Qt::KeyboardModifiers &) const
Get mouse button and modifiers used for panning.