#include <Leap.h>

Public Types | |
| enum | ValueType { TYPE_UNKNOWN = 0, TYPE_BOOLEAN = 1, TYPE_INT32 = 2, TYPE_FLOAT = 6, TYPE_STRING = 8 } |
Public Member Functions | |
| def | __init__ (self) |
| LEAP_EXPORT | Config () |
| def | get (self, args) |
| bool | getBool (const std::string &key) const |
| float | getFloat (const std::string &key) const |
| int32_t | getInt32 (const std::string &key) const |
| std::string | getString (const std::string &key) const |
| def | save (self) |
| LEAP_EXPORT bool | save () |
| def | set (self, args) |
| bool | setBool (const std::string &key, bool value) |
| bool | setFloat (const std::string &key, float value) |
| bool | setInt32 (const std::string &key, int32_t value) |
| bool | setString (const std::string &key, const std::string &value) |
| ValueType | type (const std::string &key) const |
Public Member Functions inherited from Leap::Interface | |
| def | __init__ (self, args, kwargs) |
Public Attributes | |
| this | |
Static Public Attributes | |
| TYPE_BOOLEAN = LeapPython.Config_TYPE_BOOLEAN | |
| TYPE_FLOAT = LeapPython.Config_TYPE_FLOAT | |
| TYPE_INT32 = LeapPython.Config_TYPE_INT32 | |
| TYPE_STRING = LeapPython.Config_TYPE_STRING | |
| TYPE_UNKNOWN = LeapPython.Config_TYPE_UNKNOWN | |
Private Member Functions | |
| LEAP_EXPORT bool | getBoolCString (const char *key) const |
| LEAP_EXPORT float | getFloatCString (const char *key) const |
| LEAP_EXPORT int32_t | getInt32CString (const char *key) const |
| LEAP_EXPORT const char * | getStringCString (const char *key) const |
| LEAP_EXPORT bool | setBoolCString (const char *key, bool value) |
| LEAP_EXPORT bool | setFloatCString (const char *key, float value) |
| LEAP_EXPORT bool | setInt32CString (const char *key, int32_t value) |
| LEAP_EXPORT bool | setStringCString (const char *key, const char *value) |
| LEAP_EXPORT ValueType | typeCString (const char *key) const |
Static Private Attributes | |
| __getattr__ = lambdaself,name:_swig_getattr(self, Config, name) | |
| __repr__ = _swig_repr | |
| __setattr__ = lambdaself,name,value:_swig_setattr(self, Config, name, value) | |
| __swig_destroy__ = LeapPython.delete_Config | |
| dictionary | __swig_getmethods__ = {} |
| dictionary | __swig_setmethods__ = {} |
Additional Inherited Members | |
Protected Member Functions inherited from Leap::Interface | |
| template<typename T > | |
| T * | get () const |
| LEAP_EXPORT | Interface (void *owner) |
| LEAP_EXPORT | Interface (Implementation *reference, void *owner) |
| LEAP_EXPORT | Interface (const Interface &rhs) |
| Interface (class SharedObject *object) | |
| LEAP_EXPORT Interface & | operator= (const Interface &rhs) |
| virtual LEAP_EXPORT | ~Interface () |
Static Protected Member Functions inherited from Leap::Interface | |
| static LEAP_EXPORT void | deleteCString (const char *cstr) |
Protected Attributes inherited from Leap::Interface | |
| class SharedObject * | m_object |
The Config class provides access to Leap Motion system configuration information.
You can get and set gesture configuration parameters using the Config object obtained from a connected Controller object. The key strings required to identify a configuration parameter include:
==================================== ========== ============= ======= Key string Value type Default value Units ==================================== ========== ============= ======= Gesture.Circle.MinRadius float 5.0 mm Gesture.Circle.MinArc float 1.5 * pi radians Gesture.Swipe.MinLength float 150 mm Gesture.Swipe.MinVelocity float 1000 mm/s Gesture.KeyTap.MinDownVelocity float 50 mm/s Gesture.KeyTap.HistorySeconds float 0.1 s Gesture.KeyTap.MinDistance float 3.0 mm Gesture.ScreenTap.MinForwardVelocity float 50 mm/s Gesture.ScreenTap.HistorySeconds float 0.1 s Gesture.ScreenTap.MinDistance float 5.0 mm ==================================== ========== ============= =======
After setting a configuration value, you must call the Config::save() method to commit the changes. You can save after the Controller has connected to the Leap Motion service/daemon. In other words, after the Controller has dispatched the serviceConnected or connected events or Controller::isConnected is true. The configuration value changes are not persistent; your application needs to set the values every time it runs.
Enumerates the possible data types for configuration values.
The Config::type() function returns an item from the ValueType enumeration.
| LEAP_EXPORT Leap::Config::Config | ( | ) |
Constructs a Config object. Do not create your own Config objects. Get a Config object using the Controller::config() function.
|
inline |
|
private |
|
inline |
|
private |
|
inline |
|
private |
|
inline |
|
private |
| LEAP_EXPORT bool Leap::Config::save | ( | ) |
Saves the current state of the config.
Call save() after making a set of configuration changes. The save() function transfers the configuration changes to the Leap Motion service. You can save after the Controller has connected to the Leap Motion service/daemon. In other words, after the Controller has dispatched the serviceConnected or connected events or Controller::isConnected is true. The configuration value changes are not persistent; your application must set the values every time it runs.
|
inline |
|
private |
|
inline |
|
private |
|
inline |
|
private |
|
inline |
|
private |
|
inline |
Reports the natural data type for the value related to the specified key.
| key | The key for the looking up the value in the configuration dictionary. |
|
private |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
static |
|
static |
|
static |
|
static |
|
static |