]> Shamusworld >> Repos - architektonas/blobdiff - src/widgets/qg_graphicview.h
Refactored CAD tool bars to use predefined actions.
[architektonas] / src / widgets / qg_graphicview.h
index 09a4333fbcd3f3a0b510171b616e4d9c3f91d580..2a5c3a8d1848c465ec22fa7d17be423e697295dc 100644 (file)
@@ -2,13 +2,14 @@
 #define QG_GRAPHICVIEW_H
 
 #include <QtGui>
-#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 +18,15 @@ class PaintInterface;
  * 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 RS_GraphicView, //public Q3FilePreview,
+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,12 +34,6 @@ 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);
@@ -66,6 +63,9 @@ 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);