UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
zq_object.hpp
1 /* zq_object.hpp */
2 /* $Id: zq_object.hpp,v 1.17 2007/12/29 09:10:09 vlad Exp $ */
3 #ifndef __zq_object_hpp
4 #define __zq_object_hpp
5 
6 #include "zqb_autoname.hpp"
7 #include "zqb_visible.hpp"
8 #include "zqb_placeholder.hpp"
9 
10 
11 class QzqArea;
12 
13 
36 class ZqObject : virtual public ZqbAutoName, public ZqbVisible
37 {
38 public:
39 
42  ZqObject (const char* szName = NULL);
43 
47  ZqObject (ZqbPlaceholder* pPh, const char* szName = NULL);
48 
49 
51  virtual ~ZqObject ();
52 
53 
61  virtual void debugState ();
62 
65  virtual void clearPlace ();
66 
67 
70  virtual ZqbPlaceholderVector* placeholders ();
71 
72 
73  /*
74  * To implement in derived classes
75  */
76 
78  virtual void redraw (QPainter& paint);
79 
81  virtual ZqbEventHint input (QEvent& event);
82 
89  virtual void updateLimits (QPainter* paint = NULL);
90 
95  virtual void updateGeometry ();
96 
100  virtual QPainter* getScreenPainter () const;
101 
105  virtual void setScreenPainter (QPainter* pPainter);
106 
108  virtual QzqArea* getArea () const;
109 
112  virtual QWidget* getAreaWidget () const;
113 
116  virtual void setAreaWidget (QWidget* pWidget);
117 
121  virtual bool isHardcopy () const;
122 
123 
124  /*
125  * Placement management
126  */
127 
130  bool isPlaced () const;
131 
134  ZqbPlaceholder* getPlace () const;
135 
139  ZqbPixGrpMember* px () const;
140 
143  ZqbPixGrpMember* py () const;
144 
147  bool getRect (QRect& rect) const;
148 
151  virtual bool attachToPlace (ZqbPlaceholder* pPh);
152 
155  virtual bool detachFromPlace ();
156 
157 
158  /*
159  * Flag of redrawing: just reference to the attached placeholder
160  */
161 
163  virtual void setDirty ();
164 
166  virtual void resetDirty ();
167 
169  virtual bool isDirty () const;
170 
171 
172  /*
173  * Flag of interactive drawing feature.
174  */
175 
177  void setInteractive (bool bInteractive);
178 
180  bool isInteractive () const;
181 
182 
183  /*
184  * Call for top-level redraw methods
185  */
186 
188  virtual void fullRedraw (bool bForce = false);
189 
191  virtual void interactiveRedraw ();
192 
193 protected:
194 
199 
203 
210 
211 private:
212 
214  static int s_iNameCounter;
215 
216 };
217 
218 #endif /* zq_object.hpp */
ZqbPlaceholder * m_pPh
Definition: zq_object.hpp:198
ZqbPixGrpMember * px() const
virtual bool isDirty() const
virtual bool detachFromPlace()
virtual void resetDirty()
ZqObject(const char *szName=NULL)
virtual QWidget * getAreaWidget() const
virtual void setAreaWidget(QWidget *pWidget)
bool m_bInteractive
Definition: zq_object.hpp:209
Definition: zqb_placeholder.hpp:25
bool isInteractive() const
void setInteractive(bool bInteractive)
ZqbPixGrpMember * py() const
virtual void debugState()
virtual ZqbPlaceholderVector * placeholders()
virtual bool attachToPlace(ZqbPlaceholder *pPh)
virtual void fullRedraw(bool bForce=false)
virtual void interactiveRedraw()
virtual void redraw()
Definition: zqb_visible.hpp:82
Definition: zqb_autoname.hpp:18
virtual void updateLimits(QPainter *paint=NULL)
virtual void setDirty()
Definition: zqb_pixgrpmember.hpp:24
bool getRect(QRect &rect) const
Definition: qzq_area.hpp:39
ZqbPlaceholder * getPlace() const
virtual void updateGeometry()
virtual ~ZqObject()
Definition: zq_object.hpp:36
virtual QzqArea * getArea() const
Definition: zqb_visible.hpp:33
ZqbPixGrpMember * m_pPx
Definition: zq_object.hpp:202
virtual void setScreenPainter(QPainter *pPainter)
virtual QPainter * getScreenPainter() const
bool isPlaced() const
virtual ZqbEventHint input(QEvent &event)
virtual bool isHardcopy() const
virtual void clearPlace()