UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
zq_zoom.hpp
1 /* zq_zoom.hpp */
2 /* $Id: zq_zoom.hpp 20080 2009-12-15 15:57:52Z vlad $ */
3 #ifndef __zq_zoom_hpp
4 #define __zq_zoom_hpp
5 
6 #include "zqb_natgrpmember.hpp"
7 #include "zq_rubberbox.hpp"
8 
9 
17 class ZqZoom : public ZqRubberBox
18 {
19 public:
20 
22  enum ZoomMode {
28  ZoomInClick,
35  };
36 
37 
41  ZqZoom (ZqbNatGroup& rNatAxis, ZqRubberBox::RangeMode eRangeMode,
42  const char* szName = NULL);
43 
46  ZqZoom (ZqbNatGroup& rNatAxisX, ZqbNatGroup& rNatAxisY,
47  const char* szName = NULL);
48 
52  ZqZoom (ZqbNatGroup& rNatAxis, ZqRubberBox::RangeMode eRangeMode,
53  ZqbPlaceholder* pPh, const char* szName = NULL);
54 
57  ZqZoom (ZqbNatGroup& rNatAxisX, ZqbNatGroup& rNatAxisY,
58  ZqbPlaceholder* pPh, const char* szName = NULL);
59 
60 
63  virtual void zoomAll ();
64 
70  virtual void zoomClick (float sf, double nxy[2] = NULL);
71 
72 
73  /*
74  * Properties
75  */
76 
81  virtual void setZoomMode (ZoomMode eMode);
82 
84  virtual ZoomMode getZoomMode () const;
85 
88  virtual void setScaleFactor (float fScale);
89 
91  virtual float getScaleFactor () const;
92 
93 
94  /*
95  * Polymorphic methods
96  */
97 
99  virtual ZqbEventHint input (QEvent& event);
100 
102  virtual void box (QRect r);
103 
105  virtual void click (QRect r);
106 
107 
108 protected:
109 
112  void zoomClick (double nc, ZqbNatGroup& group,
113  float fScaleFactor);
114 
120  int pos2nat (const QPoint& p, double nc[2]) const;
121 
124  void forceRedraw (ZqbNatGrpMember* pNGm);
125 
126 
129 
131  float m_fScale;
132 
136 
140 
142  bool m_bDragToMove;
143 
144 private:
145 
147  static int s_iNameCounter;
148 
149 };
150 
151 
152 #include "zq_zoom_inline.hpp"
153 
154 
155 #endif /* zq_zoom.hpp */
Definition: zq_zoom.hpp:28
virtual void zoomAll()
Definition: zq_zoom.hpp:23
ZqbNatGrpMember * m_pNatY
Definition: zq_zoom.hpp:139
virtual float getScaleFactor() const
Definition: zq_zoom_inline.hpp:63
virtual void setZoomMode(ZoomMode eMode)
Definition: zq_zoom_inline.hpp:26
Definition: zq_rubberbox.hpp:14
virtual void click(QRect r)
int pos2nat(const QPoint &p, double nc[2]) const
virtual ZoomMode getZoomMode() const
Definition: zq_zoom_inline.hpp:37
virtual void setScaleFactor(float fScale)
Definition: zq_zoom_inline.hpp:49
void forceRedraw(ZqbNatGrpMember *pNGm)
ZqZoom(ZqbNatGroup &rNatAxis, ZqRubberBox::RangeMode eRangeMode, const char *szName=NULL)
virtual void zoomClick(float sf, double nxy[2]=NULL)
virtual void box(QRect r)
Definition: zqb_natgroup.hpp:35
ZoomMode m_eZoomMode
Definition: zq_zoom.hpp:128
Definition: zqb_placeholder.hpp:25
float m_fScale
Definition: zq_zoom.hpp:131
bool m_bDragToMove
Definition: zq_zoom.hpp:142
ZoomMode
Definition: zq_zoom.hpp:22
RangeMode
Definition: zq_rubberbox.hpp:19
virtual ZqbEventHint input(QEvent &event)
ZqbNatGrpMember * m_pNatX
Definition: zq_zoom.hpp:135
Definition: zq_zoom.hpp:17
Definition: zq_zoom.hpp:31
Definition: zqb_natgrpmember.hpp:26