21 #ifndef SNARK_GRAPHICS_APPLICATIONS_LABELPOINTS_ACTION_H_
22 #define SNARK_GRAPHICS_APPLICATIONS_LABELPOINTS_ACTION_H_
24 #include <boost/function.hpp>
26 #include <qactiongroup.h>
29 namespace snark {
namespace graphics {
namespace View {
31 class Action :
public QAction
36 Action(
const std::string& name, boost::function<
void() > f );
42 boost::function< void() > m_action;
45 class ToggleAction :
public QAction
50 ToggleAction(
const std::string& name
51 , boost::function<
void(
bool ) > f
52 ,
const std::string& key =
"" );
54 ToggleAction(
const QIcon& icon
55 ,
const std::string& name
56 , boost::function<
void(
bool ) > f
57 ,
const std::string& key =
"" );
60 void action(
bool checked );
63 boost::function< void( bool ) > m_functor;
68 #endif // SNARK_GRAPHICS_APPLICATIONS_LABELPOINTS_ACTION_H_