CMultiLineSupplierGuiComp.h
Go to the documentation of this file.
1 #ifndef iqtipr_CMultiLineSupplierGuiComp_included
2 #define iqtipr_CMultiLineSupplierGuiComp_included
3 
4 
5 // ACF includes
6 #include <i2d/CPolyline.h>
7 #include <iprm/ISelectionParam.h>
9 
10 // ACF-Solutions includes
12 
13 #include <GeneratedFiles/iqtipr/ui_CMultiLineSupplierGuiComp.h>
14 
15 
16 namespace iqtipr
17 {
18 
19 
20 class CMultiLineSupplierGuiComp: public iqtinsp::TSupplierGuiCompBase<Ui::CMultiLineSupplierGuiComp>
21 {
22  Q_OBJECT
23 
24 public:
26 
27  I_BEGIN_COMPONENT(CMultiLineSupplierGuiComp);
28  I_REGISTER_SUBELEMENT(LineSelection);
29  I_REGISTER_SUBELEMENT_INTERFACE(LineSelection, iprm::ISelectionParam, ExtractLineSelection);
30  I_END_COMPONENT;
31 
33 
34 protected Q_SLOTS:
35  void on_TestButton_clicked();
36 
37 protected:
38  // reimplemented (iqtgui::TGuiObserverWrap)
39  virtual void UpdateGui(const istd::IChangeable::ChangeSet& changeSet);
40 
41  // reimplemented (iqtinsp::TSupplierGuiCompBase)
42  virtual void OnSupplierParamsChanged();
43  virtual QWidget* GetParamsWidget() const;
44 
45  // reimplemented (iqt2d::TViewExtenderCompBase)
46  virtual void CreateShapes(int sceneId, Shapes& result);
47 
48  // reimplemented (iqtgui::CGuiComponentBase)
49  virtual void OnGuiHidden();
50 
51 protected:
53  {
54  public:
55  LineSelection();
56 
57  // reimplemented (iprm::ISelectionParam)
58  virtual const iprm::IOptionsList* GetSelectionConstraints() const;
59  virtual int GetSelectedOptionIndex() const;
60  virtual bool SetSelectedOptionIndex(int index);
61  virtual iprm::ISelectionParam* GetSubselection(int index) const;
62 
63  // reimplemented (iser::ISerializable)
64  virtual bool Serialize(iser::IArchive& archive);
65 
66  protected:
68  };
69 
70  class CShape:
71  public iview::CShapeBase,
73  {
74  public:
77 
78  CShape(iprm::ISelectionParam& selection);
79  virtual ~CShape();
80 
81  // reimplemented (iview::IVisualizable)
82  virtual void Draw(QPainter& drawContext) const;
83 
84  // reimplemented (imod::CMultiModelDispatcherBase)
85  virtual void OnModelChanged(int modelId, const istd::IChangeable::ChangeSet& changeSet);
86 
87  protected:
88  // reimplemented (iview::CShapeBase)
89  virtual i2d::CRect CalcBoundingBox() const;
90 
91  private:
92  iprm::ISelectionParam& m_lineSelection;
93  };
94 
96 
98  {
99  return &component.m_lineSelection;
100  }
101 };
102 
103 
104 } // namespace iqtipr
105 
106 
107 #endif // !iqtipr_CMultiLineSupplierGuiComp_included
108 
109 
CShape(iprm::ISelectionParam &selection)
imod::TModelWrap< LineSelection > m_lineSelection
virtual iprm::ISelectionParam * GetSubselection(int index) const
static iprm::ISelectionParam * ExtractLineSelection(CMultiLineSupplierGuiComp &component)
virtual void Draw(QPainter &drawContext) const
virtual bool Serialize(iser::IArchive &archive)
virtual void UpdateGui(const istd::IChangeable::ChangeSet &changeSet)
virtual QWidget * GetParamsWidget() const
Get parameters widget object.
virtual void OnSupplierParamsChanged()
Method will be called every time if the parameter set of the supplier has been changed.
virtual const iprm::IOptionsList * GetSelectionConstraints() const
iqtinsp::TSupplierGuiCompBase< Ui::CMultiLineSupplierGuiComp > BaseClass
virtual void OnModelChanged(int modelId, const istd::IChangeable::ChangeSet &changeSet)
virtual i2d::CRect CalcBoundingBox() const
virtual void CreateShapes(int sceneId, Shapes &result)

© 2007-2017 Witold Gantzke and Kirill Lepskiy