X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_ViewWindow.h;h=77b966d860a0901ba6eeac2250bab8db8f3c3c03;hb=3ccd62a2eedaf895c689d77ab4bfc698a592870e;hp=0af119b372227aba44c5e5a230cedf8d7dadc110;hpb=6aeb748cc6eeb2bb86d34e9669ca6ceb8e4d0a55;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_ViewWindow.h b/src/XGUI/XGUI_ViewWindow.h index 0af119b37..77b966d86 100644 --- a/src/XGUI/XGUI_ViewWindow.h +++ b/src/XGUI/XGUI_ViewWindow.h @@ -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