X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_ViewWindow.h;h=65c2ae273cc87b9c50a25f7636d97de8515aff75;hb=d7f39bb5064d81ef383a672d5f38718369a13899;hp=0af119b372227aba44c5e5a230cedf8d7dadc110;hpb=ff8ca280553ca5b69794492d5c1c4b60b180959e;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_ViewWindow.h b/src/XGUI/XGUI_ViewWindow.h index 0af119b37..65c2ae273 100644 --- a/src/XGUI/XGUI_ViewWindow.h +++ b/src/XGUI/XGUI_ViewWindow.h @@ -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); @@ -190,6 +193,10 @@ protected: virtual bool eventFilter(QObject *theObj, QEvent *theEvent); + virtual void showEvent(QShowEvent* theEvent); + + virtual void contextMenuEvent(QContextMenuEvent* theEvent); + private slots: void onClose(); void onMinimize(); @@ -297,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; }; //****************************************************** @@ -323,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