fw4spl
QtMenuItemContainer.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_QTMENUITEMCONTAINER_HPP__
8 #define __FWGUIQT_CONTAINER_QTMENUITEMCONTAINER_HPP__
9 
10 #include "fwGuiQt/config.hpp"
11 
12 #include <fwCore/base.hpp>
13 
14 #include <fwGui/container/fwMenuItem.hpp>
15 
16 #include <fwTools/Object.hpp>
17 
18 #include <QPointer>
19 
20 QT_BEGIN_NAMESPACE
21 class QAction;
22 QT_END_NAMESPACE
23 
24 namespace fwGuiQt
25 {
26 namespace container
27 {
28 
32 class FWGUIQT_CLASS_API QtMenuItemContainer : public ::fwGui::container::fwMenuItem
33 {
34 
35 public:
36 
38  (()),
39  ::fwGui::factory::New< QtMenuItemContainer > );
40 
41  FWGUIQT_API QtMenuItemContainer(::fwGui::GuiBaseObject::Key key) noexcept;
42 
43  FWGUIQT_API virtual ~QtMenuItemContainer() noexcept;
44 
45  FWGUIQT_API virtual void clean() override;
46  FWGUIQT_API virtual void destroyContainer() override;
47 
48  FWGUIQT_API virtual void setQtMenuItem(QAction* menuItem);
49  FWGUIQT_API virtual QAction* getQtMenuItem();
50 
51 private:
52 
53  QPointer<QAction> m_menuItem;
54 };
55 
56 } // namespace container
57 } // namespace fwGuiQt
58 
59 #endif /*__FWGUIQT_CONTAINER_QTMENUITEMCONTAINER_HPP__*/
60 
Defines the menu item for IHM.
Definition: fwMenuItem.hpp:24
Key class used to restrict access to Object construction. See http://www.drdobbs.com/184402053.
Defines the Qt menuItem bar container for IHM.
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.