CViewProviderGuiComp.h
Go to the documentation of this file.
1 #ifndef iqt2d_CViewProviderGuiComp_included
2 #define iqt2d_CViewProviderGuiComp_included
3 
4 
5 // ACF includes
9 #include <iview/IColorSchema.h>
10 #include <iview/CConsoleGui.h>
11 #include <iqt2d/IViewProvider.h>
12 
13 
14 namespace iqt2d
15 {
16 
17 
23  public iqtgui::TGuiComponentBase<iview::CConsoleGui>,
24  virtual public ibase::ICommandsProvider,
25  virtual public IViewProvider,
27 {
28 public:
31 
36  {
41 
46 
51 
56  };
57 
58  I_BEGIN_COMPONENT(CViewProviderGuiComp);
59  I_REGISTER_INTERFACE(ibase::ICommandsProvider);
60  I_REGISTER_INTERFACE(IViewProvider);
61  I_REGISTER_INTERFACE(i2d::ICalibrationProvider);
62  I_ASSIGN(m_shapeStatusInfoCompPtr, "ShapeStatusInfo", "Shape status info consumer", false, "ShapeStatusInfo");
63  I_ASSIGN(m_calibrationProviderCompPtr, "CalibrationProvider", "Provider of 2D-calibration for the entire view", false, "CalibrationProvider");
64  I_ASSIGN_TO(m_calibrationProviderModelCompPtr, m_calibrationProviderCompPtr, false);
65  I_ASSIGN(m_colorSchemaCompPtr, "ColorSchema", "Color schema used for console", false, "ColorSchema");
66  I_ASSIGN(m_calibrationShapeCompPtr, "CalibrationShape", "Calibration shape displaying calibration grid, if not choosen default affine calibration shape will be used", false, "CalibrationShape");
67  I_ASSIGN(m_viewIdAttrPtr, "ViewId", "ID allowing identifying this view", true, 0);
68  I_ASSIGN(m_useAntialiasingAttrPtr, "UseAntialiasing", "Enables using of antialiasing", false, false);
69  I_ASSIGN(m_zoomToFitEnabledAttrPtr, "ZoomToFitEnabled", "If true, the shapes will be fit to the view according to the defined fitting mode", false, false);
70  I_ASSIGN(m_useShapeEditCommandsAttrPtr, "UseShapeEditCommands", "If true, the commands for shape editing are available", false, false);
71  I_ASSIGN(m_useGridCommandsAttrPtr, "UseGridCommands", "If true, the commands for grid management are available", false, false);
72  I_ASSIGN(m_useScollBarCommandsAttrPtr, "UseScrollBarCommands", "If true, the commands for scroll bar management are available", false, false);
73  I_ASSIGN(m_fitModeAttrPtr, "FitMode", "Select fitting mode for the view. 0 - No fitting\n1 - Fit contents to view\n2 - Horizontal fit\n3 - Vertical fit\n4 - Both axes scaled separately\n5 - Scale both axes proportional to display smallest AOI, which fully covers display", false, 0);
74  I_ASSIGN(m_backgroundModeAttrPtr, "BackgroundMode", "Mode of background drawing:\n 0 - standard window background\n 1 - color used from color scheme \n 2 - checkerboard\n 3 - dot grid\n", true, BM_NORMAL);
75  I_ASSIGN(m_fullScreenModeSupportedAttrPtr, "FullScreenModeSupported", "If enabled, the view will be switched into full screen mode on mouse double click", true, true);
76  I_END_COMPONENT;
77 
78 
79  // reimplemented (ibase::ICommandsProvider)
80  virtual const ibase::IHierarchicalCommand* GetCommands() const;
81 
82  // reimplemented (iqt2d::IViewProvider)
83  virtual int GetViewId() const;
84  virtual iview::IShapeView* GetView() const;
85 
86 protected:
87  // reimplemented (CGuiComponentBase)
88  virtual void OnGuiCreated();
89  virtual void OnGuiDestroyed();
90  virtual void OnGuiRetranslate();
91 
92  // reimplemented (imod::CMultiModelDispatcherBase)
93  void OnModelChanged(int modelId, const istd::IChangeable::ChangeSet& changeSet);
94 
95  // reimplemented (icomp::CComponentBase)
96  virtual void OnComponentCreated();
97  virtual void OnComponentDestroyed();
98 
99 protected:
100  I_REF(iview::IShapeStatusInfo, m_shapeStatusInfoCompPtr);
101  I_REF(i2d::ICalibrationProvider, m_calibrationProviderCompPtr);
102  I_REF(imod::IModel, m_calibrationProviderModelCompPtr);
103  I_REF(iview::IColorSchema, m_colorSchemaCompPtr);
104  I_REF(iview::IShape, m_calibrationShapeCompPtr);
105  I_ATTR(int, m_viewIdAttrPtr);
106  I_ATTR(bool, m_useAntialiasingAttrPtr);
107  I_ATTR(bool, m_useShapeEditCommandsAttrPtr);
108  I_ATTR(bool, m_useGridCommandsAttrPtr);
109  I_ATTR(bool, m_useScollBarCommandsAttrPtr);
110  I_ATTR(bool, m_useStatusBarCommandsAttrPtr);
111  I_ATTR(bool, m_zoomToFitEnabledAttrPtr);
112  I_ATTR(int, m_fitModeAttrPtr);
113  I_ATTR(int, m_backgroundModeAttrPtr);
114  I_ATTR(bool, m_fullScreenModeSupportedAttrPtr);
115 };
116 
117 
118 } // namespace iqt2d
119 
120 
121 #endif // !iqt2d_CViewProviderGuiComp_included
122 
123 
virtual void OnComponentDestroyed()
BackgroundMode
Background type for the 2D-view.
Common interface for an object, which delivers a 2D-calibration.
virtual void OnGuiCreated()
Called just after GUI is initialized.
Generic implementation of a data model changes notifier.
Common interface for a general shape view implementations.
Definition: IShapeView.h:24
virtual void OnGuiDestroyed()
Called just before GUI is released.
virtual void OnComponentCreated()
Base class for all Qt GUI componentes.
imod::CMultiModelDispatcherBase BaseClass2
iqtgui::TGuiComponentBase< iview::CConsoleGui > BaseClass
virtual const ibase::IHierarchicalCommand * GetCommands() const
Get list of menu commands.
Standard 2D-View provider.
Interface for a provider of the heriarchical commands.
Common interface to define the hierarchical graph structures.
Common interface for all display console shapes.
Definition: IShape.h:27
virtual void OnGuiRetranslate()
Called from widget event filter when GUI should be retranslated.
virtual iview::IShapeView * GetView() const
Called when items should be removed from specified view.
void OnModelChanged(int modelId, const istd::IChangeable::ChangeSet &changeSet)
Interface for access local bitmap information.
Common interface for model objects, that supports Model/Observer design pattern.
Definition: IModel.h:23
Set of change flags (its IDs).
Definition: IChangeable.h:30
Interface for GUI objects managing view.
Definition: IViewProvider.h:24
Defines set of standard pens, brushes and simple management of unions.
Definition: IColorSchema.h:28
virtual int GetViewId() const
Get ID indentifing this view.
Color from the given color scheme.

© 2007-2017 Witold Gantzke and Kirill Lepskiy