Salome HOME
Updates for stability of application
[modules/shaper.git] / src / XGUI / XGUI_ViewWindow.h
index e528138a3bd3ea331919fb9541de5c5c9047037a..65c2ae273cc87b9c50a25f7636d97de8515aff75 100644 (file)
@@ -93,6 +93,9 @@ public:
   //! Returns true if ribbon line drawing enabled
   bool isDrawModeEnabled() const { return myEnableDrawMode; }
 
+  //! Updates drawing mode in the view window
+  void updateEnabledDrawMode();
+
 signals:
   //! Emited whien view transformation operation is started
   void vpTransformationStarted(XGUI_ViewWindow::OperationType type);
@@ -192,6 +195,8 @@ protected:
 
   virtual void showEvent(QShowEvent* theEvent);
 
+  virtual void contextMenuEvent(QContextMenuEvent* theEvent);
+
 private slots:
   void onClose();
   void onMinimize();
@@ -299,20 +304,19 @@ class ViewerToolbar: public QToolBar
 {
 Q_OBJECT
 public:
-  ViewerToolbar(QWidget* theParent, XGUI_ViewPort* thePort)
-      : QToolBar(theParent), myVPort(thePort)
-  {
-    setBackgroundRole(QPalette::NoRole);
-    setAttribute(Qt::WA_NoSystemBackground);
-    //setAttribute(Qt::WA_PaintOnScreen);
-    setAutoFillBackground(false);
-  }
+  ViewerToolbar(QWidget* theParent, XGUI_ViewPort* thePort);
+
+protected slots:
+  void onViewPortResized() { myResize = true; }
 
 protected:
   virtual void paintEvent(QPaintEvent* theEvent);
 
+
+
 private:
   XGUI_ViewPort* myVPort;
+  bool myResize;
 };
 
 //******************************************************
@@ -325,22 +329,17 @@ class ViewerLabel: public QLabel
 {
 Q_OBJECT
 public:
-  ViewerLabel(QWidget* theParent, XGUI_ViewPort* thePort)
-      : QLabel(theParent), myVPort(thePort)
-  {
-    setBackgroundRole(QPalette::NoRole);
-    setAttribute(Qt::WA_NoSystemBackground);
-    //setAttribute(Qt::WA_PaintOnScreen);
-    setAutoFillBackground(false);
-  }
+  ViewerLabel(QWidget* theParent, XGUI_ViewPort* thePort);
 
-  void repaintBackground();
+protected slots:
+  void onViewPortResized() { myResize = true; }
 
 protected:
   virtual void paintEvent(QPaintEvent* theEvent);
 
 private:
   XGUI_ViewPort* myVPort;
+  bool myResize;
 };
 
 #endif