fw4spl
FrameLayoutManager.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_LAYOUTMANAGER_FRAMELAYOUTMANAGER_HPP__
8 #define __FWGUIQT_LAYOUTMANAGER_FRAMELAYOUTMANAGER_HPP__
9 
10 #include "fwGuiQt/config.hpp"
11 #include "fwGuiQt/container/QtContainer.hpp"
12 
13 #include <fwCore/base.hpp>
14 
15 #include <fwGui/layoutManager/IFrameLayoutManager.hpp>
16 
17 #include <QObject>
18 #include <QPoint>
19 #include <QPointer>
20 
21 QT_BEGIN_NAMESPACE
22 class QMainWindow;
23 QT_END_NAMESPACE
24 
25 namespace fwGui
26 {
27 
31 class FWGUIQT_CLASS_API FrameLayoutManager : public QObject,
33 {
34 Q_OBJECT
35 public:
36 
38  (()),
39  ::fwGui::factory::New< FrameLayoutManager > );
40 
42 
43  FWGUIQT_API virtual ~FrameLayoutManager();
44 
48  FWGUIQT_API virtual void createFrame() override;
49 
53  FWGUIQT_API virtual void destroyFrame() override;
54 
55 private Q_SLOTS:
56  void onCloseFrame();
57 
58 private:
59 
60  void setState(FrameState state);
61  FrameState getState();
62  bool isOnScreen(const QPoint& pos);
63 
64  QPointer<QMainWindow> m_qtWindow;
65 };
66 
67 } // namespace fwGui
68 
69 #endif /*__FWGUIQT_LAYOUTMANAGER_FRAMELAYOUTMANAGER_HPP__*/
70 
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.
Defines the frame manager.
#define fwCoreClassDefinitionsWithFactoryMacro(_classinfo_, _parameters_, _factory_)
Generate common construction methods for classes with one factory.
Defines an interface for managing a frame.