CSearchBasedFeaturesSupplierGuiComp.h
Go to the documentation of this file.
1 #ifndef iqtipr_CSearchBasedFeaturesSupplierGuiComp_included
2 #define iqtipr_CSearchBasedFeaturesSupplierGuiComp_included
3 
4 
5 // ACF includes
6 #include <imod/IObserver.h>
7 #include <imod/TModelWrap.h>
9 #include <i2d/CCircle.h>
10 #include <iqtgui/IGuiObject.h>
12 #include <iview/TVisualObjects.h>
13 #include <iview/IShapeFactory.h>
14 #include <iview/CCircleShape.h>
15 
16 // ACF-Solutions includes
18 #include <iqtipr/iqtipr.h>
19 
20 #include <GeneratedFiles/iqtipr/ui_CSearchBasedFeaturesSupplierGuiComp.h>
21 
22 
23 namespace iqtipr
24 {
25 
26 
28  public iqtinsp::TSupplierGuiCompBase<Ui::CSearchBasedFeaturesSupplierGuiComp>
29 {
30  Q_OBJECT
31 
32 public:
34 
36  {
43  };
44 
45  I_BEGIN_COMPONENT(CSearchBasedFeaturesSupplierGuiComp);
46  I_ASSIGN(m_intermediateResultsGuiCompPtr, "IntermediateResultsGui", "GUI integrated into group 'Intermediate Results'", false, "IntermediateResultsGui");
47  I_ASSIGN(m_shapeFactoryCompPtr, "ShapeFactory", "Shape factory used for creation of the result shapes", false, "ShapeFactory");
48  I_ASSIGN(m_showResultShapesAttrPtr, "ShowResultShapes", "Show result shapes in the image as circles", true, true);
49  I_END_COMPONENT;
50 
52 
53 protected:
54  // reimplemented (iqtinsp::TSupplierGuiCompBase)
55  virtual QWidget* GetParamsWidget() const;
56  virtual void OnSupplierParamsChanged();
57 
58  // reimplemented (iqt2d::IViewExtender)
59  virtual void AddItemsToScene(iqt2d::IViewProvider* providerPtr, int flags);
60  virtual void RemoveItemsFromScene(iqt2d::IViewProvider* providerPtr);
61 
62  // reimplemented (iqtgui::TGuiObserverWrap)
63  virtual void OnGuiModelAttached();
64  virtual void UpdateGui(const istd::IChangeable::ChangeSet& changeSet);
65 
66  // reimplemented (iqtgui::IGuiObject)
67  virtual void OnGuiCreated();
68  virtual void OnGuiHidden();
69 
70  // reimplemented (icomp::IComponentBase)
71  virtual void OnComponentDestroyed();
72 
73 protected Q_SLOTS:
74  void on_TestButton_clicked();
77 
78 private:
79  void ConnectShapes(iview::IShapeView& view);
80  void DisconnectShapes(iview::IShapeView& view);
81 
82 private:
83  I_REF(iqtgui::IGuiObject, m_intermediateResultsGuiCompPtr);
84  I_REF(iview::IShapeFactory, m_shapeFactoryCompPtr);
85  I_ATTR(bool, m_showResultShapesAttrPtr);
86 
87  // result shapes
89  typedef istd::TPointerVector<iview::IShape> VisualObjects;
90  VisualObjects m_visualPositions;
91 
92  iview::IShapeView* m_lastViewPtr;
93 };
94 
95 
96 } // namespace iqtipr
97 
98 
99 #endif // !iqtipr_CSearchBasedFeaturesSupplierGuiComp_included
100 
101 
virtual QWidget * GetParamsWidget() const
Get parameters widget object.
virtual void UpdateGui(const istd::IChangeable::ChangeSet &changeSet)
virtual void OnSupplierParamsChanged()
Method will be called every time if the parameter set of the supplier has been changed.
iqtinsp::TSupplierGuiCompBase< Ui::CSearchBasedFeaturesSupplierGuiComp > BaseClass
virtual void AddItemsToScene(iqt2d::IViewProvider *providerPtr, int flags)
virtual void RemoveItemsFromScene(iqt2d::IViewProvider *providerPtr)

© 2007-2017 Witold Gantzke and Kirill Lepskiy