X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fmainapp%2Fgraphicview.h;h=94e5be2c50fa4f20a736bedf7e13834ee93fbf87;hb=c715d05d11ffe2913fe3465ec43d456ee9b85964;hp=e2d7b5456a39912eaee93d74764e3b3d07960c2c;hpb=937ade06241548bfbc7858705b3ce1c7778c3d88;p=architektonas diff --git a/src/mainapp/graphicview.h b/src/mainapp/graphicview.h index e2d7b54..94e5be2 100644 --- a/src/mainapp/graphicview.h +++ b/src/mainapp/graphicview.h @@ -4,6 +4,7 @@ #include #include "rs.h" #include "rs_color.h" +#include "rs_preview.h" #include "rs_snapper.h" #include "vector.h" @@ -50,10 +51,6 @@ class GraphicView /** This virtual method must be overwritten and is then called whenever the view changed */ virtual void adjustZoomControls(); - /** - * Sets an external painter device. - */ - virtual void setPainter(PaintInterface * p); virtual void setBackground(const RS_Color & bg); RS_Color getBackground(); @@ -203,8 +200,9 @@ class GraphicView void SetPreviewMode(bool mode = true); void SetPreviewEntity(RS_Preview *); void SetPreviewOffset(Vector); - void SetSnapperDraw(bool); - void SetSnapperVars(Vector snapSpot, Vector snapCoord, bool showCrosshairs); +//We can remove this now... +// void SetSnapperDraw(bool); +// void SetSnapperVars(Vector snapSpot, Vector snapCoord, bool showCrosshairs); protected: RS_EntityContainer * container; @@ -287,16 +285,17 @@ class GraphicView // We use this here instead of deriving ActionInterface from it because // this makes more sense. RS_Snapper snapper; + RS_Preview preview; protected: // crap to make painting with update() possible RS_Preview * previewEntity; bool previewMode; Vector previewOffset; - bool snapperDraw; - Vector snapSpot1; - Vector snapCoord1; - bool showCrosshairs1; +// bool snapperDraw; +// Vector snapSpot1; +// Vector snapCoord1; +// bool showCrosshairs1; //QG protected: @@ -327,8 +326,7 @@ class GraphicView #endif // __GRAPHICVIEW_H__ #if 0 -class QG_GraphicView: public QWidget, public RS_GraphicView, //public Q3FilePreview, - public RS_LayerListListener, public RS_BlockListListener +class QG_GraphicView: public QWidget, public RS_GraphicView { Q_OBJECT @@ -341,21 +339,10 @@ 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); - // Methods from RS_LayerListListener Interface: - virtual void layerEdited(RS_Layer *); - virtual void layerRemoved(RS_Layer *); - virtual void layerToggled(RS_Layer *); - protected: virtual void emulateMouseMoveEvent(); virtual void mousePressEvent(QMouseEvent * e); @@ -373,50 +360,8 @@ class QG_GraphicView: public QWidget, public RS_GraphicView, //public Q3FilePrev void paintEvent(QPaintEvent *); virtual void resizeEvent(QResizeEvent * e); -#warning "!!! File preview needs porting to Qt4 !!!" -// void previewUrl(const Q3Url &u); - private slots: void slotHScrolled(int value); void slotVScrolled(int value); - - private: -#warning "!!! Double buffering is not necessary anymore !!!" - //! Buffer for double-buffering - QPixmap * buffer; -// int refCount; - - protected: - int lastWidth; - int lastHeight; - //! Horizontal scrollbar. - QG_ScrollBar * hScrollBar; - //! Vertical scrollbar. - QG_ScrollBar * vScrollBar; - //! Layout used to fit in the view and the scrollbars. - QGridLayout * layout; - //! Label for grid spacing. - QLabel * gridStatus; - //! CAD mouse cursor - QCursor * curCad; - //! Delete mouse cursor - QCursor * curDel; - //! Select mouse cursor - QCursor * curSelect; - //! Magnifying glass mouse cursor - QCursor * curMagnifier; - //! Hand mouse cursor - QCursor * curHand; -}; -#endif - -#if 0 -class QC_GraphicView: public QG_GraphicView -{ - public: - QC_GraphicView(RS_Document * doc, QWidget * parent = 0); - virtual ~QC_GraphicView(); - - virtual void drawIt(); }; #endif