fw4spl
QtMenuBarContainer.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2017.
3  * Distributed under the terms of the GNU Lesser General Public License (LGPL) as
4  * published by the Free Software Foundation.
5  * ****** END LICENSE BLOCK ****** */
6 
7 #ifndef __FWGUIQT_CONTAINER_QTMENUBARCONTAINER_HPP__
8 #define __FWGUIQT_CONTAINER_QTMENUBARCONTAINER_HPP__
9 
10 #include "fwGuiQt/config.hpp"
11 
12 #include <fwCore/base.hpp>
13 
14 #include <fwGui/container/fwMenuBar.hpp>
15 
16 #include <fwTools/Object.hpp>
17 
18 #include <QPointer>
19 
20 QT_BEGIN_NAMESPACE
21 class QMenuBar;
22 QT_END_NAMESPACE
23 
24 namespace fwGuiQt
25 {
26 
27 namespace container
28 {
29 
34 class FWGUIQT_CLASS_API QtMenuBarContainer : public ::fwGui::container::fwMenuBar
35 {
36 
37 public:
38 
40  (()),
41  ::fwGui::factory::New< QtMenuBarContainer > );
42 
43  FWGUIQT_API QtMenuBarContainer(::fwGui::GuiBaseObject::Key key) noexcept;
44 
45  FWGUIQT_API virtual ~QtMenuBarContainer() noexcept;
46 
47  FWGUIQT_API virtual void clean() override;
48  FWGUIQT_API virtual void destroyContainer() override;
49 
50  FWGUIQT_API virtual void setQtMenuBar(QMenuBar* menuBar);
51  FWGUIQT_API virtual QMenuBar* getQtMenuBar();
52 
53 private:
54 
55  QPointer<QMenuBar> m_menuBar;
56 };
57 
58 } // namespace container
59 } // namespace fwGuiQt
60 
61 #endif /*__FWGUIQT_CONTAINER_QTMENUBARCONTAINER_HPP__*/
62 
Defines the menu for IHM.
Definition: fwMenuBar.hpp:24
Defines the Qt menu bar container for GUI.
Key class used to restrict access to Object construction. See http://www.drdobbs.com/184402053.
The namespace fwGuiQt contains classes which provide the implementation of the Gui using Qt library...
Definition: WindowLevel.hpp:32
#define fwCoreClassDefinitionsWithFactoryMacro(_classinfo_, _parameters_, _factory_)
Generate common construction methods for classes with one factory.