aboutsummaryrefslogtreecommitdiffstats
path: root/libpyside/pyside.h
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2010-09-15 10:44:27 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2010-09-15 11:33:41 -0300
commit87ea5d920c62eed3e9c1185fa66740c13c71f65b (patch)
tree4653548a4b7050c85f481864c5c8d8d42bb4a975 /libpyside/pyside.h
parentcd7dac40f758f821514693c6d7d4c449a9f81240 (diff)
Fix bug#347 - "Setting properties in constructors gives incorrect results"
Added new function to libpyside: "fillQtProperties". Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Renato Araújo <renato.filho@openbossa.org>
Diffstat (limited to 'libpyside/pyside.h')
-rw-r--r--libpyside/pyside.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/libpyside/pyside.h b/libpyside/pyside.h
index 21515c8d1..cae050b5d 100644
--- a/libpyside/pyside.h
+++ b/libpyside/pyside.h
@@ -26,6 +26,8 @@
#include <Python.h>
#include <pysidemacros.h>
#include <QMetaType>
+#include <QHash>
+#include <QList>
namespace PySide
{
@@ -42,6 +44,17 @@ inline uint hash(const T& value)
}
/**
+ * Fill QObject properties and do signal connections using the values found in \p kwds dictonary.
+ * \param qObj PyObject fot the QObject.
+ * \param metaObj QMetaObject of \p qObj.
+ * \param blackList keys to be ignored in kwds dictionary, this string list MUST be sorted.
+ * \param blackListSize numbe rof elements in blackList.
+ * \param kwds key->value dictonary.
+ * \return True if everything goes well, false with a Python error setted otherwise.
+ */
+PYSIDE_API bool fillQtProperties(PyObject* qObj, const QMetaObject* metaObj, PyObject* kwds, const char** blackList, unsigned int blackListSize);
+
+/**
* If the type \p T was registered on Qt meta type system with Q_DECLARE_METATYPE macro, this class will initialize
* the meta type.
*