CDockWidgetGuiComp.h
Go to the documentation of this file.
1 #ifndef iqtgui_CDockWidgetGuiComp_included
2 #define iqtgui_CDockWidgetGuiComp_included
3 
4 
5 // Qt includes
6 #include <QtCore/QtGlobal>
7 #if QT_VERSION >= 0x050000
8 #include <QtWidgets/QDockWidget>
9 #else
10 #include <QtGui/QDockWidget>
11 #endif
12 
13 // ACF includes
16 
17 
18 namespace iqtgui
19 {
20 
21 
26  public TGuiComponentBase<QDockWidget>,
27  virtual public IMainWindowComponent
28 {
29  Q_OBJECT
30 public:
32 
33  I_BEGIN_COMPONENT(CDockWidgetGuiComp);
34  I_REGISTER_INTERFACE(IMainWindowComponent);
35  I_ASSIGN(m_slaveGuiCompPtr, "SlaveGui", "Slave GUI for this dock widget", true, "SlaveGui");
36  I_ASSIGN(m_dockAreaAttrPtr, "DockArea", "Specify the dock area for this widget\n 0 - left\n 1 - right\n 2 - top\n 3 - bottom", false, 0);
37  I_ASSIGN(m_dockFeaturesAttrPtr, "DockFeatures", "Specify the dock features for this widget\nIt is combination of options:\n0 - permanent\n1 - closable\n 2 - moveable\n 4 - floatable\n 8 - vertical title", true, WCF_CLOSABLE | WCF_MOVEABLE | WCF_FLOATABLE);
38  I_ASSIGN(m_allowedDockAreasAttrPtr, "AllowedDockAreas", "Specify the allowed dock areas\nIt is combination of options:\n 1 - left\n 2 - right\n 4 - top\n 8 - bottom", false, 0);
39  I_ASSIGN(m_dockTitleAttrPtr, "DockTitle", "Specify the dock title ", false, "DockTitle");
40  I_END_COMPONENT;
41 
42  // reimplemented (iqtgui::IMainWindowComponent)
43  virtual bool AddToMainWindow(QMainWindow& mainWindow);
44  virtual bool RemoveFromMainWindow(QMainWindow& mainWindow);
45  virtual QString GetTitle() const;
46  virtual int GetFlags() const;
47 
48 protected:
49  // reimplemented (CGuiComponentBase)
50  virtual void OnGuiCreated();
51  virtual void OnGuiDestroyed();
52  virtual void OnGuiRetranslate();
53 
54 private:
55  I_REF(iqtgui::IGuiObject, m_slaveGuiCompPtr);
56  I_ATTR(int, m_dockAreaAttrPtr);
57  I_ATTR(int, m_dockFeaturesAttrPtr);
58  I_ATTR(int, m_allowedDockAreasAttrPtr);
59  I_TEXTATTR(m_dockTitleAttrPtr);
60 };
61 
62 
63 } // namespace iqtgui
64 
65 
66 #endif // !iqtgui_CDockWidgetGuiComp_included
67 
68 
TGuiComponentBase< QDockWidget > BaseClass
Wrapper for docking windows for main window.
Base class for all Qt GUI componentes.
virtual bool RemoveFromMainWindow(QMainWindow &mainWindow)
Remove this component from main window.
virtual QString GetTitle() const
Get the title of the main window component.
A common interface for main window component such as dock widget, tool bar and so on...
virtual bool AddToMainWindow(QMainWindow &mainWindow)
Add this component to main window.
virtual void OnGuiDestroyed()
Called just before GUI is released.
Common interface for GUI objects using in component context.
Definition: IGuiObject.h:25
virtual int GetFlags() const
Get properties of of the window component.
virtual void OnGuiCreated()
Called just after GUI is initialized.
Element can be float from the main window to be standalone window.
virtual void OnGuiRetranslate()
Called from widget event filter when GUI should be retranslated.

© 2007-2017 Witold Gantzke and Kirill Lepskiy