UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
zq_layout.hpp
1 /* zq_layout.hpp */
2 /* $Id: zq_layout.hpp,v 1.10 2006/06/03 09:09:44 guser4 Exp $ */
3 #ifndef __zq_layout_hpp
4 #define __zq_layout_hpp
5 
6 #include <qrect.h>
7 
8 #include "zqb_placeholder.hpp"
9 #include "zqb_objectarray.hpp"
10 #include "zqb_pixgrpmanager.hpp"
11 #include "zqb_container.hpp"
12 #include "zq_object.hpp"
13 
14 
22 class ZqLayout : public ZqObject, public ZqbContainer
23 {
24 public:
25 
27  ZqLayout (const char* szLayoutName = NULL);
28 
31  const char* szLayoutName = NULL);
32 
34  virtual ZqbPlaceholderVector* placeholders ();
35 
36 
37  /*
38  * Dispatching different Zqools events
39  */
40 
42  virtual void redraw (QPainter& paint);
43 
46  virtual ZqbEventHint input (QEvent& event);
47 
50  virtual bool tip (const QPoint& p,
51  QString& qsShort, QString& qsLong);
52 
56  virtual void updateGeometry ();
57 
61  virtual void updateLimits (QPainter* paint = NULL);
62 
63 
67  virtual bool getRect (QRect& rect);
68 
73  virtual bool setRect (const QRect& rect);
74 
75 
78  virtual void setScreenPainter (QPainter* pPainter);
79 
82  virtual void setAreaWidget (QWidget* pWidget);
83 
84 
85 
86  /*
87  * Operations over objects.
88  */
89 
93  virtual bool removeObject (ZqObject* obj);
94 
95 
96  /*
97  * Container for placeholders
98  */
99 
104  virtual ZqbPlaceholder* placeholder (const char* szPixGroupX,
105  const char* szPixGroupY,
106  const char* szPhName = NULL);
107 
112  virtual bool remove (ZqbPlaceholder* pPh);
113 
114 
115  /*
116  * Flag of redrawing: propagate to all placeholders in the layout
117  */
118 
121  virtual void setDirty ();
122 
125  virtual void resetDirty ();
126 
129  virtual bool isDirty () const;
130 
131 
132  /*
133  * Placement management
134  */
135 
138  virtual bool attachToPlace (ZqbPlaceholder* pPh);
139 
142  virtual bool detachFromPlace ();
143 
144 public:/* data */
145 
148 
151 
152 private:/* data */
153 
155  QRect m_Rect;
156 
159  ZqObject *m_pGrabber;
160 
162  ZqbPlaceholderVector m_Placeholders;
163 
165  static int s_iNameCounter;
166 
167 };
168 
169 
170 #endif /* zq_layout.hpp */
virtual bool isDirty() const
virtual void setAreaWidget(QWidget *pWidget)
virtual ZqbPlaceholder * placeholder(const char *szPixGroupX, const char *szPixGroupY, const char *szPhName=NULL)
virtual bool getRect(QRect &rect)
virtual void resetDirty()
Definition: zq_layout.hpp:22
Definition: zqb_placeholder.hpp:25
virtual void updateLimits(QPainter *paint=NULL)
ZqbPixGrpManager pgmx
Definition: zq_layout.hpp:147
virtual bool tip(const QPoint &p, QString &qsShort, QString &qsLong)
virtual ZqbEventHint input(QEvent &event)
virtual bool removeObject(ZqObject *obj)
virtual void redraw()
Definition: zqb_visible.hpp:82
Definition: zqb_container.hpp:23
ZqbPixGrpManager pgmy
Definition: zq_layout.hpp:150
virtual ZqbPlaceholderVector * placeholders()
ZqLayout(const char *szLayoutName=NULL)
virtual void setDirty()
Definition: zq_object.hpp:36
virtual bool detachFromPlace()
virtual bool attachToPlace(ZqbPlaceholder *pPh)
virtual bool setRect(const QRect &rect)
virtual void setScreenPainter(QPainter *pPainter)
virtual void updateGeometry()
Definition: zqb_pixgrpmanager.hpp:50