Salome HOME
Issue #101: Fixed editing of nested features
[modules/shaper.git] / src / XGUI / XGUI_ViewPort.h
index ccffe4f1a3f151059586973994053b23c490d751..7c2ad4b22182b3b0e9c068cc523885555be30ebe 100644 (file)
@@ -1,7 +1,9 @@
 #ifndef XGUI_ViewPort_H
 #define XGUI_ViewPort_H
 
-#include "XGUI_ViewBackground.h"
+#include "XGUI.h"
+
+#include <Qtx.h>
 
 #include <QWidget>
 #include <V3d_Viewer.hxx>
 
 class XGUI_ViewWindow;
 
-class XGUI_ViewPort: public QWidget
+class XGUI_EXPORT XGUI_ViewPort : public QWidget
 {
 Q_OBJECT
-public:
+ public:
   XGUI_ViewPort(XGUI_ViewWindow* theParent, const Handle(V3d_Viewer)& theViewer,
                 V3d_TypeOfView theType = V3d_ORTHOGRAPHIC);
-  ~XGUI_ViewPort();
+  virtual ~XGUI_ViewPort();
 
   virtual QPaintEngine* paintEngine() const
   {
@@ -40,7 +42,7 @@ public:
   void fitRect(const QRect& rect);
   void startZoomAtPoint(int x, int y);
   void zoom(int x0, int y0, int x, int y);
-    void fitAll(bool theKeepScale = false, bool theWithZ = true, bool theUpd = true);
+  void fitAll(bool theKeepScale = false, bool theWithZ = true, bool theUpd = true);
 
   void setAdvancedZoomingEnabled(const bool theState)
   {
@@ -51,24 +53,28 @@ public:
     return myIsAdvancedZoomingEnabled;
   }
 
-  XGUI_ViewBackground background() const
+  Qtx::BackgroundData background() const
   {
     return myBackground;
   }
-  void setBackground(const XGUI_ViewBackground& bgData);
+
+  void setBackground(const Qtx::BackgroundData& bgData);
+
+  void syncronizeWith(const XGUI_ViewPort* ref);
 
 signals:
-  void vpChangeBackground(const XGUI_ViewBackground&);
+  void vpChangeBackground(const Qtx::BackgroundData&);
   void vpClosed();
   void vpMapped();
   void vpTransformed();
   void vpUpdated();
+  void resized();
 
-protected:
+ protected:
   virtual void paintEvent(QPaintEvent*);
   virtual void resizeEvent(QResizeEvent*);
 
-private:
+ private:
   Handle(V3d_View) activeView() const
   {
     return myActiveView;
@@ -89,7 +95,7 @@ private:
 
   double myScale;
 
-  XGUI_ViewBackground myBackground;
+  Qtx::BackgroundData myBackground;
   int myBgImgHeight;
   int myBgImgWidth;
 };