CBitmapSupplierGuiComp.h
Go to the documentation of this file.
1 #ifndef iqtcam_CBitmapSupplierGuiComp_included
2 #define iqtcam_CBitmapSupplierGuiComp_included
3 
4 
5 // Qt includes
6 #include <QtCore/QTimer>
7 
8 // ACF includes
10 #include <imod/IObserver.h>
11 #include <imod/TModelWrap.h>
12 #include <iimg/CBitmap.h>
13 #include <iqtgui/IGuiObject.h>
15 
16 #include <iimg/IBitmapProvider.h>
17 
19 
20 #include <iqtcam/iqtcam.h>
21 
22 #include <GeneratedFiles/iqtcam/ui_CBitmapSupplierGuiComp.h>
23 
24 
25 namespace iqtcam
26 {
27 
28 
30  public ilog::TLoggerCompWrap<
31  iqtinsp::TSupplierGuiCompBase<Ui::CBitmapSupplierGuiComp> >,
32  virtual public iimg::IBitmapProvider
33 {
34  Q_OBJECT
35 
36 public:
37  typedef ilog::TLoggerCompWrap<
39 
40  I_BEGIN_COMPONENT(CBitmapSupplierGuiComp);
41  I_REGISTER_INTERFACE(iimg::IBitmapProvider);
42  I_ASSIGN(m_bitmapLoaderCompPtr, "BitmapLoader", "Saves bitmap to file", false, "BitmapLoader");
43  I_ASSIGN(m_snapIntervalAttrPtr, "SnapInterval", "Snap interval in ms", true, 40);
44  I_END_COMPONENT;
45 
47 
48  // reimplemented (iimg::IBitmapProvider)
49  virtual const iimg::IBitmap* GetBitmap() const;
50 
51 protected Q_SLOTS:
53  void on_LiveImageButton_toggled(bool checked);
57  void OnTimerReady();
58 
59 protected:
60  void DoSnap(bool noGui = false);
61 
62  // reimplemented (iqtgui::CGuiComponentBase)
63  virtual void OnGuiCreated();
64  virtual void OnGuiHidden();
65 
66  // reimplemented (iqtinsp::TSupplierGuiCompBase)
67  virtual QWidget* GetParamsWidget() const;
68 
69  // reimplemented (iqt2d::TViewExtenderCompBase)
70  virtual void CreateShapes(int sceneId, Shapes& result);
71 
72  // reimplemented (iqtgui::TGuiObserverWrap)
73  virtual void OnGuiModelAttached();
74  virtual void UpdateGui(const istd::IChangeable::ChangeSet& changeSet);
75 
76  // reimplemented (imod::IObserver)
77  virtual void AfterUpdate(imod::IModel* modelPtr, const istd::IChangeable::ChangeSet& changeSet);
78 
79 private:
80  I_REF(ifile::IFilePersistence, m_bitmapLoaderCompPtr);
81  I_ATTR(int, m_snapIntervalAttrPtr);
82 
84 
85  QTimer m_timer;
86 };
87 
88 
89 } // namespace iqtcam
90 
91 
92 #endif // !iqtcam_CBitmapSupplierGuiComp_included
93 
94 
void DoSnap(bool noGui=false)
virtual const iimg::IBitmap * GetBitmap() const
virtual QWidget * GetParamsWidget() const
void on_LiveImageButton_toggled(bool checked)
ilog::TLoggerCompWrap< iqtinsp::TSupplierGuiCompBase< Ui::CBitmapSupplierGuiComp > > BaseClass
virtual void CreateShapes(int sceneId, Shapes &result)
virtual void UpdateGui(const istd::IChangeable::ChangeSet &changeSet)
virtual void AfterUpdate(imod::IModel *modelPtr, const istd::IChangeable::ChangeSet &changeSet)

© 2007-2017 Witold Gantzke and Kirill Lepskiy