commit
b388516ca2
@ -0,0 +1,570 @@
|
||||
v3.18.1 16th June 2009
|
||||
- A bug fix release.
|
||||
|
||||
v3.18 5th June 2009
|
||||
- Changes to be able to be built by SIP v4.8 and later.
|
||||
|
||||
v3.17.6 17th November 2008
|
||||
- A bug fix release.
|
||||
|
||||
v3.17.5 8th November 2008
|
||||
- Added the /Constrained/ argument annotations for enums needed by SIP v4.7.8
|
||||
and later.
|
||||
- Added the missing QRegion.rects() (based on a patch from Hans-Peter
|
||||
Jansen).
|
||||
- Added the missing QWidget.stackUnder() slot.
|
||||
|
||||
v3.17.4 6th December 2007
|
||||
- Changes to be able to be built by SIP v4.7.2 and later.
|
||||
|
||||
v3.17.3 30th July 2007
|
||||
- A minor bug fix release.
|
||||
- Changes to be able to be built by SIP v4.7.
|
||||
|
||||
v3.17.2 25th April 2007
|
||||
- A minor bug fix release for a regression in v3.17.1.
|
||||
|
||||
v3.17.1 10th April 2007
|
||||
- This version requires SIP v4.6 (or later).
|
||||
- Changes to ensure compatibility with future SIP releases.
|
||||
|
||||
v3.17 4th November 2006
|
||||
- Added support for Python v2.5.
|
||||
- Added the missing QImage.bitBlt() function.
|
||||
- Added the missing QListView.setSelectionAnchor() method.
|
||||
- Added the missing QStringList.__iadd__(QString) method.
|
||||
- Updated the QScintilla bindings for v1.17.
|
||||
|
||||
v3.16 24th March 2006
|
||||
- This version requires SIP v4.4 (or later).
|
||||
- PyQt3 can be installed alongside PyQt4.
|
||||
- Concatenating Python strings and QStrings is now supported.
|
||||
- QString now supports the * and *= operators that behave as they do for
|
||||
Python strings.
|
||||
- Removed some QString methods that weren't appropriate in a Python context
|
||||
and would have caused problems had they ever been used.
|
||||
- QString is more interoperable with Python string and unicode objects. For
|
||||
example they can be passed as arguments to open() and to most (but not all)
|
||||
string methods.
|
||||
- QObject.sender() now handles Python signals.
|
||||
- Added the missing MacintoshVersion enum.
|
||||
- The convention for converting between a C/C++ null pointer and Python's
|
||||
None object has now been universally applied. In previous versions a null
|
||||
pointer to, for example, a Qt list container would often be converted to an
|
||||
empty list rather than None.
|
||||
- PYQT_BUILD has been removed.
|
||||
- QPopupMenu (and sub-classes) instances now transfer ownership of the menu
|
||||
to Python in the call to exec_loop(). This means the menu's resources are
|
||||
all released when the Python wrapper is garbage collected without needing
|
||||
to call QObject.deleteLater().
|
||||
|
||||
v3.15.1 14th November 2005
|
||||
- Added the missing QApplication constructor.
|
||||
- Added the -f flag to configure.py to use any existing features file (by
|
||||
default it is recreated).
|
||||
|
||||
v3.15 30th August 2005
|
||||
- This version requires SIP v4.3 (or later).
|
||||
- Added registerWeakActiveObject() and revokeActiveObject() to QAxBase.
|
||||
- Added the missing QString + operator.
|
||||
- PyQt classes now support Python's cyclic garbage collector.
|
||||
- QDialog (and sub-classes) instances now transfer ownership of the dialog to
|
||||
Python in the call to exec_loop(). This means the dialog's resources are
|
||||
all released when the Python wrapper is garbage collected without needing
|
||||
to call QObject.deleteLater().
|
||||
- Automatic type conversion to more specific sub-classes using available
|
||||
real-time type information has been improved so that, if a sub-class isn't
|
||||
recognised then the most specific sub-class is used rather than the base
|
||||
class.
|
||||
- Automatic type conversion for QLayoutItem and sub-classes has been added.
|
||||
- Added support for QScintilla v1.6.
|
||||
|
||||
v3.14.1 6th March 2005
|
||||
- A minor bug fix release.
|
||||
|
||||
v3.14 19th February 2005
|
||||
- This version requires SIP v4.2 (or later) or SIP v3.12 (or later).
|
||||
- Added the qInstallMsgHandler() function.
|
||||
- Added support for QScintilla v1.5.
|
||||
- Added support for the VendorID package.
|
||||
- Added the qdir.py example.
|
||||
|
||||
v3.13 21st September 2004
|
||||
- Added the QUuid, QMetaObject and QMetaProperty classes.
|
||||
- Added metaObject() to QObject.
|
||||
- Added the comparison operators between QChar and QChar and char.
|
||||
- Added all the QDataStream << and >> operators for classes.
|
||||
- Added support for QScintilla v1.4.
|
||||
- Added explicit support for QScintilla to pyuic.
|
||||
|
||||
v3.12 25th May 2004
|
||||
- QValueList<QVariant> is implemented as a Python list of QVariant instances.
|
||||
- Added support for QScintilla v1.3.
|
||||
- Compiler error messages are suppressed during configuration but can be seen
|
||||
using the new -w flag to configure.py.
|
||||
|
||||
v3.11 11th March 2004
|
||||
- Added the QIconDragEvent and QLocale classes from Qt v3.3.0.
|
||||
- Updated all existing classes to Qt v3.3.1.
|
||||
- Added the missing QSocketDevice class.
|
||||
- Added the missing QString += operators.
|
||||
|
||||
v3.10 16th January 2004
|
||||
- Added the QFtp, QHttp, QHttpHeader, QHttpRequestHeader,
|
||||
QHttpResponseHeader, QLocalFs classes.
|
||||
|
||||
v3.9 7th December 2003
|
||||
- This version requires SIP v3.9 (or later) or SIP v4.0rc1 (or later).
|
||||
- QLayoutIterator.next() is now documented.
|
||||
- Added the QImageIO and QListViewItemIterator classes.
|
||||
- Added the QDockArea << and >> operators.
|
||||
- Added readBoolEntry() to QSettings.
|
||||
- Added qInstallPath(), qInstallPathDocs(), qInstallPathHeaders(),
|
||||
qInstallPathLibs(), qInstallPathBins(), qInstallPathPlugins(),
|
||||
qInstallPathData(), qInstallPathTranslations(), qInstallPathSysconf().
|
||||
- A new (configure.py) build system has been added which is independent of
|
||||
tmake and qmake and installs a pyqtconfig module. The old (build.py) build
|
||||
system remains.
|
||||
- Added the -r flag to the build systems to enable tracing.
|
||||
- Added the -v flag to the build systems to specify the default location for
|
||||
.sip files.
|
||||
|
||||
v3.8.1 6th September 2003
|
||||
- Added the missing QWMatrix.mapRect() * operators.
|
||||
- The supported educational version is now Qt v3.2.0.
|
||||
|
||||
v3.8 17th August 2003
|
||||
- Added the -k flag to build.py to build the PyQt modules as static
|
||||
libraries.
|
||||
- Added operators to QBrush, QColor, QDate, QDateTime, QDir, QDomeNode,
|
||||
QFont, QImage, QKeySequence, QPalette, QPen, QPoint, QRect, QRegExp,
|
||||
QRegion, QSize, QString, QTime, QUrl and QWMatrix (thanks to Torsten
|
||||
Marek).
|
||||
- Added the missing Qt.MetaButton.
|
||||
- Updated all classes for Qt v3.2.0.
|
||||
- Added the QSplashScreen, QSqlSelectCursor and QToolBox classes for Qt
|
||||
v3.2.0.
|
||||
- Added support for QScintilla v1.2.
|
||||
|
||||
v3.7 5th July 2003
|
||||
- Implemented __setitem__(), __delitem__(), __add__(), __iadd__(), __mul__(),
|
||||
__imul__(), __eq__() and __ne__() for QStringList.
|
||||
- Lots of new examples from Jorge Arroyo.
|
||||
- dir() of a PyQt class now returns all attributes.
|
||||
- Added bits(), scanLine(), jumpTable() and colorTable() to QImage.
|
||||
- Added toShort(), toUShort(), toInt(), toUInt(), toLong(), toULong(),
|
||||
toFloat() and toDouble() to QCString and QString.
|
||||
- Added the QWindowsXPStyle (Windows XP only), QextScintillaLexerHTML,
|
||||
QextScintillaLexerSQL and QSignalMapper classes.
|
||||
- pyuic (for Qt v3) now accepts a "-test" command line argument to allow
|
||||
generated code to be run to completion without needing any user
|
||||
interaction.
|
||||
- Added modificationAttempted() to QextScintilla.
|
||||
|
||||
v3.6 26th April 2003
|
||||
- Added the QextScintillaAPIs, QextScintillaCommand, QextScintillaCommandSet,
|
||||
QextScintillaMacros and QextScintillaPrinter classes to the qtext module.
|
||||
- Added the QCopEnvelope class to the qtpe module.
|
||||
- QString.startsWith() was missing for Qt v2 starting with Qt v2.2.0.
|
||||
- Implemented the QTextStream << QMainWindow and QTextStream >> QMainWindow
|
||||
operators.
|
||||
- pyuic will now extract Python code from the comments section of a .ui file.
|
||||
- pyuic now supports PEP 263.
|
||||
- Added the biff.py, checklists.py, drawlines.py and modified buttongroups.py
|
||||
examples from Oleksandr Yakovlyev.
|
||||
- Added the qtui module (thanks to Hans-Peter Jansen).
|
||||
- Support for Qt v3.1.2 added.
|
||||
- PYQT_VERSION is now the version encoded as a hexadecimal value.
|
||||
- Added PYQT_VERSION_STR.
|
||||
|
||||
v3.5 11th December 2002
|
||||
- Added the qtext module containing the bindings for QScintilla.
|
||||
- Added the missing QDockWindow.drawFrame(), QGLWidget.reparent() and
|
||||
QMainWindow.lineUpDockWindows() methods.
|
||||
- Added the missing QGLColorMap class.
|
||||
- Support for Qt v3.0.6, v3.1.0 and v3.1.1 added.
|
||||
- Added the Qt v3.1.x QAssistantClient, QEventLoop, QIconFactory,
|
||||
- QIMComposeEvent, QMutexLocker and QSyntaxHighlighter classes, and
|
||||
qCompress() and qUncompress functions.
|
||||
- Removed eric from the distribution as it is now packaged separately.
|
||||
- The SQL examples now support PostgreSQL as well as MySQL.
|
||||
- Added the Qtopia v1.5.0 AppLnk, AppLnkSet, Config, DateFormat, DocLnk,
|
||||
DocLnkSet, FileManager, FileSelector, FileSelectorItem, FontDatabase,
|
||||
Global, MenuButton, QDawg, QList<AppLnk>, QList<DocLnk> and Resource
|
||||
classes.
|
||||
|
||||
v3.4 10th September 2002
|
||||
- More eric updates from Detlev Offenbach, including pylupdate.
|
||||
- helpviewer is now installed as a standalone application.
|
||||
- Added the progress.py example from Hans-Peter Jansen.
|
||||
- Added the mdi.py and canvas.py examples from Sadi Kose.
|
||||
- Added QT_TR_NOOP() and QT_TRANSLATE_NOOP().
|
||||
- Added QApplication.winEventFilter(), QWidget.winEvent(), MSG and POINT
|
||||
under Windows.
|
||||
- PyQt is now licensed under several licenses including the GPL and a
|
||||
commercial license.
|
||||
|
||||
v3.3.2 12th July 2002
|
||||
- Build system changes.
|
||||
|
||||
v3.3.1 9th July 2002
|
||||
- Support for Qt v3.0.5 added.
|
||||
|
||||
v3.3 7th July 2002
|
||||
- Added README.SunOS.
|
||||
- QValueList<QPixmap> is now fully implemented as a mapping to a Python list
|
||||
of QPixmap instances.
|
||||
- QSqlRecordInfo is now implemented as a Python list of QSqlFieldInfo
|
||||
instances.
|
||||
- Added the missing QDoubleValidator.setBottom(),
|
||||
QDoubleValidator.setDecimals(), QDoubleValidator.setTop,
|
||||
QFontMetrics.boundingRect(), QFontMetrics.size(),
|
||||
QIntValidator.setBottom(), QIntValidator.setTop(), QString.compare() and
|
||||
QString.localeAwareCompare().
|
||||
- Added the qmake based build system.
|
||||
- Added lots of eric patches from Detlev Offenbach. (eric should now work
|
||||
again and has new features.)
|
||||
- Added the SQL examples from Hans-Peter Jansen.
|
||||
- pyuic for Qt v3 can now extract Python code from .ui files (thanks to
|
||||
Christian Bird).
|
||||
|
||||
v3.2.4 18th May 2002
|
||||
- Bug fixes only from the latest SIP. (Skipped v3.2.3 to keep the version
|
||||
number in line with SIP.)
|
||||
|
||||
v3.2.2 11th May 2002
|
||||
- Bug fixes only.
|
||||
|
||||
v3.2.1 5th May 2002
|
||||
- Bug fixes only from the latest SIP.
|
||||
|
||||
v3.2 5th May 2002
|
||||
- Instances that are sub-classes of QObject and created by Qt (by factory
|
||||
methods, or plugin managers for example) will now have the correct Python
|
||||
class.
|
||||
- Added the missing QToolTip.setEnabled() and QToolTip.enabled().
|
||||
- Added support for MacOS X.
|
||||
- Added PYQT_VERSION as the PyQt release number as a string.
|
||||
- Added the semaphore.py example.
|
||||
- Any Python object can now be passed as the data element of a QCustomEvent.
|
||||
- configure now searches for Qt v3.0.4.
|
||||
|
||||
v3.1 23rd March 2002
|
||||
- Removed the internal QDateTimeEditBase and QDragResponseEvent classes.
|
||||
- Added the QValueList<QImageTextLangKey> mapped class.
|
||||
- Added the missing QImageTextLangKey class.
|
||||
- Added the missing QActionGroup.add(), QActionGroup.addSeparator(),
|
||||
QImage.dotsPerMeterX(), QImage.dotsPerMeterY(), QImage.setDotsPerMeterX(),
|
||||
QImage.setDotsPerMeterY(), QImage.offset(), QImage.setOffset(),
|
||||
QImage.textList(), QImage.textLanguages(), QImage.textKeys(), QImage.text()
|
||||
and QImage.setText() methods.
|
||||
- Added support for Qt/Embedded on the Sharp Zaurus.
|
||||
- Added the start of the qtpe (Qt Palmtop Environment) module.
|
||||
- Changes required for Qt v3.0.1 and v3.0.2.
|
||||
- configure now allows the location of zlib to be specified.
|
||||
- configure now allows the directory to where the Python modules are
|
||||
installed to be specified.
|
||||
- configure now searches for Qt v3.0.1, v3.0.2 and v3.0.3.
|
||||
- Changes required by the latest SIP.
|
||||
- Added the dragdrop example from Issac Trotts.
|
||||
- Added /ReleaseLock/ to everything that might block.
|
||||
- Upgraded to autoconf-2.53 and automake-1.6.
|
||||
|
||||
v3.0 17th November 2001
|
||||
- Added the missing QChar.nbsp class variable.
|
||||
- Added the missing QChar.isLetterOrNumber(), QChar.mirroredChar(),
|
||||
QColorDialog.customColor(), QCustomDialog.customCount(),
|
||||
QColorDialog.getRgba(), QCustomDialog.setCustomColor(), QFileDialog.done(),
|
||||
QHeader.setUpdatesEnabled(), QHeader.showEvent(), QIconView.dropped(),
|
||||
QIconViewItem.dropped(), QImage.inputFormatList(),
|
||||
QImage.outputFormatList(), QLayoutIterator.next(), QLineEdit.displayText(),
|
||||
QListBox.isRubberSelecting(), QMenuBar.activateItemAt(),
|
||||
QMenuBar.focusInEvent(), QMenuBar.isDefaultUp(), QMenuBar.minimumSize(),
|
||||
QMenuBar.minimumSizeHint(), QMenuBar.setDefaultUp(), QMenuData.findItem(),
|
||||
QMimeSourceFactory.filePath(), QMimeSourceFactory.addFilePath(),
|
||||
QMotifPlusStyle.drawMenuBarItem(), QMotifPlusStyle.drawPopupMenuItem(),
|
||||
QMotifStyle.drawPopupMenuItem(), QMotifStyle.extraPopupMenuItemWidth(),
|
||||
QMotifStyle.popupMenuItemHeight(), QNetworkProtocol.newChildren(),
|
||||
QPlatinumStyle.drawPopupMenuItem(),
|
||||
QPlatinumStyle.extraPopupMenuItemWidth(),
|
||||
QPlatinumStyle.popupMenuItemHeight(), QPainter.pos(), QPalette.inactive(),
|
||||
QPopupMenu.drawItem(), QPopupMenu.itemHeight(), QPrintDialog.addButton(),
|
||||
QProgressDialog.forceShow(), QScrollBar.lineStep(), QScrollBar.maxValue(),
|
||||
QScrollBar.minValue(), QScrollBar.pageStep(), QScrollBar.setLineStep(),
|
||||
QScrollBar.setMaxValue(), QScrollBar.setMinValue(),
|
||||
QScrollBar.setPageStep(), QScrollBar.setValue(), QScrollBar.value(),
|
||||
QStyle.drawPopupMenuItem(), QStyle.drawMenuBarItem(),
|
||||
QStyle.extraPopupMenuItemWidth(), QStyle.popupMenuItemHeight(),
|
||||
QToolTip.hide(), QToolTipGroup.enabled(), QToolTipGroup.setEnabled(),
|
||||
QTranslator.messages(), QUrlOperator.newChildren(),
|
||||
QUrlOperator.startNextCopy(), QWindowsStyle.drawPopupMenuItem(),
|
||||
QWindowsStyle.extraPopupMenuItemWidth() and
|
||||
QWindowsStyle.popupMenuItemHeight() methods.
|
||||
- Added all missing methods that use QDataStream.
|
||||
- Added the missing QDir.match(), QObject.connect(), QRect.contains(),
|
||||
QString.append() and QString.prepend() variants.
|
||||
- Added the missing QAccel and QImage ctors.
|
||||
- Added the missing QColorDrag, QDns, QIconDrag, QIconDragItem, QMenuItem,
|
||||
QSGIStyle and QSound classes.
|
||||
- Renamed QDate.isValidDate() to QDate.isValid(), QFile.fileExists() to
|
||||
QFile.exists(), QFile.removeFile() to QFile.remove(), QLineEdit.del() to
|
||||
QLineEdit.delChar(), QMultiLineEdit.deleteChar() to
|
||||
QMultiLineEdit.delChar(), and QTime.IsValidTime() to QTime.isValid().
|
||||
- Added the QCanvasSpline, QCheckTableItem, QComboTableItem,
|
||||
QCustomMenuEvent, QDataBrowser, QDataTable, QDataView, QDateEdit,
|
||||
QDateTimeEdit, QDesktopWidget, QDockArea, QDockWindow, QEditorFactory,
|
||||
QErrorMessage, QGridView, QIMEvent, QKeySequence, QLibrary,
|
||||
QObjectCleanupHandler, QPixmapCache, QProcess, QRegExpValidator, QSettings,
|
||||
QSql, QSqlCursor, QSqlDatabase, QSqlDriver, QSqlEditorFactory, QSqlError,
|
||||
QSqlField, QSqlFieldInfo, QSqlForm, QSqlIndex, QSqlPropertyMap, QSqlQuery,
|
||||
QSqlRecord, QSqlRecordInfo, QSqlResult, QStyleFactory, QStyleOption,
|
||||
QTabletEvent, QTextEdit, QTimeEdit and QWindowsMime Qt3 classes.
|
||||
- Added the missing qInitNetworkProtocols() function to the qtnetwork module.
|
||||
- Removed the QTableHeader class and QTabWidget.selected() as they are not
|
||||
part of the documented API.
|
||||
- Removed the /Transfer/ flag on the QWidget parameters of
|
||||
QBoxLayout.addWidget(), QBoxLayout.insertWidget(),
|
||||
QGridLayout.addMultiCellWidget(), QGridLayout.addWidget() and
|
||||
QLayout.add().
|
||||
- QObject.className() now works with Python classes that sub-class from
|
||||
QObject derived classes.
|
||||
- pyuic now generates double quoted strings rather than single quoted strings
|
||||
(to help Qt Linguist).
|
||||
- Moved the Canvas module classes to the new qtcanvas module.
|
||||
- Moved the Network module classes to the new qtnetwork module.
|
||||
- Moved the Table module classes to the new qttable module.
|
||||
- Moved the XML module classes to the new qtxml module.
|
||||
- configure now handles Qt-mt.
|
||||
- Upgraded to autoconf-2.52, automake-1.5 and libtool-1.4.1.
|
||||
|
||||
v2.5 11th August 2001
|
||||
Minor configuration changes. Added the missing variants of
|
||||
QPixmap.save(), QWidget.reparent() and QInputDialog.getText(). Added
|
||||
the qtgl module and the gears.py example script (thanks to Toby J
|
||||
Sargeant). QObject.sender() will now return an appropriate value.
|
||||
Fixed QTextView.setText() and QScrollView.addChild(). Fixed the
|
||||
problems with overloads with different C++ signatures but similar
|
||||
Python signatures - QCString.setNum(), QLabel.setNum(),
|
||||
QLCDNumber.checkOverflow(), QString.arg(), QString.number(),
|
||||
QString.setNum(), QVariant() and QWMatrix.map(). Added the missing
|
||||
QTranslator methods. Added the QTranslatorMessage class. configure
|
||||
will now look for Qt v2.3.1. QInterlaceStyle is enabled only for Qt
|
||||
v2.3.1+ as it is broken in 2.3.0 on Windows. Fixed problems with
|
||||
QLineEdit.event() and QMultiLineEdit.event(). Added post-hooks to
|
||||
complement the existing pre-hooks. Added the Pizza example from the Qt
|
||||
Designer manual. Removed the Version keyword for the latest SIP.
|
||||
Fixed the memory leaks related to sipMapCppToSelf() in handwritten
|
||||
code. Changed the build system to handle different versions of PyQt
|
||||
for different versions of Qt. NULL QCanvasItemList, QFileInfoList,
|
||||
QObjectList, QStrList and QWidgetList pointers are now converted to an
|
||||
empty Python list rather than None. Added QDataStream and the QDom
|
||||
classes (thanks to Jim Bublitz). Added the qt_xdisplay(), qt_xscreen()
|
||||
and qt_xrootwin() functions. Added the QColor.getHsv(),
|
||||
QPaintDevice.x11Display(), QPaintDevice.x11AppDisplay(),
|
||||
QPaintDevice.x11SetAppDpiX(), QPaintDevice.x11SetAppDpiY() and
|
||||
QWidget.customEvent() methods.
|
||||
|
||||
v2.4 22nd April 2001
|
||||
Added the missing QFileDialog.getExistingDirectory(),
|
||||
QLineEdit.setReadOnly(), QLineEdit.readOnly(),
|
||||
QMotifStyle.comboButtonFocusRect(), QMotifStyle.comboButtonRect() and
|
||||
QMotifStyle.drawComboButton() methods. Added the missing
|
||||
QFileDialog.DirectoryOnly and QPalette.Inactive enum values. Updated
|
||||
the themes.py example. configure now uses the python executable to get
|
||||
the various Python locations. Added support of Qt v2.3.0, ie.
|
||||
QApplication.type(), QFontDatabase.isFixedPitch(),
|
||||
QScrollView.AutoOneFit, QToolBar.styleChange() and QInterlaceStyle.
|
||||
Added the missing final argument to QMultiLineEdit.insertAt(). Added
|
||||
the QCustomEvent class. Upgraded to automake v1.4d and libtool v1.3d.
|
||||
|
||||
v2.3 4th February 2001
|
||||
Added the missing QMessage.setTextFormat(), QMessage.textFormat(),
|
||||
QPushButton.isFlat(), QPushButton.setFlat() and QMenuData.insertItem()
|
||||
methods. Added the QCustomMenuItem class. pyuic assumes that custom
|
||||
widgets are in another module and generates code to import them. Other
|
||||
pyuic bug fixes and changes to keep track with Qt v2.2.4. eric bug
|
||||
fixes. Added the addressbook.py, buttongroups.py and menu.py examples.
|
||||
Updated all the tutorial scripts to match those in Qt v2.x. Removed
|
||||
the Qt v1.x specific examples. Removed the deprecated behaviour of
|
||||
repr() for QString, QCString and QByteArray. The Python objects that
|
||||
correspond to C++ instances that are "owned" by Qt are now kept alive
|
||||
without the Python program having to keep an explicit reference.
|
||||
configure now looks for Python 2.1.
|
||||
|
||||
v2.2 6th November 2000
|
||||
Added the %Copying directive. Added the missing %HeaderCode in
|
||||
qsizepolicy.sip. Added classes QServerSocket, QSocket and
|
||||
QHostAddress. Added hooks to the QApplication ctors to tell the
|
||||
debugger when it is safe to create QSocketNotifiers (with UNIX you can
|
||||
create QSocketNotifiers before you create the QApplication, with
|
||||
Windows you can't). Other fixes to eric to get it working with
|
||||
Windows. Implemented __str__ of QByteArray, QCString and QString to
|
||||
return an empty string for null instances. Changed __repr__ of the
|
||||
same classes to return a descriptive string for null instances. Added
|
||||
the missing QPalette.setInactive(). Colour related fixes to pyuic
|
||||
(thanks to Robert Roy). Added the documentation section on Python
|
||||
strings, Qt strings and Unicode.
|
||||
|
||||
v2.1 18th October 2000
|
||||
Added support for Qt v2.2.1. Added the widgets.py example. Added the
|
||||
eric debugger. Added the missing QCanvasPixmapArray ctor. Added the
|
||||
missing QMenuData.setItemParameter(), QMenuData.itemParameter(),
|
||||
QMenuData.activateItemAt(), QWidget.isHidden(), QWidget.isMaximized(),
|
||||
QMultiLineEdit.getCursorPosition() and QButton.keyReleaseEvent(). Add
|
||||
the len, [] and in operators to QStringList. Various other bug fixes
|
||||
(see ChangeLog).
|
||||
|
||||
v2.0 14th September 2000
|
||||
*NOTE* The implementation of enums has changed meaning that your
|
||||
scripts will be need to be changed. Also repr() of a QString will
|
||||
return a unicode object (rather than a string) with versions of Python
|
||||
that support Unicode.
|
||||
Added /Transfer/ to QObject.insertChild(). Added /TransferBack/ to
|
||||
QObject.removeChild() and QTabBar.removeTab(). Changes needed by the
|
||||
latest SIP. Fixed QFontInfo.family() for Qt v2.x (thanks to Joerg
|
||||
Kollmann). Added /Transfer/ etc. to several places in QScrollView,
|
||||
QObject, QHeader, QListView and QListViewItem (thanks to Pete Ware).
|
||||
Updated everything for Qt v2.2.0. Added pyuic. Updated the examples
|
||||
to handle to new form of enums. Added full support for Windows.
|
||||
Install in site-packages if it exists. Changes to handwritten code to
|
||||
support Python 1.6. Integrate QString with Python's Unicode support.
|
||||
|
||||
v0.12 18th May 2000
|
||||
The versions of the examples specific to Qt v1.x now get installed in
|
||||
RPMs. Added QListBoxItem.selected(), QStringList.append() and
|
||||
QStringList.prepend(). Added /Transfer/ to QApplication.setStyle(),
|
||||
QLayout.addItem(), QBoxLayout.addItem() and QGridLayout.addItem().
|
||||
Added themes.py to the examples. Clarified the software license.
|
||||
Changes needed by the latest SIP.
|
||||
|
||||
v0.11.1 1st April 2000
|
||||
Fixed the documentation for QPixmap::fill(). Code now compiles with
|
||||
gcc v2.95.2.
|
||||
|
||||
v0.11 28th March 2000
|
||||
Added Qt v2.x classes QCDEStyle, QChar, QColorDialog, QCommonStyle,
|
||||
QCString, QFontDialog, QGLayoutIterator, QGrid, QHBox, QHButtonGroup,
|
||||
QHGroupBox, QLayoutItem, QLayoutIterator, QMimeSource,
|
||||
QMimeSourceFactory, QMotifStyle, QPlatinumStyle, QSessionManager,
|
||||
QSimpleRichText, QSizeGrip, QSizePolicy, QSpacerItem, QStringList,
|
||||
QStyle, QStyleSheet, QStyleSheetItem, Qt, QTabWidget, QTextBrowser,
|
||||
QTextCodec, QTextDecoder, QTextEncoder, QTextIStream, QTextOStream,
|
||||
QTextStream, QTextView, QTranslator, QUriDrag, QVBox, QVButtonGroup,
|
||||
QVGroupBox, QWheelEvent, QWidgetItem, QWindowsStyle and QWizard. Many
|
||||
other smaller changes for Qt v2.x. Added TransferThis where needed.
|
||||
|
||||
v0.10.1 21st January 2000
|
||||
Fixed a bug in the repr() functions for QString and QByteArray by
|
||||
generating the code using the latest SIP.
|
||||
|
||||
v0.10 19th December 1999
|
||||
The .pyc files are now created by the installation process. Added
|
||||
qAppName(), QCursor.handle(), QFont.handle(), QPaintDevice.handle(),
|
||||
QPainter.handle(). Added most of the typedefs. Changed
|
||||
examples/application.py so as not to use the obsolete (and
|
||||
unimplemented) QMessageBox.message(). Fixed bug in QPixmap ctor.
|
||||
Changed the format of version qualifiers for the latest SIP. Various
|
||||
small changes to port to Windows. Added ReleaseLock to QDialog.exec().
|
||||
Fixed a bug in QRect.coords(). Changed QString and QByteArray from
|
||||
being mapped classes to being regular classes. Changed
|
||||
examples/application.py, examples/dclock.py and examples/dirview.py to
|
||||
explicitly convert from QString where needed.
|
||||
|
||||
v0.9 6th September 1999
|
||||
Separated the Qt and KDE bindings. These are the Qt bindings. Various
|
||||
changes needed by the latest SIP. Re-introduced SLOT(). Changed the
|
||||
examples to use SLOT() where possible. Added QObject.disconnect(),
|
||||
QAccel.disconnectItem(), QMenuData.disconnectItem(),
|
||||
QMovie.disconnectResize(), QMovie.disconnectStatus(),
|
||||
QMovie.disconnectUpdate() and QApplication.clipboard(). Added the
|
||||
QClipboard and QSocketNotifier classes. QEvent is automatically
|
||||
converted to the correct sub-class. The Qt event loop now cooperates
|
||||
with Python threads. Tested with Qt v1.44, Python v1.5.2, egcs v1.1.2
|
||||
and glibc v2.1.
|
||||
|
||||
v0.8 29th May 1999
|
||||
Hopefully fixed the SuSE configuration problems. Fixed the QPointArray
|
||||
ctor and QPointArray.setPoints() that took a list of points. Removed
|
||||
the section in the documentation referring to the inability to handle
|
||||
C++ references. Added lots of const keywords to suppress new warning
|
||||
messages from the compiler. Changed the handwritten code for mapped
|
||||
classes to follow the new NULL/None conventions, and for the
|
||||
introduction of sipParseArgs(). Added Drag-and-Drop support to kmyapp.
|
||||
Added Matt Gerassimoff's Qt examples. Added the QCursor global
|
||||
cursors. Added QPainter.boundingRect(), KApplication.addDropZone(),
|
||||
KApplication.removeDropZone, KApplication.setRootDropZone(). Added
|
||||
QDragEnterEvent, QDragLeaveEvent, QDragMoveEvent, QDragObject,
|
||||
QDragResponseEvent, QDropEvent, QDropSite, QHideEvent, QImageDrag,
|
||||
QPaintDeviceMetrics, QShowEvent, QStoredDrag, QTextDrag, QTimer,
|
||||
QUrlDrag, QWindow, KDNDDropZone, KDNDIcon, KDNDWidget, KPath, KSpell,
|
||||
KSpellConfig, KSpellDlg, KTreeList, KTreeListItem. Tested with Qt
|
||||
v1.44, KDE v1.1.1, Python v1.5.2, egcs v1.1.2 and glibc v2.1.1.
|
||||
|
||||
v0.7.1 3rd May 1999
|
||||
Fixed the detection of -fno-exceptions support. Added the necessary
|
||||
Py_DECREF(sipArgs) to all handwritten code. Tested with Qt v1.44, KDE
|
||||
v1.1.1, Python v1.5.2, egcs v1.1.2 and glibc v2.1.
|
||||
|
||||
v0.7 16th April 1999
|
||||
Build with -fno-exceptions if supported. Converted the documentation
|
||||
to SGML. Replaced QT_VERSION and KDE_VERSION with the proper Qt and
|
||||
KDE version constants. Fixed a bad bug converting from QStrings to
|
||||
Python strings. The "connect" convenience function has been removed.
|
||||
Added the class variables for all supported classes. Removed SLOT()
|
||||
from all examples. Renamed some static functions in QDate, QTime and
|
||||
QFile (needed because of the new implementation of static member
|
||||
functions). Added the ordinary functions related to supported classes.
|
||||
Added QListView, QListViewItem, QCheckListItem, KButton, KButtonBox,
|
||||
KContainerLayout, KContainerLayoutItem, KControlApplication,
|
||||
KControlDialog, KConfigWidget, KDatePicker, KDateTable, KDialog,
|
||||
KDirectionButton, KGradientSelector, KIntegerLine, KLed, KLedLamp,
|
||||
KListSpinBox, KNewPanner, KNumericSpinBox, KPanner, KPopupMenu,
|
||||
KQuickHelp, KQuickHelpWindow, KRestrictedLine, KRuler, KSelector,
|
||||
KSeparator, KSlider, KSpinBox, KTabBar, KTabButton, KTabCtl,
|
||||
KToolBoxManager, KWizard, KWizardPage, KXYSelector. Tested with Qt
|
||||
v1.44, KDE v1.1, Python v1.5.2, egcs v1.1.2 and glibc v2.1.
|
||||
|
||||
v0.6 20th February 1999
|
||||
Removed some handwritten code now that SIP automatically handles mapped
|
||||
classes and slots. Changed QString to be mapped to/from Python
|
||||
strings. Added the static member functions for all supported classes.
|
||||
Added new member functions for KDE v1.1. Added QBoxLayout,
|
||||
QButtonGroup, QChain, QCheckBox, QChildEvent, QDate, QDateTime,
|
||||
QDialog, QDir, QFileDialog, QFileIconProvider, QFileInfo,
|
||||
QFileInfoList, QGManager, QGroupBox, QGridLayout, QHBoxLayout, QHeader,
|
||||
QIconSet, QLayout, QMainWindow, QMessageBox, QMovie, QMultiLineEdit,
|
||||
QObjectList, QPrintDialog, QPrinter, QProgressBar, QProgressDialog,
|
||||
QRadioButton, QScrollView, QSemiModal, QSpinBox, QSplitter, QStatusBar,
|
||||
QTab, QTabBar, QTabDialog, QTime, QToolBar, QToolButton, QToolTip,
|
||||
QToolTipGroup, QVBoxLayout, QWhatsThis, QWidgetList, QWidgetStack.
|
||||
Added DlgLocation, KColorButton, KColorCombo, KColorDialog,
|
||||
KColorGroup, KDirDialog, KDirEntry, KEdit, KFM, KFileBaseDialog,
|
||||
KFileBookmark, KFileDialog, KFileInfo, KFileInfoContents,
|
||||
KFileInfoList, KFontDialog, KHTMLView, KIconLoaderButton,
|
||||
KIconLoaderDialog, KMsgBox, KPixmap, KProgress, KRadioGroup,
|
||||
KSimpleConfig, KURL. Tested with Qt v1.42, KDE v1.1, egcs v1.1.1 and
|
||||
glibc v2.1.
|
||||
|
||||
v0.5 21st January 1999
|
||||
The bindings are now packaged with autoconf configure scripts. The
|
||||
enum in QFrame is now unnamed as it is in Qt. All the examples changed
|
||||
to use the new form of enums. Added support for qApp, the global
|
||||
QColors, kapp, i18n(), Icon() and ICON(). Same test environment as
|
||||
v0.4.
|
||||
|
||||
v0.4 9th January 1999
|
||||
Enough Qt and KDE classes to implement the 14 Qt tutorials and KMyApp,
|
||||
but still not that many that implement user interface widgets. Tested
|
||||
with Qt v1.42, KDE v1.0 and gcc v2.8.1.
|
||||
|
||||
v0.3 9th December 1998
|
||||
Many more Qt classes, but still not many that implement user interface
|
||||
widgets. Those classes that are implemented are almost all fully
|
||||
implemented. Tested with Qt v1.42.
|
||||
|
||||
v0.2 5th December 1999
|
||||
Added the definitions of protected and virtual member functions.
|
||||
|
||||
v0.1 1st November 1998
|
||||
First release (with a very small set of classes implemented) to give
|
||||
people a flavour. Tested with Qt v1.41.
|
@ -0,0 +1,64 @@
|
||||
PyQt - Python Bindings for the Qt Toolkit
|
||||
|
||||
|
||||
INTRODUCTION
|
||||
|
||||
These are the Python bindings for Qt. You must also have the SIP Python
|
||||
bindings generator installed.
|
||||
|
||||
The homepage is http://www.riverbankcomputing.co.uk/pyqt/.
|
||||
|
||||
The homepage of SIP is http://www.riverbankcomputing.co.uk/sip/.
|
||||
|
||||
|
||||
COMMERCIAL VERSION
|
||||
|
||||
If you have the Commercial version of PyQt then you should also have a
|
||||
license file that you downloaded separately. The license file must be copied
|
||||
to the "sip" directory before starting to build PyQt.
|
||||
|
||||
|
||||
INSTALLATION
|
||||
|
||||
Check for any other README files in this directory that relate to your
|
||||
particular platform. Feel free to contribute a README for your platform or to
|
||||
provide updates to any existing documentation.
|
||||
|
||||
The first step is to configure PyQt by running the following command.
|
||||
|
||||
python configure.py
|
||||
|
||||
This assumes that the correct Python interpreter is on your path. Something
|
||||
like the following may be appropriate on Windows.
|
||||
|
||||
c:\python23\python configure.py
|
||||
|
||||
If you have multiple versions of Python installed then make sure you use the
|
||||
interpreter for which you wish to generate bindings for.
|
||||
|
||||
The configure.py script takes many options. Use the "-h" command line option
|
||||
to display a full list of the available options.
|
||||
|
||||
The next step is to build PyQt using your platform's make command.
|
||||
|
||||
make
|
||||
|
||||
The final step is to install PyQt by running the following command. (Depending
|
||||
on your system you may require root or administrator privileges.)
|
||||
|
||||
make install
|
||||
|
||||
|
||||
THE REST OF THE DISTRIBUTION
|
||||
|
||||
The "examples2" and "examples3" directories contain some examples (for Qt v2.x
|
||||
and Qt v3.x respectively) of Python scripts, including versions of the standard
|
||||
Qt tutorials and examples.
|
||||
|
||||
The "doc" directory contains SGML and HTML documentation for the bindings.
|
||||
This documentation includes a section describing the differences visible to
|
||||
the Python programmer between this and the previous version - please read it.
|
||||
|
||||
|
||||
Phil Thompson
|
||||
phil@riverbankcomputing.co.uk
|
@ -0,0 +1,68 @@
|
||||
This file describes some things to be aware of when building SIP (and PyQt)
|
||||
under AIX.
|
||||
|
||||
I had success building SIP V3/V4 (and PyQt) on AIX 4.3.3 and on AIX 5.1 with
|
||||
VisualAge C++ and with gcc.
|
||||
|
||||
VisualAge C++ was version 6.0 but it should also work with version 5.x.
|
||||
The GNU compiler was version 3.3.2 downloaded as a binary from
|
||||
http://aixpdslib.seas.ucla.edu/aixpdslib.html
|
||||
|
||||
The Qt-Version was 3.2.3 but it should also work with previous versions.
|
||||
|
||||
If you are using Python version 2.3.3 or higher, SIP (and PyQt) should build
|
||||
out of the box without any changes.
|
||||
|
||||
If you are using a Python version before 2.3.3, you have to patch Python,
|
||||
because until this version, Python uses the system calls load() and
|
||||
loadbind() to load and bind shared objects. These system calls cannot load
|
||||
and bind C++ shared objects properly (constructors and destructors for static
|
||||
classes are not called with these system calls). Since AIX version 4.2 the
|
||||
system calls dlopen() and dlsym() are available and should be used in
|
||||
preference.
|
||||
|
||||
The following patch changes the configure script of Python to use dlopen()
|
||||
and dlsym() if they are available. It also fixes a bug with the definition of
|
||||
_XOPEN_SOURCE:
|
||||
|
||||
---8<-------------------------------------------------------------------->8---
|
||||
diff -uNr Python-2.3.2.orig/configure Python-2.3.2/configure
|
||||
--- Python-2.3.2.orig/configure 2003-09-27 10:58:55.000000000 +0200
|
||||
+++ Python-2.3.2/configure 2003-10-28 11:33:58.000000000 +0100
|
||||
@@ -1452,6 +1452,11 @@
|
||||
# but used in struct sockaddr.sa_family. Reported by Tim Rice.
|
||||
SCO_SV/3.2)
|
||||
define_xopen_source=no;;
|
||||
+ # On AIX 4, mbstate_t is defined only when _XOPEN_SOURCE == 500 but used in
|
||||
+ # wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined or
|
||||
+ # has another value. By not (re)defining it, the defaults come in place.
|
||||
+ AIX/4)
|
||||
+ define_xopen_source=no;;
|
||||
esac
|
||||
|
||||
if test $define_xopen_source = yes
|
||||
@@ -12965,7 +12970,12 @@
|
||||
if test -z "$DYNLOADFILE"
|
||||
then
|
||||
case $ac_sys_system/$ac_sys_release in
|
||||
- AIX*) DYNLOADFILE="dynload_aix.o";;
|
||||
+ AIX*) # Use dynload_shlib.c and dlopen() if we have it.
|
||||
+ if test "$ac_cv_func_dlopen" = yes
|
||||
+ then DYNLOADFILE="dynload_shlib.o"
|
||||
+ else DYNLOADFILE="dynload_aix.o"
|
||||
+ fi
|
||||
+ ;;
|
||||
BeOS*) DYNLOADFILE="dynload_beos.o";;
|
||||
hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
|
||||
Darwin/*) DYNLOADFILE="dynload_next.o";;
|
||||
---8<-------------------------------------------------------------------->8---
|
||||
|
||||
Note: I did not mix the compilers when building Qt, Python, SIP and PyQt. At
|
||||
least Qt, SIP and PyQt must be built with the same compiler because of
|
||||
different name mangling schemes.
|
||||
|
||||
If you have any problems or questions on building SIP or PyQt on AIX, either
|
||||
send an email to ulrich.berning@desys.de or use the PyKDE mailing list.
|
||||
|
||||
Ulrich Berning
|
||||
DESYS GmbH
|
@ -0,0 +1,44 @@
|
||||
|
||||
o Compiler Error: CC -DHAVE_CONFIG_H -I. -I. -I..
|
||||
-I/users/toollib/include/python2.0 -I/users/pyqt/install/sip-3.2.1/include
|
||||
-I/users/pyqt/install/qt-x11-commercial-3.0.4/include -I/usr/openwin/include
|
||||
-c qtcmodule.cpp -KPIC -DPIC -o qtcmodule.o
|
||||
"sipqtProxyqt.h", line 113: Error: Multiple declaration for
|
||||
sipProxyqt::proxySlot(int).
|
||||
"qtcmodule.cpp", line 5393: Error: sipProxyqt::proxySlot(int) already had a
|
||||
body defined.
|
||||
|
||||
This occurs because the Sun Workshop C++ 4.2 compiler (and the Sun Forte
|
||||
C++ 6.x compiler with -compat) can not distinguish between 'bool' and 'int'
|
||||
types in overloaded method signatures and issues a compiler error.
|
||||
In this case bool is declared in qt/include/qglobal.h as
|
||||
'typedef int bool;'. To workaround this '#if 0' out the the declaration
|
||||
and body of 'proxySlot(bool)' in PyQt/qt/sipqtProxyqt.h and
|
||||
PyQt/qt/qtcmodule.cpp. This resolves the compiler error but breaks
|
||||
any 'sig(bool)' type signals. To workaround this, save the
|
||||
PyQt/qt/sipqtProxyqt.moc generated after fixing the compiler error and
|
||||
add the following bits of code:
|
||||
|
||||
...
|
||||
static const QUParameter param_slot_42[] = {
|
||||
{ 0, &static_QUType_bool, 0, QUParameter::In }
|
||||
};
|
||||
static const QUMethod slot_42 = {"proxySlot", 1, param_slot_42 };
|
||||
static const QMetaData slot_tbl[] = {
|
||||
...
|
||||
{ "proxySlot(bool)", &slot_42, QMetaData::Public }
|
||||
};
|
||||
metaObj = QMetaObject::new_metaobject(
|
||||
"sipProxyqt", parentObject,
|
||||
slot_tbl, 43,
|
||||
...
|
||||
case 42: proxySlot(static_QUType_bool.get(_o+1)); break;
|
||||
|
||||
You will need to comment out the line in PyQt/qt/Makefile that re-generates
|
||||
PyQt/qt/sipqtProxyqt.moc with moc to avoid the above changes from being
|
||||
overwritten.
|
||||
|
||||
In order to test that everything has been done correctly, create a
|
||||
toggle button and connect it's 'toggled(bool)' signal to a python slot,
|
||||
if it works, your done!
|
||||
|
@ -0,0 +1,35 @@
|
||||
Torsten Marek
|
||||
For going through the Qt classes and adding applicable operators to
|
||||
PyQt.
|
||||
|
||||
Detlev Offenbach
|
||||
For picking up and enhancing eric.
|
||||
|
||||
Hans-Peter Jansen
|
||||
For the ports of the table and SQL based example scripts and for the
|
||||
qtui module.
|
||||
|
||||
Dimitri Papadopoulos-Orfanos
|
||||
For all the help with the MacOS X port.
|
||||
|
||||
Jim Bublitz
|
||||
For QDataStream and the QDom classes, and picking up PyKDE.
|
||||
|
||||
Pete Ware
|
||||
For lots of patches for Qt v2.1+.
|
||||
|
||||
Boudewijn Rempt
|
||||
For evangelising and providing so much support to other users. Oh, and
|
||||
writing a book about it all.
|
||||
|
||||
Toby J Sargeant
|
||||
For QSocketNotifier and getting Python threads working with Qt.
|
||||
|
||||
Matt Gerassimoff
|
||||
For his Python versions of many of the Qt example programs.
|
||||
|
||||
Matt Gerassimoff, John Filo, Boudewijn Rempt
|
||||
For testing and excellent bug reports.
|
||||
|
||||
Rupert Thurner
|
||||
For pointing out what env is for.
|
@ -0,0 +1,730 @@
|
||||
# Copyright (c) 2007
|
||||
# Riverbank Computing Limited <info@riverbankcomputing.co.uk>
|
||||
#
|
||||
# This file is part of PyQt.
|
||||
#
|
||||
# This copy of PyQt is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the Free
|
||||
# Software Foundation; either version 2, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# PyQt is supplied in the hope that it will be useful, but WITHOUT ANY
|
||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# PyQt; see the file LICENSE. If not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# This is the build script for PyQt. It should be run in the top level
|
||||
# directory of the source distribution and by the Python interpreter for which
|
||||
# it is being built. It uses either qmake or tmake to do the hard work of
|
||||
# generating the platform specific Makefiles.
|
||||
|
||||
|
||||
import sys
|
||||
import os
|
||||
import glob
|
||||
import tempfile
|
||||
import shutil
|
||||
import py_compile
|
||||
import compileall
|
||||
import string
|
||||
|
||||
|
||||
# Get the SIP configuration.
|
||||
try:
|
||||
import sipconfig
|
||||
except:
|
||||
print "Unable to import the sipconfig module. Please make sure you have"
|
||||
print "SIP v3.9 or later installed."
|
||||
sys.exit(1)
|
||||
|
||||
config = sipconfig.SIPConfig("PyQt 3.18.1")
|
||||
|
||||
|
||||
# Initialise the globals.
|
||||
sipMajorVersion = config.sip_version >> 16
|
||||
sciIncDir = config.qt_inc_dir
|
||||
sciLibDir = config.qt_lib_dir
|
||||
sciLib = None
|
||||
sciVersion = None
|
||||
binDir = config.default_bin_dir
|
||||
modDir = config.default_mod_dir
|
||||
sipDir = config.default_sip_dir
|
||||
buildModules = ["qt"]
|
||||
tempBuildDir = None
|
||||
catCppFiles = 0
|
||||
catSplit = 1
|
||||
qpeTag = None
|
||||
trace = 0
|
||||
releaseGIL = 0
|
||||
|
||||
|
||||
def usage(rcode = 2):
|
||||
"""Display a usage message and exit.
|
||||
|
||||
rcode is the return code passed back to the calling process.
|
||||
"""
|
||||
print "Usage:"
|
||||
print " %s [-h] [-a version] [-b dir] [-c] [-d dir] [-g] [-j #] [-n dir] [-o dir] [-r] [-v dir]" % sipconfig.script()
|
||||
print "where:"
|
||||
print " -h display this help message"
|
||||
print " -a tag explicitly enable the qtpe module"
|
||||
print " -b dir where pyuic and pylupdate will be installed [default %s]" % config.default_bin_dir
|
||||
print " -c concatenate each module's C++ source files"
|
||||
print " -d dir where the PyQt modules will be installed [default %s]" % config.default_mod_dir
|
||||
print " -g always release the GIL (SIP v3.x behaviour)"
|
||||
print " -j # split the concatenated C++ source files into # pieces [default 1]"
|
||||
print " -n dir the directory containing the QScintilla header files [default %s]" % config.qt_inc_dir
|
||||
print " -o dir the directory containing the QScintilla library [default %s]" % config.qt_lib_dir
|
||||
print " -r generate code with tracing enabled [default disabled]"
|
||||
print " -v dir where the PyQt .sip files will be installed [default %s]" % config.default_sip_dir
|
||||
|
||||
sys.exit(rcode)
|
||||
|
||||
|
||||
def mkTempBuildDir(olddir=None):
|
||||
"""Create a temporary build directory for a console application called
|
||||
qttest, complete with patched Makefile. The global tempBuildDir is set to
|
||||
the name of the directory. The temporary directory becomes the current
|
||||
directory.
|
||||
|
||||
olddir is None if the directory should be created, otherwise it is deleted.
|
||||
|
||||
Returns the name of the previous current directory.
|
||||
"""
|
||||
global tempBuildDir
|
||||
|
||||
if olddir is None:
|
||||
tempBuildDir = tempfile.mktemp()
|
||||
|
||||
try:
|
||||
os.mkdir(tempBuildDir)
|
||||
except:
|
||||
sipconfig.error("Unable to create temporary directory.")
|
||||
|
||||
prevdir = sipconfig.push_dir(tempBuildDir)
|
||||
|
||||
sipconfig.copy_to_file("qttest.pro.in",
|
||||
"""TEMPLATE = app
|
||||
TARGET = qttest
|
||||
CONFIG += console warn_off @TEST_OPENGL@ @BLX_CONFIG_APP@
|
||||
INCLUDEPATH = @BLX_INCLUDEPATH@ @TEST_QSCINTILLA_INC@
|
||||
DEFINES = @BLX_DEFINES@
|
||||
SOURCES = qttest.cpp
|
||||
LIBS += @TEST_QUI_LIB@ @TEST_QSCINTILLA_LIB@
|
||||
""")
|
||||
|
||||
# Disable OpenGL, qui and QScintilla support by default.
|
||||
config.patches["@TEST_OPENGL@"] = ""
|
||||
config.patches["@TEST_QUI_LIB@"] = ""
|
||||
config.patches["@TEST_QSCINTILLA_INC@"] = ""
|
||||
config.patches["@TEST_QSCINTILLA_LIB@"] = ""
|
||||
|
||||
# Create a dummy source file to suppress a qmake warning.
|
||||
sipconfig.copy_to_file("qttest.cpp", "")
|
||||
|
||||
config.create_makefile("qttest.pro")
|
||||
else:
|
||||
sipconfig.pop_dir(olddir)
|
||||
prevdir = None
|
||||
|
||||
shutil.rmtree(tempBuildDir, 1)
|
||||
|
||||
return prevdir
|
||||
|
||||
|
||||
def tryModule(maindir, mname, incfile, ctor):
|
||||
"""See if a PyQt module should be built and update the buildModules list
|
||||
accordingly.
|
||||
|
||||
maindir is the directory containing this script.
|
||||
mname is the name of the PyQt module.
|
||||
incfile is the C++ header file that defines the class being used for the
|
||||
test.
|
||||
ctor is the constructor of the class being used for the test.
|
||||
"""
|
||||
# Check for the existence of the module .sip file.
|
||||
msip = os.path.join(maindir, "sip", mname, mname + "mod.sip")
|
||||
|
||||
if not os.access(msip, os.F_OK):
|
||||
return
|
||||
|
||||
sipconfig.copy_to_file("qttest.cpp",
|
||||
"""#include <%s>
|
||||
|
||||
int main(int argc,char **argv)
|
||||
{
|
||||
new %s;
|
||||
}
|
||||
""" % (incfile, ctor))
|
||||
|
||||
if sipconfig.run_make(None,0) == 0:
|
||||
buildModules.append(mname)
|
||||
sipconfig.inform("The %s module will be built." % mname)
|
||||
else:
|
||||
sipconfig.inform("The %s module will not be built." % mname)
|
||||
|
||||
sipconfig.run_make("clean")
|
||||
|
||||
|
||||
def checkQScintilla():
|
||||
"""See if QScintilla can be found and what its version is.
|
||||
"""
|
||||
# Find the QScintilla header files.
|
||||
sciglobal = os.path.join(sciIncDir, "qextscintillaglobal.h")
|
||||
|
||||
if os.access(sciglobal,os.F_OK):
|
||||
config.patches["@PYQT_QSCINTILLA_INC@"] = sciIncDir
|
||||
|
||||
sipconfig.inform("%s contains qextscintillaglobal.h." % (sciIncDir))
|
||||
|
||||
# Get the QScintilla version number.
|
||||
global sciVersion
|
||||
|
||||
sciVersion, sciversstr = sipconfig.read_version(sciglobal, "QScintilla", "QSCINTILLA_VERSION", "QSCINTILLA_VERSION_STR")
|
||||
|
||||
sipconfig.inform("QScintilla %s is being used." % (sciversstr))
|
||||
|
||||
# If we find a snapshot then set the version number to 0 as a special
|
||||
# case.
|
||||
if sciversstr[:8] == "snapshot":
|
||||
sciVersion = 0
|
||||
|
||||
# Find the QScintilla library.
|
||||
if sys.platform == "win32":
|
||||
lpatt = "qscintilla.lib"
|
||||
else:
|
||||
lpatt = "libqscintilla.*"
|
||||
|
||||
if len(glob.glob(os.path.join(sciLibDir, lpatt))):
|
||||
sipconfig.inform("%s contains the QScintilla library." % sciLibDir)
|
||||
|
||||
global sciLib
|
||||
|
||||
if sys.platform == "win32":
|
||||
sciLib = sipconfig.escape(os.path.join(sciLibDir, "qscintilla.lib"))
|
||||
else:
|
||||
sciLib = sipconfig.escape("-L" + sciLibDir) + " -lqscintilla"
|
||||
|
||||
config.patches["@PYQT_QSCINTILLA_LIB@"] = sciLib
|
||||
else:
|
||||
sipconfig.inform("The QScintilla library could not be found in %s and so the qtext module will not be built. If QScintilla is installed then use the -o argument to explicitly specify the correct directory." % (sciLibDir))
|
||||
|
||||
sciVersion = -1
|
||||
else:
|
||||
sipconfig.inform("qextscintillaglobal.h could not be found in %s and so the qtext module will not be built. If QScintilla is installed then use the -n argument to explicitly specify the correct directory." % sciIncDir)
|
||||
|
||||
sciVersion = -1
|
||||
|
||||
|
||||
def moduleChecks(maindir):
|
||||
"""See which PyQt modules to build.
|
||||
"""
|
||||
sipconfig.inform("Checking which additional PyQt modules to build.");
|
||||
|
||||
tryModule(maindir,"qtcanvas", "qcanvas.h", "QCanvas()")
|
||||
tryModule(maindir,"qtnetwork", "qsocket.h", "QSocket()")
|
||||
tryModule(maindir,"qttable", "qtable.h", "QTable()")
|
||||
tryModule(maindir,"qtxml", "qdom.h", "QDomImplementation()")
|
||||
|
||||
if config.qt_version >= 0x030000:
|
||||
tryModule(maindir,"qtsql", "qsql.h", "QSql()")
|
||||
|
||||
# We need a different Makefile for the qtgl module.
|
||||
config.patches["@TEST_OPENGL@"] = "opengl"
|
||||
config.create_makefile("qttest.pro")
|
||||
|
||||
tryModule(maindir,"qtgl", "qgl.h", "QGLWidget()")
|
||||
|
||||
# Put things back.
|
||||
config.patches["@TEST_OPENGL@"] = ""
|
||||
config.create_makefile("qttest.pro")
|
||||
|
||||
# Check for the qui library.
|
||||
if config.qt_version >= 0x030000:
|
||||
if sys.platform == "win32":
|
||||
quilib = r"$(QTDIR)\lib\qui.lib"
|
||||
else:
|
||||
quilib = "-lqui"
|
||||
|
||||
config.patches["@PYQT_QUI_LIB@"] = quilib
|
||||
|
||||
config.patches["@TEST_QUI_LIB@"] = quilib
|
||||
config.create_makefile("qttest.pro")
|
||||
|
||||
tryModule(maindir,"qtui", "qwidgetfactory.h", "QWidgetFactory()")
|
||||
|
||||
# Put things back.
|
||||
config.patches["@TEST_QUI_LIB@"] = ""
|
||||
config.create_makefile("qttest.pro")
|
||||
|
||||
# Check for the QScintilla library.
|
||||
if sciVersion >= 0:
|
||||
config.patches["@TEST_QSCINTILLA_INC@"] = sciIncDir
|
||||
config.patches["@TEST_QSCINTILLA_LIB@"] = sciLib
|
||||
config.create_makefile("qttest.pro")
|
||||
|
||||
tryModule(maindir,"qtext", "qextscintillabase.h", "QextScintillaBase()")
|
||||
|
||||
# Put things back.
|
||||
config.patches["@TEST_QSCINTILLA_INC@"] = ""
|
||||
config.patches["@TEST_QSCINTILLA_LIB@"] = ""
|
||||
config.create_makefile("qttest.pro")
|
||||
|
||||
|
||||
def generateFeatures(featfile):
|
||||
"""Generate the header file describing the Qt features that are enabled if
|
||||
it doesn't already exist. (If it already exists then we are probably cross
|
||||
compiling and generated the file through other means.)
|
||||
|
||||
featfile is the name of the features file.
|
||||
"""
|
||||
if os.access(featfile,os.F_OK):
|
||||
sipconfig.inform("Using existing features file.")
|
||||
return
|
||||
|
||||
sipconfig.inform("Generating the features file.")
|
||||
|
||||
# The features that a given Qt configuration may or may not support. Note
|
||||
# that STYLE_WINDOWSXP requires special handling.
|
||||
flist = ["ACTION", "CLIPBOARD", "CODECS", "COLORDIALOG", "DATASTREAM",
|
||||
"DIAL", "DNS", "DOM", "DRAGANDDROP", "ICONVIEW", "IMAGE_TEXT",
|
||||
"INPUTDIALOG", "FILEDIALOG", "FONTDATABASE", "FONTDIALOG",
|
||||
"MESSAGEBOX", "MIMECLIPBOARD", "NETWORKPROTOCOL", "PICTURE",
|
||||
"PRINTDIALOG", "PRINTER", "PROGRESSDIALOG", "PROPERTIES",
|
||||
"SEMIMODAL", "SIZEGRIP", "SOUND", "SPLITTER", "STYLE_CDE",
|
||||
"STYLE_INTERLACE", "STYLE_MOTIF", "STYLE_MOTIFPLUS",
|
||||
"STYLE_PLATINUM", "STYLE_SGI", "STYLE_WINDOWS", "TABDIALOG",
|
||||
"TABLE", "TABLEVIEW", "TRANSFORMATIONS", "TRANSLATION", "WIZARD",
|
||||
"WORKSPACE"]
|
||||
|
||||
# Generate the program which will generate the features file.
|
||||
f = open("qttest.cpp","w")
|
||||
|
||||
# Escape the backslashes so that the name can be embedded in a C++ string.
|
||||
ffstr = string.replace(featfile, "\\", "\\\\")
|
||||
|
||||
f.write(
|
||||
"""#include <stdio.h>
|
||||
#include <qglobal.h>
|
||||
#include <qapplication.h>
|
||||
|
||||
int main(int argc,char **argv)
|
||||
{
|
||||
FILE *fp;
|
||||
QApplication app(argc,argv,0);
|
||||
|
||||
if ((fp = fopen("%s","w")) == NULL)
|
||||
{
|
||||
printf("Unable to create '%s'\\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
#if !defined(QT_THREAD_SUPPORT)
|
||||
fprintf(fp,"-x Qt_THREAD_SUPPORT\\n");
|
||||
#endif
|
||||
|
||||
#if (defined(Q_OS_WIN32) || defined(Q_OS_WIN64)) && QT_VERSION >= 0x030000
|
||||
if (qWinVersion() != Qt::WV_XP)
|
||||
fprintf(fp,"-x Qt_STYLE_WINDOWSXP\\n");
|
||||
#endif
|
||||
""" % (ffstr, ffstr))
|
||||
|
||||
for feat in flist:
|
||||
f.write(
|
||||
"""
|
||||
#if defined(QT_NO_%s)
|
||||
fprintf(fp,"-x Qt_%s\\n");
|
||||
#endif
|
||||
""" % (feat, feat))
|
||||
|
||||
f.write(
|
||||
"""
|
||||
fclose(fp);
|
||||
|
||||
return 0;
|
||||
}
|
||||
""")
|
||||
|
||||
f.close()
|
||||
|
||||
sipconfig.run_make()
|
||||
sipconfig.run_program(os.path.join(os.getcwd(), "qttest"))
|
||||
sipconfig.run_make("clean")
|
||||
|
||||
sipconfig.inform("Generated the features file.")
|
||||
|
||||
|
||||
def generateSource(mname, plattag, qttag, xtrtag):
|
||||
"""Generate the C++ source code for a particular PyQt module.
|
||||
|
||||
mname is the name of the module.
|
||||
plattag is the SIP tag for the platform.
|
||||
qttag is the SIP tag for the Qt version.
|
||||
xtrtag is an optional extra SIP tag.
|
||||
"""
|
||||
sipconfig.inform("Generating the C++ source for the %s module." % mname)
|
||||
|
||||
try:
|
||||
shutil.rmtree(mname)
|
||||
except:
|
||||
pass
|
||||
|
||||
try:
|
||||
os.mkdir(mname)
|
||||
except:
|
||||
sipconfig.error("Unable to create the %s directory." % mname)
|
||||
|
||||
pro = mname + ".pro"
|
||||
|
||||
argv = ["-t", plattag,
|
||||
"-t", qttag,
|
||||
"-z", "features",
|
||||
"-I", "sip",
|
||||
"-m", mname + "/" + pro + ".in",
|
||||
"-c", mname,
|
||||
"sip/" + mname + "/" + mname + "mod.sip"]
|
||||
|
||||
if xtrtag:
|
||||
argv.insert(0,xtrtag)
|
||||
argv.insert(0,"-t")
|
||||
|
||||
if trace:
|
||||
argv.insert(0,"-r")
|
||||
|
||||
if releaseGIL:
|
||||
argv.insert(0,"-g")
|
||||
|
||||
sipconfig.run_program(config.sip_bin, argv)
|
||||
|
||||
# Generate the Makefile.
|
||||
sipconfig.inform("Generating the Makefile for the %s module." % mname)
|
||||
|
||||
olddir = sipconfig.push_dir(mname)
|
||||
|
||||
if catCppFiles:
|
||||
sipconfig.cat_source_files(mname, catSplit)
|
||||
|
||||
config.create_makefile(pro, mname)
|
||||
|
||||
icmds = []
|
||||
|
||||
if sipMajorVersion == 3:
|
||||
icmds.append(("copy", mname + ".py", modDir))
|
||||
icmds.append(("copy", mname + ".pyc", modDir))
|
||||
|
||||
config.add_install_target(icmds)
|
||||
|
||||
if sipMajorVersion == 3:
|
||||
# Compile the Python part of the module.
|
||||
pyname = mname + ".py"
|
||||
|
||||
sipconfig.inform("Compiling %s." % (pyname))
|
||||
py_compile.compile(pyname)
|
||||
|
||||
sipconfig.pop_dir(olddir)
|
||||
|
||||
|
||||
def versionToTag(vers, tags, desc):
|
||||
"""Convert a version number to a tag.
|
||||
|
||||
vers is the version number.
|
||||
tags is the dictionary of tags keyed by version number.
|
||||
desc is the descriptive name of the package.
|
||||
|
||||
Returns the corresponding tag.
|
||||
"""
|
||||
tag = None
|
||||
|
||||
vl = tags.keys()
|
||||
vl.sort()
|
||||
|
||||
# For a snapshot use the latest tag.
|
||||
if vers == 0:
|
||||
tag = tags[vl[-1]]
|
||||
else:
|
||||
for v in vl:
|
||||
if vers < v:
|
||||
tag = tags[v]
|
||||
break
|
||||
|
||||
if tag is None:
|
||||
sipconfig.error("Invalid %s version: 0x%06x." % (desc, vers))
|
||||
|
||||
return tag
|
||||
|
||||
|
||||
def main(argv):
|
||||
"""The main function of the script.
|
||||
|
||||
argv is the list of command line arguments.
|
||||
"""
|
||||
import getopt
|
||||
|
||||
# Parse the command line.
|
||||
try:
|
||||
optlist, args = getopt.getopt(argv[1:],"ha:b:cd:gj:n:o:rv:")
|
||||
except getopt.GetoptError:
|
||||
usage()
|
||||
|
||||
for opt, arg in optlist:
|
||||
if opt == "-h":
|
||||
usage(0)
|
||||
elif opt == "-a":
|
||||
global qpeTag
|
||||
qpeTag = arg
|
||||
elif opt == "-b":
|
||||
global binDir
|
||||
binDir = arg
|
||||
elif opt == "-c":
|
||||
global catCppFiles
|
||||
catCppFiles = 1
|
||||
elif opt == "-d":
|
||||
global modDir
|
||||
modDir = arg
|
||||
elif opt == "-g":
|
||||
global releaseGIL
|
||||
releaseGIL = 1
|
||||
elif opt == "-j":
|
||||
global catSplit
|
||||
|
||||
try:
|
||||
catSplit = int(arg)
|
||||
except:
|
||||
catSplit = 0
|
||||
|
||||
if catSplit < 1:
|
||||
usage()
|
||||
elif opt == " |