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
15 * Instances of this class can be linked to layer lists using
16 * addLayerListListener().
18 class QG_GraphicView: public QWidget, public GraphicView//, public Q3FilePreview
23 QG_GraphicView(QWidget * parent = 0, const char * name = 0, Qt::WindowFlags f = 0);
24 QG_GraphicView(Document * doc, QWidget * parent = 0);
25 virtual ~QG_GraphicView();
27 virtual int getWidth();
28 virtual int getHeight();
29 virtual void redraw();
30 virtual void adjustOffsetControls();
31 virtual void adjustZoomControls();
32 virtual void setBackground(const Color & bg);
33 virtual void setMouseCursor(RS2::CursorType c);
34 virtual void updateGridStatusWidget(const QString & text);
36 // This is just crap. Why have a klunky listener interface when we have slots/signals???
37 // That's what I thought!!!
38 // Methods from LayerListListener Interface:
39 // virtual void layerEdited(Layer *);
40 // virtual void layerRemoved(Layer *);
41 // virtual void layerToggled(Layer *);
44 virtual void emulateMouseMoveEvent();
45 virtual void mousePressEvent(QMouseEvent * e);
46 virtual void mouseReleaseEvent(QMouseEvent * e);
47 virtual void mouseMoveEvent(QMouseEvent * e);
48 virtual void tabletEvent(QTabletEvent * e);
49 virtual void leaveEvent(QEvent *);
50 virtual void enterEvent(QEvent *);
51 virtual void focusInEvent(QFocusEvent *);
52 virtual void focusOutEvent(QFocusEvent *);
53 virtual void wheelEvent(QWheelEvent * e);
54 virtual void keyPressEvent(QKeyEvent * e);
55 virtual void keyReleaseEvent(QKeyEvent * e);
57 void paintEvent(QPaintEvent *);
58 virtual void resizeEvent(QResizeEvent * e);
60 #warning "!!! File preview needs porting to Qt4 !!!"
61 // void previewUrl(const Q3Url &u);
64 void CommonInitialization(void);
67 void slotHScrolled(int value);
68 void slotVScrolled(int value);
71 //#warning "!!! Double buffering is not necessary anymore !!!"
72 // //! Buffer for double-buffering
80 //! Horizontal scrollbar.
81 QScrollBar * hScrollBar;
82 //! Vertical scrollbar.
83 QScrollBar * vScrollBar;
84 //! Layout used to fit in the view and the scrollbars.
86 //! Label for grid spacing.
90 //! Delete mouse cursor
92 //! Select mouse cursor
94 //! Magnifying glass mouse cursor
95 QCursor * curMagnifier;