X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_RubberBand.h;h=3f6199af9e222f8f9725b1451847227c6a0577a0;hb=d86c77d1c6210bbe04fbc3e5b00f9e212e1ec930;hp=2f620996eeb280feff9f5ee50b09e1e43028fd6e;hpb=7682dee5122d928f4f59f8ee6a5ad4c110fb2ec2;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_RubberBand.h b/src/XGUI/XGUI_RubberBand.h index 2f620996e..3f6199af9 100644 --- a/src/XGUI/XGUI_RubberBand.h +++ b/src/XGUI/XGUI_RubberBand.h @@ -1,72 +1,83 @@ - #ifndef XGUI_RubberBand_H #define XGUI_RubberBand_H +#include "XGUI.h" #include - -class XGUI_AbstractRubberBand : public QWidget +/*! + \class XGUI_AbstractRubberBand + \ingroup GUI + \brief Analog of class QRubberBand with possibility of creation non-rectangular contour for selection. + + Currently this class does not support Style functionality in full. +*/ +class XGUI_EXPORT XGUI_AbstractRubberBand: public QWidget { - Q_OBJECT +Q_OBJECT protected: - XGUI_AbstractRubberBand( QWidget* ); + XGUI_AbstractRubberBand(QWidget*); public: virtual ~XGUI_AbstractRubberBand(); - virtual void clearGeometry(); + virtual void clearGeometry(); - bool isClosed(); + bool isClosed(); protected: - virtual void paintEvent( QPaintEvent* ); - virtual void showEvent( QShowEvent* ); - virtual void moveEvent( QMoveEvent* ); - virtual void resizeEvent( QResizeEvent* ); + virtual void paintEvent(QPaintEvent*); + virtual void showEvent(QShowEvent*); + virtual void moveEvent(QMoveEvent*); + virtual void resizeEvent(QResizeEvent*); - virtual bool eventFilter( QObject*, QEvent* ); + virtual bool eventFilter(QObject*, QEvent*); - virtual void updateMask(); + virtual void updateMask(); protected: - QPolygon myPoints; + QPolygon myPoints; - bool myIsClosed; + bool myIsClosed; }; - +/*! + \class XGUI_RectRubberBand + \ingroup GUI + \brief Analog of class QRubberBand with possibility of creation non-rectangular contour for selection. + + Redefinition for rectangular rubber band +*/ class XGUI_RectRubberBand: public XGUI_AbstractRubberBand { - Q_OBJECT +Q_OBJECT public: - XGUI_RectRubberBand( QWidget* ); + XGUI_RectRubberBand(QWidget*); virtual ~XGUI_RectRubberBand(); - void initGeometry( const QRect& ); - void setStartPoint( const QPoint& ); - void setEndPoint( const QPoint& ); - - virtual void clearGeometry(); + void initGeometry(const QRect&); + void setStartPoint(const QPoint&); + void setEndPoint(const QPoint&); + + virtual void clearGeometry(); }; class XGUI_PolyRubberBand: public XGUI_AbstractRubberBand { - Q_OBJECT +Q_OBJECT public: - XGUI_PolyRubberBand( QWidget* ); + XGUI_PolyRubberBand(QWidget*); virtual ~XGUI_PolyRubberBand(); - void initGeometry( const QPolygon& ); - void initGeometry( const QPoint& ); + void initGeometry(const QPolygon&); + void initGeometry(const QPoint&); - void addNode( const QPoint& ); - void replaceLastNode( const QPoint& ); - void removeLastNode(); + void addNode(const QPoint&); + void replaceLastNode(const QPoint&); + void removeLastNode(); - void setClosed( bool ); + void setClosed(bool); }; - -#endif \ No newline at end of file +#endif