Back to index

scribus-ng  1.3.4.dfsg+svn20071115
cmdgetsetprop.h
Go to the documentation of this file.
00001 /*
00002 For general Scribus (>=1.3.2) copyright and licensing information please refer
00003 to the COPYING file provided with the program. Following this notice may exist
00004 a copyright and/or license notice that predates the release of Scribus 1.3.2
00005 for which a new license (GPL+exception) is in place.
00006 */
00007 #ifndef CMD_GETSETPROP_H
00008 #define CMD_GETSETPROP_H
00009 
00010 // Pulls in Python.h first
00011 #include "cmdvar.h"
00012 
00013 
00033 QObject* getQObjectFromPyArg(PyObject* arg);
00034 
00035 
00041 PyObject* wrapQObject(QObject* obj);
00042 
00043 
00048 PyObject* convert_QStringList_to_PyListObject(QStrList origlist);
00049 
00054 PyObject* convert_QObjectList_to_PyListObject(QObjectList* origlist);
00055 
00068 const char* getpropertytype(QObject* obj, const char* propname, bool includesuper = true);
00069 
00075 PyDoc_STRVAR(scribus_propertyctype__doc__,
00076 QT_TR_NOOP("getPropertyCType(object, property, includesuper=True)\n\
00077 \n\
00078 Returns the name of the C type of `property' of `object'. See getProperty()\n\
00079 for details of arguments.\n\
00080 \n\
00081 If `includesuper' is true, search inherited properties too.\n\
00082 "));
00083 PyObject* scribus_propertyctype(PyObject* /*self*/, PyObject* args, PyObject* kw);
00084 
00085 
00094 PyDoc_STRVAR(scribus_getpropertynames__doc__,
00095 QT_TR_NOOP("getPropertyNames(object, includesuper=True)\n\
00096 \n\
00097 Return a list of property names supported by `object'.\n\
00098 If `includesuper' is true, return properties supported\n\
00099 by parent classes as well.\n\
00100 "));
00101 PyObject* scribus_getpropertynames(PyObject* self, PyObject* args, PyObject* kw);
00102 
00103 
00121 PyDoc_STRVAR(scribus_getproperty__doc__,
00122 QT_TR_NOOP("getProperty(object, property)\n\
00123 \n\
00124 Return the value of the property `property' of the passed `object'.\n\
00125 \n\
00126 The `object' argument may be a string, in which case the named PageItem\n\
00127 is searched for. It may also be a PyCObject, which may point to any\n\
00128 C++ QObject instance.\n\
00129 \n\
00130 The `property' argument must be a string, and is the name of the property\n\
00131 to look up on `object'.\n\
00132 \n\
00133 The return value varies depending on the type of the property.\n\
00134 "));
00135 PyObject* scribus_getproperty(PyObject* /*self*/, PyObject* args, PyObject* kw);
00136 
00137 
00156 PyDoc_STRVAR(scribus_setproperty__doc__,
00157 QT_TR_NOOP("setProperty(object, property, value)\n\
00158 \n\
00159 Set `property' of `object' to `value'. If `value' cannot be converted to a type\n\
00160 compatible with the type of `property', an exception is raised. An exception may\n\
00161 also be raised if the underlying setter fails.\n\
00162 \n\
00163 See getProperty() for more information.\n\
00164 "));
00165 PyObject* scribus_setproperty(PyObject* /*self*/, PyObject* args, PyObject* kw);
00166 
00167 
00175 PyDoc_STRVAR(scribus_getchildren__doc__,
00176 QT_TR_NOOP("getChildren(object, ofclass=None, ofname=None, regexpmatch=False, recursive=True)\n\
00177 \n\
00178 Return a list of children of `object', possibly restricted to children\n\
00179 of class named `ofclass' or children named `ofname'. If `recursive' is true,\n\
00180 search recursively through children, grandchildren, etc.\n\
00181 \n\
00182 See QObject::children() in the Qt docs for more information.\n\
00183 "));
00184 PyObject* scribus_getchildren(PyObject* self, PyObject* args, PyObject* kw);
00185 
00186 
00194 PyDoc_STRVAR(scribus_getchild__doc__,
00195 QT_TR_NOOP("getChild(object, childname, ofclass=None, recursive=True)\n\
00196 \n\
00197 Return the first child of `object' named `childname', possibly restricting\n\
00198 the search to children of type name `ofclass'. If `recursive' is true,\n\
00199 search recursively through children, grandchildren, etc.\n\
00200 "));
00201 PyObject* scribus_getchild(PyObject* self, PyObject* args, PyObject* kw);
00202 
00203 #endif