19 #ifndef SNARK_GRAPHICS_APPLICATIONS_LABELPOINTS_ACTIONS_H_
20 #define SNARK_GRAPHICS_APPLICATIONS_LABELPOINTS_ACTIONS_H_
22 #include <boost/function.hpp>
24 #include <qactiongroup.h>
26 namespace snark {
namespace graphics {
namespace View {
namespace Actions {
28 class Action :
public QAction
33 Action(
const std::string& name, boost::function<
void() > f );
39 boost::function< void() > m_action;
42 class ToggleAction :
public QAction
47 ToggleAction(
const std::string& name
48 , boost::function<
void(
bool ) > f
49 ,
const std::string& key =
"" );
51 ToggleAction(
const QIcon& icon
52 ,
const std::string& name
53 , boost::function<
void(
bool ) > f
54 ,
const std::string& key =
"" );
57 void action(
bool checked );
60 boost::function< void( bool ) > m_functor;
65 #endif // SNARK_GRAPHICS_APPLICATIONS_LABELPOINTS_ACTIONS_H_