CToolBarGuiCompBase.h
Go to the documentation of this file.
1 #ifndef iqtgui_CToolBarGuiCompBase_included
2 #define iqtgui_CToolBarGuiCompBase_included
3 
4 
5 // Qt includes
6 #include <QtCore/QMap>
7 #if QT_VERSION >= 0x050000
8 #include <QtWidgets/QToolBar>
9 #else
10 #include <QtGui/QToolBar>
11 #endif
12 
13 // ACF includes
16 
17 
18 namespace iqtgui
19 {
20 
21 
26  public iqtgui::TGuiComponentBase<QToolBar>,
27  virtual public iqtgui::IMainWindowComponent
28 {
29 public:
31 
32  I_BEGIN_COMPONENT(CToolBarGuiCompBase);
33  I_REGISTER_INTERFACE(iqtgui::IMainWindowComponent);
34  I_ASSIGN(m_toolBarAreaAttrPtr, "ToolBarArea", "Specify the area for this toolbar\n 0 - left\n 1 - right\n 2 - top\n 3 - bottom", false, 0);
35  I_ASSIGN(m_useVerticalOrientationAttrPtr, "UseVerticalOrientation", "Use vertical orientation of the tool bar", true, false);
36  I_ASSIGN(m_dockFeaturesAttrPtr, "DockFeatures", "Specify the dock features for this widget\nIt is combination of options:\n2 - moveable\n4 - floatable", true, WCF_MOVEABLE | WCF_FLOATABLE);
37  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);
38  I_ASSIGN(m_titleAttrPtr, "Title", "Tool bar title", false, "");
39  I_ASSIGN(m_iconSizeAttrPtr, "IconSize", "Size of the icon used in the tool bar", false, 32);
40  I_ASSIGN(m_buttonStyleAttrPtr, "ButtonStyle", "Button style used by the tool bar\n0 - Only display the icon\n1 - Only display the text\n2 - The text appears beside the icon\n3 - The text appears under the icon\n4 - Follow the system style", true, Qt::ToolButtonIconOnly);
41  I_END_COMPONENT;
42 
43  // reimplemented (iqtgui::IMainWindowComponent)
44  virtual bool AddToMainWindow(QMainWindow& mainWindow);
45  virtual bool RemoveFromMainWindow(QMainWindow& mainWindow);
46  virtual QString GetTitle() const;
47  virtual int GetFlags() const;
48 
49 protected:
50  // reimplemented (CGuiComponentBase)
51  virtual void OnGuiCreated();
52 
53 private:
54  I_ATTR(int, m_toolBarAreaAttrPtr);
55  I_ATTR(bool, m_useVerticalOrientationAttrPtr);
56  I_ATTR(int, m_dockFeaturesAttrPtr);
57  I_ATTR(int, m_allowedDockAreasAttrPtr);
58  I_TEXTATTR(m_titleAttrPtr);
59  I_ATTR(int, m_iconSizeAttrPtr);
60  I_ATTR(int, m_buttonStyleAttrPtr);
61 };
62 
63 
64 } // namespace iqtgui
65 
66 
67 #endif // !iqtgui_CToolBarGuiCompBase_included
68 
69 
iqtgui::TGuiComponentBase< QToolBar > BaseClass
virtual QString GetTitle() const
Get the title of the main window component.
Base class for all Qt GUI componentes.
virtual void OnGuiCreated()
Called just after GUI is initialized.
virtual bool AddToMainWindow(QMainWindow &mainWindow)
Add this component to main window.
A common interface for main window component such as dock widget, tool bar and so on...
virtual bool RemoveFromMainWindow(QMainWindow &mainWindow)
Remove this component from main window.
virtual int GetFlags() const
Get properties of of the window component.
Basic implementation of a tool bar component.
Element can be float from the main window to be standalone window.

© 2007-2017 Witold Gantzke and Kirill Lepskiy