7 #ifndef CMD_GETSETPROP_H
8 #define CMD_GETSETPROP_H
12 #include <QStringList>
34 QObject* getQObjectFromPyArg(PyObject* arg);
42 PyObject* wrapQObject(QObject* obj);
49 PyObject* convert_QStringList_to_PyListObject(QStringList& origlist);
55 PyObject* convert_QObjectList_to_PyListObject(QObjectList* origlist);
69 const char* getpropertytype(QObject* obj,
const char* propname,
bool includesuper =
true);
76 PyDoc_STRVAR(scribus_propertyctype__doc__,
77 QT_TR_NOOP(
"getPropertyCType(object, property, includesuper=True)\n\
79 Returns the name of the C type of `property' of `object'. See getProperty()\n\
80 for details of arguments.\n\
82 If `includesuper' is true, search inherited properties too.\n\
84 PyObject* scribus_propertyctype(PyObject* , PyObject* args, PyObject* kw);
95 PyDoc_STRVAR(scribus_getpropertynames__doc__,
96 QT_TR_NOOP(
"getPropertyNames(object, includesuper=True)\n\
98 Return a list of property names supported by `object'.\n\
99 If `includesuper' is true, return properties supported\n\
100 by parent classes as well.\n\
102 PyObject* scribus_getpropertynames(PyObject*
self, PyObject* args, PyObject* kw);
122 PyDoc_STRVAR(scribus_getproperty__doc__,
123 QT_TR_NOOP(
"getProperty(object, property)\n\
125 Return the value of the property `property' of the passed `object'.\n\
127 The `object' argument may be a string, in which case the named PageItem\n\
128 is searched for. It may also be a PyCObject, which may point to any\n\
129 C++ QObject instance.\n\
131 The `property' argument must be a string, and is the name of the property\n\
132 to look up on `object'.\n\
134 The return value varies depending on the type of the property.\n\
136 PyObject* scribus_getproperty(PyObject* , PyObject* args, PyObject* kw);
157 PyDoc_STRVAR(scribus_setproperty__doc__,
158 QT_TR_NOOP(
"setProperty(object, property, value)\n\
160 Set `property' of `object' to `value'. If `value' cannot be converted to a type\n\
161 compatible with the type of `property', an exception is raised. An exception may\n\
162 also be raised if the underlying setter fails.\n\
164 See getProperty() for more information.\n\
166 PyObject* scribus_setproperty(PyObject* , PyObject* args, PyObject* kw);