The python export class for Command. More...

#include <CommandPy.h>

Public Types

typedef CommandPointerType
 
- Public Types inherited from Base::PyObjectBase
typedef void * PointerType
 
enum  Status { Valid = 0 , Immutable = 1 , Notify = 2 , NoTrack = 3 }
 

Public Member Functions

 CommandPy (Command *pcObject, PyTypeObject *T=&Type)
 
virtual PyTypeObject * GetType (void)
 
virtual int PyInit (PyObject *args, PyObject *k)
 PyInit method Override this method to initialize a newly created instance of the class (Constructor) More...
 
std::string representation (void) const
 
callbacks and implementers for the python object attributes
PyObjectgetCustomAttributes (const char *attr) const
 getter method for special attributes (e.g. dynamic ones) More...
 
int setCustomAttributes (const char *attr, PyObject *obj)
 setter for special attributes (e.g. More...
 
CommandgetCommandPtr (void) const
 getter for the object handled by this class More...
 
- Public Member Functions inherited from Base::PyObjectBase
PyObjectBaseDecRef (void)
 decref method wrapper (see python extending manual) More...
 
PyObjectBaseIncRef (void)
 incref method wrapper (see python extending manual) More...
 
bool isConst ()
 
bool isNotTracking () const
 
bool isValid ()
 
 PyObjectBase (void *, PyTypeObject *T)
 Constructor Sets the Type of the object (for inheritance) and decrease the the reference count of the PyObject. More...
 
void setConst ()
 
void setInvalid ()
 
void setNotTracking (bool on=true)
 
void setShouldNotify (bool on)
 
bool shouldNotify () const
 
void startNotify ()
 

Static Public Member Functions

static PyObjectPyMake (struct _typeobject *, PyObject *, PyObject *)
 
- Static Public Member Functions inherited from Base::PyObjectBase
static void PyDestructor (PyObject *P)
 Wrapper for the Python destructor. More...
 

Static Public Attributes

static PyGetSetDef GetterSetter []
 Attribute structure of CommandPy. More...
 
static PyMethodDef Methods []
 Methods structure of CommandPy. More...
 
static PyTypeObject Type
 Type structure of CommandPy. More...
 
- Static Public Attributes inherited from Base::PyObjectBase
static PyMethodDef Methods []
 
static PyTypeObject Type
 Py_Header struct from python.h. More...
 

Protected Member Functions

 ~CommandPy ()
 
- Protected Member Functions inherited from Base::PyObjectBase
void setTwinPointer (void *ptr)
 Overrides the pointer to the twin object. More...
 
virtual ~PyObjectBase ()
 destructor More...
 

callbacks and implementers for the python object methods

PyObjectrun (PyObject *args)
 implementer for the run() method More...
 
PyObjectisActive (PyObject *args)
 implementer for the isActive() method More...
 
PyObjectgetShortcut (PyObject *args)
 implementer for the getShortcut() method More...
 
PyObjectsetShortcut (PyObject *args)
 implementer for the setShortcut() method More...
 
PyObjectresetShortcut (PyObject *args)
 implementer for the resetShortcut() method More...
 
PyObjectgetInfo (PyObject *args)
 implementer for the getInfo() method More...
 
PyObjectgetAction (PyObject *args)
 implementer for the getAction() method More...
 
static PyObjectstaticCallback_get (PyObject *self, PyObject *args)
 callback for the get() method More...
 
static PyObjectget (PyObject *args)
 implementer for the get() method More...
 
static PyObjectstaticCallback_update (PyObject *self, PyObject *args)
 callback for the update() method More...
 
static PyObjectupdate (PyObject *args)
 implementer for the update() method More...
 
static PyObjectstaticCallback_listAll (PyObject *self, PyObject *args)
 callback for the listAll() method More...
 
static PyObjectlistAll (PyObject *args)
 implementer for the listAll() method More...
 
static PyObjectstaticCallback_listByShortcut (PyObject *self, PyObject *args)
 callback for the listByShortcut() method More...
 
static PyObjectlistByShortcut (PyObject *args)
 implementer for the listByShortcut() method More...
 
static PyObjectstaticCallback_run (PyObject *self, PyObject *args)
 callback for the run() method More...
 
static PyObjectstaticCallback_isActive (PyObject *self, PyObject *args)
 callback for the isActive() method More...
 
static PyObjectstaticCallback_getShortcut (PyObject *self, PyObject *args)
 callback for the getShortcut() method More...
 
static PyObjectstaticCallback_setShortcut (PyObject *self, PyObject *args)
 callback for the setShortcut() method More...
 
static PyObjectstaticCallback_resetShortcut (PyObject *self, PyObject *args)
 callback for the resetShortcut() method More...
 
static PyObjectstaticCallback_getInfo (PyObject *self, PyObject *args)
 callback for the getInfo() method More...
 
static PyObjectstaticCallback_getAction (PyObject *self, PyObject *args)
 callback for the getAction() method More...
 

Additional Inherited Members

- Protected Attributes inherited from Base::PyObjectBase
std::bitset< 32 > StatusBits
 

Detailed Description

The python export class for Command.

Member Typedef Documentation

◆ PointerType

Constructor & Destructor Documentation

◆ ~CommandPy()

CommandPy::~CommandPy ( )
protected

◆ CommandPy()

CommandPy::CommandPy ( Command pcObject,
PyTypeObject *  T = &Type 
)

Member Function Documentation

◆ get()

PyObject * CommandPy::get ( PyObject args)
static

implementer for the get() method

Referenced by draftguitools.gui_trackers.editTracker::move(), and staticCallback_get().

◆ getAction()

◆ getCommandPtr()

Command * CommandPy::getCommandPtr ( void  ) const

getter for the object handled by this class

◆ getCustomAttributes()

PyObject* Gui::CommandPy::getCustomAttributes ( const char *  attr) const

getter method for special attributes (e.g. dynamic ones)

◆ getInfo()

◆ getShortcut()

PyObject * CommandPy::getShortcut ( PyObject args)

◆ GetType()

virtual PyTypeObject* Gui::CommandPy::GetType ( void  )
virtual

Reimplemented from Base::PyObjectBase.

◆ isActive()

PyObject * CommandPy::isActive ( PyObject args)

implementer for the isActive() method

References Base::BaseExceptionFreeCADError, and Gui::Command::isActive().

Referenced by staticCallback_isActive().

◆ listAll()

PyObject * CommandPy::listAll ( PyObject args)
static

implementer for the listAll() method

Referenced by staticCallback_listAll().

◆ listByShortcut()

PyObject * CommandPy::listByShortcut ( PyObject args)
static

implementer for the listByShortcut() method

Referenced by staticCallback_listByShortcut().

◆ PyInit()

int CommandPy::PyInit ( PyObject ,
PyObject  
)
virtual

PyInit method Override this method to initialize a newly created instance of the class (Constructor)

Reimplemented from Base::PyObjectBase.

◆ PyMake()

PyObject * CommandPy::PyMake ( struct _typeobject *  ,
PyObject ,
PyObject  
)
static

◆ representation()

◆ resetShortcut()

PyObject * CommandPy::resetShortcut ( PyObject args)

implementer for the resetShortcut() method

test to see if we successfully reset the shortcut by loading it back and comparing

References Base::BaseExceptionFreeCADError, Gui::CommandBase::getAccel(), Gui::CommandBase::getAction(), ParameterGrp::GetGroup(), Gui::Command::getName(), and ParameterGrp::RemoveASCII().

Referenced by staticCallback_resetShortcut().

◆ run()

◆ setCustomAttributes()

int Gui::CommandPy::setCustomAttributes ( const char *  attr,
PyObject obj 
)

setter for special attributes (e.g.

dynamic ones) Output: Success=1, Failure=-1, Ignore=0

◆ setShortcut()

PyObject * CommandPy::setShortcut ( PyObject args)

implementer for the setShortcut() method

avoid cluttering parameters unnecessarily by saving only when new shortcut is not the default shortcut remove spaces to handle cases such as shortcut = "C,L" or "C, L"

References Base::BaseExceptionFreeCADError, Gui::CommandBase::getAccel(), Gui::CommandBase::getAction(), ParameterGrp::GetGroup(), Gui::Command::getName(), ParameterGrp::RemoveASCII(), and ParameterGrp::SetASCII().

Referenced by staticCallback_setShortcut().

◆ staticCallback_get()

PyObject * CommandPy::staticCallback_get ( PyObject self,
PyObject args 
)
static

◆ staticCallback_getAction()

◆ staticCallback_getInfo()

◆ staticCallback_getShortcut()

◆ staticCallback_isActive()

PyObject * CommandPy::staticCallback_isActive ( PyObject self,
PyObject args 
)
static

◆ staticCallback_listAll()

PyObject * CommandPy::staticCallback_listAll ( PyObject self,
PyObject args 
)
static

◆ staticCallback_listByShortcut()

PyObject * CommandPy::staticCallback_listByShortcut ( PyObject self,
PyObject args 
)
static

◆ staticCallback_resetShortcut()

◆ staticCallback_run()

◆ staticCallback_setShortcut()

◆ staticCallback_update()

PyObject * CommandPy::staticCallback_update ( PyObject self,
PyObject args 
)
static

◆ update()

Member Data Documentation

◆ GetterSetter

PyGetSetDef CommandPy::GetterSetter
static
Initial value:
= {
{NULL, NULL, NULL, NULL, NULL}
}

Attribute structure of CommandPy.

◆ Methods

PyMethodDef CommandPy::Methods
static

Methods structure of CommandPy.

◆ Type


The documentation for this class was generated from the following files:
  • Sources/FreeCAD-SourceDocs/src/Gui/CommandPy.h
  • Sources/FreeCAD/src/Gui/CommandPyImp.cpp
  • Sources/FreeCAD-SourceDocs/src/Gui/CommandPy.cpp