fw4spl
QtContainer.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_QTCONTAINER_HPP__
8 #define __FWGUIQT_CONTAINER_QTCONTAINER_HPP__
9 
10 #include "fwGuiQt/config.hpp"
11 
12 #include <fwCore/base.hpp>
13 
14 #include <fwGui/container/fwContainer.hpp>
15 
16 #include <fwTools/Object.hpp>
17 
18 #include <QPointer>
19 
20 QT_BEGIN_NAMESPACE
21 class QLayout;
22 class QWidget;
23 QT_END_NAMESPACE
24 
25 namespace fwGuiQt
26 {
27 namespace container
28 {
29 
35 class FWGUIQT_CLASS_API QtContainer : public ::fwGui::container::fwContainer
36 {
37 
38 public:
39 
41  (()),
42  ::fwGui::factory::New< QtContainer > )
43 
44  FWGUIQT_API QtContainer(::fwGui::GuiBaseObject::Key key) noexcept;
45 
46  FWGUIQT_API virtual ~QtContainer() noexcept;
47 
48  FWGUIQT_API virtual void setQtContainer(QWidget* container);
49  FWGUIQT_API virtual QWidget* getQtContainer();
50 
57  FWGUIQT_API virtual void setLayout(QLayout* const layout);
58 
59  FWGUIQT_API virtual void clean() override;
60  FWGUIQT_API virtual void destroyContainer() override;
61  FWGUIQT_API virtual bool isShownOnScreen() override;
62 
63  FWGUIQT_API virtual void setVisible(bool isVisible) override;
64  FWGUIQT_API virtual void setEnabled(bool isEnabled) override;
65 
66 private:
67 
68  QPointer<QWidget> m_container;
69 };
70 
71 } // namespace container
72 } // namespace fwGuiQt
73 
74 #endif /*__FWGUIQT_CONTAINER_QTCONTAINER_HPP__*/
75 
The namespace fwGui contains the base interface for IHM services.
Definition: SJobBar.hpp:23
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.
Defines the QWidget container for UI.
Definition: QtContainer.hpp:35
Defines the generic container for IHM.
Definition: fwContainer.hpp:21