fw4spl
ActionCallback.cpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2015.
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 <fwGui/registry/macros.hpp>
8 
9 #include "fwGuiQt/ActionCallback.hpp"
10 
11 
12 fwGuiRegisterMacro( ::fwGuiQt::ActionCallback, ::fwGui::ActionCallbackBase::REGISTRY_KEY );
13 
14 namespace fwGuiQt
15 {
16 
17 //-----------------------------------------------------------------------------
18 
19 ActionCallback::ActionCallback(::fwGui::GuiBaseObject::Key key)
20 {
21 }
22 
23 //-----------------------------------------------------------------------------
24 
25 ActionCallback::~ActionCallback()
26 {
27 }
28 
29 //-----------------------------------------------------------------------------
30 
31 // if action is checkable, executeQt is executed after checkQt
32 void ActionCallback::executeQt(bool checked)
33 {
34  this->execute();
35 }
36 
37 //-----------------------------------------------------------------------------
38 
39 void ActionCallback::checkQt(bool checked)
40 {
41  this->check(checked);
42 }
43 
44 } // namespace fwGuiQt
45 
46 
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
void executeQt(bool checked=false)
Qt slot.
virtual FWGUI_API void check(bool checked)
Called method when callback is checked.
Defines the menu item callback.
virtual FWGUI_API void execute() override
Called method when callback is executed.