UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
zqb_placeholder.hpp
1 /* zqb_placeholder.hpp */
2 /* $Id: zqb_placeholder.hpp,v 1.11 2007/12/20 15:11:48 vlad Exp $ */
3 #ifndef __zqb_placeholder_hpp
4 #define __zqb_placeholder_hpp
5 
6 #include <vector>
7 
8 #include "zqb_cliplinebyrect.hpp"
9 #include "zqb_visible.hpp"
10 #include "zqb_container.hpp"
11 #include "zqb_autoname.hpp"
12 #include "zqb_pixgroup.hpp"
13 #include "zqb_objectarray.hpp"
14 
15 
26  : virtual public ZqbAutoName, public ZqbVisible, public ZqbContainer
27 {
28 public:
29 
34  ZqbPlaceholder (ZqbContainer& container,
35  ZqbPixGroup* pPGX, ZqbPixGroup* pPGY,
36  const char* szPhName = NULL);
37 
39  virtual ~ZqbPlaceholder ();
40 
41 
42  /*
43  * Visible properties
44  */
45 
47  virtual void redraw (QPainter& paint);
48 
50  virtual ZqbEventHint input (QEvent& event);
51 
55  virtual void updateLimits (QPainter* paint = NULL);
56 
60  virtual void updateGeometry ();
61 
62 
63  /*
64  * Qt links
65  */
66 
69  virtual QPainter* getScreenPainter () const;
70 
73  virtual void setScreenPainter (QPainter* pPainter);
74 
77  virtual QWidget* getAreaWidget () const;
78 
81  virtual void setAreaWidget (QWidget* pWidget);
82 
84  virtual QRect getRect () const;
85 
86 
87  /*
88  * Operations over objects.
89  */
90 
94  virtual bool addObject (ZqObject* obj);
95 
99  virtual bool removeObject (ZqObject* obj);
100 
104  virtual bool toFront (ZqObject* obj);
105 
109  virtual bool toBack (ZqObject* obj);
110 
115  virtual int setDrawOrder (const ZqbObjectArray& objects);
116 
117 
118  /*
119  * Geometry of the place (location and size)
120  */
121 
124  bool isPlaced () const;
125 
128 
131 
132 
133  /*
134  * Clipping facility
135  */
136 
143  bool clipLine (int x[2], int y[2]);
144 
145 
146  /*
147  * Flag of redrawing
148  */
149 
151  void setDirty ();
152 
154  void resetDirty ();
155 
157  bool isDirty () const;
158 
159 
160  /*
161  * Flag to clear (fill with white color by default) the area under
162  * placeholder before drawing placeholder's objects
163  */
164 
166  void setAutoClear (bool bAutoClear);
167 
169  void setAutoClear (bool bAutoClear, QColor qcFillColor);
170 
172  bool getAutoClear (QColor* qcFillColor = NULL) const;
173 
174 protected:
175 
178 
180  QPainter *m_pqPainter;
181 
184  QWidget *m_pqWidget;
185 
189 
192  bool m_bDirty;
193 
198 
201 
202 private:
203 
205  static int m_iNameCounter;
206 
207 };
208 
209 
211 typedef std::vector<ZqbPlaceholder*> ZqbPlaceholderVector;
212 
213 
214 #endif /* zqb_placeholder.hpp */
virtual bool removeObject(ZqObject *obj)
virtual void setScreenPainter(QPainter *pPainter)
bool isPlaced() const
Definition: zqb_placeholder.hpp:25
virtual int setDrawOrder(const ZqbObjectArray &objects)
ZqObject * m_pGrabber
Definition: zqb_placeholder.hpp:188
virtual void updateLimits(QPainter *paint=NULL)
virtual QPainter * getScreenPainter() const
virtual bool toFront(ZqObject *obj)
virtual ZqbEventHint input(QEvent &event)
virtual QRect getRect() const
Definition: zqb_objectarray.hpp:26
ZqbPixGrpMember py
Definition: zqb_placeholder.hpp:130
virtual void redraw()
Definition: zqb_visible.hpp:82
bool m_bDirty
Definition: zqb_placeholder.hpp:192
Definition: zqb_autoname.hpp:18
Definition: zqb_container.hpp:23
bool isDirty() const
Definition: zqb_pixgrpmember.hpp:24
QPainter * m_pqPainter
Definition: zqb_placeholder.hpp:180
virtual bool toBack(ZqObject *obj)
ZqbPlaceholder(ZqbContainer &container, ZqbPixGroup *pPGX, ZqbPixGroup *pPGY, const char *szPhName=NULL)
virtual QWidget * getAreaWidget() const
QColor m_qcFillColor
Definition: zqb_placeholder.hpp:200
Definition: zq_object.hpp:36
QWidget * m_pqWidget
Definition: zqb_placeholder.hpp:184
virtual void updateGeometry()
bool clipLine(int x[2], int y[2])
Definition: zqb_visible.hpp:33
bool getAutoClear(QColor *qcFillColor=NULL) const
virtual ~ZqbPlaceholder()
virtual void setAreaWidget(QWidget *pWidget)
void setAutoClear(bool bAutoClear)
virtual bool addObject(ZqObject *obj)
ZqbPixGrpMember px
Definition: zqb_placeholder.hpp:127
bool m_bAutoClear
Definition: zqb_placeholder.hpp:197
ZqbContainer & m_Container
Definition: zqb_placeholder.hpp:177
Definition: zqb_pixgroup.hpp:34