X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fwidgets%2Fqg_graphicview.h;h=7784ea977acfcd0289a60a4be526ef88bdd67f26;hb=5adb444f3e523d3fd028617ced72d1ea6661db21;hp=2a5c3a8d1848c465ec22fa7d17be423e697295dc;hpb=52b41ea9bcb03acb96393b36fe29f27ca0163565;p=architektonas diff --git a/src/widgets/qg_graphicview.h b/src/widgets/qg_graphicview.h index 2a5c3a8..7784ea9 100644 --- a/src/widgets/qg_graphicview.h +++ b/src/widgets/qg_graphicview.h @@ -3,13 +3,10 @@ #include #include "graphicview.h" -#include "rs_layerlistlistener.h" -#include "rs_blocklistlistener.h" -#include "qg_scrollbar.h" -class RS_Document; +class Document; class PaintInterface; -class RS_Preview; +class Preview; /** * This is the Qt implementation of a widget which can view a @@ -18,15 +15,13 @@ class RS_Preview; * Instances of this class can be linked to layer lists using * addLayerListListener(). */ -//class QG_GraphicView: public QWidget, public RS_GraphicView, //public Q3FilePreview, -class QG_GraphicView: public QWidget, public GraphicView, //public Q3FilePreview, - public RS_LayerListListener, public RS_BlockListListener +class QG_GraphicView: public QWidget, public GraphicView//, public Q3FilePreview { Q_OBJECT public: QG_GraphicView(QWidget * parent = 0, const char * name = 0, Qt::WindowFlags f = 0); - QG_GraphicView(RS_Document * doc, QWidget * parent = 0); + QG_GraphicView(Document * doc, QWidget * parent = 0); virtual ~QG_GraphicView(); virtual int getWidth(); @@ -34,14 +29,16 @@ class QG_GraphicView: public QWidget, public GraphicView, //public Q3FilePreview virtual void redraw(); virtual void adjustOffsetControls(); virtual void adjustZoomControls(); - virtual void setBackground(const RS_Color & bg); + virtual void setBackground(const Color & bg); virtual void setMouseCursor(RS2::CursorType c); virtual void updateGridStatusWidget(const QString & text); - // Methods from RS_LayerListListener Interface: - virtual void layerEdited(RS_Layer *); - virtual void layerRemoved(RS_Layer *); - virtual void layerToggled(RS_Layer *); +// This is just crap. Why have a klunky listener interface when we have slots/signals??? +// That's what I thought!!! + // Methods from LayerListListener Interface: +// virtual void layerEdited(Layer *); +// virtual void layerRemoved(Layer *); +// virtual void layerToggled(Layer *); protected: virtual void emulateMouseMoveEvent(); @@ -70,19 +67,20 @@ class QG_GraphicView: public QWidget, public GraphicView, //public Q3FilePreview 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 +95,7 @@ class QG_GraphicView: public QWidget, public GraphicView, //public Q3FilePreview QCursor * curMagnifier; //! Hand mouse cursor QCursor * curHand; +#endif }; #endif