UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
zq_rubberline.hpp
1 /* zq_rubberline.hpp */
2 /* $Id: zq_rubberline.hpp 20080 2009-12-15 15:57:52Z vlad $ */
3 #ifndef __zq_rubberline_hpp
4 #define __zq_rubberline_hpp
5 
6 #include <qrubberband.h>
7 
8 #include "zq_object.hpp"
9 
10 
16 class ZqRubberLine : public ZqObject
17 {
18 public:
19 
21  enum RangeMode {
22  Vertical = 0x01,
23  Horizontal = 0x02,
24  };
25 
26 
28  ZqRubberLine (const char* szName = NULL);
29 
31  ZqRubberLine (ZqbPlaceholder* pPh, const char* szName = NULL);
32 
34  virtual ~ZqRubberLine ();
35 
36 
39  virtual bool attachToPlace (ZqbPlaceholder* pPh);
40 
43  virtual bool detachFromPlace ();
44 
45  /*
46  * Properties
47  */
48 
50  virtual void setThickness (int iThickness);
51 
53  virtual int getThickness () const;
54 
57  virtual void setRangeMode (int mMode);
58 
61  virtual int getRangeMode () const;
62 
63 
64  /*
65  * Polymorphic methods
66  */
67 
69  virtual void redraw (QPainter& paint);
70 
73  virtual ZqbEventHint input (QEvent& event);
74 
77  virtual void setInputable (bool bFlag);
78 
81  virtual void line (QRect r);
82 
83 
84 protected:
85 
89  void drawRubberLine (const QRect& p);
90 
92  void hideRubberLine ();
93 
96  bool m_bDrawn;
97 
99  QRect m_qLine;
100  QPoint m_qCurrent, m_qStart;
101 
103  int m_iThickness;
104 
107  int m_mMode;
108 
110  QRubberBand *m_qRB;
111 
112 private:
113 
115  static int s_iNameCounter;
116 
117 };
118 
119 
120 #include "zq_rubberline_inline.hpp"
121 
122 
123 #endif /* zq_rubberline.hpp */
ZqRubberLine(const char *szName=NULL)
bool m_bDrawn
Definition: zq_rubberline.hpp:80
QRubberBand * m_qRB
Definition: zq_rubberline.hpp:110
virtual ~ZqRubberLine()
int m_mMode
Definition: zq_rubberline.hpp:91
Definition: zq_rubberline.hpp:14
virtual void setRangeMode(int mMode)
Definition: zq_rubberline_inline.hpp:47
Definition: zqb_placeholder.hpp:25
void hideRubberLine()
virtual int getRangeMode() const
Definition: zq_rubberline_inline.hpp:59
virtual void setInputable(bool bFlag)
virtual bool attachToPlace(ZqbPlaceholder *pPh)
void drawRubberLine(const QRect &p)
Definition: zq_rubberline.hpp:20
virtual void redraw()
Definition: zqb_visible.hpp:82
int m_iThickness
Definition: zq_rubberline.hpp:87
virtual void line(QRect r)
QRect m_qLine
Definition: zq_rubberline.hpp:83
RangeMode
Definition: zq_rubberline.hpp:19
Definition: zq_rubberline.hpp:21
virtual ZqbEventHint input(QEvent &event)
virtual void setThickness(int iThickness)
Definition: zq_rubberline_inline.hpp:23
virtual int getThickness() const
Definition: zq_rubberline_inline.hpp:34
Definition: zq_object.hpp:36
virtual bool detachFromPlace()