UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
zqdlg_svoptions.hpp
1 /* zqdlg_svoptions.hpp */
2 /* $Id: zqdlg_svoptions.hpp,v 1.6 2009/05/07 13:56:56 vlad Exp $ */
3 #ifndef __zqdlg_svoptions_hpp
4 #define __zqdlg_svoptions_hpp
5 
6 #include <set>
7 #include <map>
8 #include <qwidget.h>
9 #include <qzq_area.hpp>
10 #include <zqb_svoptions.hpp>
11 
12 
13 /* To avoid automatically generated #include ".ui/svoptions.h" */
14 class SVOptions;
15 
16 typedef void (*ZqbSVOUpdateProc)(const ZqbSVOptions* pSVO, void* pUserData);
17 
18 
30 {
31 public:
32 
34  ZqDlgSVOptions (QWidget* parent);
35 
40  ZqDlgSVOptions (QWidget* parent, int mask);
41 
43  virtual ~ZqDlgSVOptions ();
44 
45 
48  int showModal ();
49 
51  void show ();
52 
54  void hide ();
55 
56 
62  void attachSVOptions (ZqbSVOptions* pSVO, int mChange = ~0,
63  float fSpecGain = 1.0);
64 
66  void detachSVOptions (ZqbSVOptions* pSVO);
67 
68 
71  void attachUpdater (ZqbSVOUpdateProc proc,
72  void* pUserData = NULL);
73 
75  void detachUpdater (ZqbSVOUpdateProc proc);
76 
78  void detachUpdater (ZqbSVOUpdateProc proc, void* pUserData);
79 
80 
87  void attachArea (QzqArea* pArea);
88 
90  void detachArea (QzqArea* pArea);
91 
92 
96 
97 
98  /*
99  * Callbacks
100  */
101 
103  void publishOptions ();
104 
108  bool changeOptions ();
109 
112  void propagateOptions (bool bForceRedraw = true);
113 
114 protected:
115 
117  SVOptions *m_pDlg;
118 
120  struct SVOParam {
121  int m_mChange;
122  float m_fSpecGain;
126  };
127 
130  void assignSVO (ZqbSVOptions& dst, const ZqbSVOptions& src,
131  const SVOParam& params);
132 
135  std::map<ZqbSVOptions*,SVOParam> m_AttachedSVO;
136 
139  std::set<std::pair<ZqbSVOUpdateProc,void*> > m_AttachedUpdaters;
140 
143  std::set<QzqArea*> m_AttachedArea;
144 
145 };
146 
147 
148 
149 #endif /* zqdlg_svoptions.hpp */
bool changeOptions()
ZqbSVOptions m_Options
Definition: zqdlg_svoptions.hpp:95
Definition: zqdlg_svoptions.hpp:120
void attachArea(QzqArea *pArea)
float m_fSpecGain
Definition: zqdlg_svoptions.hpp:122
void publishOptions()
SVOptions * m_pDlg
Definition: zqdlg_svoptions.hpp:117
std::set< QzqArea * > m_AttachedArea
Definition: zqdlg_svoptions.hpp:143
void detachArea(QzqArea *pArea)
Definition: zqb_svoptions.hpp:139
void attachSVOptions(ZqbSVOptions *pSVO, int mChange=~0, float fSpecGain=1.0)
void attachUpdater(ZqbSVOUpdateProc proc, void *pUserData=NULL)
void detachUpdater(ZqbSVOUpdateProc proc)
virtual ~ZqDlgSVOptions()
int m_mChange
Definition: zqdlg_svoptions.hpp:121
void detachSVOptions(ZqbSVOptions *pSVO)
Definition: qzq_area.hpp:39
std::set< std::pair< ZqbSVOUpdateProc, void * > > m_AttachedUpdaters
Definition: zqdlg_svoptions.hpp:139
std::map< ZqbSVOptions *, SVOParam > m_AttachedSVO
Definition: zqdlg_svoptions.hpp:135
ZqDlgSVOptions(QWidget *parent)
Definition: zqdlg_svoptions.hpp:29
void assignSVO(ZqbSVOptions &dst, const ZqbSVOptions &src, const SVOParam &params)
void propagateOptions(bool bForceRedraw=true)