Engauge Digitizer  2
ViewPreview.h
1 #ifndef VIEW_PREVIEW_H
2 #define VIEW_PREVIEW_H
3 
4 #include <QGraphicsView>
5 #include <QPointF>
6 
8 class ViewPreview : public QGraphicsView
9 {
10  Q_OBJECT;
11 
12 public:
14  ViewPreview(QGraphicsScene *scene,
15  QWidget *parent = 0);
16 
18  virtual void mouseMoveEvent(QMouseEvent *event);
19 
21  virtual void resizeEvent(QResizeEvent *event);
22 
23 signals:
25  void signalMouseMove (QPointF pos);
26 
27 private:
28  ViewPreview();
29 };
30 
31 #endif // VIEW_PREVIEW_H
void signalMouseMove(QPointF pos)
Forward the mouse move events.
virtual void mouseMoveEvent(QMouseEvent *event)
Intercept cursor move events and forward them.
Definition: ViewPreview.cpp:12
Class that modifies QGraphicsView to automatically expand/shrink the view to fit the window...
Definition: ViewPreview.h:8
virtual void resizeEvent(QResizeEvent *event)
Intercept resize events so we can rescale to the graphics items just fit into the resized window...
Definition: ViewPreview.cpp:19