CTriggerParamsComp.h
Go to the documentation of this file.
1 #ifndef isig_CTriggerParamsComp_included
2 #define isig_CTriggerParamsComp_included
3 
4 
5 // Qt includes
6 #include <QtCore/QVector>
7 
8 // ACF includes
9 #include "icomp/CComponentBase.h"
10 #include "iprm/ISelectionParam.h"
11 #include "iprm/IOptionsList.h"
12 
13 // ACF-Solutions includes
15 #include "isig/ITriggerParams.h"
16 
17 
18 namespace isig
19 {
20 
21 
26  public icomp::CComponentBase,
27  virtual public isig::ITriggerParams,
28  virtual public iprm::ISelectionParam,
29  virtual protected iprm::IOptionsList
30 {
31 public:
33 
35 
36  I_BEGIN_COMPONENT(CTriggerParamsComp);
37  I_REGISTER_INTERFACE(isig::ITriggerParams);
38  I_REGISTER_INTERFACE(iprm::ISelectionParam);
39  I_REGISTER_INTERFACE(iser::ISerializable);
40  I_ASSIGN(m_triggerConstraintsCompPtr, "Constraints", "Describing allowed parameter state, typically implemented in camera component", false, "Constraints");
41  I_ASSIGN(m_triggerModeAttrPtr, "TriggerMode", "Set trigger mode:\n\t0 - None\n\t1 - Continuous\n\t2 - Rising edge\n\t3 - Falling edge\n\t4 - Positive level\n\t5 - Negative level\n\t6 - Software", true, 0);
42  I_END_COMPONENT;
43 
44  // reimplemented (isig::ITriggerParams)
45  virtual const ITriggerConstraints* GetTriggerConstraints() const;
46  virtual int GetTriggerMode() const;
47  virtual void SetTriggerMode(int triggerMode);
48 
49  // reimplemented (iprm::ISelectionParam)
50  virtual const iprm::IOptionsList* GetSelectionConstraints() const;
51  virtual int GetSelectedOptionIndex() const;
52  virtual bool SetSelectedOptionIndex(int index);
53  virtual iprm::ISelectionParam* GetSubselection(int index) const;
54 
55  // reimplemented (iser::ISerializable)
56  virtual bool Serialize(iser::IArchive& archive);
57 
58 protected:
60 
61  // reimplemented (iprm::IOptionsList)
62  virtual int GetOptionsFlags() const;
63  virtual int GetOptionsCount() const;
64  virtual QString GetOptionName(int index) const;
65  virtual QString GetOptionDescription(int index) const;
66  virtual QByteArray GetOptionId(int index) const;
67  virtual bool IsOptionEnabled(int index) const;
68 
69  // reimplemented (icomp::CComponentBase)
70  virtual void OnComponentCreated();
71 
72 private:
73  int m_triggerMode;
74 
75  struct SelectionEntry
76  {
77  QString name;
78  QString description;
79  int triggerMode;
80  };
81  typedef QVector<SelectionEntry> SelectionList;
82  SelectionList m_selectionList;
83 
84  I_REF(isig::ITriggerConstraints, m_triggerConstraintsCompPtr);
85  I_ATTR(int, m_triggerModeAttrPtr);
86 };
87 
88 
89 } // namespace isig
90 
91 
92 #endif // !isig_CTriggerParamsComp_included
93 
94 
Implementation of standard trigger parameters set.
virtual void SetTriggerMode(int triggerMode)
Set trigger mode.
Interface for hardware trigger parameters.
virtual iprm::ISelectionParam * GetSubselection(int index) const
virtual QString GetOptionName(int index) const
Interface for AVT camera parameters.
virtual int GetSelectedOptionIndex() const
virtual int GetOptionsFlags() const
virtual void OnComponentCreated()
virtual bool SetSelectedOptionIndex(int index)
virtual bool Serialize(iser::IArchive &archive)
virtual QByteArray GetOptionId(int index) const
virtual const ITriggerConstraints * GetTriggerConstraints() const
Get constraints describing supported parameter states.
virtual bool IsOptionEnabled(int index) const
virtual const iprm::IOptionsList * GetSelectionConstraints() const
virtual QString GetOptionDescription(int index) const
icomp::CComponentBase BaseClass
virtual int GetOptionsCount() const
virtual int GetTriggerMode() const
Get trigger mode.

© 2007-2011 Witold Gantzke and Kirill Lepskiy