Scribus Developer Documentation - API
logo-pen

Scribus Developer Documentation - API

cmdgetsetprop.cpp File Reference

#include "cmdgetsetprop.h"
#include "cmdutil.h"
#include <QMetaObject>
#include <QMetaProperty>
#include <QList>
#include <QObject>
#include <QObjectList>

Include dependency graph for cmdgetsetprop.cpp:

Go to the source code of this file.

Functions

QObject * getQObjectFromPyArg (PyObject *arg)
 Return a pointer to the QObject that the PyObject* args refers to.
PyObject * wrapQObject (QObject *obj)
 Return a PyCObject containing the passed QObject pointer.
const char * getpropertytype (QObject *obj, const char *propname, bool includesuper)
 return the name of the C type of the specified property
PyObject * scribus_propertyctype (PyObject *, PyObject *args, PyObject *kw)
PyObject * convert_QStringList_to_PyListObject (QStringList &origlist)
 Convert a QStringList to a Python list of str objects.
PyObject * convert_QObjectList_to_PyListObject (QObjectList *origlist)
 Convert a QObjectList to a Python list of PyCObjects.
PyObject * scribus_getpropertynames (PyObject *, PyObject *args, PyObject *kw)
PyObject * scribus_getproperty (PyObject *, PyObject *args, PyObject *kw)
PyObject * scribus_setproperty (PyObject *, PyObject *args, PyObject *kw)
void cmdgetsetpropdocwarnings ()


Function Documentation

void cmdgetsetpropdocwarnings (  ) 

HACK: this removes "warning: 'blah' defined but not used" compiler warnings with header files structure untouched (docstrings are kept near declarations) PV

Definition at line 482 of file cmdgetsetprop.cpp.

PyObject* convert_QObjectList_to_PyListObject ( QObjectList *  origlist  ) 

Convert a QObjectList to a Python list of PyCObjects.

Attention:
may return NULL with an exception set

Definition at line 110 of file cmdgetsetprop.cpp.

References wrapQObject().

PyObject* convert_QStringList_to_PyListObject ( QStringList &  origlist  ) 

Convert a QStringList to a Python list of str objects.

Attention:
may return NULL with an exception set

Definition at line 96 of file cmdgetsetprop.cpp.

Referenced by scribus_getproperty(), and scribus_getpropertynames().

const char* getpropertytype ( QObject *  obj,
const char *  propname,
bool  includesuper = true 
)

return the name of the C type of the specified property

Look up `propname' on `obj', searching through parent classes if `includsuper' is true. Get and return the name of the C type of the property.

If the property cannot be found, a null string is returned. NO EXCEPTION IS SET.

See also:
scribus_propertyctype()

Definition at line 51 of file cmdgetsetprop.cpp.

Referenced by scribus_propertyctype(), and scribus_setproperty().

QObject* getQObjectFromPyArg ( PyObject *  arg  ) 

Return a pointer to the QObject that the PyObject* args refers to.

This function looks up the PyObject* argument and tries to return a corresponding QObject.

If the argument is a PyCObject, it will return the contained pointer. If the pointer is NULL an exception is set before returning.

If the argument is a string, a PageItem by that name will be looked for and, if found, returned. If no such object could be found, an exception is set and NULL is returned.

If any other type is specified, an exception is set and NULL is returned.

Attention:
may return NULL with an exception set
See also:
wrapQObject()

Definition at line 16 of file cmdgetsetprop.cpp.

References getPageItemByName(), and tr().

Referenced by scribus_getproperty(), scribus_getpropertynames(), scribus_propertyctype(), and scribus_setproperty().

PyObject* scribus_getproperty ( PyObject *  ,
PyObject *  args,
PyObject *  kw 
)

PyObject* scribus_getpropertynames ( PyObject *  ,
PyObject *  args,
PyObject *  kw 
)

PyObject* scribus_propertyctype ( PyObject *  ,
PyObject *  args,
PyObject *  kw 
)

Definition at line 67 of file cmdgetsetprop.cpp.

References getpropertytype(), getQObjectFromPyArg(), and tr().

PyObject* scribus_setproperty ( PyObject *  ,
PyObject *  args,
PyObject *  kw 
)

Definition at line 327 of file cmdgetsetprop.cpp.

References getpropertytype(), getQObjectFromPyArg(), Py_RETURN_NONE, and tr().

PyObject* wrapQObject ( QObject *  obj  ) 

Return a PyCObject containing the passed QObject pointer.

See also:
getQObjectFromPyArg()
Attention:
may return NULL with an exception set

Definition at line 45 of file cmdgetsetprop.cpp.

Referenced by convert_QObjectList_to_PyListObject(), and initscribus().

Created with personalized Doxygen. This is documentation for GPL software Scribus - Open Source Desktop Publishing.