X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_RubberBand.h;h=e31eafdee1a4fd9ab509fe594ec27b865815e907;hb=b5e6786b95d33825a3d1537d5453492e774d6399;hp=2f620996eeb280feff9f5ee50b09e1e43028fd6e;hpb=7682dee5122d928f4f59f8ee6a5ad4c110fb2ec2;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_RubberBand.h b/src/XGUI/XGUI_RubberBand.h index 2f620996e..e31eafdee 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 -protected: - XGUI_AbstractRubberBand( QWidget* ); +Q_OBJECT + protected: + XGUI_AbstractRubberBand(QWidget*); -public: + 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* ); + protected: + 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; + protected: + QPolygon myPoints; - bool myIsClosed; + bool myIsClosed; }; - -class XGUI_RectRubberBand: public XGUI_AbstractRubberBand +/*! + \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* ); + public: + 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 +class XGUI_PolyRubberBand : public XGUI_AbstractRubberBand { - Q_OBJECT +Q_OBJECT -public: - XGUI_PolyRubberBand( QWidget* ); + public: + 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