X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fwidgets%2Fqg_graphicview.h;h=b870809af51e246809d768aaa13defae1bd895d3;hb=d774c2655ba2c3657a565f325411144452392277;hp=b509421ec406b24d31300d342995b24084f61183;hpb=16ce54abf01ca3032e42a5bb11a4afcf9014dcca;p=architektonas diff --git a/src/widgets/qg_graphicview.h b/src/widgets/qg_graphicview.h index b509421..b870809 100644 --- a/src/widgets/qg_graphicview.h +++ b/src/widgets/qg_graphicview.h @@ -2,13 +2,13 @@ #define QG_GRAPHICVIEW_H #include -#include "rs_graphicview.h" +#include "graphicview.h" #include "rs_layerlistlistener.h" #include "rs_blocklistlistener.h" -#include "qg_scrollbar.h" -class RS_Preview; +class RS_Document; class PaintInterface; +class RS_Preview; /** * This is the Qt implementation of a widget which can view a @@ -17,13 +17,14 @@ class PaintInterface; * Instances of this class can be linked to layer lists using * addLayerListListener(). */ -class QG_GraphicView: public QWidget, public RS_GraphicView, //public Q3FilePreview, - public RS_LayerListListener, public RS_BlockListListener +class QG_GraphicView: public QWidget, public GraphicView//, //public Q3FilePreview, +// public RS_LayerListListener, public RS_BlockListListener { Q_OBJECT public: QG_GraphicView(QWidget * parent = 0, const char * name = 0, Qt::WindowFlags f = 0); + QG_GraphicView(RS_Document * doc, QWidget * parent = 0); virtual ~QG_GraphicView(); virtual int getWidth(); @@ -31,20 +32,16 @@ class QG_GraphicView: public QWidget, public RS_GraphicView, //public Q3FilePrev virtual void redraw(); virtual void adjustOffsetControls(); virtual void adjustZoomControls(); -// virtual RS_Painter * createPainter(); -// virtual RS_Painter * createDirectPainter(); -#warning "!!! Need to scrub out all instances of createPainter and createDirectPainter !!!" - virtual PaintInterface * createPainter(); - virtual PaintInterface * createDirectPainter(); - virtual void destroyPainter(); virtual void setBackground(const RS_Color & bg); virtual void setMouseCursor(RS2::CursorType c); virtual void updateGridStatusWidget(const QString & text); +// This is just crap. Why have a klunky listener interface when we have slots/signals??? +// That's what I thought!!! // Methods from RS_LayerListListener Interface: - virtual void layerEdited(RS_Layer *); - virtual void layerRemoved(RS_Layer *); - virtual void layerToggled(RS_Layer *); +// virtual void layerEdited(RS_Layer *); +// virtual void layerRemoved(RS_Layer *); +// virtual void layerToggled(RS_Layer *); protected: virtual void emulateMouseMoveEvent(); @@ -66,23 +63,27 @@ class QG_GraphicView: public QWidget, public RS_GraphicView, //public Q3FilePrev #warning "!!! File preview needs porting to Qt4 !!!" // void previewUrl(const Q3Url &u); + private: + void CommonInitialization(void); + private slots: void slotHScrolled(int value); void slotVScrolled(int value); - private: -#warning "!!! Double buffering is not necessary anymore !!!" - //! Buffer for double-buffering - QPixmap * buffer; +// private: +//#warning "!!! Double buffering is not necessary anymore !!!" +// //! Buffer for double-buffering +// QPixmap * buffer; // int refCount; +#if 0 protected: int lastWidth; int lastHeight; //! Horizontal scrollbar. - QG_ScrollBar * hScrollBar; + QScrollBar * hScrollBar; //! Vertical scrollbar. - QG_ScrollBar * vScrollBar; + QScrollBar * vScrollBar; //! Layout used to fit in the view and the scrollbars. QGridLayout * layout; //! Label for grid spacing. @@ -97,6 +98,7 @@ class QG_GraphicView: public QWidget, public RS_GraphicView, //public Q3FilePrev QCursor * curMagnifier; //! Hand mouse cursor QCursor * curHand; +#endif }; #endif