##// END OF EJS Templates
adapted to new generator files...
florianlink -
r193:65af4461ce48
parent child
Show More
@@ -1216,7 +1216,7 void PythonQtPrivate::addDecorators(QObject* o, int decoTypes)
1216 1216 } else if (qstrncmp(m.signature(), "static_", 7)==0) {
1217 1217 if ((decoTypes & StaticDecorator) == 0) continue;
1218 1218 QByteArray signature = m.signature();
1219 QByteArray nameOfClass = signature.mid(signature.indexOf('_')+1);
1219 QByteArray nameOfClass = signature.mid(7);
1220 1220 nameOfClass = nameOfClass.mid(0, nameOfClass.indexOf('_'));
1221 1221 PythonQtClassInfo* classInfo = lookupClassInfoAndCreateIfNotPresent(nameOfClass);
1222 1222 PythonQtSlotInfo* newSlot = new PythonQtSlotInfo(NULL, m, i, o, PythonQtSlotInfo::ClassDecorator);
@@ -1779,3 +1779,15 void PythonQtPrivate::shellClassDeleted( void* shellClass )
1779 1779 // it will be handled by the QPointer<> to the QObject, which becomes NULL
1780 1780 // via the QObject destructor.
1781 1781 }
1782
1783 PyObject* PythonQtPrivate::wrapMemoryAsBuffer( const void* data, Py_ssize_t size )
1784 {
1785 // P3K port needed later on!
1786 return PyBuffer_FromMemory((void*)data, size);
1787 }
1788
1789 PyObject* PythonQtPrivate::wrapMemoryAsBuffer( void* data, Py_ssize_t size )
1790 {
1791 // P3K port needed later on!
1792 return PyBuffer_FromReadWriteMemory(data, size);
1793 } No newline at end of file
@@ -587,6 +587,12 public:
587 587 //! wrap the given ptr into a Python object (or return existing wrapper!) if there is a known QObject of that name or a known wrapper in the factory
588 588 PyObject* wrapPtr(void* ptr, const QByteArray& name);
589 589
590 //! create a read-only buffer object from the given memory
591 static PyObject* wrapMemoryAsBuffer(const void* data, Py_ssize_t size);
592
593 //! create a read-write buffer object from the given memory
594 static PyObject* wrapMemoryAsBuffer(void* data, Py_ssize_t size);
595
590 596 //! registers a QObject derived class to PythonQt (this is implicitly called by addObject as well)
591 597 /* Since Qt4 does not offer a way to detect if a given classname is derived from QObject and thus has a QMetaObject,
592 598 you MUST register all your QObject derived classes here when you want them to be detected in signal and slot calls */
@@ -165,7 +165,7 Qt framework</a>.
165 165
166 166 The PythonQt wrappers generated by the generator located in the "generated_cpp" directory are free to be used without any licensing restrictions.
167 167
168 The generated wrappers are pre-generated and checked-in for Qt 4.8, so you only need to build and run the
168 The generated wrappers are pre-generated and checked-in for Qt 4.6.1, so you only need to build and run the
169 169 generator when you want to build additional wrappers or you want to upgrade/downgrade to another Qt version.
170 170 You may use the generator to generate C++ bindings for your own C++ classes (e.g., to make them inheritable in Python),
171 171 but this is currently not documented and involves creating your own typesystem files (although the Qt Jambi examples might help you).
@@ -420,10 +420,7 the python2x.[lib | dll | so | dynlib].
420 420 The build scripts a currently set to use Python 2.6.
421 421 You may need to tweak the \b build/python.prf file to set the correct Python includes and libs on your system.
422 422
423 \note In addition to the qmake profiles, PythonQt now offers building via Cmake. Just use the provided
424 CMakeLists.txt in the root directory of the project. This build option has not been well tested yet.
425
426 \section Windows
423 \subsection Windows
427 424
428 425 On Windows, the (non-source) Python Windows installer can be used.
429 426 Make sure that you use the same compiler, the current Python distribution is built
@@ -462,7 +459,7 the python2x.[lib | dll | so | dynlib].
462 459
463 460 The tests and examples are located in PythonQt/lib.
464 461
465 \section Linux
462 \subsection Linux
466 463
467 464 On Linux, you need to install a Python-dev package.
468 465 If Python can not be linked or include files can not be found,
@@ -480,7 +477,7 the python2x.[lib | dll | so | dynlib].
480 477 You should add PythonQt/lib to your LD_LIBRARY_PATH so that the runtime
481 478 linker can find the *.so files.
482 479
483 \section MacOSX
480 \subsection MacOsX
484 481
485 482 On Mac, Python is installed as a Framework, so you should not need to install it.
486 483 To build PythonQt, just do a:
General Comments 0
You need to be logged in to leave comments. Login now