#include <ActionFunction.h>
Public Member Functions | |
ActionFunction (QObject *) | |
Constructor. More... | |
void | hover (QAction *a, std::function< void()> func) |
void | toggle (QAction *a, std::function< void(bool)> func) |
void | trigger (QAction *a, std::function< void()> func) |
virtual | ~ActionFunction () |
The class connects the triggered() signal of a QAction instance with the method of a usual C++ class not derived from QObject.
The class can e.g be used to fill up the context-menu of the view provider classes.
http://www.boost.org/doc/libs/1_57_0/libs/bind/bind.html#with_boost_function
ActionFunction::ActionFunction | ( | QObject * | parent | ) |
Constructor.
|
virtual |
void ActionFunction::hover | ( | QAction * | a, |
std::function< void()> | func | ||
) |
References draftgeoutils.intersections::connect().
void ActionFunction::toggle | ( | QAction * | a, |
std::function< void(bool)> | func | ||
) |
References draftgeoutils.intersections::connect().
void ActionFunction::trigger | ( | QAction * | a, |
std::function< void()> | func | ||
) |
Connects the QAction's triggered() signal with the function func
References draftgeoutils.intersections::connect().