//! Sets the current view window closable or not
void setClosable( const bool isClosable ) { myClosable = isClosable; }
+ //! Enable/Disable drawing of ribbon line
+ void enableDrawMode(bool toEnable) { myEnableDrawMode = toEnable; }
+
+ //! 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);
void windowDeactivated();
protected:
- virtual void resizeEvent(QResizeEvent* theEvent);
-
virtual void changeEvent(QEvent* theEvent);
- //virtual void enterEvent(QEvent* theEvent);
- //virtual void leaveEvent(QEvent* theEvent);
-
virtual bool eventFilter(QObject *theObj, QEvent *theEvent);
+ virtual void showEvent(QShowEvent* theEvent);
+
+ virtual void contextMenuEvent(QContextMenuEvent* theEvent);
+
private slots:
void onClose();
void onMinimize();
{
Q_OBJECT
public:
- ViewerToolbar(QWidget* theParent, XGUI_ViewPort* thePort)
- : QToolBar(theParent), myVPort(thePort)
- {
- setBackgroundRole(QPalette::NoRole);
- setAttribute(Qt::WA_NoSystemBackground);
- setAttribute(Qt::WA_PaintOnScreen);
- }
+ ViewerToolbar(QWidget* theParent, XGUI_ViewPort* thePort);
+
+protected slots:
+ void onViewPortResized() { myResize = true; }
protected:
virtual void paintEvent(QPaintEvent* theEvent);
+
+
private:
XGUI_ViewPort* myVPort;
+ bool myResize;
};
//******************************************************
{
Q_OBJECT
public:
- ViewerLabel(QWidget* theParent, XGUI_ViewPort* thePort)
- : QLabel(theParent), myVPort(thePort)
- {
- setBackgroundRole(QPalette::NoRole);
- setAttribute(Qt::WA_NoSystemBackground);
- setAttribute(Qt::WA_PaintOnScreen);
- }
+ 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