qwt_panner.h
Go to the documentation of this file.
1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
2  * Qwt Widget Library
3  * Copyright (C) 1997 Josef Wilgen
4  * Copyright (C) 2002 Uwe Rathmann
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the Qwt License, Version 1.0
8  *****************************************************************************/
9 
10 #ifndef QWT_PANNER_H
11 #define QWT_PANNER_H
12 
13 #include "qwt_global.h"
14 #include <qwidget.h>
15 
16 class QCursor;
17 class QPixmap;
18 
35 class QWT_EXPORT QwtPanner: public QWidget
36 {
37  Q_OBJECT
38 
39 public:
40  explicit QwtPanner( QWidget* parent );
41  virtual ~QwtPanner();
42 
43  void setEnabled( bool );
44  bool isEnabled() const;
45 
46  void setMouseButton( Qt::MouseButton,
47  Qt::KeyboardModifiers = Qt::NoModifier );
48  void getMouseButton( Qt::MouseButton &button,
49  Qt::KeyboardModifiers & ) const;
50 
51  void setAbortKey( int key, Qt::KeyboardModifiers = Qt::NoModifier );
52  void getAbortKey( int &key, Qt::KeyboardModifiers & ) const;
53 
54  void setCursor( const QCursor & );
55  const QCursor cursor() const;
56 
57  void setOrientations( Qt::Orientations );
58  Qt::Orientations orientations() const;
59 
60  bool isOrientationEnabled( Qt::Orientation ) const;
61 
62  virtual bool eventFilter( QObject *, QEvent * ) QWT_OVERRIDE;
63 
64 Q_SIGNALS:
71  void panned( int dx, int dy );
72 
80  void moved( int dx, int dy );
81 
82 protected:
83  virtual void widgetMousePressEvent( QMouseEvent * );
84  virtual void widgetMouseReleaseEvent( QMouseEvent * );
85  virtual void widgetMouseMoveEvent( QMouseEvent * );
86  virtual void widgetKeyPressEvent( QKeyEvent * );
87  virtual void widgetKeyReleaseEvent( QKeyEvent * );
88 
89  virtual void paintEvent( QPaintEvent * ) QWT_OVERRIDE;
90 
91  virtual QBitmap contentsMask() const;
92  virtual QPixmap grab() const;
93 
94 private:
95 #ifndef QT_NO_CURSOR
96  void showCursor( bool );
97 #endif
98 
99  class PrivateData;
101 };
102 
103 #endif
#define QWT_EXPORT
Definition: qwt_global.h:38
PrivateData * d_data
Definition: qwt_panner.h:99
QwtPanner provides panning of a widget.
Definition: qwt_panner.h:35
#define QWT_OVERRIDE
Definition: qwt_global.h:53


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 03:48:10