fw4spl
QtToolBarContainer.cpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2016.
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 #include <QToolBar>
8 #include <QAction>
9 #include <QMenu>
10 #include "fwGuiQt/container/QtToolBarContainer.hpp"
11 
12 namespace fwGuiQt
13 {
14 namespace container
15 {
16 
17 //-----------------------------------------------------------------------------
18 
19 QtToolBarContainer::QtToolBarContainer(::fwGui::GuiBaseObject::Key key) noexcept
20 {
21 }
22 
23 //-----------------------------------------------------------------------------
24 
25 QtToolBarContainer::~QtToolBarContainer() noexcept
26 {
27 }
28 
29 //-----------------------------------------------------------------------------
30 
31 void QtToolBarContainer::clean()
32 {
33  SLM_ASSERT("The Qt toolBar is not yet initialized, cleaning is thus impossible", m_toolBar);
34 
35  m_toolBar->clear();
36 }
37 
38 //-----------------------------------------------------------------------------
39 
40 void QtToolBarContainer::destroyContainer()
41 {
42  SLM_ASSERT("The Qt toolBar is not yet initialized, cleaning is thus impossible", m_toolBar);
43 
44  delete m_toolBar;
45 }
46 
47 //-----------------------------------------------------------------------------
48 
49 void QtToolBarContainer::setQtToolBar(QToolBar *toolBar)
50 {
51  this->m_toolBar = toolBar;
52 }
53 
54 //-----------------------------------------------------------------------------
55 
56 QToolBar* QtToolBarContainer::getQtToolBar()
57 {
58  return this->m_toolBar;
59 }
60 
61 //-----------------------------------------------------------------------------
62 
63 } // namespace container
64 } // namespace fwGuiQt
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 SLM_ASSERT(message, cond)
work like &#39;assert&#39; from &#39;cassert&#39;, with in addition a message logged by spylog (with FATAL loglevel) ...
Definition: spyLog.hpp:308