Changeset 11158 in ntrip for trunk/BNC/qwt/qwt_panner.h
- Timestamp:
- Nov 3, 2026, 10:53:35 AM (4 weeks ago)
- File:
-
- 1 edited
-
trunk/BNC/qwt/qwt_panner.h (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/qwt/qwt_panner.h
r9383 r11158 1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*-*****************************1 /****************************************************************************** 2 2 * Qwt Widget Library 3 3 * Copyright (C) 1997 Josef Wilgen … … 9 9 10 10 #ifndef QWT_PANNER_H 11 #define QWT_PANNER_H 111 #define QWT_PANNER_H 12 12 13 13 #include "qwt_global.h" 14 14 #include <qwidget.h> 15 #include <qpixmap.h>16 15 17 16 class QCursor; 17 class QPixmap; 18 18 19 19 /*! 20 \brief QwtPanner provides panning of a widget 20 \brief QwtPanner provides panning of a widget 21 21 22 QwtPanner grabs the contents of a widget, that can be dragged 23 in all directions. The offset between the start and the end position 24 is emitted by the panned signal. 22 QwtPanner grabs the contents of a widget, that can be dragged 23 in all directions. The offset between the start and the end position 24 is emitted by the panned signal. 25 25 26 QwtPanner grabs the content of the widget into a pixmap and moves 27 the pixmap around, without initiating any repaint events for the widget. 28 Areas, that are not part of content are not painted while panning. 29 This makes panning fast enough for widgets, where 30 repaints are too slow for mouse movements. 26 QwtPanner grabs the content of the widget into a pixmap and moves 27 the pixmap around, without initiating any repaint events for the widget. 28 Areas, that are not part of content are not painted while panning. 29 This makes panning fast enough for widgets, where 30 repaints are too slow for mouse movements. 31 31 32 For widgets, where repaints are very fast it might be better to 33 implement panning manually by mapping mouse events into paint events. 34 */ 35 class QWT_EXPORT QwtPanner: public QWidget 32 For widgets, where repaints are very fast it might be better to 33 implement panning manually by mapping mouse events into paint events. 34 */ 35 class QWT_EXPORT QwtPanner : public QWidget 36 36 { 37 37 Q_OBJECT 38 38 39 public: 40 QwtPanner( QWidget* parent ); 39 public: 40 explicit QwtPanner( QWidget* parent ); 41 41 virtual ~QwtPanner(); 42 42 … … 46 46 void setMouseButton( Qt::MouseButton, 47 47 Qt::KeyboardModifiers = Qt::NoModifier ); 48 void getMouseButton( Qt::MouseButton &button,49 Qt::KeyboardModifiers & ) const;48 void getMouseButton( Qt::MouseButton& button, 49 Qt::KeyboardModifiers& ) const; 50 50 51 51 void setAbortKey( int key, Qt::KeyboardModifiers = Qt::NoModifier ); 52 void getAbortKey( int &key, Qt::KeyboardModifiers& ) const;52 void getAbortKey( int& key, Qt::KeyboardModifiers& ) const; 53 53 54 void setCursor( const QCursor & );54 void setCursor( const QCursor& ); 55 55 const QCursor cursor() const; 56 56 … … 60 60 bool isOrientationEnabled( Qt::Orientation ) const; 61 61 62 virtual bool eventFilter( QObject *, QEvent* );62 virtual bool eventFilter( QObject*, QEvent* ) QWT_OVERRIDE; 63 63 64 Q_SIGNALS: 64 Q_SIGNALS: 65 65 /*! 66 Signal emitted, when panning is done 66 Signal emitted, when panning is done 67 67 68 \param dx Offset in horizontal direction 69 \param dy Offset in vertical direction 70 */ 68 \param dx Offset in horizontal direction 69 \param dy Offset in vertical direction 70 */ 71 71 void panned( int dx, int dy ); 72 72 73 73 /*! 74 Signal emitted, while the widget moved, but panning 75 is not finished. 74 Signal emitted, while the widget moved, but panning 75 is not finished. 76 76 77 \param dx Offset in horizontal direction 78 \param dy Offset in vertical direction 79 */ 77 \param dx Offset in horizontal direction 78 \param dy Offset in vertical direction 79 */ 80 80 void moved( int dx, int dy ); 81 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 * );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 88 89 virtual void paintEvent( QPaintEvent * );89 virtual void paintEvent( QPaintEvent* ) QWT_OVERRIDE; 90 90 91 91 virtual QBitmap contentsMask() const; 92 92 virtual QPixmap grab() const; 93 93 94 private: 94 private: 95 95 #ifndef QT_NO_CURSOR 96 96 void showCursor( bool ); … … 98 98 99 99 class PrivateData; 100 PrivateData *d_data;100 PrivateData* m_data; 101 101 }; 102 102
Note:
See TracChangeset
for help on using the changeset viewer.
