UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
zq_scaled_palette.hpp
1 /* zq_scaled_palette.hpp */
2 /* $Id: zq_scaled_palette.hpp 20080 2009-12-15 15:57:52Z vlad $ */
3 #ifndef __zq_scaled_palette_hpp
4 #define __zq_scaled_palette_hpp
5 
6 #include "zq_object.hpp"
7 #include "zqb_natgrpmember.hpp"
8 #include "zqb_scaled_palette.hpp"
9 
10 //modify by haoyg,begin
11 #ifdef HAOYG
12 class QPainter;
13 #endif
14 //modifyg by haoyg,end
15 
23 class ZqScaledPalette : public ZqObject, public ZqbNatGrpMember
24 {
25 public:
26 
30  ZqScaledPalette (ZqbNatGroup& rColorScale, const char* szName = NULL);
31 
35  ZqScaledPalette (ZqbNatGroup& rColorScale,
36  ZqbPlaceholder* pPh, const char* szName = NULL);
37 
38 
39  /*
40  * Properties
41  */
42 
46  virtual void setOrientation (Qt::Orientation eOrient);
47 
49  virtual Qt::Orientation getOrientation () const;
50 
51 
57  virtual void setThickness (int nPixels);
58 
60  virtual int getThickness () const;
61 
62 
64  virtual void setPalette (const ZqbScaledPalette& pal);
65 
68  virtual void setPalette (const ZqbPalette& pal);
69 
71  virtual const ZqbScaledPalette& getPalette () const;
72 
73 
74  /*
75  * To implement in derived classes
76  */
77 
79  virtual void redraw (QPainter& paint);
80 
84  virtual void updateLimits (QPainter* paint = NULL);
85 
87  virtual ZqbEventHint input (QEvent& event);
88 
89 protected:
90 
92  void forceThickness (int nPixels);
93 
94 //modify by haoyg,begin
95 #ifdef HAOYG
96  void forceThickness (const QPainter &paint, int nPixels);
97  void setThickness (const QPainter &paint, int nPixels);
98 #endif
99 //modify by haoyg,end
100 
102  Qt::Orientation m_eOrient;
103 
106  int m_nThickness;
107 
110 
111 private:
112 
114  static int s_iNameCounter;
115 
116 };
117 
118 
119 #include "zq_scaled_palette_inline.hpp"
120 
121 #endif /* zq_scaled_palette.hpp */
virtual ZqbEventHint input(QEvent &event)
virtual void setOrientation(Qt::Orientation eOrient)
Definition: zq_scaled_palette_inline.hpp:53
Definition: zq_scaled_palette.hpp:23
Definition: zqb_scaled_palette.hpp:15
virtual Qt::Orientation getOrientation() const
Definition: zq_scaled_palette_inline.hpp:67
Definition: zqb_natgroup.hpp:35
Definition: zqb_placeholder.hpp:25
ZqbScaledPalette m_ScPal
Definition: zq_scaled_palette.hpp:109
Qt::Orientation m_eOrient
Definition: zq_scaled_palette.hpp:102
virtual void updateLimits(QPainter *paint=NULL)
Definition: zq_scaled_palette_inline.hpp:22
virtual void redraw()
Definition: zqb_visible.hpp:82
ZqScaledPalette(ZqbNatGroup &rColorScale, const char *szName=NULL)
virtual const ZqbScaledPalette & getPalette() const
Definition: zq_scaled_palette_inline.hpp:153
virtual void setPalette(const ZqbScaledPalette &pal)
Definition: zq_scaled_palette_inline.hpp:121
virtual void setThickness(int nPixels)
Definition: zq_scaled_palette_inline.hpp:81
Definition: zq_object.hpp:36
Definition: zqb_natgrpmember.hpp:26
void forceThickness(int nPixels)
Definition: zq_scaled_palette_inline.hpp:35
Definition: zqb_palette.hpp:17
int m_nThickness
Definition: zq_scaled_palette.hpp:106
virtual int getThickness() const
Definition: zq_scaled_palette_inline.hpp:110