Salome HOME
refs #30 - Sketch base GUI: create, draw lines
[modules/shaper.git] / src / XGUI / XGUI_ViewWindow.h
index 0af119b372227aba44c5e5a230cedf8d7dadc110..77b966d860a0901ba6eeac2250bab8db8f3c3c03 100644 (file)
@@ -190,6 +190,8 @@ protected:
 
   virtual bool eventFilter(QObject *theObj, QEvent *theEvent);
 
+  virtual void showEvent(QShowEvent* theEvent);
+
 private slots:
   void onClose();
   void onMinimize();
@@ -297,20 +299,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;
 };
 
 //******************************************************
@@ -323,22 +324,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