1 #ifndef QG_GRAPHICVIEW_H
2 #define QG_GRAPHICVIEW_H
5 #include "graphicview.h"
12 * This is the Qt implementation of a widget which can view a drawing.
14 class QG_GraphicView: public QWidget, public GraphicView
19 QG_GraphicView(QWidget * parent = 0, const char * name = 0, Qt::WindowFlags f = 0);
20 QG_GraphicView(Document * doc, QWidget * parent = 0);
21 virtual ~QG_GraphicView();
23 virtual int getWidth();
24 virtual int getHeight();
25 virtual void redraw();
26 virtual void adjustOffsetControls();
27 virtual void adjustZoomControls();
28 virtual void setBackground(const Color & bg);
29 virtual void setMouseCursor(RS2::CursorType c);
30 virtual void updateGridStatusWidget(const QString & text);
32 // This is just crap. Why have a klunky listener interface when we have slots/signals???
33 // That's what I thought!!!
34 // Methods from LayerListListener Interface:
35 // virtual void layerEdited(Layer *);
36 // virtual void layerRemoved(Layer *);
37 // virtual void layerToggled(Layer *);
40 virtual void emulateMouseMoveEvent();
41 virtual void mousePressEvent(QMouseEvent * e);
42 virtual void mouseReleaseEvent(QMouseEvent * e);
43 virtual void mouseMoveEvent(QMouseEvent * e);
44 virtual void tabletEvent(QTabletEvent * e);
45 virtual void leaveEvent(QEvent *);
46 virtual void enterEvent(QEvent *);
47 virtual void focusInEvent(QFocusEvent *);
48 virtual void focusOutEvent(QFocusEvent *);
49 virtual void wheelEvent(QWheelEvent * e);
50 virtual void keyPressEvent(QKeyEvent * e);
51 virtual void keyReleaseEvent(QKeyEvent * e);
53 void paintEvent(QPaintEvent *);
54 virtual void resizeEvent(QResizeEvent * e);
56 #warning "!!! File preview needs porting to Qt4 !!!"
57 // void previewUrl(const Q3Url &u);
60 void CommonInitialization(void);
63 void slotHScrolled(int value);
64 void slotVScrolled(int value);
67 //#warning "!!! Double buffering is not necessary anymore !!!"
68 // //! Buffer for double-buffering
76 //! Horizontal scrollbar.
77 QScrollBar * hScrollBar;
78 //! Vertical scrollbar.
79 QScrollBar * vScrollBar;
80 //! Layout used to fit in the view and the scrollbars.
82 //! Label for grid spacing.
86 //! Delete mouse cursor
88 //! Select mouse cursor
90 //! Magnifying glass mouse cursor
91 QCursor * curMagnifier;