UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
scale_widget.hpp
1 /* scale_widget.hpp */
2 /* $Id$ */
3 #ifndef __scale_widget_hpp
4 #define __scale_widget_hpp
5 
6 #include <QGridLayout>
7 
8 #include <zq4/qzq_area.hpp>
9 #include <zq4/zq_layout.hpp>
10 #include <zq4/zq_custom_scale.hpp>
11 
13 namespace hds
14 {
16  class ScaleWidget : public QWidget
17  {
18  Q_OBJECT
19 
20  public:
21 
23  ScaleWidget(QWidget *parent = 0, Qt::WindowFlags f = 0);
24 
26  virtual ~ScaleWidget();
27 
28 
30  virtual void redraw();
31 
32  void resize(const QSize &);
33 
34  void resizeToScale();
35 
38 
40  ZqScale* getScale() {return mp_scale;}
41 
42  virtual void updateGeometry(const ZqScale::Placement& placement, bool change_rect=false);
43 
44  bool getInitScaleSize(QSize& init_size) const;
45 
46  const QRect& getPrevRect() const;
47 
48  signals:
49 
50  void scale_geom_updated(bool change_rect);
51 
52  protected:
53 
54  void paintEvent(QPaintEvent *event);
55 
58 
61 
63  QGridLayout *mp_grid_layout;
64 
67 
69  ZqbNatGroup m_ng;
70 
71  QRect m_prev_rect;
72  };
73 };
74 
75 #endif /* scale_widget.hpp */
Placement
Definition: zq_scale.hpp:28
virtual ~ScaleWidget()
ZqScale * getScale()
Definition: scale_widget.hpp:40
Definition: zqb_natgroup.hpp:35
ZqLayout * mp_zqlayout
Definition: scale_widget.hpp:60
Definition: zq_layout.hpp:22
QzqArea * mp_zqarea
Definition: scale_widget.hpp:57
Definition: scale_widget.hpp:16
QzqArea * getZqArea()
Definition: scale_widget.hpp:37
QGridLayout * mp_grid_layout
Definition: scale_widget.hpp:63
ScaleWidget(QWidget *parent=0, Qt::WindowFlags f=0)
Definition: qzq_area.hpp:39
void paintEvent(QPaintEvent *event)
ZqScale * mp_scale
Definition: scale_widget.hpp:66
Definition: zq_scale.hpp:22
virtual void redraw()