fw4spl
QtMainFrame.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_QTMAINFRAME_HPP__
8 #define __FWGUIQT_QTMAINFRAME_HPP__
9 
10 #include "fwGuiQt/config.hpp"
11 
12 #include <QMainWindow>
13 #include <QPointer>
14 
15 #include <functional>
16 
17 namespace fwGuiQt
18 {
19 
24 class QtMainFrame : public QMainWindow
25 {
26 
27 Q_OBJECT
28 
29 public:
33  FWGUIQT_API QtMainFrame() noexcept;
34 
36  FWGUIQT_API virtual ~QtMainFrame() noexcept;
37 
38  typedef std::function<void ()> CloseCallback;
39  FWGUIQT_API void setCloseCallback(CloseCallback fct);
40 
41 protected:
42  void closeEvent(QCloseEvent* event);
43 
44 private:
45  CloseCallback m_fctCloseCallback;
46 };
47 
48 } // fwGuiQt
49 
50 #endif // __FWGUIQT_QTMAINFRAME_HPP__
virtual FWGUIQT_API ~QtMainFrame() noexcept
Destructor.
Definition: QtMainFrame.cpp:31
The namespace fwGuiQt contains classes which provide the implementation of the Gui using Qt library...
Definition: WindowLevel.hpp:32
FWGUIQT_API QtMainFrame() noexcept
Constructor.
Definition: QtMainFrame.cpp:24
A qt panel used to control a VTK 2D Negatoscope view.
Definition: QtMainFrame.hpp:24