CMultiBitmapSupplierGuiComp.h
Go to the documentation of this file.
1 #ifndef iqtcam_CMultiBitmapSupplierGuiComp_included
2 #define iqtcam_CMultiBitmapSupplierGuiComp_included
3 
4 
5 // Qt includes
6 #include <QtCore/QTimer>
7 
8 // ACF includes
9 #include "iimg/CBitmap.h"
10 
11 // ACF-Solutions includes
14 
15 #include "GeneratedFiles/iqtcam/ui_CMultiBitmapSupplierGuiComp.h"
16 
17 
18 namespace iqtcam
19 {
20 
21 
23 : public iqtinsp::TSupplierGuiCompBase<Ui::CMultiBitmapSupplierGuiComp>
24 {
25  Q_OBJECT
26 
27 public:
29 
30  I_BEGIN_COMPONENT(CMultiBitmapSupplierGuiComp);
31  I_ASSIGN(m_bitmapLoaderCompPtr, "BitmapLoader", "Saves bitmap to file", false, "BitmapLoader");
32  I_ASSIGN(m_iconSizeAttrPtr, "IconSize", "Maximum icon size in preview [px]", true, 48);
33  I_ASSIGN(m_filePathFormatAttrPtr, "FilePathFormat", "Format of file path used to save bitmap, used only if save folder is used.\n\t- %1 will be replaced with current date\n\t- %2 with time\n\t- %3 with channel index\n\t- %4 with image resolution", false, "%1%2_%3.png");
34  I_END_COMPONENT;
35 
37 
38  protected Q_SLOTS:
40  void on_LiveImageButton_toggled(bool checked);
44  void on_IconsView_currentItemChanged(QListWidgetItem* current, QListWidgetItem* previous);
45  void OnTimerReady();
46 
47 protected:
48  // reimplemented (iqtgui::CGuiComponentBase)
49  virtual void OnGuiCreated();
50  virtual void OnGuiHidden();
51 
52  // reimplemented (iqtinsp::TSupplierGuiCompBase)
53  virtual QWidget* GetParamsWidget() const;
54 
55  // reimplemented (iqt2d::TViewExtenderCompBase)
56  virtual void CreateShapes(int sceneId, Shapes& result);
57 
58  // reimplemented (iqtgui::TGuiObserverWrap)
59  virtual void OnGuiModelAttached();
60  virtual void UpdateGui(int updateFlags = 0);
61 
62 private:
63  I_REF(ifile::IFilePersistence, m_bitmapLoaderCompPtr);
64  I_ATTR(int, m_iconSizeAttrPtr);
65  I_ATTR(QString, m_filePathFormatAttrPtr);
66 
68  void SelectBitmap(int bitmapIdx);
69 
71  QList<QIcon>m_icons;
72 
73  QTimer m_timer;
74 
75 };
76 
77 
78 } // namespace iqtcam
79 
80 
81 #endif // !iqtcam_CMultiBitmapSupplierGuiComp_included
82 
83 
virtual void CreateShapes(int sceneId, Shapes &result)
void on_LiveImageButton_toggled(bool checked)
void on_IconsView_currentItemChanged(QListWidgetItem *current, QListWidgetItem *previous)
virtual QWidget * GetParamsWidget() const
Get parameters widget object.
iqtinsp::TSupplierGuiCompBase< Ui::CMultiBitmapSupplierGuiComp > BaseClass
virtual void UpdateGui(int updateFlags=0)

© 2007-2011 Witold Gantzke and Kirill Lepskiy