summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2018-01-05 15:58:35 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2018-01-12 12:28:10 +0000
commit9f2a9aba3aff73e31ea15eb4a7a04b0e50f4ee4e (patch)
tree92dcb0c4f64df8a8375af2e1a9bb1170068c36b2
parent26c046e521c38bbfc3a263782a3bb74a7c1bf937 (diff)
Move examples from submodule to pyside-setup
Move PySide2 examples that are owned by the Qt Company to a new examples directory. Done-with: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Task-number: PYSIDE-363 Change-Id: I14099764d9eef2bc35e067086121427955862e3a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r--examples/axcontainer/axviewer.py84
-rw-r--r--examples/charts/memoryusage.py128
-rwxr-xr-xexamples/corelib/threads/mandelbrot.py349
-rwxr-xr-xexamples/corelib/tools/codecs/codecs.py251
-rwxr-xr-xexamples/corelib/tools/regexp.py195
-rwxr-xr-xexamples/corelib/tools/settingseditor/settingseditor.py722
-rw-r--r--examples/datavisualization/bars3d.py115
-rw-r--r--examples/declarative/extending/chapter1-basics/app.qml64
-rw-r--r--examples/declarative/extending/chapter1-basics/basics.py100
-rw-r--r--examples/declarative/extending/chapter2-methods/app.qml70
-rw-r--r--examples/declarative/extending/chapter2-methods/methods.py105
-rw-r--r--examples/declarative/extending/chapter3-bindings/app.qml78
-rw-r--r--examples/declarative/extending/chapter3-bindings/bindings.py110
-rw-r--r--examples/declarative/extending/chapter4-customPropertyTypes/app.qml60
-rw-r--r--examples/declarative/extending/chapter4-customPropertyTypes/customPropertyTypes.py115
-rw-r--r--examples/declarative/extending/chapter5-listproperties/app.qml70
-rw-r--r--examples/declarative/extending/chapter5-listproperties/listproperties.py128
-rwxr-xr-xexamples/declarative/scrolling.py73
-rw-r--r--examples/declarative/signals/pytoqml1/main.py72
-rw-r--r--examples/declarative/signals/pytoqml1/view.qml73
-rwxr-xr-xexamples/declarative/signals/qmltopy1/main.py89
-rw-r--r--examples/declarative/signals/qmltopy1/view.qml85
-rwxr-xr-xexamples/declarative/signals/qmltopy2/main.py81
-rw-r--r--examples/declarative/signals/qmltopy2/view.qml80
-rw-r--r--examples/declarative/signals/qmltopy3/main.py72
-rw-r--r--examples/declarative/signals/qmltopy3/view.qml103
-rw-r--r--examples/declarative/signals/qmltopy4/main.py72
-rw-r--r--examples/declarative/signals/qmltopy4/view.qml68
-rw-r--r--examples/declarative/usingmodel.py102
-rw-r--r--examples/declarative/view.qml65
-rwxr-xr-xexamples/macextras/macpasteboardmime.py127
-rwxr-xr-xexamples/multimedia/audiooutput.py301
-rw-r--r--examples/multimedia/camera.py170
-rw-r--r--examples/multimedia/player.py158
-rw-r--r--examples/network/blockingfortuneclient.py225
-rwxr-xr-xexamples/network/fortuneclient.py168
-rwxr-xr-xexamples/network/fortuneserver.py125
-rwxr-xr-xexamples/network/threadedfortuneserver.py153
-rwxr-xr-xexamples/opengl/2dpainting.py174
-rw-r--r--examples/opengl/contextinfo.py251
-rw-r--r--examples/opengl/grabber.py436
-rwxr-xr-xexamples/opengl/hellogl.py288
-rwxr-xr-xexamples/opengl/overpainting.py386
-rwxr-xr-xexamples/opengl/samplebuffers.py193
-rw-r--r--examples/opengl/textures/images/side1.pngbin0 -> 1044 bytes
-rw-r--r--examples/opengl/textures/images/side2.pngbin0 -> 1768 bytes
-rw-r--r--examples/opengl/textures/images/side3.pngbin0 -> 2323 bytes
-rw-r--r--examples/opengl/textures/images/side4.pngbin0 -> 1342 bytes
-rw-r--r--examples/opengl/textures/images/side5.pngbin0 -> 1959 bytes
-rw-r--r--examples/opengl/textures/images/side6.pngbin0 -> 2446 bytes
-rwxr-xr-xexamples/opengl/textures/textures.py232
-rw-r--r--examples/opengl/textures/textures.qrc10
-rw-r--r--examples/opengl/textures/textures_rc.py797
-rwxr-xr-xexamples/script/helloscript.py61
-rw-r--r--examples/scriptableapplication/README.txt33
-rw-r--r--examples/scriptableapplication/main.cpp64
-rw-r--r--examples/scriptableapplication/mainwindow.cpp141
-rw-r--r--examples/scriptableapplication/mainwindow.h76
-rw-r--r--examples/scriptableapplication/pyside2.pri19
-rw-r--r--examples/scriptableapplication/pyside2_config.py225
-rw-r--r--examples/scriptableapplication/pythonutils.cpp169
-rw-r--r--examples/scriptableapplication/pythonutils.h81
-rw-r--r--examples/scriptableapplication/scriptableapplication.pro92
-rw-r--r--examples/scriptableapplication/scriptableapplication.xml56
-rw-r--r--examples/scriptableapplication/wrappedclasses.h56
-rw-r--r--examples/texttospeech/texttospeech.py108
-rw-r--r--examples/tutorial/t1.py57
-rw-r--r--examples/tutorial/t10.py192
-rw-r--r--examples/tutorial/t11.py264
-rw-r--r--examples/tutorial/t12.py313
-rw-r--r--examples/tutorial/t13.py396
-rw-r--r--examples/tutorial/t14.py451
-rw-r--r--examples/tutorial/t2.py60
-rw-r--r--examples/tutorial/t3.py62
-rw-r--r--examples/tutorial/t4.py67
-rw-r--r--examples/tutorial/t5.py78
-rw-r--r--examples/tutorial/t6.py91
-rw-r--r--examples/tutorial/t7.py114
-rw-r--r--examples/tutorial/t8.py153
-rw-r--r--examples/tutorial/t9.py160
-rw-r--r--examples/utils/utils.py49
-rw-r--r--examples/webenginewidgets/simplebrowser.py102
-rwxr-xr-xexamples/widgets/animation/animatedtiles/animatedtiles.py260
-rw-r--r--examples/widgets/animation/animatedtiles/animatedtiles.qrc11
-rw-r--r--examples/widgets/animation/animatedtiles/animatedtiles_rc.py6144
-rw-r--r--examples/widgets/animation/animatedtiles/images/centered.pngbin0 -> 892 bytes
-rw-r--r--examples/widgets/animation/animatedtiles/images/ellipse.pngbin0 -> 10767 bytes
-rw-r--r--examples/widgets/animation/animatedtiles/images/figure8.pngbin0 -> 14050 bytes
-rw-r--r--examples/widgets/animation/animatedtiles/images/kinetic.pngbin0 -> 6776 bytes
-rw-r--r--examples/widgets/animation/animatedtiles/images/random.pngbin0 -> 14969 bytes
-rw-r--r--examples/widgets/animation/animatedtiles/images/tile.pngbin0 -> 16337 bytes
-rw-r--r--examples/widgets/animation/appchooser/accessories-dictionary.pngbin0 -> 5396 bytes
-rw-r--r--examples/widgets/animation/appchooser/akregator.pngbin0 -> 4873 bytes
-rwxr-xr-xexamples/widgets/animation/appchooser/appchooser.py134
-rw-r--r--examples/widgets/animation/appchooser/appchooser.qrc8
-rw-r--r--examples/widgets/animation/appchooser/appchooser_rc.py1464
-rw-r--r--examples/widgets/animation/appchooser/digikam.pngbin0 -> 3334 bytes
-rw-r--r--examples/widgets/animation/appchooser/k3b.pngbin0 -> 8220 bytes
-rw-r--r--examples/widgets/animation/easing/easing.py260
-rw-r--r--examples/widgets/animation/easing/easing.qrc5
-rw-r--r--examples/widgets/animation/easing/easing_rc.py403
-rw-r--r--examples/widgets/animation/easing/form.ui205
-rw-r--r--examples/widgets/animation/easing/images/qt-logo.pngbin0 -> 5149 bytes
-rw-r--r--examples/widgets/animation/easing/ui_form.py115
-rwxr-xr-xexamples/widgets/animation/states/states.py265
-rw-r--r--examples/widgets/animation/states/states_rc.py2221
-rwxr-xr-xexamples/widgets/dialogs/classwizard/classwizard.py404
-rw-r--r--examples/widgets/dialogs/classwizard/classwizard.qrc11
-rw-r--r--examples/widgets/dialogs/classwizard/classwizard_rc.py3928
-rw-r--r--examples/widgets/dialogs/classwizard/images/background.pngbin0 -> 22578 bytes
-rw-r--r--examples/widgets/dialogs/classwizard/images/banner.pngbin0 -> 3947 bytes
-rw-r--r--examples/widgets/dialogs/classwizard/images/logo1.pngbin0 -> 1619 bytes
-rw-r--r--examples/widgets/dialogs/classwizard/images/logo2.pngbin0 -> 1619 bytes
-rw-r--r--examples/widgets/dialogs/classwizard/images/logo3.pngbin0 -> 1619 bytes
-rw-r--r--examples/widgets/dialogs/classwizard/images/watermark1.pngbin0 -> 14516 bytes
-rw-r--r--examples/widgets/dialogs/classwizard/images/watermark2.pngbin0 -> 14912 bytes
-rwxr-xr-xexamples/widgets/dialogs/extension.py114
-rwxr-xr-xexamples/widgets/dialogs/findfiles.py211
-rw-r--r--examples/widgets/dialogs/standarddialogs.py320
-rwxr-xr-xexamples/widgets/dialogs/trivialwizard.py113
-rwxr-xr-xexamples/widgets/draganddrop/draggabletext/draggabletext.py156
-rw-r--r--examples/widgets/draganddrop/draggabletext/draggabletext.qrc5
-rw-r--r--examples/widgets/draganddrop/draggabletext/draggabletext_rc.py97
-rw-r--r--examples/widgets/draganddrop/draggabletext/words.txt41
-rwxr-xr-xexamples/widgets/effects/lighting.py145
-rwxr-xr-xexamples/widgets/graphicsview/anchorlayout.py126
-rw-r--r--examples/widgets/graphicsview/collidingmice/collidingmice.py217
-rw-r--r--examples/widgets/graphicsview/collidingmice/mice_rc.py271
-rwxr-xr-xexamples/widgets/graphicsview/diagramscene/diagramscene.py825
-rw-r--r--examples/widgets/graphicsview/diagramscene/diagramscene.qrc19
-rw-r--r--examples/widgets/graphicsview/diagramscene/diagramscene_rc.py445
-rw-r--r--examples/widgets/graphicsview/diagramscene/images/background1.pngbin0 -> 112 bytes
-rw-r--r--examples/widgets/graphicsview/diagramscene/images/background2.pngbin0 -> 114 bytes
-rw-r--r--examples/widgets/graphicsview/diagramscene/images/background3.pngbin0 -> 116 bytes
-rw-r--r--examples/widgets/graphicsview/diagramscene/images/background4.pngbin0 -> 96 bytes
-rw-r--r--examples/widgets/graphicsview/diagramscene/images/bold.pngbin0 -> 274 bytes
-rw-r--r--examples/widgets/graphicsview/diagramscene/images/bringtofront.pngbin0 -> 293 bytes
-rw-r--r--examples/widgets/graphicsview/diagramscene/images/delete.pngbin0 -> 831 bytes
-rw-r--r--examples/widgets/graphicsview/diagramscene/images/floodfill.pngbin0 -> 282 bytes
-rw-r--r--examples/widgets/graphicsview/diagramscene/images/italic.pngbin0 -> 247 bytes
-rw-r--r--examples/widgets/graphicsview/diagramscene/images/linecolor.pngbin0 -> 145 bytes
-rw-r--r--examples/widgets/graphicsview/diagramscene/images/linepointer.pngbin0 -> 141 bytes
-rw-r--r--examples/widgets/graphicsview/diagramscene/images/pointer.pngbin0 -> 173 bytes
-rw-r--r--examples/widgets/graphicsview/diagramscene/images/sendtoback.pngbin0 -> 318 bytes
-rw-r--r--examples/widgets/graphicsview/diagramscene/images/textpointer.pngbin0 -> 753 bytes
-rw-r--r--examples/widgets/graphicsview/diagramscene/images/underline.pngbin0 -> 250 bytes
-rw-r--r--examples/widgets/graphicsview/dragdroprobot/dragdroprobot.py287
-rw-r--r--examples/widgets/graphicsview/dragdroprobot/dragdroprobot.qrc5
-rw-r--r--examples/widgets/graphicsview/dragdroprobot/dragdroprobot_rc.py1017
-rw-r--r--examples/widgets/graphicsview/dragdroprobot/images/head.pngbin0 -> 14972 bytes
-rwxr-xr-xexamples/widgets/graphicsview/elasticnodes.py414
-rw-r--r--examples/widgets/itemviews/addressbook/adddialogwidget.py103
-rw-r--r--examples/widgets/itemviews/addressbook/addressbook.py131
-rw-r--r--examples/widgets/itemviews/addressbook/addresswidget.py249
-rw-r--r--examples/widgets/itemviews/addressbook/newaddresstab.py94
-rw-r--r--examples/widgets/itemviews/addressbook/tablemodel.py147
-rwxr-xr-xexamples/widgets/itemviews/basicsortfiltermodel.py203
-rwxr-xr-xexamples/widgets/itemviews/fetchmore.py148
-rw-r--r--examples/widgets/itemviews/stardelegate/stardelegate.py174
-rw-r--r--examples/widgets/itemviews/stardelegate/stareditor.py99
-rw-r--r--examples/widgets/itemviews/stardelegate/starrating.py102
-rwxr-xr-xexamples/widgets/layouts/basiclayouts.py135
-rw-r--r--examples/widgets/layouts/dynamiclayouts.py171
-rwxr-xr-xexamples/widgets/layouts/flowlayout.py156
-rwxr-xr-xexamples/widgets/mainwindows/application/application.py273
-rw-r--r--examples/widgets/mainwindows/application/application.qrc10
-rw-r--r--examples/widgets/mainwindows/application/application_rc.py645
-rw-r--r--examples/widgets/mainwindows/application/images/copy.pngbin0 -> 1338 bytes
-rw-r--r--examples/widgets/mainwindows/application/images/cut.pngbin0 -> 1323 bytes
-rw-r--r--examples/widgets/mainwindows/application/images/new.pngbin0 -> 852 bytes
-rw-r--r--examples/widgets/mainwindows/application/images/open.pngbin0 -> 2073 bytes
-rw-r--r--examples/widgets/mainwindows/application/images/paste.pngbin0 -> 1645 bytes
-rw-r--r--examples/widgets/mainwindows/application/images/save.pngbin0 -> 1187 bytes
-rw-r--r--examples/widgets/mainwindows/dockwidgets/dockwidgets.py304
-rw-r--r--examples/widgets/mainwindows/dockwidgets/dockwidgets.qrc8
-rw-r--r--examples/widgets/mainwindows/dockwidgets/dockwidgets_rc.py503
-rw-r--r--examples/widgets/mainwindows/dockwidgets/images/new.pngbin0 -> 977 bytes
-rw-r--r--examples/widgets/mainwindows/dockwidgets/images/print.pngbin0 -> 1732 bytes
-rw-r--r--examples/widgets/mainwindows/dockwidgets/images/save.pngbin0 -> 1894 bytes
-rw-r--r--examples/widgets/mainwindows/dockwidgets/images/undo.pngbin0 -> 1768 bytes
-rw-r--r--examples/widgets/mainwindows/mdi/images/copy.pngbin0 -> 1338 bytes
-rw-r--r--examples/widgets/mainwindows/mdi/images/cut.pngbin0 -> 1323 bytes
-rw-r--r--examples/widgets/mainwindows/mdi/images/new.pngbin0 -> 852 bytes
-rw-r--r--examples/widgets/mainwindows/mdi/images/open.pngbin0 -> 2073 bytes
-rw-r--r--examples/widgets/mainwindows/mdi/images/paste.pngbin0 -> 1645 bytes
-rw-r--r--examples/widgets/mainwindows/mdi/images/save.pngbin0 -> 1187 bytes
-rwxr-xr-xexamples/widgets/mainwindows/mdi/mdi.py448
-rw-r--r--examples/widgets/mainwindows/mdi/mdi.qrc10
-rw-r--r--examples/widgets/mainwindows/mdi/mdi_rc.py645
-rwxr-xr-xexamples/widgets/painting/basicdrawing/basicdrawing.py350
-rw-r--r--examples/widgets/painting/basicdrawing/basicdrawing.qrc6
-rw-r--r--examples/widgets/painting/basicdrawing/basicdrawing_rc.py174
-rw-r--r--examples/widgets/painting/basicdrawing/images/brick.pngbin0 -> 856 bytes
-rw-r--r--examples/widgets/painting/basicdrawing/images/qt-logo.pngbin0 -> 533 bytes
-rwxr-xr-xexamples/widgets/painting/concentriccircles.py147
-rwxr-xr-xexamples/widgets/richtext/orderform.py297
-rwxr-xr-xexamples/widgets/richtext/syntaxhighlighter.py203
-rw-r--r--examples/widgets/richtext/syntaxhighlighter/examples/example79
-rw-r--r--examples/widgets/richtext/syntaxhighlighter/syntaxhighlighter.py180
-rw-r--r--examples/widgets/richtext/syntaxhighlighter/syntaxhighlighter.qrc5
-rw-r--r--examples/widgets/richtext/syntaxhighlighter/syntaxhighlighter_rc.py183
-rw-r--r--examples/widgets/richtext/textobject/files/heart.svg55
-rwxr-xr-xexamples/widgets/richtext/textobject/textobject.py130
-rwxr-xr-xexamples/widgets/state-machine/eventtrans.py93
-rwxr-xr-xexamples/widgets/state-machine/factstates.py112
-rwxr-xr-xexamples/widgets/state-machine/pingpong.py97
-rwxr-xr-xexamples/widgets/state-machine/rogue.py203
-rwxr-xr-xexamples/widgets/state-machine/trafficlight.py140
-rwxr-xr-xexamples/widgets/state-machine/twowaybutton.py71
-rwxr-xr-xexamples/widgets/tutorials/addressbook/part1.py75
-rwxr-xr-xexamples/widgets/tutorials/addressbook/part2.py182
-rwxr-xr-xexamples/widgets/tutorials/addressbook/part3.py247
-rwxr-xr-xexamples/widgets/tutorials/addressbook/part4.py301
-rwxr-xr-xexamples/widgets/tutorials/addressbook/part5.py361
-rwxr-xr-xexamples/widgets/tutorials/addressbook/part6.py426
-rwxr-xr-xexamples/widgets/tutorials/addressbook/part7.py478
-rwxr-xr-xexamples/widgets/widgets/hellogl_openglwidget_legacy.py289
-rw-r--r--examples/widgets/widgets/tetrix.py499
-rwxr-xr-xexamples/xml/dombookmarks/dombookmarks.py263
-rw-r--r--examples/xml/dombookmarks/frank.xbel230
-rw-r--r--examples/xml/dombookmarks/jennifer.xbel93
-rw-r--r--examples/xmlpatterns/schema/files/contact.xsd25
-rw-r--r--examples/xmlpatterns/schema/files/invalid_contact.xml11
-rw-r--r--examples/xmlpatterns/schema/files/invalid_order.xml13
-rw-r--r--examples/xmlpatterns/schema/files/invalid_recipe.xml14
-rw-r--r--examples/xmlpatterns/schema/files/order.xsd23
-rw-r--r--examples/xmlpatterns/schema/files/recipe.xsd40
-rw-r--r--examples/xmlpatterns/schema/files/valid_contact.xml11
-rw-r--r--examples/xmlpatterns/schema/files/valid_order.xml18
-rw-r--r--examples/xmlpatterns/schema/files/valid_recipe.xml13
-rwxr-xr-xexamples/xmlpatterns/schema/schema.py278
-rw-r--r--examples/xmlpatterns/schema/schema.qrc13
-rw-r--r--examples/xmlpatterns/schema/schema.ui71
-rw-r--r--examples/xmlpatterns/schema/schema_rc.py501
-rw-r--r--examples/xmlpatterns/schema/ui_schema.py62
-rw-r--r--setup.py20
236 files changed, 44257 insertions, 12 deletions
diff --git a/examples/axcontainer/axviewer.py b/examples/axcontainer/axviewer.py
new file mode 100644
index 00000000..cb3d4c0d
--- /dev/null
+++ b/examples/axcontainer/axviewer.py
@@ -0,0 +1,84 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2017 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+"""PySide2 Active Qt Viewer example"""
+
+import sys
+from PySide2.QtAxContainer import QAxSelect, QAxWidget
+from PySide2.QtGui import QKeySequence
+from PySide2.QtWidgets import (QAction, qApp, QApplication, QDialog, QFileDialog,
+ QMainWindow, QMenu, QMenuBar, QMessageBox, QToolBar)
+
+class MainWindow(QMainWindow):
+
+ def __init__(self):
+ super(MainWindow, self).__init__()
+
+ toolBar = QToolBar()
+ self.addToolBar(toolBar)
+ fileMenu = self.menuBar().addMenu("&File")
+ loadAction = QAction("Load...", self, shortcut="Ctrl+L", triggered=self.load)
+ fileMenu.addAction(loadAction)
+ toolBar.addAction(loadAction)
+ exitAction = QAction("E&xit", self, shortcut="Ctrl+Q", triggered=self.close)
+ fileMenu.addAction(exitAction)
+
+ aboutMenu = self.menuBar().addMenu("&About")
+ aboutQtAct = QAction("About &Qt", self, triggered=qApp.aboutQt)
+ aboutMenu.addAction(aboutQtAct)
+ self.axWidget = QAxWidget()
+ self.setCentralWidget(self.axWidget)
+
+ def load(self):
+ axSelect = QAxSelect(self)
+ if axSelect.exec_() == QDialog.Accepted:
+ clsid = axSelect.clsid()
+ if not self.axWidget.setControl(clsid):
+ QMessageBox.warning(self, "AxViewer", "Unable to load " + clsid + ".")
+
+if __name__ == '__main__':
+ app = QApplication(sys.argv)
+ mainWin = MainWindow()
+ availableGeometry = app.desktop().availableGeometry(mainWin)
+ mainWin.resize(availableGeometry.width() / 3, availableGeometry.height() / 2)
+ mainWin.show()
+ sys.exit(app.exec_())
diff --git a/examples/charts/memoryusage.py b/examples/charts/memoryusage.py
new file mode 100644
index 00000000..c0e0a38d
--- /dev/null
+++ b/examples/charts/memoryusage.py
@@ -0,0 +1,128 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2017 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+"""PySide2 Charts example: Simple memory usage viewer"""
+
+import os
+import sys
+from PySide2.QtCore import QRect, QSize, QProcess
+from PySide2.QtWidgets import QApplication, QMainWindow
+from PySide2.QtCharts import QtCharts
+
+def runProcess(command, arguments):
+ process = QProcess()
+ process.start(command, arguments)
+ process.waitForFinished()
+ result = []
+ for line in str(process.readAllStandardOutput()).split(os.linesep):
+ result.append(line)
+ return result
+
+def getMemoryUsage():
+ result = []
+ if sys.platform == 'win32':
+ # Windows: Obtain memory usage in KB from 'tasklist'
+ for line in runProcess('tasklist', [])[3:]:
+ if len(line) >= 74:
+ command = line[0:23].strip()
+ if command.endswith('.exe'):
+ command = command[0:len(command) - 4]
+ memoryUsage = float(line[64:74].strip().replace(',', '').replace('.', ''))
+ legend = ''
+ if memoryUsage > 10240:
+ legend = '{} {}M'.format(command, round(memoryUsage / 1024))
+ else:
+ legend = '{} {}K'.format(command, round(memoryUsage))
+ result.append([legend, memoryUsage])
+ else:
+ # Unix: Obtain memory usage percentage from 'ps'
+ psOptions = ['-e', 'v']
+ memoryColumn = 8
+ commandColumn = 9
+ if sys.platform == 'darwin':
+ psOptions = ['-e', '-v']
+ memoryColumn = 11
+ commandColumn = 12
+ for line in runProcess('ps', psOptions)[1:]:
+ tokens = line.split(None)
+ if len(tokens) > commandColumn: # Percentage and command
+ command = tokens[commandColumn]
+ if not command.startswith('['):
+ command = os.path.basename(command)
+ memoryUsage = round(float(tokens[memoryColumn].replace(',', '.')))
+ legend = '{} {}%'.format(command, memoryUsage)
+ result.append([legend, memoryUsage])
+
+ result.sort(key = lambda x: x[1], reverse=True)
+ return result
+
+class MainWindow(QMainWindow):
+
+ def __init__(self):
+ super(MainWindow, self).__init__()
+
+ self.setWindowTitle('Memory Usage')
+
+ memoryUsage = getMemoryUsage()
+ if len(memoryUsage) > 5:
+ memoryUsage = memoryUsage[0:4]
+
+ self.series = QtCharts.QPieSeries()
+ for item in memoryUsage:
+ self.series.append(item[0], item[1]);
+
+ slice = self.series.slices()[0]
+ slice.setExploded();
+ slice.setLabelVisible();
+ self.chart = QtCharts.QChart()
+ self.chart.addSeries(self.series);
+ self.chartView = QtCharts.QChartView(self.chart)
+ self.setCentralWidget(self.chartView)
+
+if __name__ == '__main__':
+ app = QApplication(sys.argv)
+ mainWin = MainWindow()
+ availableGeometry = app.desktop().availableGeometry(mainWin)
+ size = availableGeometry.height() * 3 / 4
+ mainWin.resize(size, size)
+ mainWin.show()
+ sys.exit(app.exec_())
diff --git a/examples/corelib/threads/mandelbrot.py b/examples/corelib/threads/mandelbrot.py
new file mode 100755
index 00000000..53da3d48
--- /dev/null
+++ b/examples/corelib/threads/mandelbrot.py
@@ -0,0 +1,349 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2013 Riverbank Computing Limited.
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+"""PySide2 port of the corelib/threads/mandelbrot example from Qt v5.x, originating from PyQt"""
+
+from PySide2.QtCore import (Signal, QMutex, QMutexLocker, QPoint, QSize, Qt,
+ QThread, QWaitCondition)
+from PySide2.QtGui import QColor, QImage, QPainter, QPixmap, qRgb
+from PySide2.QtWidgets import QApplication, QWidget
+
+
+DefaultCenterX = -0.647011
+DefaultCenterY = -0.0395159
+DefaultScale = 0.00403897
+
+ZoomInFactor = 0.8
+ZoomOutFactor = 1 / ZoomInFactor
+ScrollStep = 20
+
+
+class RenderThread(QThread):
+ ColormapSize = 512
+
+ renderedImage = Signal(QImage, float)
+
+ def __init__(self, parent=None):
+ super(RenderThread, self).__init__(parent)
+
+ self.mutex = QMutex()
+ self.condition = QWaitCondition()
+ self.centerX = 0.0
+ self.centerY = 0.0
+ self.scaleFactor = 0.0
+ self.resultSize = QSize()
+ self.colormap = []
+
+ self.restart = False
+ self.abort = False
+
+ for i in range(RenderThread.ColormapSize):
+ self.colormap.append(self.rgbFromWaveLength(380.0 + (i * 400.0 / RenderThread.ColormapSize)))
+
+ def stop(self):
+ self.mutex.lock()
+ self.abort = True
+ self.condition.wakeOne()
+ self.mutex.unlock()
+
+ self.wait(2000)
+
+ def render(self, centerX, centerY, scaleFactor, resultSize):
+ locker = QMutexLocker(self.mutex)
+
+ self.centerX = centerX
+ self.centerY = centerY
+ self.scaleFactor = scaleFactor
+ self.resultSize = resultSize
+
+ if not self.isRunning():
+ self.start(QThread.LowPriority)
+ else:
+ self.restart = True
+ self.condition.wakeOne()
+
+ def run(self):
+ while True:
+ self.mutex.lock()
+ resultSize = self.resultSize
+ scaleFactor = self.scaleFactor
+ centerX = self.centerX
+ centerY = self.centerY
+ self.mutex.unlock()
+
+ halfWidth = resultSize.width() // 2
+ halfHeight = resultSize.height() // 2
+ image = QImage(resultSize, QImage.Format_RGB32)
+
+ NumPasses = 8
+ curpass = 0
+
+ while curpass < NumPasses:
+ MaxIterations = (1 << (2 * curpass + 6)) + 32
+ Limit = 4
+ allBlack = True
+
+ for y in range(-halfHeight, halfHeight):
+ if self.restart:
+ break
+ if self.abort:
+ return
+
+ ay = 1j * (centerY + (y * scaleFactor))
+
+ for x in range(-halfWidth, halfWidth):
+ c0 = centerX + (x * scaleFactor) + ay
+ c = c0
+ numIterations = 0
+
+ while numIterations < MaxIterations:
+ numIterations += 1
+ c = c*c + c0
+ if abs(c) >= Limit:
+ break
+ numIterations += 1
+ c = c*c + c0
+ if abs(c) >= Limit:
+ break
+ numIterations += 1
+ c = c*c + c0
+ if abs(c) >= Limit:
+ break
+ numIterations += 1
+ c = c*c + c0
+ if abs(c) >= Limit:
+ break
+
+ if numIterations < MaxIterations:
+ image.setPixel(x + halfWidth, y + halfHeight,
+ self.colormap[numIterations % RenderThread.ColormapSize])
+ allBlack = False
+ else:
+ image.setPixel(x + halfWidth, y + halfHeight, qRgb(0, 0, 0))
+
+ if allBlack and curpass == 0:
+ curpass = 4
+ else:
+ if not self.restart:
+ self.renderedImage.emit(image, scaleFactor)
+ curpass += 1
+
+ self.mutex.lock()
+ if not self.restart:
+ self.condition.wait(self.mutex)
+ self.restart = False
+ self.mutex.unlock()
+
+ def rgbFromWaveLength(self, wave):
+ r = 0.0
+ g = 0.0
+ b = 0.0
+
+ if wave >= 380.0 and wave <= 440.0:
+ r = -1.0 * (wave - 440.0) / (440.0 - 380.0)
+ b = 1.0
+ elif wave >= 440.0 and wave <= 490.0:
+ g = (wave - 440.0) / (490.0 - 440.0)
+ b = 1.0
+ elif wave >= 490.0 and wave <= 510.0:
+ g = 1.0
+ b = -1.0 * (wave - 510.0) / (510.0 - 490.0)
+ elif wave >= 510.0 and wave <= 580.0:
+ r = (wave - 510.0) / (580.0 - 510.0)
+ g = 1.0
+ elif wave >= 580.0 and wave <= 645.0:
+ r = 1.0
+ g = -1.0 * (wave - 645.0) / (645.0 - 580.0)
+ elif wave >= 645.0 and wave <= 780.0:
+ r = 1.0
+
+ s = 1.0
+ if wave > 700.0:
+ s = 0.3 + 0.7 * (780.0 - wave) / (780.0 - 700.0)
+ elif wave < 420.0:
+ s = 0.3 + 0.7 * (wave - 380.0) / (420.0 - 380.0)
+
+ r = pow(r * s, 0.8)
+ g = pow(g * s, 0.8)
+ b = pow(b * s, 0.8)
+
+ return qRgb(r*255, g*255, b*255)
+
+
+class MandelbrotWidget(QWidget):
+ def __init__(self, parent=None):
+ super(MandelbrotWidget, self).__init__(parent)
+
+ self.thread = RenderThread()
+ self.pixmap = QPixmap()
+ self.pixmapOffset = QPoint()
+ self.lastDragPos = QPoint()
+
+ self.centerX = DefaultCenterX
+ self.centerY = DefaultCenterY
+ self.pixmapScale = DefaultScale
+ self.curScale = DefaultScale
+
+ self.thread.renderedImage.connect(self.updatePixmap)
+
+ self.setWindowTitle("Mandelbrot")
+ self.setCursor(Qt.CrossCursor)
+ self.resize(550, 400)
+
+ def paintEvent(self, event):
+ painter = QPainter(self)
+ painter.fillRect(self.rect(), Qt.black)
+
+ if self.pixmap.isNull():
+ painter.setPen(Qt.white)
+ painter.drawText(self.rect(), Qt.AlignCenter,
+ "Rendering initial image, please wait...")
+ return
+
+ if self.curScale == self.pixmapScale:
+ painter.drawPixmap(self.pixmapOffset, self.pixmap)
+ else:
+ scaleFactor = self.pixmapScale / self.curScale
+ newWidth = int(self.pixmap.width() * scaleFactor)
+ newHeight = int(self.pixmap.height() * scaleFactor)
+ newX = self.pixmapOffset.x() + (self.pixmap.width() - newWidth) / 2
+ newY = self.pixmapOffset.y() + (self.pixmap.height() - newHeight) / 2
+
+ painter.save()
+ painter.translate(newX, newY)
+ painter.scale(scaleFactor, scaleFactor)
+ exposed, _ = painter.matrix().inverted()
+ exposed = exposed.mapRect(self.rect()).adjusted(-1, -1, 1, 1)
+ painter.drawPixmap(exposed, self.pixmap, exposed)
+ painter.restore()
+
+ text = "Use mouse wheel or the '+' and '-' keys to zoom. Press and " \
+ "hold left mouse button to scroll."
+ metrics = painter.fontMetrics()
+ textWidth = metrics.width(text)
+
+ painter.setPen(Qt.NoPen)
+ painter.setBrush(QColor(0, 0, 0, 127))
+ painter.drawRect((self.width() - textWidth) / 2 - 5, 0, textWidth + 10,
+ metrics.lineSpacing() + 5)
+ painter.setPen(Qt.white)
+ painter.drawText((self.width() - textWidth) / 2,
+ metrics.leading() + metrics.ascent(), text)
+
+ def resizeEvent(self, event):
+ self.thread.render(self.centerX, self.centerY, self.curScale, self.size())
+
+ def keyPressEvent(self, event):
+ if event.key() == Qt.Key_Plus:
+ self.zoom(ZoomInFactor)
+ elif event.key() == Qt.Key_Minus:
+ self.zoom(ZoomOutFactor)
+ elif event.key() == Qt.Key_Left:
+ self.scroll(-ScrollStep, 0)
+ elif event.key() == Qt.Key_Right:
+ self.scroll(+ScrollStep, 0)
+ elif event.key() == Qt.Key_Down:
+ self.scroll(0, -ScrollStep)
+ elif event.key() == Qt.Key_Up:
+ self.scroll(0, +ScrollStep)
+ else:
+ super(MandelbrotWidget, self).keyPressEvent(event)
+
+ def wheelEvent(self, event):
+ numDegrees = event.angleDelta().y() / 8
+ numSteps = numDegrees / 15.0
+ self.zoom(pow(ZoomInFactor, numSteps))
+
+ def mousePressEvent(self, event):
+ if event.buttons() == Qt.LeftButton:
+ self.lastDragPos = QPoint(event.pos())
+
+ def mouseMoveEvent(self, event):
+ if event.buttons() & Qt.LeftButton:
+ self.pixmapOffset += event.pos() - self.lastDragPos
+ self.lastDragPos = QPoint(event.pos())
+ self.update()
+
+ def mouseReleaseEvent(self, event):
+ if event.button() == Qt.LeftButton:
+ self.pixmapOffset += event.pos() - self.lastDragPos
+ self.lastDragPos = QPoint()
+
+ deltaX = (self.width() - self.pixmap.width()) / 2 - self.pixmapOffset.x()
+ deltaY = (self.height() - self.pixmap.height()) / 2 - self.pixmapOffset.y()
+ self.scroll(deltaX, deltaY)
+
+ def updatePixmap(self, image, scaleFactor):
+ if not self.lastDragPos.isNull():
+ return
+
+ self.pixmap = QPixmap.fromImage(image)
+ self.pixmapOffset = QPoint()
+ self.lastDragPosition = QPoint()
+ self.pixmapScale = scaleFactor
+ self.update()
+
+ def zoom(self, zoomFactor):
+ self.curScale *= zoomFactor
+ self.update()
+ self.thread.render(self.centerX, self.centerY, self.curScale,
+ self.size())
+
+ def scroll(self, deltaX, deltaY):
+ self.centerX += deltaX * self.curScale
+ self.centerY += deltaY * self.curScale
+ self.update()
+ self.thread.render(self.centerX, self.centerY, self.curScale,
+ self.size())
+
+
+if __name__ == '__main__':
+
+ import sys
+
+ app = QApplication(sys.argv)
+ widget = MandelbrotWidget()
+ widget.show()
+ r = app.exec_()
+ widget.thread.stop()
+ sys.exit(r)
diff --git a/examples/corelib/tools/codecs/codecs.py b/examples/corelib/tools/codecs/codecs.py
new file mode 100755
index 00000000..15f7d956
--- /dev/null
+++ b/examples/corelib/tools/codecs/codecs.py
@@ -0,0 +1,251 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2013 Riverbank Computing Limited.
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+"""PySide2 port of the widgets/tools/codecs example from Qt v5.x"""
+
+from PySide2 import QtCore, QtGui, QtWidgets
+
+
+def codec_name(codec):
+ try:
+ # Python v3.
+ name = str(codec.name(), encoding='ascii')
+ except TypeError:
+ # Python v2.
+ name = str(codec.name())
+
+ return name
+
+
+class MainWindow(QtWidgets.QMainWindow):
+ def __init__(self):
+ super(MainWindow, self).__init__()
+
+ self.textEdit = QtWidgets.QTextEdit()
+ self.textEdit.setLineWrapMode(QtWidgets.QTextEdit.NoWrap)
+ self.setCentralWidget(self.textEdit)
+
+ self.codecs = []
+ self.findCodecs()
+
+ self.previewForm = PreviewForm(self)
+ self.previewForm.setCodecList(self.codecs)
+
+ self.saveAsActs = []
+ self.createActions()
+ self.createMenus()
+
+ self.setWindowTitle("Codecs")
+ self.resize(500, 400)
+
+ def open(self):
+ fileName, _ = QtWidgets.QFileDialog.getOpenFileName(self)
+ if fileName:
+ inFile = QtCore.QFile(fileName)
+ if not inFile.open(QtCore.QFile.ReadOnly):
+ QtWidgets.QMessageBox.warning(self, "Codecs",
+ "Cannot read file %s:\n%s" % (fileName, inFile.errorString()))
+ return
+
+ data = inFile.readAll()
+
+ self.previewForm.setEncodedData(data)
+ if self.previewForm.exec_():
+ self.textEdit.setPlainText(self.previewForm.decodedString())
+
+ def save(self):
+ fileName = QtWidgets.QFileDialog.getSaveFileName(self)
+ if fileName:
+ outFile = QtCore.QFile(fileName)
+ if not outFile.open(QtCore.QFile.WriteOnly|QtCore.QFile.Text):
+ QtWidgets.QMessageBox.warning(self, "Codecs",
+ "Cannot write file %s:\n%s" % (fileName, outFile.errorString()))
+ return
+
+ action = self.sender()
+ codecName = action.data()
+
+ out = QtCore.QTextStream(outFile)
+ out.setCodec(codecName)
+ out << self.textEdit.toPlainText()
+
+ def about(self):
+ QtWidgets.QMessageBox.about(self, "About Codecs",
+ "The <b>Codecs</b> example demonstrates how to read and "
+ "write files using various encodings.")
+
+ def aboutToShowSaveAsMenu(self):
+ currentText = self.textEdit.toPlainText()
+
+ for action in self.saveAsActs:
+ codecName = str(action.data())
+ codec = QtCore.QTextCodec.codecForName(codecName)
+ action.setVisible(codec and codec.canEncode(currentText))
+
+ def findCodecs(self):
+ codecMap = []
+ iso8859RegExp = QtCore.QRegExp('ISO[- ]8859-([0-9]+).*')
+
+ for mib in QtCore.QTextCodec.availableMibs():
+ codec = QtCore.QTextCodec.codecForMib(mib)
+ sortKey = codec_name(codec).upper()
+ rank = 0
+
+ if sortKey.startswith('UTF-8'):
+ rank = 1
+ elif sortKey.startswith('UTF-16'):
+ rank = 2
+ elif iso8859RegExp.exactMatch(sortKey):
+ if len(iso8859RegExp.cap(1)) == 1:
+ rank = 3
+ else:
+ rank = 4
+ else:
+ rank = 5
+
+ codecMap.append((str(rank) + sortKey, codec))
+
+ codecMap.sort()
+ self.codecs = [item[-1] for item in codecMap]
+
+ def createActions(self):
+ self.openAct = QtWidgets.QAction("&Open...", self, shortcut="Ctrl+O",
+ triggered=self.open)
+
+ for codec in self.codecs:
+ name = codec_name(codec)
+
+ action = QtWidgets.QAction(name + '...', self, triggered=self.save)
+ action.setData(name)
+ self.saveAsActs.append(action)
+
+ self.exitAct = QtWidgets.QAction("E&xit", self, shortcut="Ctrl+Q",
+ triggered=self.close)
+
+ self.aboutAct = QtWidgets.QAction("&About", self, triggered=self.about)
+
+ self.aboutQtAct = QtWidgets.QAction("About &Qt", self,
+ triggered=QtWidgets.qApp.aboutQt)
+
+ def createMenus(self):
+ self.saveAsMenu = QtWidgets.QMenu("&Save As", self)
+ for action in self.saveAsActs:
+ self.saveAsMenu.addAction(action)
+
+ self.saveAsMenu.aboutToShow.connect(self.aboutToShowSaveAsMenu)
+
+ self.fileMenu = QtWidgets.QMenu("&File", self)
+ self.fileMenu.addAction(self.openAct)
+ self.fileMenu.addMenu(self.saveAsMenu)
+ self.fileMenu.addSeparator()
+ self.fileMenu.addAction(self.exitAct)
+
+ self.helpMenu = QtWidgets.QMenu("&Help", self)
+ self.helpMenu.addAction(self.aboutAct)
+ self.helpMenu.addAction(self.aboutQtAct)
+
+ self.menuBar().addMenu(self.fileMenu)
+ self.menuBar().addSeparator()
+ self.menuBar().addMenu(self.helpMenu)
+
+
+class PreviewForm(QtWidgets.QDialog):
+ def __init__(self, parent):
+ super(PreviewForm, self).__init__(parent)
+
+ self.encodingComboBox = QtWidgets.QComboBox()
+ encodingLabel = QtWidgets.QLabel("&Encoding:")
+ encodingLabel.setBuddy(self.encodingComboBox)
+
+ self.textEdit = QtWidgets.QTextEdit()
+ self.textEdit.setLineWrapMode(QtWidgets.QTextEdit.NoWrap)
+ self.textEdit.setReadOnly(True)
+
+ buttonBox = QtWidgets.QDialogButtonBox(QtWidgets.QDialogButtonBox.Ok | QtWidgets.QDialogButtonBox.Cancel)
+
+ self.encodingComboBox.activated.connect(self.updateTextEdit)
+ buttonBox.accepted.connect(self.accept)
+ buttonBox.rejected.connect(self.reject)
+
+ mainLayout = QtWidgets.QGridLayout()
+ mainLayout.addWidget(encodingLabel, 0, 0)
+ mainLayout.addWidget(self.encodingComboBox, 0, 1)
+ mainLayout.addWidget(self.textEdit, 1, 0, 1, 2)
+ mainLayout.addWidget(buttonBox, 2, 0, 1, 2)
+ self.setLayout(mainLayout)
+
+ self.setWindowTitle("Choose Encoding")
+ self.resize(400, 300)
+
+ def setCodecList(self, codecs):
+ self.encodingComboBox.clear()
+ for codec in codecs:
+ self.encodingComboBox.addItem(codec_name(codec), codec.mibEnum())
+
+ def setEncodedData(self, data):
+ self.encodedData = data
+ self.updateTextEdit()
+
+ def decodedString(self):
+ return self.decodedStr
+
+ def updateTextEdit(self):
+ mib = self.encodingComboBox.itemData(self.encodingComboBox.currentIndex())
+ codec = QtCore.QTextCodec.codecForMib(mib)
+
+ data = QtCore.QTextStream(self.encodedData)
+ data.setAutoDetectUnicode(False)
+ data.setCodec(codec)
+
+ self.decodedStr = data.readAll()
+ self.textEdit.setPlainText(self.decodedStr)
+
+
+if __name__ == '__main__':
+
+ import sys
+
+ app = QtWidgets.QApplication(sys.argv)
+ mainWin = MainWindow()
+ mainWin.show()
+ sys.exit(app.exec_())
diff --git a/examples/corelib/tools/regexp.py b/examples/corelib/tools/regexp.py
new file mode 100755
index 00000000..7e28a536
--- /dev/null
+++ b/examples/corelib/tools/regexp.py
@@ -0,0 +1,195 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2013 Riverbank Computing Limited.
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+"""PySide2 port of the widgets/tools/regexp example from Qt v5.x"""
+
+from PySide2 import QtCore, QtGui, QtWidgets
+
+
+class RegExpDialog(QtWidgets.QDialog):
+ MaxCaptures = 6
+
+ def __init__(self, parent=None):
+ super(RegExpDialog, self).__init__(parent)
+
+ self.patternComboBox = QtWidgets.QComboBox()
+ self.patternComboBox.setEditable(True)
+ self.patternComboBox.setSizePolicy(QtWidgets.QSizePolicy.Expanding,
+ QtWidgets.QSizePolicy.Preferred)
+
+ patternLabel = QtWidgets.QLabel("&Pattern:")
+ patternLabel.setBuddy(self.patternComboBox)
+
+ self.escapedPatternLineEdit = QtWidgets.QLineEdit()
+ self.escapedPatternLineEdit.setReadOnly(True)
+ palette = self.escapedPatternLineEdit.palette()
+ palette.setBrush(QtGui.QPalette.Base,
+ palette.brush(QtGui.QPalette.Disabled, QtGui.QPalette.Base))
+ self.escapedPatternLineEdit.setPalette(palette)
+
+ escapedPatternLabel = QtWidgets.QLabel("&Escaped Pattern:")
+ escapedPatternLabel.setBuddy(self.escapedPatternLineEdit)
+
+ self.syntaxComboBox = QtWidgets.QComboBox()
+ self.syntaxComboBox.addItem("Regular expression v1",
+ QtCore.QRegExp.RegExp)
+ self.syntaxComboBox.addItem("Regular expression v2",
+ QtCore.QRegExp.RegExp2)
+ self.syntaxComboBox.addItem("Wildcard", QtCore.QRegExp.Wildcard)
+ self.syntaxComboBox.addItem("Fixed string",
+ QtCore.QRegExp.FixedString)
+
+ syntaxLabel = QtWidgets.QLabel("&Pattern Syntax:")
+ syntaxLabel.setBuddy(self.syntaxComboBox)
+
+ self.textComboBox = QtWidgets.QComboBox()
+ self.textComboBox.setEditable(True)
+ self.textComboBox.setSizePolicy(QtWidgets.QSizePolicy.Expanding,
+ QtWidgets.QSizePolicy.Preferred)
+
+ textLabel = QtWidgets.QLabel("&Text:")
+ textLabel.setBuddy(self.textComboBox)
+
+ self.caseSensitiveCheckBox = QtWidgets.QCheckBox("Case &Sensitive")
+ self.caseSensitiveCheckBox.setChecked(True)
+ self.minimalCheckBox = QtWidgets.QCheckBox("&Minimal")
+
+ indexLabel = QtWidgets.QLabel("Index of Match:")
+ self.indexEdit = QtWidgets.QLineEdit()
+ self.indexEdit.setReadOnly(True)
+
+ matchedLengthLabel = QtWidgets.QLabel("Matched Length:")
+ self.matchedLengthEdit = QtWidgets.QLineEdit()
+ self.matchedLengthEdit.setReadOnly(True)
+
+ self.captureLabels = []
+ self.captureEdits = []
+ for i in range(self.MaxCaptures):
+ self.captureLabels.append(QtWidgets.QLabel("Capture %d:" % i))
+ self.captureEdits.append(QtWidgets.QLineEdit())
+ self.captureEdits[i].setReadOnly(True)
+ self.captureLabels[0].setText("Match:")
+
+ checkBoxLayout = QtWidgets.QHBoxLayout()
+ checkBoxLayout.addWidget(self.caseSensitiveCheckBox)
+ checkBoxLayout.addWidget(self.minimalCheckBox)
+ checkBoxLayout.addStretch(1)
+
+ mainLayout = QtWidgets.QGridLayout()
+ mainLayout.addWidget(patternLabel, 0, 0)
+ mainLayout.addWidget(self.patternComboBox, 0, 1)
+ mainLayout.addWidget(escapedPatternLabel, 1, 0)
+ mainLayout.addWidget(self.escapedPatternLineEdit, 1, 1)
+ mainLayout.addWidget(syntaxLabel, 2, 0)
+ mainLayout.addWidget(self.syntaxComboBox, 2, 1)
+ mainLayout.addLayout(checkBoxLayout, 3, 0, 1, 2)
+ mainLayout.addWidget(textLabel, 4, 0)
+ mainLayout.addWidget(self.textComboBox, 4, 1)
+ mainLayout.addWidget(indexLabel, 5, 0)
+ mainLayout.addWidget(self.indexEdit, 5, 1)
+ mainLayout.addWidget(matchedLengthLabel, 6, 0)
+ mainLayout.addWidget(self.matchedLengthEdit, 6, 1)
+
+ for i in range(self.MaxCaptures):
+ mainLayout.addWidget(self.captureLabels[i], 7 + i, 0)
+ mainLayout.addWidget(self.captureEdits[i], 7 + i, 1)
+ self.setLayout(mainLayout)
+
+ self.patternComboBox.editTextChanged.connect(self.refresh)
+ self.textComboBox.editTextChanged.connect(self.refresh)
+ self.caseSensitiveCheckBox.toggled.connect(self.refresh)
+ self.minimalCheckBox.toggled.connect(self.refresh)
+ self.syntaxComboBox.currentIndexChanged.connect(self.refresh)
+
+ self.patternComboBox.addItem("[A-Za-z_]+([A-Za-z_0-9]*)")
+ self.textComboBox.addItem("(10 + delta4)* 32")
+
+ self.setWindowTitle("RegExp")
+ self.setFixedHeight(self.sizeHint().height())
+ self.refresh()
+
+ def refresh(self):
+ self.setUpdatesEnabled(False)
+
+ pattern = self.patternComboBox.currentText()
+ text = self.textComboBox.currentText()
+
+ escaped = str(pattern)
+ escaped.replace('\\', '\\\\')
+ escaped.replace('"', '\\"')
+ self.escapedPatternLineEdit.setText('"' + escaped + '"')
+
+ rx = QtCore.QRegExp(pattern)
+ cs = QtCore.Qt.CaseInsensitive
+ if self.caseSensitiveCheckBox.isChecked():
+ cs = QtCore.Qt.CaseSensitive
+ rx.setCaseSensitivity(cs)
+ rx.setMinimal(self.minimalCheckBox.isChecked())
+ syntax = self.syntaxComboBox.itemData(self.syntaxComboBox.currentIndex())
+ rx.setPatternSyntax(QtCore.QRegExp.PatternSyntax(syntax))
+
+ palette = self.patternComboBox.palette()
+ if rx.isValid():
+ palette.setColor(QtGui.QPalette.Text,
+ self.textComboBox.palette().color(QtGui.QPalette.Text))
+ else:
+ palette.setColor(QtGui.QPalette.Text, QtCore.Qt.red)
+ self.patternComboBox.setPalette(palette)
+
+ self.indexEdit.setText(str(rx.indexIn(text)))
+ self.matchedLengthEdit.setText(str(rx.matchedLength()))
+
+ for i in range(self.MaxCaptures):
+ self.captureLabels[i].setEnabled(i <= rx.captureCount())
+ self.captureEdits[i].setEnabled(i <= rx.captureCount())
+ self.captureEdits[i].setText(rx.cap(i))
+
+ self.setUpdatesEnabled(True)
+
+if __name__ == '__main__':
+
+ import sys
+
+ app = QtWidgets.QApplication(sys.argv)
+ dialog = RegExpDialog()
+ sys.exit(dialog.exec_())
diff --git a/examples/corelib/tools/settingseditor/settingseditor.py b/examples/corelib/tools/settingseditor/settingseditor.py
new file mode 100755
index 00000000..90504974
--- /dev/null
+++ b/examples/corelib/tools/settingseditor/settingseditor.py
@@ -0,0 +1,722 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2013 Riverbank Computing Limited.
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+"""PySide2 port of the widgets/tools/settingseditor example from Qt v5.x"""
+
+import sys
+
+from PySide2 import QtCore, QtGui, QtWidgets
+
+
+class MainWindow(QtWidgets.QMainWindow):
+ def __init__(self, parent=None):
+ super(MainWindow, self).__init__(parent)
+
+ self.settingsTree = SettingsTree()
+ self.setCentralWidget(self.settingsTree)
+
+ self.locationDialog = None
+
+ self.createActions()
+ self.createMenus()
+
+ self.autoRefreshAct.setChecked(True)
+ self.fallbacksAct.setChecked(True)
+
+ self.setWindowTitle("Settings Editor")
+ self.resize(500, 600)
+
+ def openSettings(self):
+ if self.locationDialog is None:
+ self.locationDialog = LocationDialog(self)
+
+ if self.locationDialog.exec_():
+ settings = QtCore.QSettings(self.locationDialog.format(),
+ self.locationDialog.scope(),
+ self.locationDialog.organization(),
+ self.locationDialog.application())
+ self.setSettingsObject(settings)
+ self.fallbacksAct.setEnabled(True)
+
+ def openIniFile(self):
+ fileName, _ = QtWidgets.QFileDialog.getOpenFileName(self, "Open INI File",
+ '', "INI Files (*.ini *.conf)")
+
+ if fileName:
+ settings = QtCore.QSettings(fileName, QtCore.QSettings.IniFormat)
+ self.setSettingsObject(settings)
+ self.fallbacksAct.setEnabled(False)
+
+ def openPropertyList(self):
+ fileName, _ = QtWidgets.QFileDialog.getOpenFileName(self,
+ "Open Property List", '', "Property List Files (*.plist)")
+
+ if fileName:
+ settings = QtCore.QSettings(fileName, QtCore.QSettings.NativeFormat)
+ self.setSettingsObject(settings)
+ self.fallbacksAct.setEnabled(False)
+
+ def openRegistryPath(self):
+ path, ok = QtWidgets.QInputDialog.getText(self, "Open Registry Path",
+ "Enter the path in the Windows registry:",
+ QtWidgets.QLineEdit.Normal, 'HKEY_CURRENT_USER\\')
+
+ if ok and path != '':
+ settings = QtCore.QSettings(path, QtCore.QSettings.NativeFormat)
+ self.setSettingsObject(settings)
+ self.fallbacksAct.setEnabled(False)
+
+ def about(self):
+ QtWidgets.QMessageBox.about(self, "About Settings Editor",
+ "The <b>Settings Editor</b> example shows how to access "
+ "application settings using Qt.")
+
+ def createActions(self):
+ self.openSettingsAct = QtWidgets.QAction("&Open Application Settings...",
+ self, shortcut="Ctrl+O", triggered=self.openSettings)
+
+ self.openIniFileAct = QtWidgets.QAction("Open I&NI File...", self,
+ shortcut="Ctrl+N", triggered=self.openIniFile)
+
+ self.openPropertyListAct = QtWidgets.QAction("Open macOS &Property List...",
+ self, shortcut="Ctrl+P", triggered=self.openPropertyList)
+ if sys.platform != 'darwin':
+ self.openPropertyListAct.setEnabled(False)
+
+ self.openRegistryPathAct = QtWidgets.QAction(
+ "Open Windows &Registry Path...", self, shortcut="Ctrl+G",
+ triggered=self.openRegistryPath)
+ if sys.platform != 'win32':
+ self.openRegistryPathAct.setEnabled(False)
+
+ self.refreshAct = QtWidgets.QAction("&Refresh", self, shortcut="Ctrl+R",
+ enabled=False, triggered=self.settingsTree.refresh)
+
+ self.exitAct = QtWidgets.QAction("E&xit", self, shortcut="Ctrl+Q",
+ triggered=self.close)
+
+ self.autoRefreshAct = QtWidgets.QAction("&Auto-Refresh", self,
+ shortcut="Ctrl+A", checkable=True, enabled=False)
+ self.autoRefreshAct.triggered[bool].connect(self.settingsTree.setAutoRefresh)
+ self.autoRefreshAct.triggered[bool].connect(self.refreshAct.setDisabled)
+
+ self.fallbacksAct = QtWidgets.QAction("&Fallbacks", self,
+ shortcut="Ctrl+F", checkable=True, enabled=False)
+ self.fallbacksAct.triggered[bool].connect(self.settingsTree.setFallbacksEnabled)
+
+ self.aboutAct = QtWidgets.QAction("&About", self, triggered=self.about)
+
+ self.aboutQtAct = QtWidgets.QAction("About &Qt", self,
+ triggered=QtWidgets.qApp.aboutQt)
+
+ def createMenus(self):
+ self.fileMenu = self.menuBar().addMenu("&File")
+ self.fileMenu.addAction(self.openSettingsAct)
+ self.fileMenu.addAction(self.openIniFileAct)
+ self.fileMenu.addAction(self.openPropertyListAct)
+ self.fileMenu.addAction(self.openRegistryPathAct)
+ self.fileMenu.addSeparator()
+ self.fileMenu.addAction(self.refreshAct)
+ self.fileMenu.addSeparator()
+ self.fileMenu.addAction(self.exitAct)
+
+ self.optionsMenu = self.menuBar().addMenu("&Options")
+ self.optionsMenu.addAction(self.autoRefreshAct)
+ self.optionsMenu.addAction(self.fallbacksAct)
+
+ self.menuBar().addSeparator()
+
+ self.helpMenu = self.menuBar().addMenu("&Help")
+ self.helpMenu.addAction(self.aboutAct)
+ self.helpMenu.addAction(self.aboutQtAct)
+
+ def setSettingsObject(self, settings):
+ settings.setFallbacksEnabled(self.fallbacksAct.isChecked())
+ self.settingsTree.setSettingsObject(settings)
+
+ self.refreshAct.setEnabled(True)
+ self.autoRefreshAct.setEnabled(True)
+
+ niceName = settings.fileName()
+ niceName.replace('\\', '/')
+ niceName = niceName.split('/')[-1]
+
+ if not settings.isWritable():
+ niceName += " (read only)"
+
+ self.setWindowTitle("%s - Settings Editor" % niceName)
+
+
+class LocationDialog(QtWidgets.QDialog):
+ def __init__(self, parent=None):
+ super(LocationDialog, self).__init__(parent)
+
+ self.formatComboBox = QtWidgets.QComboBox()
+ self.formatComboBox.addItem("Native")
+ self.formatComboBox.addItem("INI")
+
+ self.scopeComboBox = QtWidgets.QComboBox()
+ self.scopeComboBox.addItem("User")
+ self.scopeComboBox.addItem("System")
+
+ self.organizationComboBox = QtWidgets.QComboBox()
+ self.organizationComboBox.addItem("Trolltech")
+ self.organizationComboBox.setEditable(True)
+
+ self.applicationComboBox = QtWidgets.QComboBox()
+ self.applicationComboBox.addItem("Any")
+ self.applicationComboBox.addItem("Application Example")
+ self.applicationComboBox.addItem("Assistant")
+ self.applicationComboBox.addItem("Designer")
+ self.applicationComboBox.addItem("Linguist")
+ self.applicationComboBox.setEditable(True)
+ self.applicationComboBox.setCurrentIndex(3)
+
+ formatLabel = QtWidgets.QLabel("&Format:")
+ formatLabel.setBuddy(self.formatComboBox)
+
+ scopeLabel = QtWidgets.QLabel("&Scope:")
+ scopeLabel.setBuddy(self.scopeComboBox)
+
+ organizationLabel = QtWidgets.QLabel("&Organization:")
+ organizationLabel.setBuddy(self.organizationComboBox)
+
+ applicationLabel = QtWidgets.QLabel("&Application:")
+ applicationLabel.setBuddy(self.applicationComboBox)
+
+ self.locationsGroupBox = QtWidgets.QGroupBox("Setting Locations")
+
+ self.locationsTable = QtWidgets.QTableWidget()
+ self.locationsTable.setSelectionMode(QtWidgets.QAbstractItemView.SingleSelection)
+ self.locationsTable.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows)
+ self.locationsTable.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
+ self.locationsTable.setColumnCount(2)
+ self.locationsTable.setHorizontalHeaderLabels(("Location", "Access"))
+ self.locationsTable.horizontalHeader().setSectionResizeMode(0, QtWidgets.QHeaderView.Stretch)
+ self.locationsTable.horizontalHeader().resizeSection(1, 180)
+
+ self.buttonBox = QtWidgets.QDialogButtonBox(QtWidgets.QDialogButtonBox.Ok | QtWidgets.QDialogButtonBox.Cancel)
+
+ self.formatComboBox.activated.connect(self.updateLocationsTable)
+ self.scopeComboBox.activated.connect(self.updateLocationsTable)
+ self.organizationComboBox.lineEdit().editingFinished.connect(self.updateLocationsTable)
+ self.applicationComboBox.lineEdit().editingFinished.connect(self.updateLocationsTable)
+ self.buttonBox.accepted.connect(self.accept)
+ self.buttonBox.rejected.connect(self.reject)
+
+ locationsLayout = QtWidgets.QVBoxLayout()
+ locationsLayout.addWidget(self.locationsTable)
+ self.locationsGroupBox.setLayout(locationsLayout)
+
+ mainLayout = QtWidgets.QGridLayout()
+ mainLayout.addWidget(formatLabel, 0, 0)
+ mainLayout.addWidget(self.formatComboBox, 0, 1)
+ mainLayout.addWidget(scopeLabel, 1, 0)
+ mainLayout.addWidget(self.scopeComboBox, 1, 1)
+ mainLayout.addWidget(organizationLabel, 2, 0)
+ mainLayout.addWidget(self.organizationComboBox, 2, 1)
+ mainLayout.addWidget(applicationLabel, 3, 0)
+ mainLayout.addWidget(self.applicationComboBox, 3, 1)
+ mainLayout.addWidget(self.locationsGroupBox, 4, 0, 1, 2)
+ mainLayout.addWidget(self.buttonBox, 5, 0, 1, 2)
+ self.setLayout(mainLayout)
+
+ self.updateLocationsTable()
+
+ self.setWindowTitle("Open Application Settings")
+ self.resize(650, 400)
+
+ def format(self):
+ if self.formatComboBox.currentIndex() == 0:
+ return QtCore.QSettings.NativeFormat
+ else:
+ return QtCore.QSettings.IniFormat
+
+ def scope(self):
+ if self.scopeComboBox.currentIndex() == 0:
+ return QtCore.QSettings.UserScope
+ else:
+ return QtCore.QSettings.SystemScope
+
+ def organization(self):
+ return self.organizationComboBox.currentText()
+
+ def application(self):
+ if self.applicationComboBox.currentText() == "Any":
+ return ''
+
+ return self.applicationComboBox.currentText()
+
+ def updateLocationsTable(self):
+ self.locationsTable.setUpdatesEnabled(False)
+ self.locationsTable.setRowCount(0)
+
+ for i in range(2):
+ if i == 0:
+ if self.scope() == QtCore.QSettings.SystemScope:
+ continue
+
+ actualScope = QtCore.QSettings.UserScope
+ else:
+ actualScope = QtCore.QSettings.SystemScope
+
+ for j in range(2):
+ if j == 0:
+ if not self.application():
+ continue
+
+ actualApplication = self.application()
+ else:
+ actualApplication = ''
+
+ settings = QtCore.QSettings(self.format(), actualScope,
+ self.organization(), actualApplication)
+
+ row = self.locationsTable.rowCount()
+ self.locationsTable.setRowCount(row + 1)
+
+ item0 = QtWidgets.QTableWidgetItem()
+ item0.setText(settings.fileName())
+
+ item1 = QtWidgets.QTableWidgetItem()
+ disable = not (settings.childKeys() or settings.childGroups())
+
+ if row == 0:
+ if settings.isWritable():
+ item1.setText("Read-write")
+ disable = False
+ else:
+ item1.setText("Read-only")
+ self.buttonBox.button(QtWidgets.QDialogButtonBox.Ok).setDisabled(disable)
+ else:
+ item1.setText("Read-only fallback")
+
+ if disable:
+ item0.setFlags(item0.flags() & ~QtCore.Qt.ItemIsEnabled)
+ item1.setFlags(item1.flags() & ~QtCore.Qt.ItemIsEnabled)
+
+ self.locationsTable.setItem(row, 0, item0)
+ self.locationsTable.setItem(row, 1, item1)
+
+ self.locationsTable.setUpdatesEnabled(True)
+
+
+class SettingsTree(QtWidgets.QTreeWidget):
+ def __init__(self, parent=None):
+ super(SettingsTree, self).__init__(parent)
+
+ self.setItemDelegate(VariantDelegate(self))
+
+ self.setHeaderLabels(("Setting", "Type", "Value"))
+ self.header().setSectionResizeMode(0, QtWidgets.QHeaderView.Stretch)
+ self.header().setSectionResizeMode(2, QtWidgets.QHeaderView.Stretch)
+
+ self.settings = None
+ self.refreshTimer = QtCore.QTimer()
+ self.refreshTimer.setInterval(2000)
+ self.autoRefresh = False
+
+ self.groupIcon = QtGui.QIcon()
+ self.groupIcon.addPixmap(self.style().standardPixmap(QtWidgets.QStyle.SP_DirClosedIcon),
+ QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ self.groupIcon.addPixmap(self.style().standardPixmap(QtWidgets.QStyle.SP_DirOpenIcon),
+ QtGui.QIcon.Normal, QtGui.QIcon.On)
+ self.keyIcon = QtGui.QIcon()
+ self.keyIcon.addPixmap(self.style().standardPixmap(QtWidgets.QStyle.SP_FileIcon))
+
+ self.refreshTimer.timeout.connect(self.maybeRefresh)
+
+ def setSettingsObject(self, settings):
+ self.settings = settings
+ self.clear()
+
+ if self.settings is not None:
+ self.settings.setParent(self)
+ self.refresh()
+ if self.autoRefresh:
+ self.refreshTimer.start()
+ else:
+ self.refreshTimer.stop()
+
+ def sizeHint(self):
+ return QtCore.QSize(800, 600)
+
+ def setAutoRefresh(self, autoRefresh):
+ self.autoRefresh = autoRefresh
+
+ if self.settings is not None:
+ if self.autoRefresh:
+ self.maybeRefresh()
+ self.refreshTimer.start()
+ else:
+ self.refreshTimer.stop()
+
+ def setFallbacksEnabled(self, enabled):
+ if self.settings is not None:
+ self.settings.setFallbacksEnabled(enabled)
+ self.refresh()
+
+ def maybeRefresh(self):
+ if self.state() != QtWidgets.QAbstractItemView.EditingState:
+ self.refresh()
+
+ def refresh(self):
+ if self.settings is None:
+ return
+
+ # The signal might not be connected.
+ try:
+ self.itemChanged.disconnect(self.updateSetting)
+ except:
+ pass
+
+ self.settings.sync()
+ self.updateChildItems(None)
+
+ self.itemChanged.connect(self.updateSetting)
+
+ def event(self, event):
+ if event.type() == QtCore.QEvent.WindowActivate:
+ if self.isActiveWindow() and self.autoRefresh:
+ self.maybeRefresh()
+
+ return super(SettingsTree, self).event(event)
+
+ def updateSetting(self, item):
+ key = item.text(0)
+ ancestor = item.parent()
+
+ while ancestor:
+ key = ancestor.text(0) + '/' + key
+ ancestor = ancestor.parent()
+
+ d = item.data(2, QtCore.Qt.UserRole)
+ self.settings.setValue(key, item.data(2, QtCore.Qt.UserRole))
+
+ if self.autoRefresh:
+ self.refresh()
+
+ def updateChildItems(self, parent):
+ dividerIndex = 0
+
+ for group in self.settings.childGroups():
+ childIndex = self.findChild(parent, group, dividerIndex)
+ if childIndex != -1:
+ child = self.childAt(parent, childIndex)
+ child.setText(1, '')
+ child.setText(2, '')
+ child.setData(2, QtCore.Qt.UserRole, None)
+ self.moveItemForward(parent, childIndex, dividerIndex)
+ else:
+ child = self.createItem(group, parent, dividerIndex)
+
+ child.setIcon(0, self.groupIcon)
+ dividerIndex += 1
+
+ self.settings.beginGroup(group)
+ self.updateChildItems(child)
+ self.settings.endGroup()
+
+ for key in self.settings.childKeys():
+ childIndex = self.findChild(parent, key, 0)
+ if childIndex == -1 or childIndex >= dividerIndex:
+ if childIndex != -1:
+ child = self.childAt(parent, childIndex)
+ for i in range(child.childCount()):
+ self.deleteItem(child, i)
+ self.moveItemForward(parent, childIndex, dividerIndex)
+ else:
+ child = self.createItem(key, parent, dividerIndex)
+ child.setIcon(0, self.keyIcon)
+ dividerIndex += 1
+ else:
+ child = self.childAt(parent, childIndex)
+
+ value = self.settings.value(key)
+ if value is None:
+ child.setText(1, 'Invalid')
+ else:
+ child.setText(1, value.__class__.__name__)
+ child.setText(2, VariantDelegate.displayText(value))
+ child.setData(2, QtCore.Qt.UserRole, value)
+
+ while dividerIndex < self.childCount(parent):
+ self.deleteItem(parent, dividerIndex)
+
+ def createItem(self, text, parent, index):
+ after = None
+
+ if index != 0:
+ after = self.childAt(parent, index - 1)
+
+ if parent is not None:
+ item = QtWidgets.QTreeWidgetItem(parent, after)
+ else:
+ item = QtWidgets.QTreeWidgetItem(self, after)
+
+ item.setText(0, text)
+ item.setFlags(item.flags() | QtCore.Qt.ItemIsEditable)
+ return item
+
+ def deleteItem(self, parent, index):
+ if parent is not None:
+ item = parent.takeChild(index)
+ else:
+ item = self.takeTopLevelItem(index)
+ del item
+
+ def childAt(self, parent, index):
+ if parent is not None:
+ return parent.child(index)
+ else:
+ return self.topLevelItem(index)
+
+ def childCount(self, parent):
+ if parent is not None:
+ return parent.childCount()
+ else:
+ return self.topLevelItemCount()
+
+ def findChild(self, parent, text, startIndex):
+ for i in range(self.childCount(parent)):
+ if self.childAt(parent, i).text(0) == text:
+ return i
+ return -1
+
+ def moveItemForward(self, parent, oldIndex, newIndex):
+ for int in range(oldIndex - newIndex):
+ self.deleteItem(parent, newIndex)
+
+
+class VariantDelegate(QtWidgets.QItemDelegate):
+ def __init__(self, parent=None):
+ super(VariantDelegate, self).__init__(parent)
+
+ self.boolExp = QtCore.QRegExp()
+ self.boolExp.setPattern('true|false')
+ self.boolExp.setCaseSensitivity(QtCore.Qt.CaseInsensitive)
+
+ self.byteArrayExp = QtCore.QRegExp()
+ self.byteArrayExp.setPattern('[\\x00-\\xff]*')
+
+ self.charExp = QtCore.QRegExp()
+ self.charExp.setPattern('.')
+
+ self.colorExp = QtCore.QRegExp()
+ self.colorExp.setPattern('\\(([0-9]*),([0-9]*),([0-9]*),([0-9]*)\\)')
+
+ self.doubleExp = QtCore.QRegExp()
+ self.doubleExp.setPattern('')
+
+ self.pointExp = QtCore.QRegExp()
+ self.pointExp.setPattern('\\((-?[0-9]*),(-?[0-9]*)\\)')
+
+ self.rectExp = QtCore.QRegExp()
+ self.rectExp.setPattern('\\((-?[0-9]*),(-?[0-9]*),(-?[0-9]*),(-?[0-9]*)\\)')
+
+ self.signedIntegerExp = QtCore.QRegExp()
+ self.signedIntegerExp.setPattern('-?[0-9]*')
+
+ self.sizeExp = QtCore.QRegExp(self.pointExp)
+
+ self.unsignedIntegerExp = QtCore.QRegExp()
+ self.unsignedIntegerExp.setPattern('[0-9]*')
+
+ self.dateExp = QtCore.QRegExp()
+ self.dateExp.setPattern('([0-9]{,4})-([0-9]{,2})-([0-9]{,2})')
+
+ self.timeExp = QtCore.QRegExp()
+ self.timeExp.setPattern('([0-9]{,2}):([0-9]{,2}):([0-9]{,2})')
+
+ self.dateTimeExp = QtCore.QRegExp()
+ self.dateTimeExp.setPattern(self.dateExp.pattern() + 'T' + self.timeExp.pattern())
+
+ def paint(self, painter, option, index):
+ if index.column() == 2:
+ value = index.model().data(index, QtCore.Qt.UserRole)
+ if not self.isSupportedType(value):
+ myOption = QtWidgets.QStyleOptionViewItem(option)
+ myOption.state &= ~QtWidgets.QStyle.State_Enabled
+ super(VariantDelegate, self).paint(painter, myOption, index)
+ return
+
+ super(VariantDelegate, self).paint(painter, option, index)
+
+ def createEditor(self, parent, option, index):
+ if index.column() != 2:
+ return None
+
+ originalValue = index.model().data(index, QtCore.Qt.UserRole)
+ if not self.isSupportedType(originalValue):
+ return None
+
+ lineEdit = QtWidgets.QLineEdit(parent)
+ lineEdit.setFrame(False)
+
+ if isinstance(originalValue, bool):
+ regExp = self.boolExp
+ elif isinstance(originalValue, float):
+ regExp = self.doubleExp
+ elif isinstance(originalValue, int):
+ regExp = self.signedIntegerExp
+ elif isinstance(originalValue, QtCore.QByteArray):
+ regExp = self.byteArrayExp
+ elif isinstance(originalValue, QtGui.QColor):
+ regExp = self.colorExp
+ elif isinstance(originalValue, QtCore.QDate):
+ regExp = self.dateExp
+ elif isinstance(originalValue, QtCore.QDateTime):
+ regExp = self.dateTimeExp
+ elif isinstance(originalValue, QtCore.QTime):
+ regExp = self.timeExp
+ elif isinstance(originalValue, QtCore.QPoint):
+ regExp = self.pointExp
+ elif isinstance(originalValue, QtCore.QRect):
+ regExp = self.rectExp
+ elif isinstance(originalValue, QtCore.QSize):
+ regExp = self.sizeExp
+ else:
+ regExp = QtCore.QRegExp()
+
+ if not regExp.isEmpty():
+ validator = QtGui.QRegExpValidator(regExp, lineEdit)
+ lineEdit.setValidator(validator)
+
+ return lineEdit
+
+ def setEditorData(self, editor, index):
+ value = index.model().data(index, QtCore.Qt.UserRole)
+ if editor is not None:
+ editor.setText(self.displayText(value))
+
+ def setModelData(self, editor, model, index):
+ if not editor.isModified():
+ return
+
+ text = editor.text()
+ validator = editor.validator()
+ if validator is not None:
+ state, text, _ = validator.validate(text, 0)
+ if state != QtGui.QValidator.Acceptable:
+ return
+
+ originalValue = index.model().data(index, QtCore.Qt.UserRole)
+
+ if isinstance(originalValue, QtGui.QColor):
+ self.colorExp.exactMatch(text)
+ value = QtGui.QColor(min(int(self.colorExp.cap(1)), 255),
+ min(int(self.colorExp.cap(2)), 255),
+ min(int(self.colorExp.cap(3)), 255),
+ min(int(self.colorExp.cap(4)), 255))
+ elif isinstance(originalValue, QtCore.QDate):
+ value = QtCore.QDate.fromString(text, QtCore.Qt.ISODate)
+ if not value.isValid():
+ return
+ elif isinstance(originalValue, QtCore.QDateTime):
+ value = QtCore.QDateTime.fromString(text, QtCore.Qt.ISODate)
+ if not value.isValid():
+ return
+ elif isinstance(originalValue, QtCore.QTime):
+ value = QtCore.QTime.fromString(text, QtCore.Qt.ISODate)
+ if not value.isValid():
+ return
+ elif isinstance(originalValue, QtCore.QPoint):
+ self.pointExp.exactMatch(text)
+ value = QtCore.QPoint(int(self.pointExp.cap(1)),
+ int(self.pointExp.cap(2)))
+ elif isinstance(originalValue, QtCore.QRect):
+ self.rectExp.exactMatch(text)
+ value = QtCore.QRect(int(self.rectExp.cap(1)),
+ int(self.rectExp.cap(2)),
+ int(self.rectExp.cap(3)),
+ int(self.rectExp.cap(4)))
+ elif isinstance(originalValue, QtCore.QSize):
+ self.sizeExp.exactMatch(text)
+ value = QtCore.QSize(int(self.sizeExp.cap(1)),
+ int(self.sizeExp.cap(2)))
+ elif isinstance(originalValue, list):
+ value = text.split(',')
+ else:
+ value = type(originalValue)(text)
+
+ model.setData(index, self.displayText(value), QtCore.Qt.DisplayRole)
+ model.setData(index, value, QtCore.Qt.UserRole)
+
+ @staticmethod
+ def isSupportedType(value):
+ return isinstance(value, (bool, float, int, QtCore.QByteArray,
+ str, QtGui.QColor, QtCore.QDate, QtCore.QDateTime,
+ QtCore.QTime, QtCore.QPoint, QtCore.QRect, QtCore.QSize,
+ list))
+
+ @staticmethod
+ def displayText(value):
+ if isinstance(value, (bool, int, QtCore.QByteArray)):
+ return str(value)
+ if isinstance(value, str):
+ return value
+ elif isinstance(value, float):
+ return '%g' % value
+ elif isinstance(value, QtGui.QColor):
+ return '(%u,%u,%u,%u)' % (value.red(), value.green(), value.blue(), value.alpha())
+ elif isinstance(value, (QtCore.QDate, QtCore.QDateTime, QtCore.QTime)):
+ return value.toString(QtCore.Qt.ISODate)
+ elif isinstance(value, QtCore.QPoint):
+ return '(%d,%d)' % (value.x(), value.y())
+ elif isinstance(value, QtCore.QRect):
+ return '(%d,%d,%d,%d)' % (value.x(), value.y(), value.width(), value.height())
+ elif isinstance(value, QtCore.QSize):
+ return '(%d,%d)' % (value.width(), value.height())
+ elif isinstance(value, list):
+ return ','.join(value)
+ elif value is None:
+ return '<Invalid>'
+
+ return '<%s>' % value
+
+
+if __name__ == '__main__':
+ app = QtWidgets.QApplication(sys.argv)
+ mainWin = MainWindow()
+ mainWin.show()
+ sys.exit(app.exec_())
diff --git a/examples/datavisualization/bars3d.py b/examples/datavisualization/bars3d.py
new file mode 100644
index 00000000..c07314cb
--- /dev/null
+++ b/examples/datavisualization/bars3d.py
@@ -0,0 +1,115 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2017 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+"""PySide2 QtDataVisualization example"""
+
+import os
+import sys
+from PySide2.QtCore import QRect, QSize, QProcess, Qt
+from PySide2.QtGui import QGuiApplication, QScreen, QWindow
+from PySide2.QtWidgets import QApplication, QSizePolicy, QMainWindow, QWidget
+from PySide2.QtDataVisualization import QtDataVisualization
+
+def dataToBarDataRow(data):
+ return list(QtDataVisualization.QBarDataItem(d) for d in data)
+
+def dataToBarDataArray(data):
+ return list(dataToBarDataRow(row) for row in data)
+
+class MainWindow(QMainWindow):
+
+ def __init__(self):
+ super(MainWindow, self).__init__()
+
+ self.setWindowTitle('Qt DataVisualization 3D Bars')
+
+ self.bars = QtDataVisualization.Q3DBars()
+
+ self.columnAxis = QtDataVisualization.QCategory3DAxis()
+ self.columnAxis.setTitle('Columns')
+ self.columnAxis.setTitleVisible(True)
+ self.columnAxis.setLabels(['Column1', 'Column2'])
+ self.columnAxis.setLabelAutoRotation(30);
+
+ self.rowAxis = QtDataVisualization.QCategory3DAxis()
+ self.rowAxis.setTitle('Rows')
+ self.rowAxis.setTitleVisible(True)
+ self.rowAxis.setLabels(['Row1', 'Row2'])
+ self.rowAxis.setLabelAutoRotation(30);
+
+ self.valueAxis = QtDataVisualization.QValue3DAxis()
+ self.valueAxis.setTitle('Values')
+ self.valueAxis.setTitleVisible(True)
+ self.valueAxis.setRange(0, 5);
+
+ self.bars.setRowAxis(self.rowAxis)
+ self.bars.setColumnAxis(self.columnAxis)
+ self.bars.setValueAxis(self.valueAxis)
+
+ self.series = QtDataVisualization.QBar3DSeries()
+ self.arrayData = [[1, 2], [3, 4]]
+ self.series.dataProxy().addRows(dataToBarDataArray(self.arrayData))
+
+ self.bars.setPrimarySeries(self.series)
+
+ self.container = QWidget.createWindowContainer(self.bars)
+
+ if not self.bars.hasContext():
+ print("Couldn't initialize the OpenGL context.")
+ sys.exit(-1)
+
+ camera = self.bars.scene().activeCamera()
+ camera.setYRotation(22.5)
+
+ geometry = QGuiApplication.primaryScreen().geometry()
+ size = geometry.height() * 3 / 4
+ self.container.setMinimumSize(size, size)
+
+ self.container.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding);
+ self.container.setFocusPolicy(Qt.StrongFocus);
+ self.setCentralWidget(self.container)
+
+if __name__ == '__main__':
+ app = QApplication(sys.argv)
+ mainWin = MainWindow()
+ mainWin.show()
+ sys.exit(app.exec_())
diff --git a/examples/declarative/extending/chapter1-basics/app.qml b/examples/declarative/extending/chapter1-basics/app.qml
new file mode 100644
index 00000000..60ecd7bf
--- /dev/null
+++ b/examples/declarative/extending/chapter1-basics/app.qml
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the PySide examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+//![0]
+import Charts 1.0
+import QtQuick 2.0
+
+Item {
+ width: 300; height: 200
+
+ PieChart {
+ id: aPieChart
+ anchors.centerIn: parent
+ width: 100; height: 100
+ name: "A simple pie chart"
+ color: "red"
+ }
+
+ Text {
+ anchors {
+ bottom: parent.bottom;
+ horizontalCenter: parent.horizontalCenter;
+ bottomMargin: 20
+ }
+ text: aPieChart.name
+ }
+}
+//![0]
diff --git a/examples/declarative/extending/chapter1-basics/basics.py b/examples/declarative/extending/chapter1-basics/basics.py
new file mode 100644
index 00000000..fb943bdb
--- /dev/null
+++ b/examples/declarative/extending/chapter1-basics/basics.py
@@ -0,0 +1,100 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from __future__ import print_function
+
+"""PySide2 port of the qml/tutorials/extending-qml/chapter1-basics example from Qt v5.x"""
+
+import sys, os
+sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', '..', 'utils'))
+from utils import text_type
+
+from PySide2.QtCore import Property, Signal, QUrl
+from PySide2.QtGui import QGuiApplication, QPen, QPainter, QColor
+from PySide2.QtQml import qmlRegisterType
+from PySide2.QtQuick import QQuickPaintedItem, QQuickView
+
+class PieChart (QQuickPaintedItem):
+ def __init__(self, parent = None):
+ QQuickPaintedItem.__init__(self, parent)
+ self._name = u''
+
+ def paint(self, painter):
+ pen = QPen(self.color, 2)
+ painter.setPen(pen);
+ painter.setRenderHints(QPainter.Antialiasing, True);
+ painter.drawPie(self.boundingRect(), 90 * 16, 290 * 16);
+
+ def getColor(self):
+ return self._color
+
+ def setColor(self, value):
+ self._color = value
+
+ def getName(self):
+ return self._name
+
+ def setName(self, value):
+ self._name = value
+
+ nameChanged = Signal()
+
+ color = Property(QColor, getColor, setColor)
+ name = Property(text_type, getName, setName, notify=nameChanged)
+
+if __name__ == '__main__':
+ app = QGuiApplication(sys.argv)
+
+ qmlRegisterType(PieChart, 'Charts', 1, 0, 'PieChart');
+
+ view = QQuickView()
+ view.setResizeMode(QQuickView.SizeRootObjectToView)
+ qmlFile = os.path.join(os.path.dirname(__file__), 'app.qml')
+ view.setSource(QUrl.fromLocalFile(os.path.abspath(qmlFile)))
+ if view.status() == QQuickView.Error:
+ sys.exit(-1)
+ view.show()
+ res = app.exec_()
+ # Deleting the view before it goes out of scope is required to make sure all child QML instances
+ # are destroyed in the correct order.
+ del view
+ sys.exit(res)
diff --git a/examples/declarative/extending/chapter2-methods/app.qml b/examples/declarative/extending/chapter2-methods/app.qml
new file mode 100644
index 00000000..863b597d
--- /dev/null
+++ b/examples/declarative/extending/chapter2-methods/app.qml
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the PySide examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+//![0]
+import Charts 1.0
+import QtQuick 2.0
+
+Item {
+ width: 300; height: 200
+
+ PieChart {
+ id: aPieChart
+ anchors.centerIn: parent
+ width: 100; height: 100
+ color: "red"
+
+ onChartCleared: console.log("The chart has been cleared")
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: aPieChart.clearChart()
+ }
+
+ Text {
+ anchors {
+ bottom: parent.bottom;
+ horizontalCenter: parent.horizontalCenter;
+ bottomMargin: 20
+ }
+ text: "Click anywhere to clear the chart"
+ }
+}
+//![0]
diff --git a/examples/declarative/extending/chapter2-methods/methods.py b/examples/declarative/extending/chapter2-methods/methods.py
new file mode 100644
index 00000000..25543818
--- /dev/null
+++ b/examples/declarative/extending/chapter2-methods/methods.py
@@ -0,0 +1,105 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from __future__ import print_function
+
+"""PySide2 port of the qml/tutorials/extending-qml/chapter2-methods example from Qt v5.x"""
+
+import sys, os
+sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', '..', 'utils'))
+from utils import text_type
+
+from PySide2.QtCore import Property, Signal, Slot, QUrl, Qt
+from PySide2.QtGui import QGuiApplication, QPen, QPainter, QColor
+from PySide2.QtQml import qmlRegisterType
+from PySide2.QtQuick import QQuickPaintedItem, QQuickView
+
+class PieChart (QQuickPaintedItem):
+ def __init__(self, parent = None):
+ QQuickPaintedItem.__init__(self, parent)
+ self._name = u''
+
+ def paint(self, painter):
+ pen = QPen(self.color, 2)
+ painter.setPen(pen);
+ painter.setRenderHints(QPainter.Antialiasing, True);
+ painter.drawPie(self.boundingRect(), 90 * 16, 290 * 16);
+
+ def getColor(self):
+ return self._color
+
+ def setColor(self, value):
+ self._color = value
+
+ def getName(self):
+ return self._name
+
+ def setName(self, value):
+ self._name = value
+
+ color = Property(QColor, getColor, setColor)
+ name = Property(text_type, getName, setName)
+ chartCleared = Signal()
+
+ @Slot() # This should be something like @Invokable
+ def clearChart(self):
+ self.setColor(Qt.transparent)
+ self.update()
+ self.chartCleared.emit()
+
+if __name__ == '__main__':
+ app = QGuiApplication(sys.argv)
+
+ qmlRegisterType(PieChart, 'Charts', 1, 0, 'PieChart');
+
+ view = QQuickView()
+ view.setResizeMode(QQuickView.SizeRootObjectToView)
+ qmlFile = os.path.join(os.path.dirname(__file__), 'app.qml')
+ view.setSource(QUrl.fromLocalFile(os.path.abspath(qmlFile)))
+ if view.status() == QQuickView.Error:
+ sys.exit(-1)
+ view.show()
+ res = app.exec_()
+ # Deleting the view before it goes out of scope is required to make sure all child QML instances
+ # are destroyed in the correct order.
+ del view
+ sys.exit(res)
diff --git a/examples/declarative/extending/chapter3-bindings/app.qml b/examples/declarative/extending/chapter3-bindings/app.qml
new file mode 100644
index 00000000..01b9216e
--- /dev/null
+++ b/examples/declarative/extending/chapter3-bindings/app.qml
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the PySide examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+//![0]
+import Charts 1.0
+import QtQuick 2.0
+
+Item {
+ width: 300; height: 200
+
+ Row {
+ anchors.centerIn: parent
+ spacing: 20
+
+ PieChart {
+ id: chartA
+ width: 100; height: 100
+ color: "red"
+ }
+
+ PieChart {
+ id: chartB
+ width: 100; height: 100
+ color: chartA.color
+ }
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: { chartA.color = "blue" }
+ }
+
+ Text {
+ anchors {
+ bottom: parent.bottom;
+ horizontalCenter: parent.horizontalCenter;
+ bottomMargin: 20
+ }
+ text: "Click anywhere to change the chart color"
+ }
+}
+//![0]
diff --git a/examples/declarative/extending/chapter3-bindings/bindings.py b/examples/declarative/extending/chapter3-bindings/bindings.py
new file mode 100644
index 00000000..14506a06
--- /dev/null
+++ b/examples/declarative/extending/chapter3-bindings/bindings.py
@@ -0,0 +1,110 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from __future__ import print_function
+
+"""PySide2 port of the qml/tutorials/extending-qml/chapter3-bindings example from Qt v5.x"""
+
+import sys, os
+sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', '..', 'utils'))
+from utils import text_type
+
+from PySide2.QtCore import Property, Signal, Slot, QUrl, Qt
+from PySide2.QtGui import QGuiApplication, QPen, QPainter, QColor
+from PySide2.QtQml import qmlRegisterType
+from PySide2.QtQuick import QQuickPaintedItem, QQuickView
+
+class PieChart (QQuickPaintedItem):
+ def __init__(self, parent = None):
+ QQuickPaintedItem.__init__(self, parent)
+ self._name = u''
+ self._color = QColor()
+
+ def paint(self, painter):
+ pen = QPen(self._color, 2)
+ painter.setPen(pen);
+ painter.setRenderHints(QPainter.Antialiasing, True);
+ painter.drawPie(self.boundingRect(), 90 * 16, 290 * 16);
+
+ def getColor(self):
+ return self._color
+
+ def setColor(self, value):
+ if value != self._color:
+ self._color = value
+ self.update()
+ self.colorChanged.emit()
+
+ def getName(self):
+ return self._name
+
+ def setName(self, value):
+ self._name = value
+
+ colorChanged = Signal()
+ color = Property(QColor, getColor, setColor, notify=colorChanged)
+ name = Property(text_type, getName, setName)
+ chartCleared = Signal()
+
+ @Slot() # This should be something like @Invokable
+ def clearChart(self):
+ self.setColor(Qt.transparent)
+ self.update()
+ self.chartCleared.emit()
+
+if __name__ == '__main__':
+ app = QGuiApplication(sys.argv)
+
+ qmlRegisterType(PieChart, 'Charts', 1, 0, 'PieChart');
+
+ view = QQuickView()
+ view.setResizeMode(QQuickView.SizeRootObjectToView)
+ qmlFile = os.path.join(os.path.dirname(__file__), 'app.qml')
+ view.setSource(QUrl.fromLocalFile(os.path.abspath(qmlFile)))
+ if view.status() == QQuickView.Error:
+ sys.exit(-1)
+ view.show()
+ res = app.exec_()
+ # Deleting the view before it goes out of scope is required to make sure all child QML instances
+ # are destroyed in the correct order.
+ del view
+ sys.exit(res)
diff --git a/examples/declarative/extending/chapter4-customPropertyTypes/app.qml b/examples/declarative/extending/chapter4-customPropertyTypes/app.qml
new file mode 100644
index 00000000..00e07727
--- /dev/null
+++ b/examples/declarative/extending/chapter4-customPropertyTypes/app.qml
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the PySide examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+//![0]
+import Charts 1.0
+import QtQuick 2.0
+
+Item {
+ width: 300; height: 200
+
+ PieChart {
+ id: chart
+ anchors.centerIn: parent
+ width: 100; height: 100
+
+ pieSlice: PieSlice {
+ anchors.fill: parent
+ color: "red"
+ }
+ }
+
+ Component.onCompleted: console.log("The pie is colored " + chart.pieSlice.color)
+}
+//![0]
diff --git a/examples/declarative/extending/chapter4-customPropertyTypes/customPropertyTypes.py b/examples/declarative/extending/chapter4-customPropertyTypes/customPropertyTypes.py
new file mode 100644
index 00000000..90e6bb45
--- /dev/null
+++ b/examples/declarative/extending/chapter4-customPropertyTypes/customPropertyTypes.py
@@ -0,0 +1,115 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from __future__ import print_function
+
+"""PySide2 port of the qml/tutorials/extending-qml/chapter4-customPropertyTypes example from Qt v5.x"""
+
+import sys, os
+sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', '..', 'utils'))
+from utils import text_type
+
+from PySide2.QtCore import Property, QUrl
+from PySide2.QtGui import QGuiApplication, QPen, QPainter, QColor
+from PySide2.QtQml import qmlRegisterType
+from PySide2.QtQuick import QQuickPaintedItem, QQuickView
+
+class PieSlice (QQuickPaintedItem):
+ def __init__(self, parent = None):
+ QQuickPaintedItem.__init__(self, parent)
+ self._color = QColor()
+
+ def getColor(self):
+ return self._color
+
+ def setColor(self, value):
+ self._color = value
+
+ color = Property(QColor, getColor, setColor)
+
+ def paint(self, painter):
+ pen = QPen(self._color, 2)
+ painter.setPen(pen);
+ painter.setRenderHints(QPainter.Antialiasing, True);
+ painter.drawPie(self.boundingRect(), 90 * 16, 290 * 16);
+
+class PieChart (QQuickPaintedItem):
+ def __init__(self, parent = None):
+ QQuickPaintedItem.__init__(self, parent)
+ self._name = u''
+ self._pieSlice = None
+
+ def getName(self):
+ return self._name
+
+ def setName(self, value):
+ self._name = value
+
+ name = Property(text_type, getName, setName)
+
+ def getPieSlice(self):
+ return self._pieSlice
+
+ def setPieSlice(self, value):
+ self._pieSlice = value
+ self._pieSlice.setParentItem(self)
+
+ pieSlice = Property(PieSlice, getPieSlice, setPieSlice)
+
+if __name__ == '__main__':
+ app = QGuiApplication(sys.argv)
+
+ qmlRegisterType(PieChart, 'Charts', 1, 0, 'PieChart');
+ qmlRegisterType(PieSlice, "Charts", 1, 0, "PieSlice");
+
+ view = QQuickView()
+ view.setResizeMode(QQuickView.SizeRootObjectToView)
+ qmlFile = os.path.join(os.path.dirname(__file__), 'app.qml')
+ view.setSource(QUrl.fromLocalFile(os.path.abspath(qmlFile)))
+ if view.status() == QQuickView.Error:
+ sys.exit(-1)
+ view.show()
+ res = app.exec_()
+ # Deleting the view before it goes out of scope is required to make sure all child QML instances
+ # are destroyed in the correct order.
+ del view
+ sys.exit(res)
diff --git a/examples/declarative/extending/chapter5-listproperties/app.qml b/examples/declarative/extending/chapter5-listproperties/app.qml
new file mode 100644
index 00000000..230c2952
--- /dev/null
+++ b/examples/declarative/extending/chapter5-listproperties/app.qml
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the PySide examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+//![0]
+import Charts 1.0
+import QtQuick 2.0
+
+Item {
+ width: 300; height: 200
+
+ PieChart {
+ anchors.centerIn: parent
+ width: 100; height: 100
+
+ slices: [
+ PieSlice {
+ anchors.fill: parent
+ color: "red"
+ fromAngle: 0; angleSpan: 110
+ },
+ PieSlice {
+ anchors.fill: parent
+ color: "black"
+ fromAngle: 110; angleSpan: 50
+ },
+ PieSlice {
+ anchors.fill: parent
+ color: "blue"
+ fromAngle: 160; angleSpan: 100
+ }
+ ]
+ }
+}
+//![0]
diff --git a/examples/declarative/extending/chapter5-listproperties/listproperties.py b/examples/declarative/extending/chapter5-listproperties/listproperties.py
new file mode 100644
index 00000000..d6d3a73e
--- /dev/null
+++ b/examples/declarative/extending/chapter5-listproperties/listproperties.py
@@ -0,0 +1,128 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from __future__ import print_function
+
+"""PySide2 port of the qml/tutorials/extending-qml/chapter5-listproperties example from Qt v5.x"""
+
+import sys, os
+sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', '..', 'utils'))
+from utils import text_type
+
+from PySide2.QtCore import Property, QUrl
+from PySide2.QtGui import QGuiApplication, QPen, QPainter, QColor
+from PySide2.QtQml import qmlRegisterType, ListProperty
+from PySide2.QtQuick import QQuickPaintedItem, QQuickView
+
+class PieSlice (QQuickPaintedItem):
+ def __init__(self, parent = None):
+ QQuickPaintedItem.__init__(self, parent)
+ self._color = QColor()
+ self._fromAngle = 0
+ self._angleSpan = 0
+
+ def getColor(self):
+ return self._color
+
+ def setColor(self, value):
+ self._color = value
+
+ def getFromAngle(self):
+ return self._angle
+
+ def setFromAngle(self, value):
+ self._fromAngle = value
+
+ def getAngleSpan(self):
+ return self._angleSpan
+
+ def setAngleSpan(self, value):
+ self._angleSpan = value
+
+ color = Property(QColor, getColor, setColor)
+ fromAngle = Property(int, getFromAngle, setFromAngle)
+ angleSpan = Property(int, getAngleSpan, setAngleSpan)
+
+ def paint(self, painter):
+ pen = QPen(self._color, 2)
+ painter.setPen(pen);
+ painter.setRenderHints(QPainter.Antialiasing, True);
+ painter.drawPie(self.boundingRect(), self._fromAngle * 16, self._angleSpan * 16);
+
+class PieChart (QQuickPaintedItem):
+ def __init__(self, parent = None):
+ QQuickPaintedItem.__init__(self, parent)
+ self._name = u''
+ self._slices = []
+
+ def getName(self):
+ return self._name
+
+ def setName(self, value):
+ self._name = value
+
+ name = Property(text_type, getName, setName)
+
+ def appendSlice(self, _slice):
+ _slice.setParentItem(self)
+ self._slices.append(_slice)
+
+ slices = ListProperty(PieSlice, appendSlice)
+
+if __name__ == '__main__':
+ app = QGuiApplication(sys.argv)
+
+ qmlRegisterType(PieChart, 'Charts', 1, 0, 'PieChart');
+ qmlRegisterType(PieSlice, "Charts", 1, 0, "PieSlice");
+
+ view = QQuickView()
+ view.setResizeMode(QQuickView.SizeRootObjectToView)
+ qmlFile = os.path.join(os.path.dirname(__file__), 'app.qml')
+ view.setSource(QUrl.fromLocalFile(os.path.abspath(qmlFile)))
+ if view.status() == QQuickView.Error:
+ sys.exit(-1)
+ view.show()
+ res = app.exec_()
+ # Deleting the view before it goes out of scope is required to make sure all child QML instances
+ # are destroyed in the correct order.
+ del view
+ sys.exit(res)
diff --git a/examples/declarative/scrolling.py b/examples/declarative/scrolling.py
new file mode 100755
index 00000000..7b079c8f
--- /dev/null
+++ b/examples/declarative/scrolling.py
@@ -0,0 +1,73 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from __future__ import print_function
+
+import os
+import sys
+from PySide2.QtCore import QUrl
+from PySide2.QtGui import QGuiApplication
+import PySide2.QtQml
+from PySide2.QtQuick import QQuickView
+
+# This example uses a QML file to show a scrolling list containing
+# all the items listed in dataList.
+
+if __name__ == '__main__':
+ dataList = ["Item 1", "Item 2", "Item 3", "Item 4"]
+
+ app = QGuiApplication(sys.argv)
+ view = QQuickView()
+
+ ctxt = view.rootContext()
+ ctxt.setContextProperty("myModel", dataList)
+
+ qmlFile = os.path.join(os.path.dirname(__file__), 'view.qml')
+ view.setSource(QUrl.fromLocalFile(os.path.abspath(qmlFile)))
+ if view.status() == QQuickView.Error:
+ sys.exit(-1)
+ view.show()
+
+ app.exec_()
+ # Deleting the view before it goes out of scope is required to make sure all child QML instances
+ # are destroyed in the correct order.
+ del view
diff --git a/examples/declarative/signals/pytoqml1/main.py b/examples/declarative/signals/pytoqml1/main.py
new file mode 100644
index 00000000..e90a3cfa
--- /dev/null
+++ b/examples/declarative/signals/pytoqml1/main.py
@@ -0,0 +1,72 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from __future__ import print_function
+
+import os
+import sys
+from PySide2.QtCore import QTimer, QUrl
+from PySide2.QtGui import QGuiApplication
+import PySide2.QtQml
+from PySide2.QtQuick import QQuickView
+
+if __name__ == '__main__':
+ app = QGuiApplication(sys.argv)
+
+ timer = QTimer()
+ timer.start(2000)
+
+ view = QQuickView()
+ qmlFile = os.path.join(os.path.dirname(__file__), 'view.qml')
+ view.setSource(QUrl.fromLocalFile(os.path.abspath(qmlFile)))
+ if view.status() == QQuickView.Error:
+ sys.exit(-1)
+ root = view.rootObject()
+
+ timer.timeout.connect(root.updateRotater)
+
+ view.show()
+ res = app.exec_()
+ # Deleting the view before it goes out of scope is required to make sure all child QML instances
+ # are destroyed in the correct order.
+ del view
+ sys.exit(res)
diff --git a/examples/declarative/signals/pytoqml1/view.qml b/examples/declarative/signals/pytoqml1/view.qml
new file mode 100644
index 00000000..21ba8aa6
--- /dev/null
+++ b/examples/declarative/signals/pytoqml1/view.qml
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the PySide examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+Rectangle {
+ id: page
+
+ function updateRotater() {
+ rotater.angle = rotater.angle + 45
+ }
+
+ width: 500; height: 200
+ color: "lightgray"
+
+ Rectangle {
+ id: rotater
+ property real angle : 0
+ x: 240
+ width: 100; height: 10
+ color: "black"
+ y: 95
+
+ transform: Rotation {
+ origin.x: 10; origin.y: 5
+ angle: rotater.angle
+ Behavior on angle {
+ SpringAnimation {
+ spring: 1.4
+ damping: .05
+ }
+ }
+ }
+ }
+
+}
diff --git a/examples/declarative/signals/qmltopy1/main.py b/examples/declarative/signals/qmltopy1/main.py
new file mode 100755
index 00000000..ba568495
--- /dev/null
+++ b/examples/declarative/signals/qmltopy1/main.py
@@ -0,0 +1,89 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from __future__ import print_function
+
+import os
+import sys
+from PySide2.QtCore import QObject, QUrl, Slot
+from PySide2.QtGui import QGuiApplication
+import PySide2.QtQml
+from PySide2.QtQuick import QQuickView
+
+class Console(QObject):
+ """Output stuff on the console."""
+
+ @Slot(str)
+ @Slot('double')
+ def output(self, s):
+ print(s)
+
+ @Slot(str)
+ def outputStr(self, s):
+ print(s)
+
+ @Slot('double')
+ def outputFloat(self, x):
+ print(x)
+
+
+if __name__ == '__main__':
+ app = QGuiApplication(sys.argv)
+ view = QQuickView()
+
+ # Instantiate the Python object.
+ con = Console()
+
+ # Expose the object to QML.
+ context = view.rootContext()
+ context.setContextProperty("con", con)
+
+ qmlFile = os.path.join(os.path.dirname(__file__), 'view.qml')
+ view.setSource(QUrl.fromLocalFile(os.path.abspath(qmlFile)))
+ if view.status() == QQuickView.Error:
+ sys.exit(-1)
+ view.show()
+ res = app.exec_()
+ # Deleting the view before it goes out of scope is required to make sure all child QML instances
+ # are destroyed in the correct order.
+ del view
+ sys.exit(res)
diff --git a/examples/declarative/signals/qmltopy1/view.qml b/examples/declarative/signals/qmltopy1/view.qml
new file mode 100644
index 00000000..0115d432
--- /dev/null
+++ b/examples/declarative/signals/qmltopy1/view.qml
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the PySide examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+import QtQuick 2.0
+
+Rectangle {
+ id: page
+
+ width: 500; height: 200
+ color: "lightgray"
+
+ Text {
+ id: helloText
+ text: "Hello world!"
+ anchors.horizontalCenter: page.horizontalCenter
+ y: 30
+ font.pointSize: 24; font.bold: true
+ }
+
+ Rectangle {
+ id: button
+ width: 150; height: 40
+ color: "darkgray"
+ anchors.horizontalCenter: page.horizontalCenter
+ y: 120
+ MouseArea {
+ id: buttonMouseArea
+ objectName: "buttonMouseArea"
+ anchors.fill: parent
+ onClicked: {
+ // once the "con" context has been declared,
+ // slots can be called like functions
+ con.outputFloat(123)
+ con.outputStr("foobar")
+ con.output(helloText.x)
+ con.output(helloText.text)
+ }
+ }
+ Text {
+ id: buttonText
+ text: "Press me!"
+ anchors.horizontalCenter: button.horizontalCenter
+ anchors.verticalCenter: button.verticalCenter
+ font.pointSize: 16
+ }
+ }
+}
diff --git a/examples/declarative/signals/qmltopy2/main.py b/examples/declarative/signals/qmltopy2/main.py
new file mode 100755
index 00000000..be8692c0
--- /dev/null
+++ b/examples/declarative/signals/qmltopy2/main.py
@@ -0,0 +1,81 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from __future__ import print_function
+
+import os
+import sys
+from PySide2.QtCore import QObject, QUrl, Slot
+from PySide2.QtGui import QGuiApplication
+import PySide2.QtQml
+from PySide2.QtQuick import QQuickView
+
+class RotateValue(QObject):
+ def __init__(self):
+ super(RotateValue,self).__init__()
+ self.r = 0
+
+ # If a slot returns a value, the return value type must be explicitly
+ # defined in the decorator.
+ @Slot(result=int)
+ def val(self):
+ self.r = self.r + 10
+ return self.r
+
+if __name__ == '__main__':
+ app = QGuiApplication(sys.argv)
+ view = QQuickView()
+
+ rotatevalue = RotateValue()
+ context = view.rootContext()
+ context.setContextProperty("rotatevalue", rotatevalue)
+
+ qmlFile = os.path.join(os.path.dirname(__file__), 'view.qml')
+ view.setSource(QUrl.fromLocalFile(os.path.abspath(qmlFile)))
+ if view.status() == QQuickView.Error:
+ sys.exit(-1)
+ view.show()
+ res = app.exec_()
+ # Deleting the view before it goes out of scope is required to make sure all child QML instances
+ # are destroyed in the correct order.
+ del view
+ sys.exit(res)
diff --git a/examples/declarative/signals/qmltopy2/view.qml b/examples/declarative/signals/qmltopy2/view.qml
new file mode 100644
index 00000000..2a905a69
--- /dev/null
+++ b/examples/declarative/signals/qmltopy2/view.qml
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the PySide examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+Rectangle {
+ id: page
+
+ width: 500; height: 200
+ color: "lightgray"
+
+ Text {
+ id: helloText
+ text: "Hello world!"
+ anchors.horizontalCenter: page.horizontalCenter
+ y: 30
+ font.pointSize: 24; font.bold: true
+ }
+
+
+ Rectangle {
+ id: button
+ width: 150; height: 40
+ color: "darkgray"
+ anchors.horizontalCenter: page.horizontalCenter
+ y: 120
+ MouseArea {
+ id: buttonMouseArea
+ objectName: "buttonMouseArea"
+ anchors.fill: parent
+ onClicked: {
+ helloText.rotation = rotatevalue.val()
+ }
+ }
+ Text {
+ id: buttonText
+ text: "Press me!"
+ anchors.horizontalCenter: button.horizontalCenter
+ anchors.verticalCenter: button.verticalCenter
+ font.pointSize: 16
+ }
+ }
+}
diff --git a/examples/declarative/signals/qmltopy3/main.py b/examples/declarative/signals/qmltopy3/main.py
new file mode 100644
index 00000000..81c19ee8
--- /dev/null
+++ b/examples/declarative/signals/qmltopy3/main.py
@@ -0,0 +1,72 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from __future__ import print_function
+
+import os
+import sys
+from PySide2.QtCore import QObject, QUrl
+from PySide2.QtGui import QGuiApplication
+import PySide2.QtQml
+from PySide2.QtQuick import QQuickView
+
+def sayThis(s):
+ print(s)
+
+if __name__ == '__main__':
+ app = QGuiApplication(sys.argv)
+ view = QQuickView()
+ qmlFile = os.path.join(os.path.dirname(__file__), 'view.qml')
+ view.setSource(QUrl.fromLocalFile(os.path.abspath(qmlFile)))
+ if view.status() == QQuickView.Error:
+ sys.exit(-1)
+
+ root = view.rootObject()
+ root.textRotationChanged.connect(sayThis)
+ root.buttonClicked.connect(lambda: sayThis("clicked button (QML top-level signal)"))
+
+ view.show()
+ res = app.exec_()
+ # Deleting the view before it goes out of scope is required to make sure all child QML instances
+ # are destroyed in the correct order.
+ del view
+ sys.exit(res)
diff --git a/examples/declarative/signals/qmltopy3/view.qml b/examples/declarative/signals/qmltopy3/view.qml
new file mode 100644
index 00000000..72984a13
--- /dev/null
+++ b/examples/declarative/signals/qmltopy3/view.qml
@@ -0,0 +1,103 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the PySide examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+Rectangle {
+ id: page
+
+ signal buttonClicked
+ signal textRotationChanged(double rot)
+
+ width: 500; height: 200
+ color: "lightgray"
+
+ Text {
+ id: helloText
+ text: "Hello world!"
+ y: 30
+ x: page.width/2-width/2
+ font.pointSize: 24; font.bold: true
+ onRotationChanged: textRotationChanged(rotation)
+
+ states: State {
+ name: "down"; when: buttonMouseArea.pressed === true
+ PropertyChanges {
+ target: helloText;
+ rotation: 180;
+ y: 100;
+ }
+ }
+
+ transitions: Transition {
+ from: ""; to: "down"; reversible: true
+ ParallelAnimation {
+ NumberAnimation {
+ properties: "y,rotation"
+ duration: 500
+ easing.type: Easing.InOutQuad
+ }
+ }
+ }
+ }
+
+ Rectangle {
+ id: button
+ width: 150; height: 40
+ color: "darkgray"
+ anchors.horizontalCenter: page.horizontalCenter
+ y: 120
+ MouseArea {
+ id: buttonMouseArea
+ objectName: "buttonMouseArea"
+ anchors.fill: parent
+ onClicked: {
+ buttonClicked()
+ }
+ }
+ Text {
+ id: buttonText
+ text: "Press me!"
+ anchors.horizontalCenter: button.horizontalCenter
+ anchors.verticalCenter: button.verticalCenter
+ font.pointSize: 16
+ }
+ }
+}
diff --git a/examples/declarative/signals/qmltopy4/main.py b/examples/declarative/signals/qmltopy4/main.py
new file mode 100644
index 00000000..5f180b34
--- /dev/null
+++ b/examples/declarative/signals/qmltopy4/main.py
@@ -0,0 +1,72 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from __future__ import print_function
+
+import os
+import sys
+from PySide2.QtCore import QObject, QUrl
+from PySide2.QtGui import QGuiApplication
+import PySide2.QtQml
+from PySide2.QtQuick import QQuickView
+
+def sayThis(s):
+ print(s)
+
+if __name__ == '__main__':
+ app = QGuiApplication(sys.argv)
+ view = QQuickView()
+ qmlFile = os.path.join(os.path.dirname(__file__), 'view.qml')
+ view.setSource(QUrl.fromLocalFile(os.path.abspath(qmlFile)))
+ if view.status() == QQuickView.Error:
+ sys.exit(-1)
+
+ root = view.rootObject()
+ button = root.findChild(QObject, "buttonMouseArea")
+ button.clicked.connect(lambda: sayThis("clicked button (signal directly connected)"))
+
+ view.show()
+ res = app.exec_()
+ # Deleting the view before it goes out of scope is required to make sure all child QML instances
+ # are destroyed in the correct order.
+ del view
+ sys.exit(res)
diff --git a/examples/declarative/signals/qmltopy4/view.qml b/examples/declarative/signals/qmltopy4/view.qml
new file mode 100644
index 00000000..212df77e
--- /dev/null
+++ b/examples/declarative/signals/qmltopy4/view.qml
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the PySide examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+Rectangle {
+ id: page
+
+ width: 500; height: 200
+ color: "lightgray"
+
+ Rectangle {
+ id: button
+ width: 150; height: 40
+ color: "darkgray"
+ anchors.horizontalCenter: page.horizontalCenter
+ anchors.verticalCenter: page.verticalCenter
+ MouseArea {
+ id: buttonMouseArea
+ objectName: "buttonMouseArea"
+ anchors.fill: parent
+ }
+ Text {
+ id: buttonText
+ text: "Press me!"
+ anchors.horizontalCenter: button.horizontalCenter
+ anchors.verticalCenter: button.verticalCenter
+ font.pointSize: 16
+ }
+ }
+}
diff --git a/examples/declarative/usingmodel.py b/examples/declarative/usingmodel.py
new file mode 100644
index 00000000..bd2e4469
--- /dev/null
+++ b/examples/declarative/usingmodel.py
@@ -0,0 +1,102 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from __future__ import print_function
+
+import os
+import sys
+from PySide2.QtCore import QAbstractListModel, Qt, QUrl
+from PySide2.QtGui import QGuiApplication
+import PySide2.QtQml
+from PySide2.QtQuick import QQuickView
+
+class PersonModel (QAbstractListModel):
+ MyRole = Qt.UserRole + 1
+
+ def __init__(self, parent = None):
+ QAbstractListModel.__init__(self, parent)
+ self._data = []
+
+ def roleNames(self):
+ roles = {
+ PersonModel.MyRole : 'modelData',
+ Qt.DisplayRole : 'display'
+ }
+ return roles
+
+ def rowCount(self, index):
+ return len(self._data)
+
+ def data(self, index, role):
+ d = self._data[index.row()]
+
+ if role == Qt.DisplayRole:
+ return d['name']
+ elif role == Qt.DecorationRole:
+ return Qt.black
+ elif role == PersonModel.MyRole:
+ return d['myrole']
+ return None
+
+ def populate(self):
+ self._data.append({'name':'Qt', 'myrole':'role1'})
+ self._data.append({'name':'PySide', 'myrole':'role2'})
+
+if __name__ == '__main__':
+ app = QGuiApplication(sys.argv)
+ view = QQuickView()
+ view.setResizeMode(QQuickView.SizeRootObjectToView)
+
+ myModel = PersonModel()
+ myModel.populate()
+
+ view.rootContext().setContextProperty("myModel", myModel)
+ qmlFile = os.path.join(os.path.dirname(__file__), 'view.qml')
+ view.setSource(QUrl.fromLocalFile(os.path.abspath(qmlFile)))
+ if view.status() == QQuickView.Error:
+ sys.exit(-1)
+ view.show()
+
+ app.exec_()
+ # Deleting the view before it goes out of scope is required to make sure all child QML instances
+ # are destroyed in the correct order.
+ del view
diff --git a/examples/declarative/view.qml b/examples/declarative/view.qml
new file mode 100644
index 00000000..caf2dc1c
--- /dev/null
+++ b/examples/declarative/view.qml
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the PySide examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+ListView {
+ width: 100
+ height: 100
+ anchors.fill: parent
+ model: myModel
+ delegate: Component {
+ Rectangle {
+ height: 25
+ width: 100
+ Text {
+ function displayText() {
+ var result = ""
+ if (typeof display !== "undefined")
+ result = display + ": "
+ result += modelData
+ return result
+ }
+
+ text: displayText()
+ }
+ }
+ }
+}
diff --git a/examples/macextras/macpasteboardmime.py b/examples/macextras/macpasteboardmime.py
new file mode 100755
index 00000000..0daa21a9
--- /dev/null
+++ b/examples/macextras/macpasteboardmime.py
@@ -0,0 +1,127 @@
+#!/usr/bin/env python
+
+############################################################################
+##
+## Copyright (C) 2017 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+############################################################################
+
+import sys
+import math
+from PySide2 import QtCore, QtGui, QtWidgets
+
+try:
+ from PySide2 import QtMacExtras
+except ImportError:
+ app = QtWidgets.QApplication(sys.argv)
+ messageBox = QtWidgets.QMessageBox(QtWidgets.QMessageBox.Critical, "QtMacExtras macpasteboardmime",
+ "This exampe only runs on macOS and QtMacExtras must be installed to run this example.",
+ QtWidgets.QMessageBox.Close)
+ messageBox.exec_()
+ sys.exit(1)
+
+class VCardMime(QtMacExtras.QMacPasteboardMime):
+ def __init__(self, t = QtMacExtras.QMacPasteboardMime.MIME_ALL):
+ super(VCardMime, self).__init__(t)
+
+ def convertorName(self):
+ return "VCardMime"
+
+ def canConvert(self, mime, flav):
+ if self.mimeFor(flav) == mime:
+ return True
+ else:
+ return False
+
+ def mimeFor(self, flav):
+ if flav == "public.vcard":
+ return "application/x-mycompany-VCard"
+ else:
+ return ""
+
+ def flavorFor(self, mime):
+ if mime == "application/x-mycompany-VCard":
+ return "public.vcard"
+ else:
+ return ""
+
+ def convertToMime(self, mime, data, flav):
+ all = QtCore.QByteArray()
+ for i in data:
+ all += i
+ return all
+
+ def convertFromMime(mime, data, flav):
+ # Todo: implement!
+ return []
+
+class TestWidget(QtWidgets.QWidget):
+ def __init__(self, parent=None):
+ super(TestWidget, self).__init__(parent)
+ self.vcardMime = VCardMime()
+ self.setAcceptDrops(True)
+
+ self.label1 = QtWidgets.QLabel()
+ self.label2 = QtWidgets.QLabel()
+
+ layout = QtWidgets.QVBoxLayout()
+ layout.addWidget(self.label1)
+ layout.addWidget(self.label2)
+ self.setLayout(layout)
+
+ self.label1.setText("Please drag a \"VCard\" from Contacts application, normally a name in the list, and drop here.")
+
+ def dragEnterEvent(self, e):
+ e.accept()
+
+ def dropEvent(self, e):
+ e.accept()
+ self.contentsDropEvent(e)
+
+ def contentsDropEvent(self, e):
+ if e.mimeData().hasFormat("application/x-mycompany-VCard"):
+ s = e.mimeData().data( "application/x-mycompany-VCard" )
+ # s now contains text of vcard
+ self.label2.setText(str(s));
+ e.acceptProposedAction()
+
+if __name__ == '__main__':
+ app = QtWidgets.QApplication(sys.argv)
+ QtMacExtras.qRegisterDraggedTypes(["public.vcard"])
+ wid1 = TestWidget()
+ wid1.show()
+ sys.exit(app.exec_())
diff --git a/examples/multimedia/audiooutput.py b/examples/multimedia/audiooutput.py
new file mode 100755
index 00000000..27068311
--- /dev/null
+++ b/examples/multimedia/audiooutput.py
@@ -0,0 +1,301 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2013 Riverbank Computing Limited.
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+"""PySide2 port of the multimedia/audiooutput example from Qt v5.x, originating from PyQt"""
+
+from math import pi, sin
+from struct import pack
+
+from PySide2.QtCore import QByteArray, QIODevice, Qt, QTimer, qWarning
+from PySide2.QtMultimedia import (QAudio, QAudioDeviceInfo, QAudioFormat,
+ QAudioOutput)
+from PySide2.QtWidgets import (QApplication, QComboBox, QHBoxLayout, QLabel,
+ QMainWindow, QPushButton, QSlider, QVBoxLayout, QWidget)
+
+
+class Generator(QIODevice):
+
+ def __init__(self, format, durationUs, sampleRate, parent):
+ super(Generator, self).__init__(parent)
+
+ self.m_pos = 0
+ self.m_buffer = QByteArray()
+
+ self.generateData(format, durationUs, sampleRate)
+
+ def start(self):
+ self.open(QIODevice.ReadOnly)
+
+ def stop(self):
+ self.m_pos = 0
+ self.close()
+
+ def generateData(self, format, durationUs, sampleRate):
+ pack_format = ''
+
+ if format.sampleSize() == 8:
+ if format.sampleType() == QAudioFormat.UnSignedInt:
+ scaler = lambda x: ((1.0 + x) / 2 * 255)
+ pack_format = 'B'
+ elif format.sampleType() == QAudioFormat.SignedInt:
+ scaler = lambda x: x * 127
+ pack_format = 'b'
+ elif format.sampleSize() == 16:
+ if format.sampleType() == QAudioFormat.UnSignedInt:
+ scaler = lambda x: (1.0 + x) / 2 * 65535
+ pack_format = '<H' if format.byteOrder() == QAudioFormat.LittleEndian else '>H'
+ elif format.sampleType() == QAudioFormat.SignedInt:
+ scaler = lambda x: x * 32767
+ pack_format = '<h' if format.byteOrder() == QAudioFormat.LittleEndian else '>h'
+
+ assert(pack_format != '')
+
+ channelBytes = format.sampleSize() // 8
+ sampleBytes = format.channelCount() * channelBytes
+
+ length = (format.sampleRate() * format.channelCount() * (format.sampleSize() // 8)) * durationUs // 100000
+
+ self.m_buffer.clear()
+ sampleIndex = 0
+ factor = 2 * pi * sampleRate / format.sampleRate()
+
+ while length != 0:
+ x = sin((sampleIndex % format.sampleRate()) * factor)
+ packed = pack(pack_format, int(scaler(x)))
+
+ for _ in range(format.channelCount()):
+ self.m_buffer.append(packed)
+ length -= channelBytes
+
+ sampleIndex += 1
+
+ def readData(self, maxlen):
+ data = QByteArray()
+ total = 0
+
+ while maxlen > total:
+ chunk = min(self.m_buffer.size() - self.m_pos, maxlen - total)
+ data.append(self.m_buffer.mid(self.m_pos, chunk))
+ self.m_pos = (self.m_pos + chunk) % self.m_buffer.size()
+ total += chunk
+
+ return data.data()
+
+ def writeData(self, data):
+ return 0
+
+ def bytesAvailable(self):
+ return self.m_buffer.size() + super(Generator, self).bytesAvailable()
+
+
+class AudioTest(QMainWindow):
+
+ PUSH_MODE_LABEL = "Enable push mode"
+ PULL_MODE_LABEL = "Enable pull mode"
+ SUSPEND_LABEL = "Suspend playback"
+ RESUME_LABEL = "Resume playback"
+
+ DurationSeconds = 1
+ ToneSampleRateHz = 600
+ DataSampleRateHz = 44100
+
+ def __init__(self):
+ super(AudioTest, self).__init__()
+
+ self.m_device = QAudioDeviceInfo.defaultOutputDevice()
+ self.m_output = None
+
+ self.initializeWindow()
+ self.initializeAudio()
+
+ def initializeWindow(self):
+ layout = QVBoxLayout()
+
+ self.m_deviceBox = QComboBox()
+ self.m_deviceBox.activated[int].connect(self.deviceChanged)
+ for deviceInfo in QAudioDeviceInfo.availableDevices(QAudio.AudioOutput):
+ self.m_deviceBox.addItem(deviceInfo.deviceName(), deviceInfo)
+
+ layout.addWidget(self.m_deviceBox)
+
+ self.m_modeButton = QPushButton()
+ self.m_modeButton.clicked.connect(self.toggleMode)
+ self.m_modeButton.setText(self.PUSH_MODE_LABEL)
+
+ layout.addWidget(self.m_modeButton)
+
+ self.m_suspendResumeButton = QPushButton(
+ clicked=self.toggleSuspendResume)
+ self.m_suspendResumeButton.setText(self.SUSPEND_LABEL)
+
+ layout.addWidget(self.m_suspendResumeButton)
+
+ volumeBox = QHBoxLayout()
+ volumeLabel = QLabel("Volume:")
+ self.m_volumeSlider = QSlider(Qt.Horizontal, minimum=0, maximum=100,
+ singleStep=10)
+ self.m_volumeSlider.valueChanged.connect(self.volumeChanged)
+
+ volumeBox.addWidget(volumeLabel)
+ volumeBox.addWidget(self.m_volumeSlider)
+
+ layout.addLayout(volumeBox)
+
+ window = QWidget()
+ window.setLayout(layout)
+
+ self.setCentralWidget(window)
+
+ def initializeAudio(self):
+ self.m_pullTimer = QTimer(self)
+ self.m_pullTimer.timeout.connect(self.pullTimerExpired)
+ self.m_pullMode = True
+
+ self.m_format = QAudioFormat()
+ self.m_format.setSampleRate(self.DataSampleRateHz)
+ self.m_format.setChannelCount(1)
+ self.m_format.setSampleSize(16)
+ self.m_format.setCodec('audio/pcm')
+ self.m_format.setByteOrder(QAudioFormat.LittleEndian)
+ self.m_format.setSampleType(QAudioFormat.SignedInt)
+
+ info = QAudioDeviceInfo(QAudioDeviceInfo.defaultOutputDevice())
+ if not info.isFormatSupported(self.m_format):
+ qWarning("Default format not supported - trying to use nearest")
+ self.m_format = info.nearestFormat(self.m_format)
+
+ self.m_generator = Generator(self.m_format,
+ self.DurationSeconds * 1000000, self.ToneSampleRateHz, self)
+
+ self.createAudioOutput()
+
+ def createAudioOutput(self):
+ self.m_audioOutput = QAudioOutput(self.m_device, self.m_format)
+ self.m_audioOutput.notify.connect(self.notified)
+ self.m_audioOutput.stateChanged.connect(self.handleStateChanged)
+
+ self.m_generator.start()
+ self.m_audioOutput.start(self.m_generator)
+ self.m_volumeSlider.setValue(self.m_audioOutput.volume() * 100)
+
+ def deviceChanged(self, index):
+ self.m_pullTimer.stop()
+ self.m_generator.stop()
+ self.m_audioOutput.stop()
+ self.m_device = self.m_deviceBox.itemData(index)
+
+ self.createAudioOutput()
+
+ def volumeChanged(self, value):
+ if self.m_audioOutput is not None:
+ self.m_audioOutput.setVolume(value / 100.0)
+
+ def notified(self):
+ qWarning("bytesFree = %d, elapsedUSecs = %d, processedUSecs = %d" % (
+ self.m_audioOutput.bytesFree(),
+ self.m_audioOutput.elapsedUSecs(),
+ self.m_audioOutput.processedUSecs()))
+
+ def pullTimerExpired(self):
+ if self.m_audioOutput is not None and self.m_audioOutput.state() != QAudio.StoppedState:
+ chunks = self.m_audioOutput.bytesFree() // self.m_audioOutput.periodSize()
+ for _ in range(chunks):
+ data = self.m_generator.read(self.m_audioOutput.periodSize())
+ if data is None or len(data) != self.m_audioOutput.periodSize():
+ break
+
+ self.m_output.write(data)
+
+ def toggleMode(self):
+ self.m_pullTimer.stop()
+ self.m_audioOutput.stop()
+
+ if self.m_pullMode:
+ self.m_modeButton.setText(self.PULL_MODE_LABEL)
+ self.m_output = self.m_audioOutput.start()
+ self.m_pullMode = False
+ self.m_pullTimer.start(20)
+ else:
+ self.m_modeButton.setText(self.PUSH_MODE_LABEL)
+ self.m_pullMode = True
+ self.m_audioOutput.start(self.m_generator)
+
+ self.m_suspendResumeButton.setText(self.SUSPEND_LABEL)
+
+ def toggleSuspendResume(self):
+ if self.m_audioOutput.state() == QAudio.SuspendedState:
+ qWarning("status: Suspended, resume()")
+ self.m_audioOutput.resume()
+ self.m_suspendResumeButton.setText(self.SUSPEND_LABEL)
+ elif self.m_audioOutput.state() == QAudio.ActiveState:
+ qWarning("status: Active, suspend()")
+ self.m_audioOutput.suspend()
+ self.m_suspendResumeButton.setText(self.RESUME_LABEL)
+ elif self.m_audioOutput.state() == QAudio.StoppedState:
+ qWarning("status: Stopped, resume()")
+ self.m_audioOutput.resume()
+ self.m_suspendResumeButton.setText(self.SUSPEND_LABEL)
+ elif self.m_audioOutput.state() == QAudio.IdleState:
+ qWarning("status: IdleState")
+
+ stateMap = {
+ QAudio.ActiveState: "ActiveState",
+ QAudio.SuspendedState: "SuspendedState",
+ QAudio.StoppedState: "StoppedState",
+ QAudio.IdleState: "IdleState"}
+
+ def handleStateChanged(self, state):
+ qWarning("state = " + self.stateMap.get(state, "Unknown"))
+
+
+if __name__ == '__main__':
+
+ import sys
+
+ app = QApplication(sys.argv)
+ app.setApplicationName("Audio Output Test")
+
+ audio = AudioTest()
+ audio.show()
+
+ sys.exit(app.exec_())
diff --git a/examples/multimedia/camera.py b/examples/multimedia/camera.py
new file mode 100644
index 00000000..1b8d5ad4
--- /dev/null
+++ b/examples/multimedia/camera.py
@@ -0,0 +1,170 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2017 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+"""PySide2 Multimedia Camera Example"""
+
+import os, sys
+from PySide2.QtCore import QDate, QDir, QStandardPaths, Qt, QUrl
+from PySide2.QtGui import QClipboard, QGuiApplication, QDesktopServices, QIcon
+from PySide2.QtGui import QImage, QPixmap
+from PySide2.QtWidgets import (QAction, qApp, QApplication, QHBoxLayout, QLabel,
+ QMainWindow, QPushButton, QTabWidget, QToolBar, QVBoxLayout, QWidget)
+from PySide2.QtMultimedia import QCamera, QCameraImageCapture, QCameraInfo
+from PySide2.QtMultimediaWidgets import QCameraViewfinder
+
+class ImageView(QWidget):
+ def __init__(self, previewImage, fileName):
+ super(ImageView, self).__init__()
+
+ self.fileName = fileName
+
+ mainLayout = QVBoxLayout(self)
+ self.imageLabel = QLabel()
+ self.imageLabel.setPixmap(QPixmap.fromImage(previewImage))
+ mainLayout.addWidget(self.imageLabel)
+
+ topLayout = QHBoxLayout()
+ self.fileNameLabel = QLabel(QDir.toNativeSeparators(fileName))
+ self.fileNameLabel.setTextInteractionFlags(Qt.TextBrowserInteraction)
+
+ topLayout.addWidget(self.fileNameLabel)
+ topLayout.addStretch()
+ copyButton = QPushButton("Copy")
+ copyButton.setToolTip("Copy file name to clipboard")
+ topLayout.addWidget(copyButton)
+ copyButton.clicked.connect(self.copy)
+ launchButton = QPushButton("Launch")
+ launchButton.setToolTip("Launch image viewer")
+ topLayout.addWidget(launchButton)
+ launchButton.clicked.connect(self.launch)
+ mainLayout.addLayout(topLayout)
+
+ def copy(self):
+ QGuiApplication.clipboard().setText(self.fileNameLabel.text())
+
+ def launch(self):
+ QDesktopServices.openUrl(QUrl.fromLocalFile(self.fileName))
+
+class MainWindow(QMainWindow):
+ def __init__(self):
+ super(MainWindow, self).__init__()
+
+ self.cameraInfo = QCameraInfo.defaultCamera()
+ self.camera = QCamera(self.cameraInfo)
+ self.camera.setCaptureMode(QCamera.CaptureStillImage)
+ self.imageCapture = QCameraImageCapture(self.camera)
+ self.imageCapture.imageCaptured.connect(self.imageCaptured)
+ self.imageCapture.imageSaved.connect(self.imageSaved)
+ self.currentPreview = QImage()
+
+ toolBar = QToolBar()
+ self.addToolBar(toolBar)
+
+ fileMenu = self.menuBar().addMenu("&File")
+ shutterIcon = QIcon(os.path.join(os.path.dirname(__file__),
+ "shutter.svg"))
+ self.takePictureAction = QAction(shutterIcon, "&Take Picture", self,
+ shortcut="Ctrl+T",
+ triggered=self.takePicture)
+ self.takePictureAction.setToolTip("Take Picture")
+ fileMenu.addAction(self.takePictureAction)
+ toolBar.addAction(self.takePictureAction)
+
+ exitAction = QAction(QIcon.fromTheme("application-exit"), "E&xit",
+ self, shortcut="Ctrl+Q", triggered=self.close)
+ fileMenu.addAction(exitAction)
+
+ aboutMenu = self.menuBar().addMenu("&About")
+ aboutQtAction = QAction("About &Qt", self, triggered=qApp.aboutQt)
+ aboutMenu.addAction(aboutQtAction)
+
+ self.tabWidget = QTabWidget()
+ self.setCentralWidget(self.tabWidget)
+
+ self.cameraViewfinder = QCameraViewfinder()
+ self.camera.setViewfinder(self.cameraViewfinder)
+ self.tabWidget.addTab(self.cameraViewfinder, "Viewfinder")
+
+ if self.camera.status() != QCamera.UnavailableStatus:
+ name = self.cameraInfo.description()
+ self.setWindowTitle("PySide2 Camera Example (" + name + ")")
+ self.statusBar().showMessage("Starting: '" + name + "'", 5000)
+ self.camera.start()
+ else:
+ self.setWindowTitle("PySide2 Camera Example")
+ self.takePictureAction.setEnabled(False)
+ self.statusBar().showMessage("Camera unavailable", 5000)
+
+ def nextImageFileName(self):
+ picturesLocation = QStandardPaths.writableLocation(QStandardPaths.PicturesLocation)
+ dateString = QDate.currentDate().toString("yyyyMMdd")
+ pattern = picturesLocation + "/pyside2_camera_" + dateString + "_{:03d}.jpg"
+ n = 1
+ while True:
+ result = pattern.format(n)
+ if not os.path.exists(result):
+ return result
+ n = n + 1
+ return None
+
+ def takePicture(self):
+ self.currentPreview = QImage()
+ self.camera.searchAndLock()
+ self.imageCapture.capture(self.nextImageFileName())
+ self.camera.unlock()
+
+ def imageCaptured(self, id, previewImage):
+ self.currentPreview = previewImage
+
+ def imageSaved(self, id, fileName):
+ index = self.tabWidget.count()
+ imageView = ImageView(self.currentPreview, fileName)
+ self.tabWidget.addTab(imageView, "Capture #{}".format(index))
+ self.tabWidget.setCurrentIndex(index)
+
+if __name__ == '__main__':
+ app = QApplication(sys.argv)
+ mainWin = MainWindow()
+ availableGeometry = app.desktop().availableGeometry(mainWin)
+ mainWin.resize(availableGeometry.width() / 3, availableGeometry.height() / 2)
+ mainWin.show()
+ sys.exit(app.exec_())
diff --git a/examples/multimedia/player.py b/examples/multimedia/player.py
new file mode 100644
index 00000000..76445cd3
--- /dev/null
+++ b/examples/multimedia/player.py
@@ -0,0 +1,158 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2017 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+"""PySide2 Multimedia player example"""
+
+import sys
+from PySide2.QtCore import SLOT, QStandardPaths, Qt
+from PySide2.QtGui import QIcon, QKeySequence
+from PySide2.QtWidgets import (QAction, qApp, QApplication, QDialog, QFileDialog,
+ QMainWindow, QMenu, QMenuBar, QSlider, QStyle, QToolBar)
+from PySide2.QtMultimedia import QMediaPlayer, QMediaPlaylist
+from PySide2.QtMultimediaWidgets import QVideoWidget
+
+class MainWindow(QMainWindow):
+
+ def __init__(self):
+ super(MainWindow, self).__init__()
+
+ self.playlist = QMediaPlaylist()
+ self.player = QMediaPlayer()
+
+ toolBar = QToolBar()
+ self.addToolBar(toolBar)
+
+ fileMenu = self.menuBar().addMenu("&File")
+ openAction = QAction(QIcon.fromTheme("document-open"),
+ "&Open...", self, shortcut=QKeySequence.Open,
+ triggered=self.open)
+ fileMenu.addAction(openAction)
+ exitAction = QAction(QIcon.fromTheme("application-exit"), "E&xit",
+ self, shortcut="Ctrl+Q", triggered=self.close)
+ fileMenu.addAction(exitAction)
+
+ playMenu = self.menuBar().addMenu("&Play")
+ playIcon = self.style().standardIcon(QStyle.SP_MediaPlay)
+ self.playAction = toolBar.addAction(playIcon, "Play")
+ self.playAction.triggered.connect(self.player.play)
+ playMenu.addAction(self.playAction)
+
+ previousIcon = self.style().standardIcon(QStyle.SP_MediaSkipBackward)
+ self.previousAction = toolBar.addAction(previousIcon, "Previous")
+ self.previousAction.triggered.connect(self.previousClicked)
+ playMenu.addAction(self.previousAction)
+
+ pauseIcon = self.style().standardIcon(QStyle.SP_MediaPause)
+ self.pauseAction = toolBar.addAction(pauseIcon, "Pause")
+ self.pauseAction.triggered.connect(self.player.pause)
+ playMenu.addAction(self.pauseAction)
+
+ nextIcon = self.style().standardIcon(QStyle.SP_MediaSkipForward)
+ self.nextAction = toolBar.addAction(nextIcon, "Next")
+ self.nextAction.triggered.connect(self.playlist.next)
+ playMenu.addAction(self.nextAction)
+
+ stopIcon = self.style().standardIcon(QStyle.SP_MediaStop)
+ self.stopAction = toolBar.addAction(stopIcon, "Stop")
+ self.stopAction.triggered.connect(self.player.stop)
+ playMenu.addAction(self.stopAction)
+
+ self.volumeSlider = QSlider()
+ self.volumeSlider.setOrientation(Qt.Horizontal)
+ self.volumeSlider.setMinimum(0)
+ self.volumeSlider.setMaximum(100)
+ self.volumeSlider.setFixedWidth(app.desktop().availableGeometry(self).width() / 10)
+ self.volumeSlider.setValue(self.player.volume())
+ self.volumeSlider.setTickInterval(10)
+ self.volumeSlider.setTickPosition(QSlider.TicksBelow)
+ self.volumeSlider.setToolTip("Volume")
+ self.volumeSlider.valueChanged.connect(self.player.setVolume)
+ toolBar.addWidget(self.volumeSlider)
+
+ aboutMenu = self.menuBar().addMenu("&About")
+ aboutQtAct = QAction("About &Qt", self, triggered=qApp.aboutQt)
+ aboutMenu.addAction(aboutQtAct)
+
+ self.videoWidget = QVideoWidget()
+ self.setCentralWidget(self.videoWidget)
+ self.player.setPlaylist(self.playlist);
+ self.player.stateChanged.connect(self.updateButtons)
+ self.player.setVideoOutput(self.videoWidget);
+
+ self.updateButtons(self.player.state())
+
+ def open(self):
+ fileDialog = QFileDialog(self)
+ supportedMimeTypes = QMediaPlayer.supportedMimeTypes()
+ if not supportedMimeTypes:
+ supportedMimeTypes.append("video/x-msvideo") # AVI
+ fileDialog.setMimeTypeFilters(supportedMimeTypes)
+ moviesLocation = QStandardPaths.writableLocation(QStandardPaths.MoviesLocation)
+ fileDialog.setDirectory(moviesLocation)
+ if fileDialog.exec_() == QDialog.Accepted:
+ self.playlist.addMedia(fileDialog.selectedUrls()[0])
+ self.player.play()
+
+ def previousClicked(self):
+ # Go to previous track if we are within the first 5 seconds of playback
+ # Otherwise, seek to the beginning.
+ if self.player.position() <= 5000:
+ self.playlist.previous();
+ else:
+ player.setPosition(0);
+
+ def updateButtons(self, state):
+ mediaCount = self.playlist.mediaCount()
+ self.playAction.setEnabled(mediaCount > 0
+ and state != QMediaPlayer.PlayingState)
+ self.pauseAction.setEnabled(state == QMediaPlayer.PlayingState)
+ self.stopAction.setEnabled(state != QMediaPlayer.StoppedState)
+ self.previousAction.setEnabled(self.player.position() > 0)
+ self.nextAction.setEnabled(mediaCount > 1)
+
+if __name__ == '__main__':
+ app = QApplication(sys.argv)
+ mainWin = MainWindow()
+ availableGeometry = app.desktop().availableGeometry(mainWin)
+ mainWin.resize(availableGeometry.width() / 3, availableGeometry.height() / 2)
+ mainWin.show()
+ sys.exit(app.exec_())
diff --git a/examples/network/blockingfortuneclient.py b/examples/network/blockingfortuneclient.py
new file mode 100644
index 00000000..8e73af0f
--- /dev/null
+++ b/examples/network/blockingfortuneclient.py
@@ -0,0 +1,225 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2013 Riverbank Computing Limited.
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+"""PySide2 port of the network/blockingfortunclient example from Qt v5.x, originating from PyQt"""
+
+from PySide2.QtCore import (Signal, QDataStream, QMutex, QMutexLocker,
+ QThread, QWaitCondition)
+from PySide2.QtGui import QIntValidator
+from PySide2.QtWidgets import (QApplication, QDialogButtonBox, QGridLayout,
+ QLabel, QLineEdit, QMessageBox, QPushButton, QWidget)
+from PySide2.QtNetwork import (QAbstractSocket, QHostAddress, QNetworkInterface,
+ QTcpSocket)
+
+
+class FortuneThread(QThread):
+ newFortune = Signal(str)
+
+ error = Signal(int, str)
+
+ def __init__(self, parent=None):
+ super(FortuneThread, self).__init__(parent)
+
+ self.quit = False
+ self.hostName = ''
+ self.cond = QWaitCondition()
+ self.mutex = QMutex()
+ self.port = 0
+
+ def __del__(self):
+ self.mutex.lock()
+ self.quit = True
+ self.cond.wakeOne()
+ self.mutex.unlock()
+ self.wait()
+
+ def requestNewFortune(self, hostname, port):
+ locker = QMutexLocker(self.mutex)
+ self.hostName = hostname
+ self.port = port
+ if not self.isRunning():
+ self.start()
+ else:
+ self.cond.wakeOne()
+
+ def run(self):
+ self.mutex.lock()
+ serverName = self.hostName
+ serverPort = self.port
+ self.mutex.unlock()
+
+ while not self.quit:
+ Timeout = 5 * 1000
+
+ socket = QTcpSocket()
+ socket.connectToHost(serverName, serverPort)
+
+ if not socket.waitForConnected(Timeout):
+ self.error.emit(socket.error(), socket.errorString())
+ return
+
+ while socket.bytesAvailable() < 2:
+ if not socket.waitForReadyRead(Timeout):
+ self.error.emit(socket.error(), socket.errorString())
+ return
+
+ instr = QDataStream(socket)
+ instr.setVersion(QDataStream.Qt_4_0)
+ blockSize = instr.readUInt16()
+
+ while socket.bytesAvailable() < blockSize:
+ if not socket.waitForReadyRead(Timeout):
+ self.error.emit(socket.error(), socket.errorString())
+ return
+
+ self.mutex.lock()
+ fortune = instr.readQString()
+ self.newFortune.emit(fortune)
+
+ self.cond.wait(self.mutex)
+ serverName = self.hostName
+ serverPort = self.port
+ self.mutex.unlock()
+
+
+class BlockingClient(QWidget):
+ def __init__(self, parent=None):
+ super(BlockingClient, self).__init__(parent)
+
+ self.thread = FortuneThread()
+ self.currentFortune = ''
+
+ hostLabel = QLabel("&Server name:")
+ portLabel = QLabel("S&erver port:")
+
+ for ipAddress in QNetworkInterface.allAddresses():
+ if ipAddress != QHostAddress.LocalHost and ipAddress.toIPv4Address() != 0:
+ break
+ else:
+ ipAddress = QHostAddress(QHostAddress.LocalHost)
+
+ ipAddress = ipAddress.toString()
+
+ self.hostLineEdit = QLineEdit(ipAddress)
+ self.portLineEdit = QLineEdit()
+ self.portLineEdit.setValidator(QIntValidator(1, 65535, self))
+
+ hostLabel.setBuddy(self.hostLineEdit)
+ portLabel.setBuddy(self.portLineEdit)
+
+ self.statusLabel = QLabel(
+ "This example requires that you run the Fortune Server example as well.")
+ self.statusLabel.setWordWrap(True)
+
+ self.getFortuneButton = QPushButton("Get Fortune")
+ self.getFortuneButton.setDefault(True)
+ self.getFortuneButton.setEnabled(False)
+
+ quitButton = QPushButton("Quit")
+
+ buttonBox = QDialogButtonBox()
+ buttonBox.addButton(self.getFortuneButton, QDialogButtonBox.ActionRole)
+ buttonBox.addButton(quitButton, QDialogButtonBox.RejectRole)
+
+ self.getFortuneButton.clicked.connect(self.requestNewFortune)
+ quitButton.clicked.connect(self.close)
+ self.hostLineEdit.textChanged.connect(self.enableGetFortuneButton)
+ self.portLineEdit.textChanged.connect(self.enableGetFortuneButton)
+ self.thread.newFortune.connect(self.showFortune)
+ self.thread.error.connect(self.displayError)
+
+ mainLayout = QGridLayout()
+ mainLayout.addWidget(hostLabel, 0, 0)
+ mainLayout.addWidget(self.hostLineEdit, 0, 1)
+ mainLayout.addWidget(portLabel, 1, 0)
+ mainLayout.addWidget(self.portLineEdit, 1, 1)
+ mainLayout.addWidget(self.statusLabel, 2, 0, 1, 2)
+ mainLayout.addWidget(buttonBox, 3, 0, 1, 2)
+ self.setLayout(mainLayout)
+
+ self.setWindowTitle("Blocking Fortune Client")
+ self.portLineEdit.setFocus()
+
+ def requestNewFortune(self):
+ self.getFortuneButton.setEnabled(False)
+ self.thread.requestNewFortune(self.hostLineEdit.text(),
+ int(self.portLineEdit.text()))
+
+ def showFortune(self, nextFortune):
+ if nextFortune == self.currentFortune:
+ self.requestNewFortune()
+ return
+
+ self.currentFortune = nextFortune
+ self.statusLabel.setText(self.currentFortune)
+ self.getFortuneButton.setEnabled(True)
+
+ def displayError(self, socketError, message):
+ if socketError == QAbstractSocket.HostNotFoundError:
+ QMessageBox.information(self, "Blocking Fortune Client",
+ "The host was not found. Please check the host and port "
+ "settings.")
+ elif socketError == QAbstractSocket.ConnectionRefusedError:
+ QMessageBox.information(self, "Blocking Fortune Client",
+ "The connection was refused by the peer. Make sure the "
+ "fortune server is running, and check that the host name "
+ "and port settings are correct.")
+ else:
+ QMessageBox.information(self, "Blocking Fortune Client",
+ "The following error occurred: %s." % message)
+
+ self.getFortuneButton.setEnabled(True)
+
+ def enableGetFortuneButton(self):
+ self.getFortuneButton.setEnabled(self.hostLineEdit.text() != '' and
+ self.portLineEdit.text() != '')
+
+
+if __name__ == '__main__':
+
+ import sys
+
+ app = QApplication(sys.argv)
+ client = BlockingClient()
+ client.show()
+ sys.exit(app.exec_())
diff --git a/examples/network/fortuneclient.py b/examples/network/fortuneclient.py
new file mode 100755
index 00000000..3ec5623b
--- /dev/null
+++ b/examples/network/fortuneclient.py
@@ -0,0 +1,168 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2013 Riverbank Computing Limited.
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+"""PySide2 port of the network/fortuneclient example from Qt v5.x"""
+
+from PySide2 import QtCore, QtGui, QtWidgets, QtNetwork
+
+
+class Client(QtWidgets.QDialog):
+ def __init__(self, parent=None):
+ super(Client, self).__init__(parent)
+
+ self.blockSize = 0
+ self.currentFortune = ''
+
+ hostLabel = QtWidgets.QLabel("&Server name:")
+ portLabel = QtWidgets.QLabel("S&erver port:")
+
+ self.hostLineEdit = QtWidgets.QLineEdit('Localhost')
+ self.portLineEdit = QtWidgets.QLineEdit()
+ self.portLineEdit.setValidator(QtGui.QIntValidator(1, 65535, self))
+
+ hostLabel.setBuddy(self.hostLineEdit)
+ portLabel.setBuddy(self.portLineEdit)
+
+ self.statusLabel = QtWidgets.QLabel("This examples requires that you run "
+ "the Fortune Server example as well.")
+
+ self.getFortuneButton = QtWidgets.QPushButton("Get Fortune")
+ self.getFortuneButton.setDefault(True)
+ self.getFortuneButton.setEnabled(False)
+
+ quitButton = QtWidgets.QPushButton("Quit")
+
+ buttonBox = QtWidgets.QDialogButtonBox()
+ buttonBox.addButton(self.getFortuneButton,
+ QtWidgets.QDialogButtonBox.ActionRole)
+ buttonBox.addButton(quitButton, QtWidgets.QDialogButtonBox.RejectRole)
+
+ self.tcpSocket = QtNetwork.QTcpSocket(self)
+
+ self.hostLineEdit.textChanged.connect(self.enableGetFortuneButton)
+ self.portLineEdit.textChanged.connect(self.enableGetFortuneButton)
+ self.getFortuneButton.clicked.connect(self.requestNewFortune)
+ quitButton.clicked.connect(self.close)
+ self.tcpSocket.readyRead.connect(self.readFortune)
+ self.tcpSocket.error.connect(self.displayError)
+
+ mainLayout = QtWidgets.QGridLayout()
+ mainLayout.addWidget(hostLabel, 0, 0)
+ mainLayout.addWidget(self.hostLineEdit, 0, 1)
+ mainLayout.addWidget(portLabel, 1, 0)
+ mainLayout.addWidget(self.portLineEdit, 1, 1)
+ mainLayout.addWidget(self.statusLabel, 2, 0, 1, 2)
+ mainLayout.addWidget(buttonBox, 3, 0, 1, 2)
+ self.setLayout(mainLayout)
+
+ self.setWindowTitle("Fortune Client")
+ self.portLineEdit.setFocus()
+
+ def requestNewFortune(self):
+ self.getFortuneButton.setEnabled(False)
+ self.blockSize = 0
+ self.tcpSocket.abort()
+ self.tcpSocket.connectToHost(self.hostLineEdit.text(),
+ int(self.portLineEdit.text()))
+
+ def readFortune(self):
+ instr = QtCore.QDataStream(self.tcpSocket)
+ instr.setVersion(QtCore.QDataStream.Qt_4_0)
+
+ if self.blockSize == 0:
+ if self.tcpSocket.bytesAvailable() < 2:
+ return
+
+ self.blockSize = instr.readUInt16()
+
+ if self.tcpSocket.bytesAvailable() < self.blockSize:
+ return
+
+ nextFortune = instr.readString()
+
+ try:
+ # Python v3.
+ nextFortune = str(nextFortune, encoding='ascii')
+ except TypeError:
+ # Python v2.
+ pass
+
+ if nextFortune == self.currentFortune:
+ QtCore.QTimer.singleShot(0, self.requestNewFortune)
+ return
+
+ self.currentFortune = nextFortune
+ self.statusLabel.setText(self.currentFortune)
+ self.getFortuneButton.setEnabled(True)
+
+ def displayError(self, socketError):
+ if socketError == QtNetwork.QAbstractSocket.RemoteHostClosedError:
+ pass
+ elif socketError == QtNetwork.QAbstractSocket.HostNotFoundError:
+ QtWidgets.QMessageBox.information(self, "Fortune Client",
+ "The host was not found. Please check the host name and "
+ "port settings.")
+ elif socketError == QtNetwork.QAbstractSocket.ConnectionRefusedError:
+ QtWidgets.QMessageBox.information(self, "Fortune Client",
+ "The connection was refused by the peer. Make sure the "
+ "fortune server is running, and check that the host name "
+ "and port settings are correct.")
+ else:
+ QtWidgets.QMessageBox.information(self, "Fortune Client",
+ "The following error occurred: %s." % self.tcpSocket.errorString())
+
+ self.getFortuneButton.setEnabled(True)
+
+ def enableGetFortuneButton(self):
+ self.getFortuneButton.setEnabled(bool(self.hostLineEdit.text() and
+ self.portLineEdit.text()))
+
+
+if __name__ == '__main__':
+
+ import sys
+
+ app = QtWidgets.QApplication(sys.argv)
+ client = Client()
+ client.show()
+ sys.exit(client.exec_())
diff --git a/examples/network/fortuneserver.py b/examples/network/fortuneserver.py
new file mode 100755
index 00000000..1c08f6e8
--- /dev/null
+++ b/examples/network/fortuneserver.py
@@ -0,0 +1,125 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2013 Riverbank Computing Limited.
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+"""PySide2 port of the network/fortuneserver example from Qt v5.x"""
+
+import random
+
+from PySide2 import QtCore, QtGui, QtWidgets, QtNetwork
+
+
+class Server(QtWidgets.QDialog):
+ def __init__(self, parent=None):
+ super(Server, self).__init__(parent)
+
+ statusLabel = QtWidgets.QLabel()
+ quitButton = QtWidgets.QPushButton("Quit")
+ quitButton.setAutoDefault(False)
+
+ self.tcpServer = QtNetwork.QTcpServer(self)
+ if not self.tcpServer.listen():
+ QtWidgets.QMessageBox.critical(self, "Fortune Server",
+ "Unable to start the server: %s." % self.tcpServer.errorString())
+ self.close()
+ return
+
+ statusLabel.setText("The server is running on port %d.\nRun the "
+ "Fortune Client example now." % self.tcpServer.serverPort())
+
+ self.fortunes = (
+ "You've been leading a dog's life. Stay off the furniture.",
+ "You've got to think about tomorrow.",
+ "You will be surprised by a loud noise.",
+ "You will feel hungry again in another hour.",
+ "You might have mail.",
+ "You cannot kill time without injuring eternity.",
+ "Computers are not intelligent. They only think they are.")
+
+ quitButton.clicked.connect(self.close)
+ self.tcpServer.newConnection.connect(self.sendFortune)
+
+ buttonLayout = QtWidgets.QHBoxLayout()
+ buttonLayout.addStretch(1)
+ buttonLayout.addWidget(quitButton)
+ buttonLayout.addStretch(1)
+
+ mainLayout = QtWidgets.QVBoxLayout()
+ mainLayout.addWidget(statusLabel)
+ mainLayout.addLayout(buttonLayout)
+ self.setLayout(mainLayout)
+
+ self.setWindowTitle("Fortune Server")
+
+ def sendFortune(self):
+ block = QtCore.QByteArray()
+ out = QtCore.QDataStream(block, QtCore.QIODevice.WriteOnly)
+ out.setVersion(QtCore.QDataStream.Qt_4_0)
+ out.writeUInt16(0)
+ fortune = self.fortunes[random.randint(0, len(self.fortunes) - 1)]
+
+ try:
+ # Python v3.
+ fortune = bytes(fortune, encoding='ascii')
+ except:
+ # Python v2.
+ pass
+
+ out.writeString(fortune)
+ out.device().seek(0)
+ out.writeUInt16(block.size() - 2)
+
+ clientConnection = self.tcpServer.nextPendingConnection()
+ clientConnection.disconnected.connect(clientConnection.deleteLater)
+
+ clientConnection.write(block)
+ clientConnection.disconnectFromHost()
+
+
+if __name__ == '__main__':
+
+ import sys
+
+ app = QtWidgets.QApplication(sys.argv)
+ server = Server()
+ random.seed(None)
+ sys.exit(server.exec_())
diff --git a/examples/network/threadedfortuneserver.py b/examples/network/threadedfortuneserver.py
new file mode 100755
index 00000000..95452e7e
--- /dev/null
+++ b/examples/network/threadedfortuneserver.py
@@ -0,0 +1,153 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2013 Riverbank Computing Limited.
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+"""PySide2 port of the network/threadedfortuneserver example from Qt v5.x, originating from PyQt"""
+
+import random
+
+from PySide2.QtCore import (Signal, QByteArray, QDataStream, QIODevice,
+ QThread, Qt)
+from PySide2.QtWidgets import (QApplication, QDialog, QHBoxLayout, QLabel,
+ QMessageBox, QPushButton, QVBoxLayout)
+from PySide2.QtNetwork import (QHostAddress, QNetworkInterface, QTcpServer,
+ QTcpSocket)
+
+
+class FortuneThread(QThread):
+ error = Signal(QTcpSocket.SocketError)
+
+ def __init__(self, socketDescriptor, fortune, parent):
+ super(FortuneThread, self).__init__(parent)
+
+ self.socketDescriptor = socketDescriptor
+ self.text = fortune
+
+ def run(self):
+ tcpSocket = QTcpSocket()
+ if not tcpSocket.setSocketDescriptor(self.socketDescriptor):
+ self.error.emit(tcpSocket.error())
+ return
+
+ block = QByteArray()
+ outstr = QDataStream(block, QIODevice.WriteOnly)
+ outstr.setVersion(QDataStream.Qt_4_0)
+ outstr.writeUInt16(0)
+ outstr.writeQString(self.text)
+ outstr.device().seek(0)
+ outstr.writeUInt16(block.size() - 2)
+
+ tcpSocket.write(block)
+ tcpSocket.disconnectFromHost()
+ tcpSocket.waitForDisconnected()
+
+
+class FortuneServer(QTcpServer):
+ fortunes = (
+ "You've been leading a dog's life. Stay off the furniture.",
+ "You've got to think about tomorrow.",
+ "You will be surprised by a loud noise.",
+ "You will feel hungry again in another hour.",
+ "You might have mail.",
+ "You cannot kill time without injuring eternity.",
+ "Computers are not intelligent. They only think they are.")
+
+ def incomingConnection(self, socketDescriptor):
+ fortune = self.fortunes[random.randint(0, len(self.fortunes) - 1)]
+
+ thread = FortuneThread(socketDescriptor, fortune, self)
+ thread.finished.connect(thread.deleteLater)
+ thread.start()
+
+
+class Dialog(QDialog):
+ def __init__(self, parent=None):
+ super(Dialog, self).__init__(parent)
+
+ self.server = FortuneServer()
+
+ statusLabel = QLabel()
+ statusLabel.setTextInteractionFlags(Qt.TextBrowserInteraction)
+ statusLabel.setWordWrap(True)
+ quitButton = QPushButton("Quit")
+ quitButton.setAutoDefault(False)
+
+ if not self.server.listen():
+ QMessageBox.critical(self, "Threaded Fortune Server",
+ "Unable to start the server: %s." % self.server.errorString())
+ self.close()
+ return
+
+ for ipAddress in QNetworkInterface.allAddresses():
+ if ipAddress != QHostAddress.LocalHost and ipAddress.toIPv4Address() != 0:
+ break
+ else:
+ ipAddress = QHostAddress(QHostAddress.LocalHost)
+
+ ipAddress = ipAddress.toString()
+
+ statusLabel.setText("The server is running on\n\nIP: %s\nport: %d\n\n"
+ "Run the Fortune Client example now." % (ipAddress, self.server.serverPort()))
+
+ quitButton.clicked.connect(self.close)
+
+ buttonLayout = QHBoxLayout()
+ buttonLayout.addStretch(1)
+ buttonLayout.addWidget(quitButton)
+ buttonLayout.addStretch(1)
+
+ mainLayout = QVBoxLayout()
+ mainLayout.addWidget(statusLabel)
+ mainLayout.addLayout(buttonLayout)
+ self.setLayout(mainLayout)
+
+ self.setWindowTitle("Threaded Fortune Server")
+
+
+if __name__ == '__main__':
+
+ import sys
+
+ app = QApplication(sys.argv)
+ dialog = Dialog()
+ dialog.show()
+ sys.exit(dialog.exec_())
diff --git a/examples/opengl/2dpainting.py b/examples/opengl/2dpainting.py
new file mode 100755
index 00000000..6073024c
--- /dev/null
+++ b/examples/opengl/2dpainting.py
@@ -0,0 +1,174 @@
+#!/usr/bin/env python
+
+############################################################################
+##
+## Copyright (C) 2013 Riverbank Computing Limited.
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+############################################################################
+
+"""PySide2 port of the opengl/legacy/2dpainting example from Qt v5.x"""
+
+import sys
+import math
+from PySide2.QtCore import *
+from PySide2.QtGui import *
+from PySide2.QtWidgets import *
+from PySide2.QtOpenGL import *
+
+try:
+ from OpenGL import GL
+except ImportError:
+ app = QApplication(sys.argv)
+ messageBox = QMessageBox(QMessageBox.Critical, "OpenGL 2dpainting",
+ "PyOpenGL must be installed to run this example.",
+ QMessageBox.Close)
+ messageBox.setDetailedText("Run:\npip install PyOpenGL PyOpenGL_accelerate")
+ messageBox.exec_()
+ sys.exit(1)
+
+
+class Helper:
+ def __init__(self):
+ gradient = QLinearGradient(QPointF(50, -20), QPointF(80, 20))
+ gradient.setColorAt(0.0, Qt.white)
+ gradient.setColorAt(1.0, QColor(0xa6, 0xce, 0x39))
+
+ self.background = QBrush(QColor(64, 32, 64))
+ self.circleBrush = QBrush(gradient)
+ self.circlePen = QPen(Qt.black)
+ self.circlePen.setWidth(1)
+ self.textPen = QPen(Qt.white)
+ self.textFont = QFont()
+ self.textFont.setPixelSize(50)
+
+ def paint(self, painter, event, elapsed):
+ painter.fillRect(event.rect(), self.background)
+ painter.translate(100, 100)
+
+ painter.save()
+ painter.setBrush(self.circleBrush)
+ painter.setPen(self.circlePen)
+ painter.rotate(elapsed * 0.030)
+
+ r = elapsed/1000.0
+ n = 30
+ for i in range(n):
+ painter.rotate(30)
+ radius = 0 + 120.0*((i+r)/n)
+ circleRadius = 1 + ((i+r)/n)*20
+ painter.drawEllipse(QRectF(radius, -circleRadius,
+ circleRadius*2, circleRadius*2))
+
+ painter.restore()
+
+ painter.setPen(self.textPen)
+ painter.setFont(self.textFont)
+ painter.drawText(QRect(-50, -50, 100, 100), Qt.AlignCenter, "Qt")
+
+
+class Widget(QWidget):
+ def __init__(self, helper, parent = None):
+ QWidget.__init__(self, parent)
+
+ self.helper = helper
+ self.elapsed = 0
+ self.setFixedSize(200, 200)
+
+ def animate(self):
+ self.elapsed = (self.elapsed + self.sender().interval()) % 1000
+ self.repaint()
+
+ def paintEvent(self, event):
+ painter = QPainter()
+ painter.begin(self)
+ painter.setRenderHint(QPainter.Antialiasing)
+ self.helper.paint(painter, event, self.elapsed)
+ painter.end()
+
+
+class GLWidget(QGLWidget):
+ def __init__(self, helper, parent = None):
+ QGLWidget.__init__(self, QGLFormat(QGL.SampleBuffers), parent)
+
+ self.helper = helper
+ self.elapsed = 0
+ self.setFixedSize(200, 200)
+
+ def animate(self):
+ self.elapsed = (self.elapsed + self.sender().interval()) % 1000
+ self.repaint()
+
+ def paintEvent(self, event):
+ painter = QPainter()
+ painter.begin(self)
+ self.helper.paint(painter, event, self.elapsed)
+ painter.end()
+
+
+class Window(QWidget):
+ def __init__(self, parent = None):
+ QWidget.__init__(self, parent)
+
+ helper = Helper()
+ native = Widget(helper, self)
+ openGL = GLWidget(helper, self)
+ nativeLabel = QLabel(self.tr("Native"))
+ nativeLabel.setAlignment(Qt.AlignHCenter)
+ openGLLabel = QLabel(self.tr("OpenGL"))
+ openGLLabel.setAlignment(Qt.AlignHCenter)
+
+ layout = QGridLayout()
+ layout.addWidget(native, 0, 0)
+ layout.addWidget(openGL, 0, 1)
+ layout.addWidget(nativeLabel, 1, 0)
+ layout.addWidget(openGLLabel, 1, 1)
+ self.setLayout(layout)
+
+ timer = QTimer(self)
+ self.connect(timer, SIGNAL("timeout()"), native.animate)
+ self.connect(timer, SIGNAL("timeout()"), openGL.animate)
+ timer.start(50)
+
+ self.setWindowTitle(self.tr("2D Painting on Native and OpenGL Widgets"))
+
+
+if __name__ == '__main__':
+ app = QApplication(sys.argv)
+ window = Window()
+ window.show()
+ sys.exit(app.exec_())
diff --git a/examples/opengl/contextinfo.py b/examples/opengl/contextinfo.py
new file mode 100644
index 00000000..b2df1ded
--- /dev/null
+++ b/examples/opengl/contextinfo.py
@@ -0,0 +1,251 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2017 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+"""PySide2 port of the opengl/contextinfo example from Qt v5.x"""
+
+import numpy
+import sys
+
+from PySide2.QtCore import QLibraryInfo, QSize, QTimer, Qt
+from PySide2.QtGui import (QMatrix4x4, QOpenGLBuffer, QOpenGLContext, QOpenGLShader,
+ QOpenGLShaderProgram, QOpenGLVertexArrayObject, QSurfaceFormat, QWindow)
+from PySide2.QtWidgets import (QApplication, QHBoxLayout, QMessageBox, QPlainTextEdit,
+ QWidget)
+from PySide2.support import VoidPtr
+try:
+ from OpenGL import GL
+except ImportError:
+ app = QApplication(sys.argv)
+ messageBox = QMessageBox(QMessageBox.Critical, "ContextInfo",
+ "PyOpenGL must be installed to run this example.",
+ QMessageBox.Close)
+ messageBox.setDetailedText("Run:\npip install PyOpenGL PyOpenGL_accelerate")
+ messageBox.exec_()
+ sys.exit(1)
+
+vertexShaderSource110 = """
+#version 110
+attribute highp vec4 posAttr;
+attribute lowp vec4 colAttr;
+varying lowp vec4 col;
+uniform highp mat4 matrix;
+void main() {
+ col = colAttr;
+ gl_Position = matrix * posAttr;
+}
+"""
+
+fragmentShaderSource110 = """
+#version 110
+varying lowp vec4 col;
+void main() {
+ gl_FragColor = col;
+}
+"""
+
+vertexShaderSource = """
+#version 150
+in vec4 posAttr;
+in vec4 colAttr;
+out vec4 col;
+uniform mat4 matrix;
+void main() {
+ col = colAttr;
+ gl_Position = matrix * posAttr;
+}
+"""
+
+fragmentShaderSource = """
+#version 150
+in vec4 col;
+out vec4 fragColor;
+void main() {
+ fragColor = col;
+}
+"""
+
+vertices = numpy.array([0, 0.707, -0.5, -0.5, 0.5, -0.5], dtype = numpy.float32)
+colors = numpy.array([1, 0, 0, 0, 1, 0, 0, 0, 1], dtype = numpy.float32)
+
+class RenderWindow(QWindow):
+ def __init__(self, format):
+ super(RenderWindow, self).__init__()
+ self.setSurfaceType(QWindow.OpenGLSurface);
+ self.setFormat(format);
+ self.context = QOpenGLContext(self);
+ self.context.setFormat(self.requestedFormat());
+ if not self.context.create():
+ raise Exception("Unable to create GL context")
+ self.program = None
+ self.timer = None
+ self.angle = 0
+
+ def initGl(self):
+ self.program = QOpenGLShaderProgram(self);
+ self.vao = QOpenGLVertexArrayObject()
+ self.vbo = QOpenGLBuffer()
+
+ format = self.context.format();
+ useNewStyleShader = format.profile() == QSurfaceFormat.CoreProfile;
+ # Try to handle 3.0 & 3.1 that do not have the core/compatibility profile
+ # concept 3.2+ has. This may still fail since version 150 (3.2) is
+ # specified in the sources but it's worth a try.
+ if (format.renderableType() == QSurfaceFormat.OpenGL and format.majorVersion() == 3
+ and format.minorVersion() <= 1):
+ useNewStyleShader = not format.testOption(QSurfaceFormat.DeprecatedFunctions)
+
+ vertexShader = vertexShaderSource if useNewStyleShader else vertexShaderSource110
+ fragmentShader = fragmentShaderSource if useNewStyleShader else fragmentShaderSource110
+ if not self.program.addShaderFromSourceCode(QOpenGLShader.Vertex, vertexShader):
+ raise Exception("Vertex shader could not be added: {} ({})".format(self.program.log(), vertexShader))
+ if not self.program.addShaderFromSourceCode(QOpenGLShader.Fragment, fragmentShader):
+ raise Exception("Fragment shader could not be added: {} ({})".format(self.program.log(), fragmentShader))
+ if not self.program.link():
+ raise Exception("Could not link shaders: {}".format(self.program.log()))
+
+ self.posAttr = self.program.attributeLocation("posAttr");
+ self.colAttr = self.program.attributeLocation("colAttr");
+ self.matrixUniform = self.program.uniformLocation("matrix");
+
+ self.vbo.create();
+ self.vbo.bind();
+ self.verticesData = vertices.tobytes()
+ self.colorsData = colors.tobytes()
+ verticesSize = 4 * vertices.size
+ colorsSize = 4 * colors.size
+ self.vbo.allocate(VoidPtr(self.verticesData), verticesSize + colorsSize);
+ self.vbo.write(verticesSize, VoidPtr(self.colorsData), colorsSize)
+ self.vbo.release();
+
+ vaoBinder = QOpenGLVertexArrayObject.Binder(self.vao)
+ if self.vao.isCreated(): # have VAO support, use it
+ self.setupVertexAttribs()
+
+ def setupVertexAttribs(self):
+ self.vbo.bind();
+ self.program.setAttributeBuffer(self.posAttr, GL.GL_FLOAT, 0, 2);
+ self.program.setAttributeBuffer(self.colAttr, GL.GL_FLOAT, 4 * vertices.size, 3);
+ self.program.enableAttributeArray(self.posAttr);
+ self.program.enableAttributeArray(self.colAttr);
+ self.vbo.release();
+
+ def exposeEvent(self, event):
+ if self.isExposed():
+ self.render()
+ if self.timer is None:
+ self.timer = QTimer(self)
+ self.timer.timeout.connect(self.slotTimer)
+ self.timer.start(10)
+
+ def render(self):
+ if not self.context.makeCurrent(self):
+ raise Exception("makeCurrent() failed")
+ functions = self.context.functions()
+ if self.program is None:
+ functions.glEnable(GL.GL_DEPTH_TEST)
+ functions.glClearColor(0, 0, 0, 1)
+ self.initGl()
+
+ functions.glViewport(0, 0, self.width(), self.height());
+ functions.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
+
+ self.program.bind();
+ matrix = QMatrix4x4()
+ matrix.perspective(60, 4 / 3, 0.1, 100)
+ matrix.translate(0, 0, -2)
+ matrix.rotate(self.angle, 0, 1, 0)
+ self.program.setUniformValue(self.matrixUniform, matrix);
+
+ if self.vao.isCreated():
+ self.vao.bind();
+ else: # no VAO support, set the vertex attribute arrays now
+ self.setupVertexAttribs()
+
+ functions.glDrawArrays(GL.GL_TRIANGLES, 0, 3);
+
+ self.vao.release()
+ self.program.release()
+
+ # swapInterval is 1 by default which means that swapBuffers() will (hopefully) block
+ # and wait for vsync.
+ self.context.swapBuffers(self)
+ self.context.doneCurrent()
+
+ def slotTimer(self):
+ self.render()
+ self.angle += 1
+
+ def glInfo(self):
+ if not self.context.makeCurrent(self):
+ raise Exception("makeCurrent() failed")
+ functions = self.context.functions()
+ text = "Vendor: {}\nRenderer: {}\nVersion: {}\nShading language: {}".format(
+ functions.glGetString(GL.GL_VENDOR), functions.glGetString(GL.GL_RENDERER),
+ functions.glGetString(GL.GL_VERSION),
+ functions.glGetString(GL.GL_SHADING_LANGUAGE_VERSION))
+ self.context.doneCurrent()
+ return text
+
+class MainWindow(QWidget):
+ def __init__(self):
+ super(MainWindow, self).__init__()
+ hBoxLayout = QHBoxLayout(self)
+ self.plainTextEdit = QPlainTextEdit()
+ self.plainTextEdit.setMinimumWidth(400)
+ self.plainTextEdit.setReadOnly(True)
+ hBoxLayout.addWidget(self.plainTextEdit)
+ self.renderWindow = RenderWindow(QSurfaceFormat())
+ container = QWidget.createWindowContainer(self.renderWindow)
+ container.setMinimumSize(QSize(400, 400))
+ hBoxLayout.addWidget(container)
+
+ def updateDescription(self):
+ text = "{}\n\nPython {}\n\n{}".format(QLibraryInfo.build(), sys.version,
+ self.renderWindow.glInfo())
+ self.plainTextEdit.setPlainText(text)
+
+if __name__ == '__main__':
+ app = QApplication(sys.argv)
+ mainWindow = MainWindow()
+ mainWindow.show()
+ mainWindow.updateDescription()
+ sys.exit(app.exec_())
diff --git a/examples/opengl/grabber.py b/examples/opengl/grabber.py
new file mode 100644
index 00000000..f9eb9dc0
--- /dev/null
+++ b/examples/opengl/grabber.py
@@ -0,0 +1,436 @@
+#!/usr/bin/env python
+
+############################################################################
+##
+## Copyright (C) 2013 Riverbank Computing Limited.
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+############################################################################
+
+"""PySide2 port of the opengl/legacy/grabber example from Qt v5.x"""
+
+import sys
+import math
+
+from PySide2 import QtCore, QtGui, QtWidgets, QtOpenGL
+
+try:
+ from OpenGL.GL import *
+except ImportError:
+ app = QtWidgets.QApplication(sys.argv)
+ messageBox = QtWidgets.QMessageBox(QtWidgets.QMessageBox.Critical, "OpenGL grabber",
+ "PyOpenGL must be installed to run this example.",
+ QtWidgets.QMessageBox.Close)
+ messageBox.setDetailedText("Run:\npip install PyOpenGL PyOpenGL_accelerate")
+ messageBox.exec_()
+ sys.exit(1)
+
+
+class GLWidget(QtOpenGL.QGLWidget):
+ xRotationChanged = QtCore.Signal(int)
+ yRotationChanged = QtCore.Signal(int)
+ zRotationChanged = QtCore.Signal(int)
+
+ def __init__(self, parent=None):
+ super(GLWidget, self).__init__(parent)
+
+ self.gear1 = 0
+ self.gear2 = 0
+ self.gear3 = 0
+ self.xRot = 0
+ self.yRot = 0
+ self.zRot = 0
+ self.gear1Rot = 0
+
+ timer = QtCore.QTimer(self)
+ timer.timeout.connect(self.advanceGears)
+ timer.start(20)
+
+ def freeResources(self):
+ self.makeCurrent()
+ glDeleteLists(self.gear1, 1)
+ glDeleteLists(self.gear2, 1)
+ glDeleteLists(self.gear3, 1)
+
+ def setXRotation(self, angle):
+ self.normalizeAngle(angle)
+
+ if angle != self.xRot:
+ self.xRot = angle
+ self.xRotationChanged.emit(angle)
+ self.updateGL()
+
+ def setYRotation(self, angle):
+ self.normalizeAngle(angle)
+
+ if angle != self.yRot:
+ self.yRot = angle
+ self.yRotationChanged.emit(angle)
+ self.updateGL()
+
+ def setZRotation(self, angle):
+ self.normalizeAngle(angle)
+
+ if angle != self.zRot:
+ self.zRot = angle
+ self.zRotationChanged.emit(angle)
+ self.updateGL()
+
+ def initializeGL(self):
+ lightPos = (5.0, 5.0, 10.0, 1.0)
+ reflectance1 = (0.8, 0.1, 0.0, 1.0)
+ reflectance2 = (0.0, 0.8, 0.2, 1.0)
+ reflectance3 = (0.2, 0.2, 1.0, 1.0)
+
+ glLightfv(GL_LIGHT0, GL_POSITION, lightPos)
+ glEnable(GL_LIGHTING)
+ glEnable(GL_LIGHT0)
+ glEnable(GL_DEPTH_TEST)
+
+ self.gear1 = self.makeGear(reflectance1, 1.0, 4.0, 1.0, 0.7, 20)
+ self.gear2 = self.makeGear(reflectance2, 0.5, 2.0, 2.0, 0.7, 10)
+ self.gear3 = self.makeGear(reflectance3, 1.3, 2.0, 0.5, 0.7, 10)
+
+ glEnable(GL_NORMALIZE)
+ glClearColor(0.0, 0.0, 0.0, 1.0)
+
+ def paintGL(self):
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)
+
+ glPushMatrix()
+ glRotated(self.xRot / 16.0, 1.0, 0.0, 0.0)
+ glRotated(self.yRot / 16.0, 0.0, 1.0, 0.0)
+ glRotated(self.zRot / 16.0, 0.0, 0.0, 1.0)
+
+ self.drawGear(self.gear1, -3.0, -2.0, 0.0, self.gear1Rot / 16.0)
+ self.drawGear(self.gear2, +3.1, -2.0, 0.0,
+ -2.0 * (self.gear1Rot / 16.0) - 9.0)
+
+ glRotated(+90.0, 1.0, 0.0, 0.0)
+ self.drawGear(self.gear3, -3.1, -1.8, -2.2,
+ +2.0 * (self.gear1Rot / 16.0) - 2.0)
+
+ glPopMatrix()
+
+ def resizeGL(self, width, height):
+ side = min(width, height)
+ if side < 0:
+ return
+
+ glViewport(int((width - side) / 2), int((height - side) / 2), side, side)
+
+ glMatrixMode(GL_PROJECTION)
+ glLoadIdentity()
+ glFrustum(-1.0, +1.0, -1.0, 1.0, 5.0, 60.0)
+ glMatrixMode(GL_MODELVIEW)
+ glLoadIdentity()
+ glTranslated(0.0, 0.0, -40.0)
+
+ def mousePressEvent(self, event):
+ self.lastPos = event.pos()
+
+ def mouseMoveEvent(self, event):
+ dx = event.x() - self.lastPos.x()
+ dy = event.y() - self.lastPos.y()
+
+ if event.buttons() & QtCore.Qt.LeftButton:
+ self.setXRotation(self.xRot + 8 * dy)
+ self.setYRotation(self.yRot + 8 * dx)
+ elif event.buttons() & QtCore.Qt.RightButton:
+ self.setXRotation(self.xRot + 8 * dy)
+ self.setZRotation(self.zRot + 8 * dx)
+
+ self.lastPos = event.pos()
+
+ def advanceGears(self):
+ self.gear1Rot += 2 * 16
+ self.updateGL()
+
+ def xRotation(self):
+ return self.xRot
+
+ def yRotation(self):
+ return self.yRot
+
+ def zRotation(self):
+ return self.zRot
+
+ def makeGear(self, reflectance, innerRadius, outerRadius, thickness, toothSize, toothCount):
+ list = glGenLists(1)
+ glNewList(list, GL_COMPILE)
+ glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, reflectance)
+
+ r0 = innerRadius
+ r1 = outerRadius - toothSize / 2.0
+ r2 = outerRadius + toothSize / 2.0
+ delta = (2.0 * math.pi / toothCount) / 4.0
+ z = thickness / 2.0
+
+ glShadeModel(GL_FLAT)
+
+ for i in range(2):
+ if i == 0:
+ sign = +1.0
+ else:
+ sign = -1.0
+
+ glNormal3d(0.0, 0.0, sign)
+
+ glBegin(GL_QUAD_STRIP)
+
+ for j in range(toothCount+1):
+ angle = 2.0 * math.pi * j / toothCount
+ glVertex3d(r0 * math.cos(angle), r0 * math.sin(angle), sign * z)
+ glVertex3d(r1 * math.cos(angle), r1 * math.sin(angle), sign * z)
+ glVertex3d(r0 * math.cos(angle), r0 * math.sin(angle), sign * z)
+ glVertex3d(r1 * math.cos(angle + 3 * delta), r1 * math.sin(angle + 3 * delta), sign * z)
+
+ glEnd()
+
+ glBegin(GL_QUADS)
+
+ for j in range(toothCount):
+ angle = 2.0 * math.pi * j / toothCount
+ glVertex3d(r1 * math.cos(angle), r1 * math.sin(angle), sign * z)
+ glVertex3d(r2 * math.cos(angle + delta), r2 * math.sin(angle + delta), sign * z)
+ glVertex3d(r2 * math.cos(angle + 2 * delta), r2 * math.sin(angle + 2 * delta), sign * z)
+ glVertex3d(r1 * math.cos(angle + 3 * delta), r1 * math.sin(angle + 3 * delta), sign * z)
+
+ glEnd()
+
+ glBegin(GL_QUAD_STRIP)
+
+ for i in range(toothCount):
+ for j in range(2):
+ angle = 2.0 * math.pi * (i + (j / 2.0)) / toothCount
+ s1 = r1
+ s2 = r2
+
+ if j == 1:
+ s1, s2 = s2, s1
+
+ glNormal3d(math.cos(angle), math.sin(angle), 0.0)
+ glVertex3d(s1 * math.cos(angle), s1 * math.sin(angle), +z)
+ glVertex3d(s1 * math.cos(angle), s1 * math.sin(angle), -z)
+
+ glNormal3d(s2 * math.sin(angle + delta) - s1 * math.sin(angle), s1 * math.cos(angle) - s2 * math.cos(angle + delta), 0.0)
+ glVertex3d(s2 * math.cos(angle + delta), s2 * math.sin(angle + delta), +z)
+ glVertex3d(s2 * math.cos(angle + delta), s2 * math.sin(angle + delta), -z)
+
+ glVertex3d(r1, 0.0, +z)
+ glVertex3d(r1, 0.0, -z)
+ glEnd()
+
+ glShadeModel(GL_SMOOTH)
+
+ glBegin(GL_QUAD_STRIP)
+
+ for i in range(toothCount+1):
+ angle = i * 2.0 * math.pi / toothCount
+ glNormal3d(-math.cos(angle), -math.sin(angle), 0.0)
+ glVertex3d(r0 * math.cos(angle), r0 * math.sin(angle), +z)
+ glVertex3d(r0 * math.cos(angle), r0 * math.sin(angle), -z)
+
+ glEnd()
+
+ glEndList()
+
+ return list
+
+ def drawGear(self, gear, dx, dy, dz, angle):
+ glPushMatrix()
+ glTranslated(dx, dy, dz)
+ glRotated(angle, 0.0, 0.0, 1.0)
+ glCallList(gear)
+ glPopMatrix()
+
+ def normalizeAngle(self, angle):
+ while (angle < 0):
+ angle += 360 * 16
+
+ while (angle > 360 * 16):
+ angle -= 360 * 16
+
+
+class MainWindow(QtWidgets.QMainWindow):
+ def __init__(self):
+ super(MainWindow, self).__init__()
+
+ centralWidget = QtWidgets.QWidget()
+ self.setCentralWidget(centralWidget)
+
+ self.glWidget = GLWidget()
+ self.pixmapLabel = QtWidgets.QLabel()
+
+ self.glWidgetArea = QtWidgets.QScrollArea()
+ self.glWidgetArea.setWidget(self.glWidget)
+ self.glWidgetArea.setWidgetResizable(True)
+ self.glWidgetArea.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
+ self.glWidgetArea.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
+ self.glWidgetArea.setSizePolicy(QtWidgets.QSizePolicy.Ignored,
+ QtWidgets.QSizePolicy.Ignored)
+ self.glWidgetArea.setMinimumSize(50, 50)
+
+ self.pixmapLabelArea = QtWidgets.QScrollArea()
+ self.pixmapLabelArea.setWidget(self.pixmapLabel)
+ self.pixmapLabelArea.setSizePolicy(QtWidgets.QSizePolicy.Ignored,
+ QtWidgets.QSizePolicy.Ignored)
+ self.pixmapLabelArea.setMinimumSize(50, 50)
+
+ xSlider = self.createSlider(self.glWidget.xRotationChanged,
+ self.glWidget.setXRotation)
+ ySlider = self.createSlider(self.glWidget.yRotationChanged,
+ self.glWidget.setYRotation)
+ zSlider = self.createSlider(self.glWidget.zRotationChanged,
+ self.glWidget.setZRotation)
+
+ self.createActions()
+ self.createMenus()
+
+ centralLayout = QtWidgets.QGridLayout()
+ centralLayout.addWidget(self.glWidgetArea, 0, 0)
+ centralLayout.addWidget(self.pixmapLabelArea, 0, 1)
+ centralLayout.addWidget(xSlider, 1, 0, 1, 2)
+ centralLayout.addWidget(ySlider, 2, 0, 1, 2)
+ centralLayout.addWidget(zSlider, 3, 0, 1, 2)
+ centralWidget.setLayout(centralLayout)
+
+ xSlider.setValue(15 * 16)
+ ySlider.setValue(345 * 16)
+ zSlider.setValue(0 * 16)
+
+ self.setWindowTitle("Grabber")
+ self.resize(400, 300)
+
+ def renderIntoPixmap(self):
+ size = self.getSize()
+
+ if size.isValid():
+ pixmap = self.glWidget.renderPixmap(size.width(), size.height())
+ self.setPixmap(pixmap)
+
+ def grabFrameBuffer(self):
+ image = self.glWidget.grabFrameBuffer()
+ self.setPixmap(QtGui.QPixmap.fromImage(image))
+
+ def clearPixmap(self):
+ self.setPixmap(QtGui.QPixmap())
+
+ def about(self):
+ QtWidgets.QMessageBox.about(self, "About Grabber",
+ "The <b>Grabber</b> example demonstrates two approaches for "
+ "rendering OpenGL into a Qt pixmap.")
+
+ def createActions(self):
+ self.renderIntoPixmapAct = QtWidgets.QAction("&Render into Pixmap...",
+ self, shortcut="Ctrl+R", triggered=self.renderIntoPixmap)
+
+ self.grabFrameBufferAct = QtWidgets.QAction("&Grab Frame Buffer", self,
+ shortcut="Ctrl+G", triggered=self.grabFrameBuffer)
+
+ self.clearPixmapAct = QtWidgets.QAction("&Clear Pixmap", self,
+ shortcut="Ctrl+L", triggered=self.clearPixmap)
+
+ self.exitAct = QtWidgets.QAction("E&xit", self, shortcut="Ctrl+Q",
+ triggered=self.close)
+
+ self.aboutAct = QtWidgets.QAction("&About", self, triggered=self.about)
+
+ self.aboutQtAct = QtWidgets.QAction("About &Qt", self,
+ triggered=QtWidgets.qApp.aboutQt)
+
+ def createMenus(self):
+ self.fileMenu = self.menuBar().addMenu("&File")
+ self.fileMenu.addAction(self.renderIntoPixmapAct)
+ self.fileMenu.addAction(self.grabFrameBufferAct)
+ self.fileMenu.addAction(self.clearPixmapAct)
+ self.fileMenu.addSeparator()
+ self.fileMenu.addAction(self.exitAct)
+
+ self.helpMenu = self.menuBar().addMenu("&Help")
+ self.helpMenu.addAction(self.aboutAct)
+ self.helpMenu.addAction(self.aboutQtAct)
+
+ def createSlider(self, changedSignal, setterSlot):
+ slider = QtWidgets.QSlider(QtCore.Qt.Horizontal)
+ slider.setRange(0, 360 * 16)
+ slider.setSingleStep(16)
+ slider.setPageStep(15 * 16)
+ slider.setTickInterval(15 * 16)
+ slider.setTickPosition(QtWidgets.QSlider.TicksRight)
+
+ slider.valueChanged.connect(setterSlot)
+ changedSignal.connect(slider.setValue)
+
+ return slider
+
+ def setPixmap(self, pixmap):
+ self.pixmapLabel.setPixmap(pixmap)
+ size = pixmap.size()
+
+ if size - QtCore.QSize(1, 0) == self.pixmapLabelArea.maximumViewportSize():
+ size -= QtCore.QSize(1, 0)
+
+ self.pixmapLabel.resize(size)
+
+ def getSize(self):
+ text, ok = QtWidgets.QInputDialog.getText(self, "Grabber",
+ "Enter pixmap size:", QtWidgets.QLineEdit.Normal,
+ "%d x %d" % (self.glWidget.width(), self.glWidget.height()))
+
+ if not ok:
+ return QtCore.QSize()
+
+ regExp = QtCore.QRegExp("([0-9]+) *x *([0-9]+)")
+
+ if regExp.exactMatch(text):
+ width = int(regExp.cap(1))
+ height = int(regExp.cap(2))
+ if width > 0 and width < 2048 and height > 0 and height < 2048:
+ return QtCore.QSize(width, height)
+
+ return self.glWidget.size()
+
+
+if __name__ == '__main__':
+
+ app = QtWidgets.QApplication(sys.argv)
+ mainWin = MainWindow()
+ mainWin.show()
+ res = app.exec_()
+ mainWin.glWidget.freeResources()
+ sys.exit(res)
diff --git a/examples/opengl/hellogl.py b/examples/opengl/hellogl.py
new file mode 100755
index 00000000..18857fac
--- /dev/null
+++ b/examples/opengl/hellogl.py
@@ -0,0 +1,288 @@
+#!/usr/bin/env python
+
+############################################################################
+##
+## Copyright (C) 2013 Riverbank Computing Limited.
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+############################################################################
+
+"""PySide2 port of the opengl/legacy/hellogl example from Qt v5.x"""
+
+import sys
+import math
+from PySide2 import QtCore, QtGui, QtWidgets, QtOpenGL
+
+try:
+ from OpenGL import GL
+except ImportError:
+ app = QtWidgets.QApplication(sys.argv)
+ messageBox = QtWidgets.QMessageBox(QtWidgets.QMessageBox.Critical, "OpenGL hellogl",
+ "PyOpenGL must be installed to run this example.",
+ QtWidgets.QMessageBox.Close)
+ messageBox.setDetailedText("Run:\npip install PyOpenGL PyOpenGL_accelerate")
+ messageBox.exec_()
+ sys.exit(1)
+
+
+class Window(QtWidgets.QWidget):
+ def __init__(self, parent=None):
+ QtWidgets.QWidget.__init__(self, parent)
+
+ self.glWidget = GLWidget()
+
+ self.xSlider = self.createSlider(QtCore.SIGNAL("xRotationChanged(int)"),
+ self.glWidget.setXRotation)
+ self.ySlider = self.createSlider(QtCore.SIGNAL("yRotationChanged(int)"),
+ self.glWidget.setYRotation)
+ self.zSlider = self.createSlider(QtCore.SIGNAL("zRotationChanged(int)"),
+ self.glWidget.setZRotation)
+
+ mainLayout = QtWidgets.QHBoxLayout()
+ mainLayout.addWidget(self.glWidget)
+ mainLayout.addWidget(self.xSlider)
+ mainLayout.addWidget(self.ySlider)
+ mainLayout.addWidget(self.zSlider)
+ self.setLayout(mainLayout)
+
+ self.xSlider.setValue(170 * 16)
+ self.ySlider.setValue(160 * 16)
+ self.zSlider.setValue(90 * 16)
+
+ self.setWindowTitle(self.tr("Hello GL"))
+
+ def createSlider(self, changedSignal, setterSlot):
+ slider = QtWidgets.QSlider(QtCore.Qt.Vertical)
+
+ slider.setRange(0, 360 * 16)
+ slider.setSingleStep(16)
+ slider.setPageStep(15 * 16)
+ slider.setTickInterval(15 * 16)
+ slider.setTickPosition(QtWidgets.QSlider.TicksRight)
+
+ self.glWidget.connect(slider, QtCore.SIGNAL("valueChanged(int)"), setterSlot)
+ self.connect(self.glWidget, changedSignal, slider, QtCore.SLOT("setValue(int)"))
+
+ return slider
+
+
+class GLWidget(QtOpenGL.QGLWidget):
+ xRotationChanged = QtCore.Signal(int)
+ yRotationChanged = QtCore.Signal(int)
+ zRotationChanged = QtCore.Signal(int)
+
+ def __init__(self, parent=None):
+ QtOpenGL.QGLWidget.__init__(self, parent)
+
+ self.object = 0
+ self.xRot = 0
+ self.yRot = 0
+ self.zRot = 0
+
+ self.lastPos = QtCore.QPoint()
+
+ self.trolltechGreen = QtGui.QColor.fromCmykF(0.40, 0.0, 1.0, 0.0)
+ self.trolltechPurple = QtGui.QColor.fromCmykF(0.39, 0.39, 0.0, 0.0)
+
+ def xRotation(self):
+ return self.xRot
+
+ def yRotation(self):
+ return self.yRot
+
+ def zRotation(self):
+ return self.zRot
+
+ def minimumSizeHint(self):
+ return QtCore.QSize(50, 50)
+
+ def sizeHint(self):
+ return QtCore.QSize(400, 400)
+
+ def setXRotation(self, angle):
+ angle = self.normalizeAngle(angle)
+ if angle != self.xRot:
+ self.xRot = angle
+ self.emit(QtCore.SIGNAL("xRotationChanged(int)"), angle)
+ self.updateGL()
+
+ def setYRotation(self, angle):
+ angle = self.normalizeAngle(angle)
+ if angle != self.yRot:
+ self.yRot = angle
+ self.emit(QtCore.SIGNAL("yRotationChanged(int)"), angle)
+ self.updateGL()
+
+ def setZRotation(self, angle):
+ angle = self.normalizeAngle(angle)
+ if angle != self.zRot:
+ self.zRot = angle
+ self.emit(QtCore.SIGNAL("zRotationChanged(int)"), angle)
+ self.updateGL()
+
+ def initializeGL(self):
+ self.qglClearColor(self.trolltechPurple.darker())
+ self.object = self.makeObject()
+ GL.glShadeModel(GL.GL_FLAT)
+ GL.glEnable(GL.GL_DEPTH_TEST)
+ GL.glEnable(GL.GL_CULL_FACE)
+
+ def paintGL(self):
+ GL.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT)
+ GL.glLoadIdentity()
+ GL.glTranslated(0.0, 0.0, -10.0)
+ GL.glRotated(self.xRot / 16.0, 1.0, 0.0, 0.0)
+ GL.glRotated(self.yRot / 16.0, 0.0, 1.0, 0.0)
+ GL.glRotated(self.zRot / 16.0, 0.0, 0.0, 1.0)
+ GL.glCallList(self.object)
+
+ def resizeGL(self, width, height):
+ side = min(width, height)
+ GL.glViewport(int((width - side) / 2),int((height - side) / 2), side, side)
+
+ GL.glMatrixMode(GL.GL_PROJECTION)
+ GL.glLoadIdentity()
+ GL.glOrtho(-0.5, +0.5, -0.5, +0.5, 4.0, 15.0)
+ GL.glMatrixMode(GL.GL_MODELVIEW)
+
+ def mousePressEvent(self, event):
+ self.lastPos = QtCore.QPoint(event.pos())
+
+ def mouseMoveEvent(self, event):
+ dx = event.x() - self.lastPos.x()
+ dy = event.y() - self.lastPos.y()
+
+ if event.buttons() & QtCore.Qt.LeftButton:
+ self.setXRotation(self.xRot + 8 * dy)
+ self.setYRotation(self.yRot + 8 * dx)
+ elif event.buttons() & QtCore.Qt.RightButton:
+ self.setXRotation(self.xRot + 8 * dy)
+ self.setZRotation(self.zRot + 8 * dx)
+
+ self.lastPos = QtCore.QPoint(event.pos())
+
+ def makeObject(self):
+ genList = GL.glGenLists(1)
+ GL.glNewList(genList, GL.GL_COMPILE)
+
+ GL.glBegin(GL.GL_QUADS)
+
+ x1 = +0.06
+ y1 = -0.14
+ x2 = +0.14
+ y2 = -0.06
+ x3 = +0.08
+ y3 = +0.00
+ x4 = +0.30
+ y4 = +0.22
+
+ self.quad(x1, y1, x2, y2, y2, x2, y1, x1)
+ self.quad(x3, y3, x4, y4, y4, x4, y3, x3)
+
+ self.extrude(x1, y1, x2, y2)
+ self.extrude(x2, y2, y2, x2)
+ self.extrude(y2, x2, y1, x1)
+ self.extrude(y1, x1, x1, y1)
+ self.extrude(x3, y3, x4, y4)
+ self.extrude(x4, y4, y4, x4)
+ self.extrude(y4, x4, y3, x3)
+
+ Pi = 3.14159265358979323846
+ NumSectors = 200
+
+ for i in range(NumSectors):
+ angle1 = (i * 2 * Pi) / NumSectors
+ x5 = 0.30 * math.sin(angle1)
+ y5 = 0.30 * math.cos(angle1)
+ x6 = 0.20 * math.sin(angle1)
+ y6 = 0.20 * math.cos(angle1)
+
+ angle2 = ((i + 1) * 2 * Pi) / NumSectors
+ x7 = 0.20 * math.sin(angle2)
+ y7 = 0.20 * math.cos(angle2)
+ x8 = 0.30 * math.sin(angle2)
+ y8 = 0.30 * math.cos(angle2)
+
+ self.quad(x5, y5, x6, y6, x7, y7, x8, y8)
+
+ self.extrude(x6, y6, x7, y7)
+ self.extrude(x8, y8, x5, y5)
+
+ GL.glEnd()
+ GL.glEndList()
+
+ return genList
+
+ def quad(self, x1, y1, x2, y2, x3, y3, x4, y4):
+ self.qglColor(self.trolltechGreen)
+
+ GL.glVertex3d(x1, y1, +0.05)
+ GL.glVertex3d(x2, y2, +0.05)
+ GL.glVertex3d(x3, y3, +0.05)
+ GL.glVertex3d(x4, y4, +0.05)
+
+ GL.glVertex3d(x4, y4, -0.05)
+ GL.glVertex3d(x3, y3, -0.05)
+ GL.glVertex3d(x2, y2, -0.05)
+ GL.glVertex3d(x1, y1, -0.05)
+
+ def extrude(self, x1, y1, x2, y2):
+ self.qglColor(self.trolltechGreen.darker(250 + int(100 * x1)))
+
+ GL.glVertex3d(x1, y1, -0.05)
+ GL.glVertex3d(x2, y2, -0.05)
+ GL.glVertex3d(x2, y2, +0.05)
+ GL.glVertex3d(x1, y1, +0.05)
+
+ def normalizeAngle(self, angle):
+ while angle < 0:
+ angle += 360 * 16
+ while angle > 360 * 16:
+ angle -= 360 * 16
+ return angle
+
+ def freeResources(self):
+ self.makeCurrent()
+ GL.glDeleteLists(self.object, 1)
+
+if __name__ == '__main__':
+ app = QtWidgets.QApplication(sys.argv)
+ window = Window()
+ window.show()
+ res = app.exec_()
+ window.glWidget.freeResources()
+ sys.exit(res)
diff --git a/examples/opengl/overpainting.py b/examples/opengl/overpainting.py
new file mode 100755
index 00000000..9285eaa9
--- /dev/null
+++ b/examples/opengl/overpainting.py
@@ -0,0 +1,386 @@
+#!/usr/bin/env python
+
+############################################################################
+##
+## Copyright (C) 2013 Riverbank Computing Limited.
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+############################################################################
+
+"""PySide2 port of the opengl/legacy/overpainting example from Qt v5.x"""
+
+import sys
+import math, random
+from PySide2.QtCore import *
+from PySide2.QtGui import *
+from PySide2.QtWidgets import *
+from PySide2.QtOpenGL import *
+
+try:
+ from OpenGL.GL import *
+except ImportError:
+ app = QApplication(sys.argv)
+ messageBox = QMessageBox(QMessageBox.Critical, "OpenGL overpainting",
+ "PyOpenGL must be installed to run this example.",
+ QMessageBox.Close)
+ messageBox.setDetailedText("Run:\npip install PyOpenGL PyOpenGL_accelerate")
+ messageBox.exec_()
+ sys.exit(1)
+
+
+class Bubble:
+ def __init__(self, position, radius, velocity):
+ self.position = position
+ self.vel = velocity
+ self.radius = radius
+ self.innerColor = self.randomColor()
+ self.outerColor = self.randomColor()
+ self.updateBrush()
+
+ def updateBrush(self):
+ gradient = QRadialGradient(QPointF(self.radius, self.radius), self.radius,
+ QPointF(self.radius*0.5, self.radius*0.5))
+
+ gradient.setColorAt(0, QColor(255, 255, 255, 255))
+ gradient.setColorAt(0.25, self.innerColor)
+ gradient.setColorAt(1, self.outerColor)
+ self.brush = QBrush(gradient)
+
+ def drawBubble(self, painter):
+ painter.save()
+ painter.translate(self.position.x() - self.radius,
+ self.position.y() - self.radius)
+ painter.setBrush(self.brush)
+ painter.drawEllipse(0, 0, int(2*self.radius), int(2*self.radius))
+ painter.restore()
+
+ def randomColor(self):
+ red = random.randrange(205, 256)
+ green = random.randrange(205, 256)
+ blue = random.randrange(205, 256)
+ alpha = random.randrange(91, 192)
+
+ return QColor(red, green, blue, alpha)
+
+ def move(self, bbox):
+ self.position += self.vel
+ leftOverflow = self.position.x() - self.radius - bbox.left()
+ rightOverflow = self.position.x() + self.radius - bbox.right()
+ topOverflow = self.position.y() - self.radius - bbox.top()
+ bottomOverflow = self.position.y() + self.radius - bbox.bottom()
+
+ if leftOverflow < 0.0:
+ self.position.setX(self.position.x() - 2 * leftOverflow)
+ self.vel.setX(-self.vel.x())
+ elif rightOverflow > 0.0:
+ self.position.setX(self.position.x() - 2 * rightOverflow)
+ self.vel.setX(-self.vel.x())
+
+ if topOverflow < 0.0:
+ self.position.setY(self.position.y() - 2 * topOverflow)
+ self.vel.setY(-self.vel.y())
+ elif bottomOverflow > 0.0:
+ self.position.setY(self.position.y() - 2 * bottomOverflow)
+ self.vel.setY(-self.vel.y())
+
+ def rect(self):
+ return QRectF(self.position.x() - self.radius,
+ self.position.y() - self.radius,
+ 2 * self.radius, 2 * self.radius)
+
+
+class GLWidget(QGLWidget):
+ def __init__(self, parent = None):
+ QGLWidget.__init__(self, QGLFormat(QGL.SampleBuffers), parent)
+
+ midnight = QTime(0, 0, 0)
+ random.seed(midnight.secsTo(QTime.currentTime()))
+
+ self.object = 0
+ self.xRot = 0
+ self.yRot = 0
+ self.zRot = 0
+ self.image = QImage()
+ self.bubbles = []
+ self.lastPos = QPoint()
+
+ self.trolltechGreen = QColor.fromCmykF(0.40, 0.0, 1.0, 0.0)
+ self.trolltechPurple = QColor.fromCmykF(0.39, 0.39, 0.0, 0.0)
+
+ self.animationTimer = QTimer()
+ self.animationTimer.setSingleShot(False)
+ self.connect(self.animationTimer, SIGNAL("timeout()"), self.animate)
+ self.animationTimer.start(25)
+
+ self.setAttribute(Qt.WA_NoSystemBackground)
+ self.setMinimumSize(200, 200)
+ self.setWindowTitle(self.tr("Overpainting a Scene"))
+
+ def freeResources(self):
+ self.makeCurrent()
+ glDeleteLists(self.object, 1)
+
+ def setXRotation(self, angle):
+ angle = self.normalizeAngle(angle)
+ if angle != self.xRot:
+ self.xRot = angle
+ self.emit(SIGNAL("xRotationChanged(int)"), angle)
+
+ def setYRotation(self, angle):
+ angle = self.normalizeAngle(angle)
+ if angle != self.yRot:
+ self.yRot = angle
+ self.emit(SIGNAL("yRotationChanged(int)"), angle)
+
+ def setZRotation(self, angle):
+ angle = self.normalizeAngle(angle)
+ if angle != self.zRot:
+ self.zRot = angle
+ self.emit(SIGNAL("zRotationChanged(int)"), angle)
+
+ def initializeGL(self):
+ self.object = self.makeObject()
+
+ def mousePressEvent(self, event):
+ self.lastPos = QPoint(event.pos())
+
+ def mouseMoveEvent(self, event):
+ dx = event.x() - self.lastPos.x()
+ dy = event.y() - self.lastPos.y()
+
+ if event.buttons() & Qt.LeftButton:
+ self.setXRotation(self.xRot + 8 * dy)
+ self.setYRotation(self.yRot + 8 * dx)
+ elif event.buttons() & Qt.RightButton:
+ self.setXRotation(self.xRot + 8 * dy)
+ self.setZRotation(self.zRot + 8 * dx)
+
+ self.lastPos = QPoint(event.pos())
+
+ def paintEvent(self, event):
+ painter = QPainter()
+ painter.begin(self)
+ painter.setRenderHint(QPainter.Antialiasing)
+
+ glPushAttrib(GL_ALL_ATTRIB_BITS)
+ glMatrixMode(GL_PROJECTION)
+ glPushMatrix()
+ glMatrixMode(GL_MODELVIEW)
+ glPushMatrix()
+
+ self.qglClearColor(self.trolltechPurple.darker())
+ glShadeModel(GL_SMOOTH)
+ glEnable(GL_DEPTH_TEST)
+ glEnable(GL_CULL_FACE)
+ glEnable(GL_LIGHTING)
+ glEnable(GL_LIGHT0)
+ lightPosition = ( 0.5, 5.0, 7.0, 1.0 )
+ glLightfv(GL_LIGHT0, GL_POSITION, lightPosition)
+
+ self.resizeGL(self.width(), self.height())
+
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)
+ glLoadIdentity()
+ glTranslated(0.0, 0.0, -10.0)
+ glRotated(self.xRot / 16.0, 1.0, 0.0, 0.0)
+ glRotated(self.yRot / 16.0, 0.0, 1.0, 0.0)
+ glRotated(self.zRot / 16.0, 0.0, 0.0, 1.0)
+ glCallList(self.object)
+
+ glPopAttrib()
+ glMatrixMode(GL_MODELVIEW)
+ glPopMatrix()
+ glMatrixMode(GL_PROJECTION)
+ glPopMatrix()
+
+ glDisable(GL_CULL_FACE) ### not required if begin() also does it
+
+ for bubble in self.bubbles:
+ if bubble.rect().intersects(QRectF(event.rect())):
+ bubble.drawBubble(painter)
+
+ painter.drawImage((self.width() - self.image.width())/2, 0, self.image)
+ painter.end()
+
+ def resizeGL(self, width, height):
+ side = min(width, height)
+ glViewport(int((width - side) / 2), int((height - side) / 2), side, side)
+
+ glMatrixMode(GL_PROJECTION)
+ glLoadIdentity()
+ glOrtho(-0.5, +0.5, +0.5, -0.5, 4.0, 15.0)
+ glMatrixMode(GL_MODELVIEW)
+
+ self.formatInstructions(width, height)
+
+ def showEvent(self, event):
+ self.createBubbles(20 - len(self.bubbles))
+
+ def sizeHint(self):
+ return QSize(400, 400)
+
+ def makeObject(self):
+ list = glGenLists(1)
+ glNewList(list, GL_COMPILE)
+
+ glEnable(GL_NORMALIZE)
+ glBegin(GL_QUADS)
+
+ logoDiffuseColor = (self.trolltechGreen.red()/255.0,
+ self.trolltechGreen.green()/255.0,
+ self.trolltechGreen.blue()/255.0, 1.0)
+ glMaterialfv(GL_FRONT, GL_DIFFUSE, logoDiffuseColor)
+
+ x1 = +0.06
+ y1 = -0.14
+ x2 = +0.14
+ y2 = -0.06
+ x3 = +0.08
+ y3 = +0.00
+ x4 = +0.30
+ y4 = +0.22
+
+ self.quad(x1, y1, x2, y2, y2, x2, y1, x1)
+ self.quad(x3, y3, x4, y4, y4, x4, y3, x3)
+
+ self.extrude(x1, y1, x2, y2)
+ self.extrude(x2, y2, y2, x2)
+ self.extrude(y2, x2, y1, x1)
+ self.extrude(y1, x1, x1, y1)
+ self.extrude(x3, y3, x4, y4)
+ self.extrude(x4, y4, y4, x4)
+ self.extrude(y4, x4, y3, x3)
+
+ NumSectors = 200
+
+ for i in range(NumSectors):
+ angle1 = (i * 2 * math.pi) / NumSectors
+ x5 = 0.30 * math.sin(angle1)
+ y5 = 0.30 * math.cos(angle1)
+ x6 = 0.20 * math.sin(angle1)
+ y6 = 0.20 * math.cos(angle1)
+
+ angle2 = ((i + 1) * 2 * math.pi) / NumSectors
+ x7 = 0.20 * math.sin(angle2)
+ y7 = 0.20 * math.cos(angle2)
+ x8 = 0.30 * math.sin(angle2)
+ y8 = 0.30 * math.cos(angle2)
+
+ self.quad(x5, y5, x6, y6, x7, y7, x8, y8)
+
+ self.extrude(x6, y6, x7, y7)
+ self.extrude(x8, y8, x5, y5)
+
+ glEnd()
+
+ glEndList()
+ return list
+
+ def quad(self, x1, y1, x2, y2, x3, y3, x4, y4):
+ glNormal3d(0.0, 0.0, -1.0)
+ glVertex3d(x1, y1, -0.05)
+ glVertex3d(x2, y2, -0.05)
+ glVertex3d(x3, y3, -0.05)
+ glVertex3d(x4, y4, -0.05)
+
+ glNormal3d(0.0, 0.0, 1.0)
+ glVertex3d(x4, y4, +0.05)
+ glVertex3d(x3, y3, +0.05)
+ glVertex3d(x2, y2, +0.05)
+ glVertex3d(x1, y1, +0.05)
+
+ def extrude(self, x1, y1, x2, y2):
+ self.qglColor(self.trolltechGreen.darker(250 + int(100 * x1)))
+
+ glNormal3d((x1 + x2)/2.0, (y1 + y2)/2.0, 0.0)
+ glVertex3d(x1, y1, +0.05)
+ glVertex3d(x2, y2, +0.05)
+ glVertex3d(x2, y2, -0.05)
+ glVertex3d(x1, y1, -0.05)
+
+ def normalizeAngle(self, angle):
+ while angle < 0:
+ angle += 360 * 16
+ while angle > 360 * 16:
+ angle -= 360 * 16
+ return angle
+
+ def createBubbles(self, number):
+ for i in range(number):
+ position = QPointF(self.width()*(0.1 + 0.8*random.random()),
+ self.height()*(0.1 + 0.8*random.random()))
+ radius = min(self.width(), self.height())*(0.0125 + 0.0875*random.random())
+ velocity = QPointF(self.width()*0.0125*(-0.5 + random.random()),
+ self.height()*0.0125*(-0.5 + random.random()))
+
+ self.bubbles.append(Bubble(position, radius, velocity))
+
+ def animate(self):
+ for bubble in self.bubbles:
+ self.update(bubble.rect().toRect())
+ bubble.move(self.rect())
+ self.update(bubble.rect().toRect())
+
+ def formatInstructions(self, width, height):
+ text = self.tr("Click and drag with the left mouse button "
+ "to rotate the Qt logo.")
+ metrics = QFontMetrics(self.font())
+ border = max(4, metrics.leading())
+
+ rect = metrics.boundingRect(0, 0, width - 2*border, int(height*0.125),
+ Qt.AlignCenter | Qt.TextWordWrap, text)
+ self.image = QImage(width, rect.height() + 2*border,
+ QImage.Format_ARGB32_Premultiplied)
+ self.image.fill(qRgba(0, 0, 0, 127))
+
+ painter = QPainter()
+ painter.begin(self.image)
+ painter.setRenderHint(QPainter.TextAntialiasing)
+ painter.setPen(Qt.white)
+ painter.drawText((width - rect.width())/2, border,
+ rect.width(), rect.height(),
+ Qt.AlignCenter | Qt.TextWordWrap, text)
+ painter.end()
+
+
+if __name__ == '__main__':
+ app = QApplication(sys.argv)
+ window = GLWidget()
+ window.show()
+ res = app.exec_()
+ window.freeResources()
+ sys.exit(res)
diff --git a/examples/opengl/samplebuffers.py b/examples/opengl/samplebuffers.py
new file mode 100755
index 00000000..eabcdd31
--- /dev/null
+++ b/examples/opengl/samplebuffers.py
@@ -0,0 +1,193 @@
+#!/usr/bin/env python
+
+############################################################################
+##
+## Copyright (C) 2013 Riverbank Computing Limited.
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+############################################################################
+
+"""PySide2 port of the opengl/legacy/samplebuffers example from Qt v5.x"""
+
+import sys
+import math
+from PySide2 import QtCore, QtGui, QtWidgets, QtOpenGL
+
+try:
+ from OpenGL import GL
+except ImportError:
+ app = QtWidgets.QApplication(sys.argv)
+ messageBox = QtWidgets.QMessageBox(QtWidgets.QMessageBox.Critical, "OpenGL samplebuffers",
+ "PyOpenGL must be installed to run this example.",
+ QtWidgets.QMessageBox.Close)
+ messageBox.setDetailedText("Run:\npip install PyOpenGL PyOpenGL_accelerate")
+ messageBox.exec_()
+ sys.exit(1)
+
+
+class GLWidget(QtOpenGL.QGLWidget):
+ GL_MULTISAMPLE = 0x809D
+ rot = 0.0
+
+ def __init__(self, parent=None):
+ QtOpenGL.QGLWidget.__init__(self, QtOpenGL.QGLFormat(QtOpenGL.QGL.SampleBuffers), parent)
+
+ self.list_ = []
+
+ self.startTimer(40)
+ self.setWindowTitle(self.tr("Sample Buffers"))
+
+ def initializeGL(self):
+ GL.glMatrixMode(GL.GL_PROJECTION)
+ GL.glLoadIdentity()
+ GL.glOrtho( -.5, .5, .5, -.5, -1000, 1000)
+ GL.glMatrixMode(GL.GL_MODELVIEW)
+ GL.glLoadIdentity()
+ GL.glClearColor(1.0, 1.0, 1.0, 1.0)
+
+ self.makeObject()
+
+ def resizeGL(self, w, h):
+ GL.glViewport(0, 0, w, h)
+
+ def paintGL(self):
+ GL.glClear(GL.GL_COLOR_BUFFER_BIT)
+
+ GL.glMatrixMode(GL.GL_MODELVIEW)
+ GL.glPushMatrix()
+ GL.glEnable(GLWidget.GL_MULTISAMPLE)
+ GL.glTranslatef( -0.25, -0.10, 0.0)
+ GL.glScalef(0.75, 1.15, 0.0)
+ GL.glRotatef(GLWidget.rot, 0.0, 0.0, 1.0)
+ GL.glCallList(self.list_)
+ GL.glPopMatrix()
+
+ GL.glPushMatrix()
+ GL.glDisable(GLWidget.GL_MULTISAMPLE)
+ GL.glTranslatef(0.25, -0.10, 0.0)
+ GL.glScalef(0.75, 1.15, 0.0)
+ GL.glRotatef(GLWidget.rot, 0.0, 0.0, 1.0)
+ GL.glCallList(self.list_)
+ GL.glPopMatrix()
+
+ GLWidget.rot += 0.2
+
+ self.qglColor(QtCore.Qt.black)
+ self.renderText(-0.35, 0.4, 0.0, "Multisampling enabled")
+ self.renderText(0.15, 0.4, 0.0, "Multisampling disabled")
+
+ def timerEvent(self, event):
+ self.update()
+
+ def makeObject(self):
+ trolltechGreen = QtGui.QColor.fromCmykF(0.40, 0.0, 1.0, 0.0)
+ Pi = 3.14159265358979323846
+ NumSectors = 15
+ x1 = +0.06
+ y1 = -0.14
+ x2 = +0.14
+ y2 = -0.06
+ x3 = +0.08
+ y3 = +0.00
+ x4 = +0.30
+ y4 = +0.22
+
+ self.list_ = GL.glGenLists(1)
+ GL.glNewList(self.list_, GL.GL_COMPILE)
+
+ for i in range(NumSectors):
+ angle1 = float((i * 2 * Pi) / NumSectors)
+ x5 = 0.30 * math.sin(angle1)
+ y5 = 0.30 * math.cos(angle1)
+ x6 = 0.20 * math.sin(angle1)
+ y6 = 0.20 * math.cos(angle1)
+
+ angle2 = float(((i + 1) * 2 * Pi) / NumSectors)
+ x7 = 0.20 * math.sin(angle2)
+ y7 = 0.20 * math.cos(angle2)
+ x8 = 0.30 * math.sin(angle2)
+ y8 = 0.30 * math.cos(angle2)
+
+ self.qglColor(trolltechGreen)
+ self.quad(GL.GL_QUADS, x5, y5, x6, y6, x7, y7, x8, y8)
+ self.qglColor(QtCore.Qt.black)
+ self.quad(GL.GL_LINE_LOOP, x5, y5, x6, y6, x7, y7, x8, y8)
+
+ self.qglColor(trolltechGreen)
+ self.quad(GL.GL_QUADS, x1, y1, x2, y2, y2, x2, y1, x1)
+ self.quad(GL.GL_QUADS, x3, y3, x4, y4, y4, x4, y3, x3)
+
+ self.qglColor(QtCore.Qt.black)
+ self.quad(GL.GL_LINE_LOOP, x1, y1, x2, y2, y2, x2, y1, x1)
+ self.quad(GL.GL_LINE_LOOP, x3, y3, x4, y4, y4, x4, y3, x3)
+
+ GL.glEndList()
+
+ def quad(self, primitive, x1, y1, x2, y2, x3, y3, x4, y4):
+ GL.glBegin(primitive)
+
+ GL.glVertex2d(x1, y1)
+ GL.glVertex2d(x2, y2)
+ GL.glVertex2d(x3, y3)
+ GL.glVertex2d(x4, y4)
+
+ GL.glEnd()
+
+ def freeResources(self):
+ self.makeCurrent()
+ GL.glDeleteLists(self.list_, 1)
+
+
+if __name__ == '__main__':
+ app = QtWidgets.QApplication(sys.argv)
+
+ if not QtOpenGL.QGLFormat.hasOpenGL():
+ QMessageBox.information(0, "OpenGL pbuffers",
+ "This system does not support OpenGL.",
+ QMessageBox.Ok)
+ sys.exit(1)
+
+ f = QtOpenGL.QGLFormat.defaultFormat()
+ f.setSampleBuffers(True)
+ QtOpenGL.QGLFormat.setDefaultFormat(f)
+
+ widget = GLWidget()
+ widget.resize(640, 480)
+ widget.show()
+ res = app.exec_()
+ widget.freeResources()
+ sys.exit(res)
diff --git a/examples/opengl/textures/images/side1.png b/examples/opengl/textures/images/side1.png
new file mode 100644
index 00000000..68fd4336
--- /dev/null
+++ b/examples/opengl/textures/images/side1.png
Binary files differ
diff --git a/examples/opengl/textures/images/side2.png b/examples/opengl/textures/images/side2.png
new file mode 100644
index 00000000..b12d30d4
--- /dev/null
+++ b/examples/opengl/textures/images/side2.png
Binary files differ
diff --git a/examples/opengl/textures/images/side3.png b/examples/opengl/textures/images/side3.png
new file mode 100644
index 00000000..f582ae55
--- /dev/null
+++ b/examples/opengl/textures/images/side3.png
Binary files differ
diff --git a/examples/opengl/textures/images/side4.png b/examples/opengl/textures/images/side4.png
new file mode 100644
index 00000000..19829d2d
--- /dev/null
+++ b/examples/opengl/textures/images/side4.png
Binary files differ
diff --git a/examples/opengl/textures/images/side5.png b/examples/opengl/textures/images/side5.png
new file mode 100644
index 00000000..3843b122
--- /dev/null
+++ b/examples/opengl/textures/images/side5.png
Binary files differ
diff --git a/examples/opengl/textures/images/side6.png b/examples/opengl/textures/images/side6.png
new file mode 100644
index 00000000..798a9bb6
--- /dev/null
+++ b/examples/opengl/textures/images/side6.png
Binary files differ
diff --git a/examples/opengl/textures/textures.py b/examples/opengl/textures/textures.py
new file mode 100755
index 00000000..3c91a602
--- /dev/null
+++ b/examples/opengl/textures/textures.py
@@ -0,0 +1,232 @@
+#!/usr/bin/env python
+
+############################################################################
+##
+## Copyright (C) 2013 Riverbank Computing Limited.
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+############################################################################
+
+"""PySide2 port of the opengl/textures example from Qt v5.x"""
+
+import sys
+from PySide2 import QtCore, QtGui, QtWidgets, QtOpenGL
+
+try:
+ from OpenGL.GL import *
+except ImportError:
+ app = QtWidgets.QApplication(sys.argv)
+ messageBox = QtWidgets.QMessageBox(QtWidgets.QMessageBox.Critical, "OpenGL textures",
+ "PyOpenGL must be installed to run this example.",
+ QtWidgets.QMessageBox.Close)
+ messageBox.setDetailedText("Run:\npip install PyOpenGL PyOpenGL_accelerate")
+ messageBox.exec_()
+ sys.exit(1)
+
+import textures_rc
+
+
+class GLWidget(QtOpenGL.QGLWidget):
+ sharedObject = 0
+ refCount = 0
+
+ coords = (
+ ( ( +1, -1, -1 ), ( -1, -1, -1 ), ( -1, +1, -1 ), ( +1, +1, -1 ) ),
+ ( ( +1, +1, -1 ), ( -1, +1, -1 ), ( -1, +1, +1 ), ( +1, +1, +1 ) ),
+ ( ( +1, -1, +1 ), ( +1, -1, -1 ), ( +1, +1, -1 ), ( +1, +1, +1 ) ),
+ ( ( -1, -1, -1 ), ( -1, -1, +1 ), ( -1, +1, +1 ), ( -1, +1, -1 ) ),
+ ( ( +1, -1, +1 ), ( -1, -1, +1 ), ( -1, -1, -1 ), ( +1, -1, -1 ) ),
+ ( ( -1, -1, +1 ), ( +1, -1, +1 ), ( +1, +1, +1 ), ( -1, +1, +1 ) )
+ )
+
+ clicked = QtCore.Signal()
+
+ def __init__(self, parent, shareWidget):
+ QtOpenGL.QGLWidget.__init__(self, parent, shareWidget)
+
+ self.clearColor = QtCore.Qt.black
+ self.xRot = 0
+ self.yRot = 0
+ self.zRot = 0
+ self.clearColor = QtGui.QColor()
+ self.lastPos = QtCore.QPoint()
+
+ def freeGLResources(self):
+ GLWidget.refCount -= 1
+ if GLWidget.refCount == 0:
+ self.makeCurrent()
+ glDeleteLists(self.__class__.sharedObject, 1)
+
+ def minimumSizeHint(self):
+ return QtCore.QSize(50, 50)
+
+ def sizeHint(self):
+ return QtCore.QSize(200, 200)
+
+ def rotateBy(self, xAngle, yAngle, zAngle):
+ self.xRot = (self.xRot + xAngle) % 5760
+ self.yRot = (self.yRot + yAngle) % 5760
+ self.zRot = (self.zRot + zAngle) % 5760
+ self.updateGL()
+
+ def setClearColor(self, color):
+ self.clearColor = color
+ self.updateGL()
+
+ def initializeGL(self):
+ if not GLWidget.sharedObject:
+ self.textures = []
+ for i in range(6):
+ self.textures.append(self.bindTexture(QtGui.QPixmap(":/images/side%d.png" % (i + 1))))
+ GLWidget.sharedObject = self.makeObject()
+ GLWidget.refCount += 1
+
+ glEnable(GL_DEPTH_TEST)
+ glEnable(GL_CULL_FACE)
+ glEnable(GL_TEXTURE_2D)
+
+ def paintGL(self):
+ self.qglClearColor(self.clearColor)
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)
+ glLoadIdentity()
+ glTranslated(0.0, 0.0, -10.0)
+ glRotated(self.xRot / 16.0, 1.0, 0.0, 0.0)
+ glRotated(self.yRot / 16.0, 0.0, 1.0, 0.0)
+ glRotated(self.zRot / 16.0, 0.0, 0.0, 1.0)
+ glCallList(GLWidget.sharedObject)
+
+ def resizeGL(self, width, height):
+ side = min(width, height)
+ glViewport(int((width - side) / 2), int((height - side) / 2), side, side)
+
+ glMatrixMode(GL_PROJECTION)
+ glLoadIdentity()
+ glOrtho(-0.5, +0.5, +0.5, -0.5, 4.0, 15.0)
+ glMatrixMode(GL_MODELVIEW)
+
+ def mousePressEvent(self, event):
+ self.lastPos = QtCore.QPoint(event.pos())
+
+ def mouseMoveEvent(self, event):
+ dx = event.x() - self.lastPos.x()
+ dy = event.y() - self.lastPos.y()
+
+ if event.buttons() & QtCore.Qt.LeftButton:
+ self.rotateBy(8 * dy, 8 * dx, 0)
+ elif event.buttons() & QtCore.Qt.RightButton:
+ self.rotateBy(8 * dy, 0, 8 * dx)
+
+ self.lastPos = QtCore.QPoint(event.pos())
+
+ def mouseReleaseEvent(self, event):
+ self.clicked.emit()
+
+ def makeObject(self):
+ dlist = glGenLists(1)
+ glNewList(dlist, GL_COMPILE)
+
+ for i in range(6):
+ glBindTexture(GL_TEXTURE_2D, self.textures[i])
+
+ glBegin(GL_QUADS)
+ for j in range(4):
+ tx = {False: 0, True: 1}[j == 0 or j == 3]
+ ty = {False: 0, True: 1}[j == 0 or j == 1]
+ glTexCoord2d(tx, ty)
+ glVertex3d(0.2 * GLWidget.coords[i][j][0],
+ 0.2 * GLWidget.coords[i][j][1],
+ 0.2 * GLWidget.coords[i][j][2])
+
+ glEnd()
+
+ glEndList()
+ return dlist
+
+
+class Window(QtWidgets.QWidget):
+ NumRows = 2
+ NumColumns = 3
+
+ def __init__(self, parent=None):
+ QtWidgets.QWidget.__init__(self, parent)
+
+ mainLayout = QtWidgets.QGridLayout()
+ self.glWidgets = []
+
+ for i in range(Window.NumRows):
+ self.glWidgets.append([])
+ for j in range(Window.NumColumns):
+ self.glWidgets[i].append(None)
+
+ for i in range(Window.NumRows):
+ for j in range(Window.NumColumns):
+ clearColor = QtGui.QColor()
+ clearColor.setHsv(((i * Window.NumColumns) + j) * 255
+ / (Window.NumRows * Window.NumColumns - 1),
+ 255, 63)
+
+ self.glWidgets[i][j] = GLWidget(self, self.glWidgets[0][0])
+ self.glWidgets[i][j].setClearColor(clearColor)
+ self.glWidgets[i][j].rotateBy(+42 * 16, +42 * 16, -21 * 16)
+ mainLayout.addWidget(self.glWidgets[i][j], i, j)
+
+ self.glWidgets[i][j].clicked.connect(self.setCurrentGlWidget)
+ QtWidgets.qApp.lastWindowClosed.connect(self.glWidgets[i][j].freeGLResources)
+
+ self.setLayout(mainLayout)
+
+ self.currentGlWidget = self.glWidgets[0][0]
+
+ timer = QtCore.QTimer(self)
+ timer.timeout.connect(self.rotateOneStep)
+ timer.start(20)
+
+ self.setWindowTitle(self.tr("Textures"))
+
+ def setCurrentGlWidget(self):
+ self.currentGlWidget = self.sender()
+
+ def rotateOneStep(self):
+ if self.currentGlWidget:
+ self.currentGlWidget.rotateBy(+2 * 16, +2 * 16, -1 * 16)
+
+
+if __name__ == "__main__":
+ app = QtWidgets.QApplication(sys.argv)
+ window = Window()
+ window.show()
+ sys.exit(app.exec_())
diff --git a/examples/opengl/textures/textures.qrc b/examples/opengl/textures/textures.qrc
new file mode 100644
index 00000000..efa9e9c8
--- /dev/null
+++ b/examples/opengl/textures/textures.qrc
@@ -0,0 +1,10 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>images/side1.png</file>
+ <file>images/side2.png</file>
+ <file>images/side3.png</file>
+ <file>images/side4.png</file>
+ <file>images/side5.png</file>
+ <file>images/side6.png</file>
+</qresource>
+</RCC>
diff --git a/examples/opengl/textures/textures_rc.py b/examples/opengl/textures/textures_rc.py
new file mode 100644
index 00000000..2e9faeea
--- /dev/null
+++ b/examples/opengl/textures/textures_rc.py
@@ -0,0 +1,797 @@
+#############################################################################
+##
+## Copyright (C) 2013 Riverbank Computing Limited.
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+# Resource object code
+#
+# Created: Wed Dec 28 19:57:29 2005
+# by: The Resource Compiler for PyQt (Qt v4.1.0)
+#
+# WARNING! All changes made in this file will be lost!
+
+from PySide2 import QtCore
+
+qt_resource_data = b"\
+\x00\x00\x05\x3e\
+\x89\
+\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
+\x00\x01\x00\x00\x00\x01\x00\x08\x03\x00\x00\x00\x6b\xac\x58\x54\
+\x00\x00\x00\xa5\x50\x4c\x54\x45\x00\x7c\xf8\x00\x80\xf8\x08\x80\
+\xf8\x08\x84\xf8\x10\x84\xf8\x10\x88\xf8\x18\x88\xf8\x18\x8c\xf8\
+\x20\x90\xf8\x28\x90\xf8\x28\x94\xf8\x30\x94\xf8\x30\x98\xf8\x38\
+\x98\xf8\x38\x9c\xf8\x40\x9c\xf8\x40\xa0\xf8\x48\xa4\xf8\x50\xa4\
+\xf8\x50\xa8\xf8\x58\xa8\xf8\x58\xac\xf8\x60\xb0\xf8\x68\xb0\xf8\
+\x68\xb4\xf8\x70\xb4\xf8\x70\xb8\xf8\x78\xbc\xf8\x80\xbc\xf8\x80\
+\xc0\xf8\x88\xc4\xf8\x90\xc4\xf8\x90\xc8\xf8\x98\xcc\xf8\xa0\xcc\
+\xf8\xa0\xd0\xf8\xa8\xd4\xf8\xb0\xd8\xf8\xb8\xd8\xf8\xb8\xdc\xf8\
+\xc0\xdc\xf8\xc0\xe0\xf8\xc8\xe0\xf8\xc8\xe4\xf8\xd0\xe4\xf8\xd0\
+\xe8\xf8\xd8\xe8\xf8\xd8\xec\xf8\xe0\xec\xf8\xe0\xf0\xf8\xe8\xf4\
+\xf8\xf0\xf4\xf8\xf0\xf8\xf8\xf8\xf8\xf8\xf8\xfc\xf8\xce\x99\xaa\
+\x77\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x00\x48\x00\x00\x00\
+\x48\x00\x46\xc9\x6b\x3e\x00\x00\x04\x3f\x49\x44\x41\x54\x78\xda\
+\xed\xdd\xe1\x76\xd2\x40\x10\x05\xe0\x0d\x34\x05\x91\x62\x28\x82\
+\x14\x24\x16\x53\xc4\x88\x18\x13\xd3\x79\xff\x47\xf3\x8f\x9e\xee\
+\x20\x25\x9b\x9e\xb6\xb6\x73\xef\x3e\x40\x0f\xfb\x41\x93\xbd\x33\
+\x13\x70\x02\xbe\x1c\x01\x08\x40\x00\x02\x10\x40\x1c\xe0\x22\x00\
+\x01\x08\xa0\x01\xa0\x2e\x7d\x04\x20\x00\x01\x08\x40\x00\x02\x10\
+\x80\x00\x04\x20\x00\x01\x08\x40\x00\x02\x10\x80\x00\x04\x20\x00\
+\x01\x08\x40\x00\x02\x10\x80\x00\x04\x20\x00\x01\x08\x40\x00\x02\
+\x10\xe0\x05\xac\x9f\xd9\x7c\x38\x02\x05\xa8\xf3\x74\xd2\x73\xce\
+\xb9\x1e\x20\x40\x91\xcd\x87\xd1\xdf\x21\x96\x2e\x16\x40\x9d\xa7\
+\x93\xf3\x63\x63\x3c\x08\x00\xea\x8d\x07\x03\xa8\xf3\xf4\x32\x3e\
+\x39\xc8\x65\x18\xa0\x3c\xfe\xc6\xc3\x00\x54\xbd\xa0\x51\x3e\xbb\
+\x00\x53\x87\x0d\x70\xe3\xb0\x01\xaa\x18\x1c\x60\xe2\xb0\x01\x32\
+\x87\x0d\x50\xc6\xe0\x00\x63\x87\x0d\x90\x39\x6c\x80\xf2\x0c\x1c\
+\x60\xec\xb0\x01\x32\x87\x0d\x10\x74\x07\xb0\x0c\x70\xe9\xb0\x01\
+\x32\x87\x0d\x50\xc5\xe0\x00\x7e\x06\x88\x00\x01\x54\x08\x5e\xe0\
+\x01\xa8\x2a\x50\xbf\xc6\x03\x98\xf9\x1b\xdc\x0a\x1c\xc0\xd6\xdf\
+\xdf\x4c\xe0\x00\xea\xbe\xb7\xbd\xb8\xc2\x03\xb8\xf2\xb7\x97\x09\
+\x1c\xc0\x37\xff\xb6\x97\x08\x1e\xc0\xc0\x3f\x02\x14\x78\x00\x2b\
+\x7f\x73\x4b\x81\x03\x28\x3a\xea\x08\x80\x07\x90\xf8\x7b\xdb\x08\
+\x1c\xc0\xda\xdf\xda\x58\xe0\x00\x54\x08\xec\x14\x78\x00\xaa\x13\
+\xba\x12\x38\x00\x75\x06\xfe\x73\x05\x44\x02\x50\x67\x60\xf7\x45\
+\xe0\x00\x96\xfe\xbe\x26\x02\x07\xf0\xc3\x3f\x03\x77\x4b\x3c\x00\
+\x75\x04\x48\x05\x0e\x40\xd5\x81\x07\x02\x07\xa0\xeb\xc0\x39\x1e\
+\xc0\xfc\xa0\x0c\x84\x06\xb0\x8b\x0e\xca\x40\x68\x00\x43\x7f\x4f\
+\x6b\x81\x03\x50\x21\x68\x28\x70\x00\xea\x0a\x18\xed\xf0\x00\x3e\
+\xf8\x3b\x9a\x0b\x1c\xc0\xa9\x2b\x20\x04\xc0\xf0\xb0\x10\x0e\x06\
+\xf0\xd9\xdf\xcf\x85\xc0\x01\xd4\xe7\xf7\x9e\x01\x31\x00\x54\xfb\
+\x3b\x11\x38\x80\x42\x0d\x40\xec\xf0\x00\xc6\xf7\x94\x41\x50\x00\
+\x36\xee\x9f\x56\x18\x16\xc0\x9b\xfb\x53\x20\x04\xc0\xb5\xbf\x97\
+\x4e\x09\x07\xa0\xcb\x20\x0b\x81\x03\x50\xb7\xc0\xb3\x0a\x0e\x40\
+\xdf\x02\x53\x81\x03\x50\xcf\x44\xf5\x6a\x38\x80\xdc\x9d\xa8\x03\
+\x21\x00\xa8\x14\xd8\x17\x38\x00\x3d\x11\x7e\x03\x07\x70\xdb\x3f\
+\x55\x08\x04\x00\xf8\xe4\xf4\x44\x2c\x1a\xc0\xaf\xb8\x29\x06\x1b\
+\x07\x50\xcd\xf0\xa3\x31\xd8\x36\x40\xd9\x69\x8c\xc1\xb6\x01\x66\
+\xcd\x31\xd8\x34\x80\x3e\x04\xcf\x04\x0e\xe0\x7d\x40\x0c\xb6\x0c\
+\xf0\xdd\x05\xc4\x60\xcb\x00\xe3\x90\x18\x6c\x18\x40\xa7\xa0\x54\
+\xe0\x00\x46\x41\x31\xd8\x2e\xc0\x36\x2c\x06\xdb\x05\x18\x85\xc5\
+\x60\xb3\x00\xdb\xc0\x18\x6c\x16\x60\x18\x18\x83\xad\x02\x6c\x42\
+\x63\xb0\x55\x80\x61\x68\x0c\x36\x0a\xb0\x09\x8e\xc1\x46\x01\x2e\
+\x82\x63\xb0\x4d\x00\x7d\x0b\xd8\xe3\x01\xbc\xf3\x5f\xfc\xa5\xc0\
+\x01\xe4\xad\xaf\x00\xc6\x00\x92\xb6\xb7\x00\x63\x00\x3b\xf5\xda\
+\xbf\xe2\x01\x4c\x5a\x1e\x02\xad\x01\xec\xa3\x76\x29\xc0\x1c\xc0\
+\xac\x5d\x0c\x34\x07\x50\xaa\x0f\xc0\x35\x1e\x80\x1a\x88\xe9\xd6\
+\x70\x00\x55\xb7\x45\x29\xd8\x22\xc0\x2a\xbc\x19\x64\x12\xe0\xf6\
+\xbc\x75\x0c\xb2\x05\xa0\x1e\x0b\x38\x36\x16\x6f\x1d\xc0\xff\x7e\
+\x1c\x37\x12\x38\x80\xb6\xa5\x50\x73\x00\xe3\x07\x1d\x82\xec\x00\
+\xec\xdb\x35\x43\xec\x01\xa8\x53\x70\x4f\xe0\x00\xf4\x21\x68\x8d\
+\x07\x90\x3e\xfc\x03\x60\x03\xa0\xe9\xb7\x62\x1e\x79\x15\x2f\x0d\
+\xe0\xe6\x79\xf7\x1f\xd2\x6f\x7a\x5e\x80\x04\x1c\x60\xef\xc0\x01\
+\xe6\xe0\x00\x75\x17\x1c\xe0\xda\x81\x03\x0c\xc0\x01\x72\x07\x0e\
+\x30\x05\x07\xa8\x22\x70\x80\xbd\x43\xff\x17\x40\xff\x04\xc8\x5b\
+\x5e\x04\xc1\x01\x52\x74\x80\x2d\x3a\x40\x89\x0e\x20\x31\x3a\x40\
+\x82\x0e\x70\x85\x0e\xf0\x08\xaf\xc4\xe0\xb3\xc3\x04\x20\x00\x01\
+\x08\x40\x00\x02\x10\x80\x00\x04\x20\x00\x01\x08\x40\x00\x02\x9c\
+\x58\x0d\xbf\x3b\x5c\x9b\x07\x68\x28\x29\x56\xe6\x01\x76\x4f\x3f\
+\x10\xf6\xb2\x01\x36\xa7\x01\x72\xf3\x00\x0d\x7d\x95\xcc\x3c\x40\
+\x43\x67\x6d\x69\x1e\xa0\x61\xc8\x34\xb1\x0e\xd0\x34\x5e\xd0\xb5\
+\x0e\xf0\xb1\xa9\x07\x90\x1b\x07\x68\x1c\xb3\x9e\xd9\x06\x58\x37\
+\x76\x81\xba\x95\x65\x80\x2a\x60\xce\x7e\x69\x19\x20\x64\xba\x24\
+\x2a\xec\x02\xac\x82\x5a\xa1\x83\xda\x2a\xc0\x22\xb0\x19\x9c\xd4\
+\x26\x01\xf6\xa3\xe0\x76\xf8\x60\x67\x0e\xa0\xde\x4c\xda\xcc\x17\
+\x46\xd3\xfc\x15\x03\xac\x96\x07\x6b\x31\xbd\x68\x3f\x5d\x19\x27\
+\xf3\xbb\xbf\x50\xbc\x2a\x80\x27\x18\x25\xdd\x12\x80\x00\x04\x20\
+\x00\x01\x08\x40\x00\x02\x18\x28\x8a\xfe\xaf\x45\x00\x02\x10\x80\
+\x00\x04\x20\x00\x01\x08\x40\x00\x02\x10\x80\x00\x04\x20\x00\x01\
+\x08\x40\x00\x02\x10\x80\x00\x04\x20\x00\x01\x08\x40\x00\x02\x10\
+\x80\x00\x04\x20\x00\x2a\x00\xda\x22\x00\x01\x08\x70\x07\x80\xbb\
+\x08\x40\x00\x02\x10\x00\x7a\xfd\x06\x0e\x4c\xb1\x67\x70\xf4\x76\
+\x0b\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
+\x00\x00\x07\xa7\
+\x89\
+\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
+\x00\x01\x00\x00\x00\x01\x00\x08\x03\x00\x00\x00\x6b\xac\x58\x54\
+\x00\x00\x00\x8d\x50\x4c\x54\x45\x78\xfc\x00\x80\xfc\x00\x80\xfc\
+\x08\x80\xfc\x10\x88\xfc\x10\x88\xfc\x18\x88\xfc\x20\x90\xfc\x20\
+\x90\xfc\x28\x90\xfc\x30\x98\xfc\x30\x98\xfc\x38\x98\xfc\x40\xa0\
+\xfc\x40\xa0\xfc\x48\xa0\xfc\x50\xa8\xfc\x50\xa8\xfc\x58\xa8\xfc\
+\x60\xb0\xfc\x60\xb0\xfc\x68\xb0\xfc\x70\xb8\xfc\x70\xb8\xfc\x78\
+\xc0\xfc\x80\xc0\xfc\x88\xc0\xfc\x90\xc8\xfc\x90\xc8\xfc\x98\xc8\
+\xfc\xa0\xd0\xfc\xa0\xd0\xfc\xa8\xd0\xfc\xb0\xd8\xfc\xb0\xd8\xfc\
+\xb8\xd8\xfc\xc0\xe0\xfc\xc0\xe0\xfc\xc8\xe0\xfc\xd0\xe8\xfc\xd0\
+\xe8\xfc\xd8\xe8\xfc\xe0\xf0\xfc\xe0\xf0\xfc\xe8\xf0\xfc\xf0\xf8\
+\xfc\xf0\xf8\xfc\xf8\xa0\x01\x02\x2a\x00\x00\x00\x09\x70\x48\x59\
+\x73\x00\x00\x00\x48\x00\x00\x00\x48\x00\x46\xc9\x6b\x3e\x00\x00\
+\x06\xc0\x49\x44\x41\x54\x78\xda\xed\xdd\xdb\x62\x9b\x38\x10\x06\
+\x60\x4b\x85\x42\x21\x66\xa1\x26\x1c\x8a\x03\x81\x9a\x40\x21\xf0\
+\xfe\x8f\xb7\x17\xbb\x6d\xe2\xc6\x18\x8c\xf5\x13\x81\x86\xcb\x36\
+\x17\xf8\x33\x16\xd2\x68\x66\xb4\xeb\x15\xbf\x76\x04\x40\x00\x04\
+\x40\x00\x04\xd0\xef\x14\xbc\x08\x80\x00\x08\xe0\x1c\x40\xa9\xa1\
+\x8f\x00\x08\x80\x00\x08\x80\x00\x08\x80\x00\x08\x80\x00\x08\x80\
+\x00\x08\x80\x00\x08\x80\x00\x08\x80\x00\x08\x80\x00\x08\x80\x00\
+\x08\x80\x00\x08\x80\x00\x08\x80\x00\x08\x80\x00\x08\x80\x00\x08\
+\x80\x00\x08\xe0\xae\xab\x43\xde\x7c\xd7\x49\x0f\xf0\xcc\x76\x5c\
+\x37\xac\x07\xc7\x3b\x04\x61\x9c\x3c\x65\x79\x51\x56\x75\xd3\x4e\
+\xba\xf3\xae\x6d\xea\xaa\x3c\x15\x79\x96\x3e\x1d\x7f\xc4\x51\x18\
+\xf8\x07\xcf\x75\xf6\xb6\x65\x1a\xba\xc6\xd9\x6e\xc7\x7f\x49\x0e\
+\x50\xf2\xc1\xcc\x2c\xc6\x35\xdd\x30\x4d\xcb\xde\x3b\x8e\xeb\x79\
+\x07\xff\x31\xf8\xf0\xf9\xc6\x2f\x47\x72\x80\x00\x9d\xe0\x66\x48\
+\x0e\x10\xa1\x01\x7c\xc9\x01\x12\x34\x40\x26\x39\x40\x8a\x06\x68\
+\x25\x07\x28\xc0\x9f\xdf\x94\xfd\x35\x58\x82\x01\x3c\xd9\x01\x6a\
+\x30\xc0\x0f\xd9\x01\x5a\x30\x40\x21\xfd\x4c\x10\x0c\xf0\x4b\x7a\
+\x00\x0e\xfd\xfc\x4c\xfe\xc5\x90\x0e\x05\xd0\xe4\x07\x30\x65\x7f\
+\x0b\xa2\x01\x6c\x28\x80\x25\x3f\xc0\x1e\x0a\x60\xcb\x0f\xe0\xaa\
+\x0e\x70\x50\x1d\xe0\x51\x75\x80\x50\x75\x80\x58\xf5\xb7\x00\x36\
+\x22\xf2\x4d\x7e\x80\x54\xf5\x89\x50\x26\x79\x48\x14\x0e\x90\xab\
+\xbe\x16\xc0\xc6\xc4\x56\xb0\x1a\x04\xc7\xc4\xe4\xdf\x1a\x7b\x51\
+\xfd\x2d\x50\x41\x7f\x01\x95\xfc\x00\xf5\x87\xfd\xc0\xff\x36\x04\
+\xff\xec\x08\xfa\x41\x18\x46\x71\x9c\x1c\x8f\x69\x96\xe5\x45\x71\
+\x2a\xcb\xb2\x3c\xfd\x2c\xf2\x3c\xcb\xd2\xa7\x63\x92\xc4\x51\x14\
+\x86\x81\xef\x1f\xbe\x7b\xae\xeb\xec\xf7\xb6\x6d\x99\xa6\xf1\x55\
+\xd7\x34\x1e\xf5\xf2\x03\x34\x67\x00\x61\x2f\xdf\xb5\x28\x40\xa4\
+\x1e\xc0\x79\x5c\x3c\x56\x1d\x20\x51\x0f\xe0\xf5\x0c\xe0\xa8\x1e\
+\x40\x77\x06\xf0\xa4\x3a\x40\xaa\x3a\x40\xa6\x3a\x40\xae\x3a\x40\
+\xa1\x3a\xc0\x4f\xd5\x01\x4e\xaa\x03\x94\xaa\x03\x54\xaa\x03\xd4\
+\xaa\x03\x34\xaa\x03\xb4\x04\xa0\x38\x40\xa7\x3a\x40\xaf\x38\x00\
+\x53\x1d\x80\x13\x80\xe2\x00\x9a\xea\x00\xba\xea\x00\x86\xea\x00\
+\xa6\xea\x00\xdf\x54\x07\xb0\x54\x07\xb0\x55\x07\xd8\xab\x0e\xe0\
+\x5c\xfc\x93\xf6\x74\x0c\xbd\xbd\xa9\x6b\x9c\xed\xd8\x17\xdd\x30\
+\x6d\xf7\x31\xce\x4e\xaf\x1b\x04\x70\x3f\xfc\xf7\x4b\xe2\x1a\x83\
+\x39\x70\x6e\x94\x77\x5b\x06\xe8\x32\x4f\x1b\x4d\x82\x79\x88\x5f\
+\xd6\x0d\xf0\x3a\x50\xe6\xd8\x65\xee\xd4\x7a\x2a\x3d\xac\x57\x0c\
+\x70\x96\x1f\x70\xf8\xfd\xaf\xa7\xc3\x6d\xd5\x64\xf6\xb1\x5b\x2b\
+\x40\xf3\xb1\xd6\xbd\x4d\x66\x54\x52\x69\x71\xb7\x01\x80\xa0\xef\
+\xfb\xea\x30\xb3\x94\x10\x45\xb0\x64\x9a\x5c\xd8\x3f\xdf\x53\x45\
+\xf6\x35\x5f\x21\xc0\x59\xa6\xa8\x6d\xdc\x5b\x2c\xde\xae\x0e\xe0\
+\x24\x38\x3d\x3c\x5f\x1b\x80\xf0\x6c\xf1\x70\x65\x00\xcf\xc2\x13\
+\x84\x9d\x76\x55\x00\x80\x92\x19\xb3\x5d\x13\x00\xa2\x68\x4a\xac\
+\xc0\x1a\xcb\xe6\xcc\x66\x3d\x00\x98\xc2\x49\xb3\x5b\x0d\x80\x8f\
+\x29\x95\x70\x57\x03\xe0\x81\x8a\x45\xe2\xb5\x00\xa0\xca\xe7\x59\
+\xb1\x12\x00\x58\x03\x05\xa3\x5b\x07\x80\x05\xab\x98\x0a\xd6\x01\
+\x60\xc0\x00\xd8\xcb\x2a\x00\x34\x18\xc0\xee\x61\x15\x00\x0c\x07\
+\x20\x28\xf1\x16\x0b\xd0\x21\xeb\x26\xf7\x2b\x00\x68\xa0\x95\xb3\
+\xa5\xfc\x00\x03\x95\xb3\xcc\xf2\xa2\xb4\xa8\x9a\xd7\xbe\xef\xdb\
+\xa6\x2e\x8e\xa1\x37\x67\xb4\xf4\xe4\x07\xb8\x10\x10\xe2\x4e\x7c\
+\xf1\x9b\x6b\x73\xff\xd6\xc6\x63\xbc\x93\x1e\xe0\xef\xfe\x09\xcc\
+\xcd\xae\xdd\x74\xe9\xdf\x16\x32\x4e\xa5\x07\x38\x8f\x87\xe8\xd1\
+\xe8\x4a\xbe\x4b\xf4\x85\x87\x41\x2c\xc0\xfb\x78\x88\x3e\xad\x6c\
+\xb2\x8b\xa7\x3f\x05\xac\x95\x1d\xe0\xad\xb1\x32\x9f\xbe\x7e\x6b\
+\xa7\xaf\xa0\x72\xd9\x01\x82\x79\x11\xfd\x27\xbe\xdc\x82\x00\x3c\
+\x0f\xf0\xd9\xac\x70\x7e\x35\x71\x24\xb0\x64\x07\xe8\xfb\xca\x99\
+\x15\xc9\x6e\xa6\x2d\x23\x59\x27\x3d\x40\xdf\x9f\x66\x45\x6f\x3a\
+\x6b\xa1\xc9\x20\x1e\x60\xe6\xd5\x1a\xcb\xcc\x04\xa4\x05\xe8\xeb\
+\x29\x4b\xe9\x68\xc3\x00\x93\xfa\x90\x79\x5b\x06\x98\x12\x53\xb7\
+\x37\x0d\xd0\x8d\xbf\x0c\xcd\x4d\x03\x4c\xd8\x5a\x35\xb6\x0d\x30\
+\x1e\x54\xd6\x36\x0e\x30\x3a\x0e\xf2\x8d\x03\x8c\x86\xd5\xd9\xd6\
+\x01\x62\xd5\x9f\x80\xb1\xa8\xaa\xbe\x75\x80\xb1\xf6\xf4\xe6\xe6\
+\x01\x62\x95\x27\x42\x7d\x3f\xda\x94\xd4\xd9\x3c\xc0\xc8\x29\x25\
+\xde\xf6\x01\xf6\xe0\xbc\x49\xe9\x01\x7c\x65\xe3\x01\xff\x5f\xd7\
+\x33\x0d\xab\xed\x03\xe4\xe0\xd6\xd2\xd2\x03\x54\xd8\x69\x80\xfc\
+\x00\xbf\xc0\xfb\xc3\xd2\x03\x5c\x3d\xaf\x2d\x51\x00\xe0\x6a\x92\
+\x49\xad\x00\x40\x8f\x1d\x02\xd6\xfd\x04\x84\x2a\x00\x34\xe0\x3c\
+\x31\xe9\x01\x6a\x64\x40\x70\x0d\x00\x57\xea\xce\x7c\x99\x01\x2a\
+\x57\x50\x61\x4b\x8a\x9c\x07\xc3\x00\x5a\x9f\x89\x2a\x70\x8b\xd6\
+\x98\x28\x19\x7f\xd9\xed\x76\x5c\xcc\x23\x30\x7c\x5e\x5d\x26\x2b\
+\xc0\xb3\x21\x32\xa1\xdd\xc4\xc5\x43\x41\x00\x7f\xaa\x64\x98\x88\
+\xc6\x07\x1d\x03\x57\xcd\x88\x07\x78\x7b\x66\xff\x11\x70\x7f\x83\
+\xb5\xb7\x5a\x27\x2b\x40\x2a\xb4\x97\x78\x30\x04\x20\xea\xb0\x06\
+\xf1\x00\x8d\xd0\xc2\x9e\xaf\xc0\x65\x00\x6a\x10\x34\x04\xe6\xf1\
+\x95\xc0\x14\x49\x18\xc0\xbb\x30\x26\xbb\x77\xb6\xee\x43\xe7\x00\
+\x20\x80\xf7\x7b\xda\xfa\x7d\x93\x81\x76\x60\x57\x80\x55\x32\x03\
+\xb4\xe2\x8a\x5c\x63\x78\xe1\x28\x64\x26\x68\x8a\xba\xd7\x56\x43\
+\xff\x00\x30\x00\x67\x3f\x5c\x76\xc7\x70\x35\xf0\x0e\xd4\x64\x2f\
+\x9f\x3f\xef\x9b\xc1\x67\xff\x5e\x6b\x86\x5c\x04\x00\x01\xda\xf3\
+\x1b\xd7\xe7\x4e\x89\x2d\x60\x18\x00\xbb\x1a\xfc\xeb\xce\x67\x0a\
+\x04\xf8\x01\x00\x05\xf0\xf7\xad\xeb\x73\x7e\x05\x29\xbe\x7b\x04\
+\x0c\xe0\xc3\x7e\x9e\x76\xfb\x84\xa8\xb8\x3c\x00\xe8\xa2\x4f\xa9\
+\x80\x00\xbc\x7e\xb8\x79\x7e\xeb\x3e\xf6\xcf\xcb\x53\x20\x2e\xbc\
+\xbf\x22\x26\x24\x76\x61\xf8\xf2\x6f\x7a\x74\xb3\xcb\xdf\x3f\x17\
+\x7f\x56\x15\x06\xe0\xd2\xf8\x65\xde\x50\xdd\x11\x0d\x7c\x7e\xc0\
+\x49\x4d\x18\x80\x8b\x9b\xfa\x2c\x98\xf8\x10\x34\x03\xb9\x71\x1a\
+\xe2\xa0\x26\x50\x54\x78\x60\x04\x9b\x14\xc5\x18\xaa\x9c\xd4\x21\
+\xbd\x45\x41\xfb\x02\x43\x69\xde\x46\x32\xf6\x14\xa4\x43\xe9\xc1\
+\x06\xa6\xb7\x2a\x08\xe0\x71\x78\x3f\x2b\xb8\xf2\x20\xb7\x91\xbe\
+\x54\x17\x39\x30\xc0\xd5\x3c\x77\x23\x28\x2e\x3d\x07\x75\xf2\x30\
+\x18\x02\x66\xb0\x23\x8b\x41\x00\xed\x58\x9a\xbb\x75\x48\xf2\xea\
+\xf7\x97\xda\x96\x69\xe4\x5c\x2b\x12\xd3\x70\x47\x35\xa2\xf6\x06\
+\xa7\x75\x84\x60\x5c\xd3\xb5\xf1\x46\x2b\x36\xf0\x90\x32\x14\xc0\
+\x41\x5c\xab\x10\x0e\x3d\xb0\x1a\x05\x70\x14\xd7\x2c\x06\x7b\x48\
+\x1f\x6c\x7b\x5c\xd0\xc7\xd7\xd0\x67\x15\xc3\x12\x24\xb8\x88\x8f\
+\xcf\x7c\xf8\x01\x75\x30\x00\x01\x7d\xe4\xd8\xf7\x05\x8e\xa8\x84\
+\x01\xdc\xdf\x4c\xd3\x5d\xe4\x88\x52\x18\x40\x76\xe7\xb7\xef\xbd\
+\xf4\xfd\xaa\x01\xee\xea\xa2\x35\xa1\xe1\x8e\xf4\x00\x7d\x30\xb7\
+\x95\x1e\x73\x96\x3c\xa3\x1c\x98\x26\xd7\xa5\x33\x9a\xe9\xb3\x7d\
+\xb2\xec\xd9\xb4\xd8\x3c\xc1\x3a\xba\xe9\x34\x09\xee\xa6\x8b\x9f\
+\xcb\x0a\x4f\x94\xac\x93\xfd\xa4\xae\x8a\x9a\x13\x15\x9f\x71\x28\
+\xeb\x22\x99\xa2\xa7\xd8\x35\xae\x28\x68\xb6\x9f\x7e\xda\xa1\xd4\
+\x8b\xa5\xca\x76\x2f\x59\x1c\xb8\x7b\xcb\xd0\x38\x67\x3b\xc6\x75\
+\xc3\xb4\xf7\x6e\x90\xe4\xd5\xe7\x1e\xc6\x2b\x7f\xbd\x00\x01\x10\
+\x00\x01\x10\x00\x01\x10\x00\x01\x10\x00\x01\x10\x00\x01\x10\x00\
+\x01\x10\x00\x01\x10\x00\x01\x10\x00\x01\x10\x00\x01\x10\x00\x01\
+\x10\x00\x01\x10\x00\x01\x10\x00\x01\x10\x00\x01\x40\x00\x54\xbb\
+\x08\x80\x00\x08\xe0\x0d\x40\xdd\x8b\x00\x08\x80\x00\x08\x40\xe9\
+\xeb\x5f\x29\x7e\x47\x9c\x8c\x3f\x1d\xdc\x00\x00\x00\x00\x49\x45\
+\x4e\x44\xae\x42\x60\x82\
+\x00\x00\x09\x8e\
+\x89\
+\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
+\x00\x01\x00\x00\x00\x01\x00\x08\x03\x00\x00\x00\x6b\xac\x58\x54\
+\x00\x00\x00\xf0\x50\x4c\x54\x45\xf8\x00\x78\xf8\x00\x80\xf8\x04\
+\x80\xf8\x08\x80\xf8\x0c\x80\xf8\x10\x80\xf8\x10\x88\xf8\x14\x88\
+\xf8\x18\x88\xf8\x1c\x88\xf8\x20\x88\xf8\x20\x90\xf8\x24\x90\xf8\
+\x28\x90\xf8\x2c\x90\xf8\x30\x90\xf8\x30\x98\xf8\x34\x98\xf8\x38\
+\x98\xf8\x3c\x98\xf8\x40\x98\xf8\x40\xa0\xf8\x44\xa0\xf8\x48\xa0\
+\xf8\x4c\xa0\xf8\x50\xa0\xf8\x50\xa8\xf8\x54\xa8\xf8\x58\xa8\xf8\
+\x5c\xa8\xf8\x60\xa8\xf8\x60\xb0\xf8\x64\xb0\xf8\x68\xb0\xf8\x6c\
+\xb0\xf8\x70\xb0\xf8\x70\xb8\xf8\x74\xb8\xf8\x78\xb8\xf8\x7c\xb8\
+\xf8\x80\xb8\xf8\x80\xc0\xf8\x84\xc0\xf8\x88\xc0\xf8\x8c\xc0\xf8\
+\x90\xc0\xf8\x90\xc8\xf8\x94\xc8\xf8\x98\xc8\xf8\x9c\xc8\xf8\xa0\
+\xc8\xf8\xa0\xd0\xf8\xa4\xd0\xf8\xa8\xd0\xf8\xac\xd0\xf8\xb0\xd0\
+\xf8\xb0\xd8\xf8\xb4\xd8\xf8\xb8\xd8\xf8\xbc\xd8\xf8\xc0\xd8\xf8\
+\xc0\xe0\xf8\xc4\xe0\xf8\xc8\xe0\xf8\xcc\xe0\xf8\xd0\xe0\xf8\xd0\
+\xe8\xf8\xd4\xe8\xf8\xd8\xe8\xf8\xdc\xe8\xf8\xe0\xe8\xf8\xe0\xf0\
+\xf8\xe4\xf0\xf8\xe8\xf0\xf8\xec\xf0\xf8\xf0\xf0\xf8\xf0\xf8\xf8\
+\xf4\xf8\xf8\xf8\xf8\xf8\xfc\xf8\xd6\xac\x3e\xe0\x00\x00\x00\x09\
+\x70\x48\x59\x73\x00\x00\x00\x48\x00\x00\x00\x48\x00\x46\xc9\x6b\
+\x3e\x00\x00\x08\x44\x49\x44\x41\x54\x78\xda\xed\xdd\x6b\x5b\xda\
+\x48\x14\x00\xe0\x40\x52\x01\x05\x54\xac\xc8\x4a\x11\x61\x2d\x56\
+\xa4\x5c\xaa\x60\x15\xb9\x88\x60\x00\x49\xce\xff\xff\x37\xfb\xa1\
+\xbb\xed\xb6\x0f\x73\x83\x99\x30\xc9\x9c\xf9\xac\x79\x98\x37\x99\
+\xfb\x99\x19\x0b\x0c\x4f\x16\x02\x20\x00\x02\x20\x00\x02\x80\x65\
+\x60\x42\x00\x04\x40\x80\xdf\x01\x8c\xaa\xfa\x10\x00\x01\x10\x00\
+\x01\x10\x00\x01\x10\x00\x01\x10\x00\x01\x10\x00\x01\x10\x00\x01\
+\x10\x00\x01\x10\x00\x01\x10\x00\x01\x10\x00\x01\x10\x00\x01\x10\
+\x00\x01\x10\x00\x01\x10\x00\x01\x10\x00\x01\x10\x60\xf7\x69\xe5\
+\x4e\x86\x4f\x0f\xdd\xce\xa3\x61\x00\xf3\xe7\xbb\x9b\xf2\xd9\x51\
+\x32\xfe\x33\x96\xa7\xb8\x34\x04\xc0\x1f\xb7\x2f\x73\x1f\xd6\x44\
+\x33\x25\x9f\xa2\x0f\xe0\xf5\xaf\x4f\xe2\xe4\x80\xae\xaa\x17\x69\
+\x80\x79\xbb\x60\x33\x42\xda\x32\xe3\xc8\x02\xbc\x77\xf2\x31\x8e\
+\xa0\xbe\x78\x3d\x9a\x00\xe3\xb2\xcd\x1b\xd7\x98\x9b\x45\x0f\xa0\
+\x77\x2c\x12\xd9\xe9\xb8\xd1\x02\xf0\x3b\x69\xb1\xd0\xd6\x46\xb4\
+\xbe\x80\x7b\xc1\xec\x5b\xb5\x48\xd5\x01\xfd\xac\x68\x68\x73\x25\
+\x4a\x95\xe0\xec\x9c\x23\xc7\x76\x36\x5f\xba\xaa\x37\x5a\xed\x4e\
+\xbb\x59\xff\x7c\x1d\xa1\x66\xd0\xaf\x33\x6a\xfe\x58\xa6\xf4\xb5\
+\x3f\x8f\xec\x60\x68\x44\xff\xfa\xd3\x95\xde\x52\xfd\x8f\xd8\x1d\
+\x80\x5f\xa3\x75\x7b\xb2\x37\xaf\x11\x1f\x0e\x8f\x29\xaf\xdf\xa9\
+\xbc\x44\x7e\x3e\xa0\x41\x1e\xf0\xa4\xdb\x1e\x40\xc4\x01\x16\x67\
+\xc4\xec\x1f\xf5\x0c\x98\x11\x1a\x24\x49\xd9\x3f\xe8\x9a\x30\x25\
+\xd6\x22\x7d\xfe\x4e\xc3\x37\x60\x4e\xd0\xbb\x20\xbd\xfe\x73\x17\
+\x20\xfa\x00\xee\x11\x21\xfb\x7b\x5d\x00\x03\x00\x5e\x48\xc5\xff\
+\x74\x0e\x26\x00\xf4\x1d\x42\xfe\xaf\x01\x4c\x00\xb8\x27\x54\x7f\
+\x4e\x0f\x8c\x00\x68\x10\x5e\x7f\x72\x02\x46\x00\xd4\x49\x5d\xbf\
+\x19\x18\x01\x70\x4b\xc8\xff\xe1\x02\x8c\x00\x20\xe5\x3f\xb3\xd3\
+\xfc\x07\x07\x40\x2a\xff\xe9\x39\x18\x01\xf0\x8d\x90\xff\xc4\x0c\
+\x8c\x00\x78\x22\xb4\x7f\xf6\x08\x8c\x00\x78\x21\xf5\x7f\xba\x60\
+\x04\x80\x4b\xea\xff\x56\xc1\x08\x00\xef\x90\x90\xff\x63\xdf\x0c\
+\x80\x32\x69\xf8\x3f\x03\x23\x00\xda\xa4\xf1\x7f\x1b\x8c\x00\x18\
+\x93\xe6\x7f\xf2\x60\x04\xc0\x32\x45\x5a\xf0\x9a\x99\x01\x50\x22\
+\x15\x80\x3a\x18\x01\xf0\x9d\x94\xff\x7d\xdf\x08\x80\x65\x82\x04\
+\x70\x0f\x46\x00\x14\x89\xeb\x1f\x60\x04\x00\xb1\x00\x58\x0f\x46\
+\x00\x78\x07\xc4\xc5\x5f\x30\x02\xe0\x86\xf8\x01\x74\x8c\x00\x70\
+\x89\xf1\x1f\x09\xcf\x08\x80\x62\x30\x71\x5e\xda\x02\x8c\xc8\x11\
+\x10\x53\x23\x00\xc8\x31\x00\x39\x30\x01\x60\x48\xfe\x00\x9a\x46\
+\x00\xe4\xc9\x00\xae\x09\x00\x94\x0f\xe0\x18\x4c\x00\x28\x90\x01\
+\xae\x4d\x00\x98\x52\x82\x00\x07\x26\x00\x54\x29\x51\x80\xbe\x01\
+\x00\x2b\x87\x0c\x90\x07\x03\x00\x9a\x56\x48\xaa\x00\x55\x00\x19\
+\x0a\xc0\xa3\x01\x00\x63\x5a\x14\xf8\xc2\x00\x80\x2b\x4a\xfe\x93\
+\x10\x7d\x00\x3f\x69\x85\xa5\x0e\x54\x03\xf0\x44\x2b\x01\x57\x06\
+\x00\x94\x68\x00\x2d\x03\x00\xf6\x68\x00\xfd\xe8\x03\x0c\xa9\x5b\
+\x81\x28\x2b\x62\xb3\x6e\xbd\x7c\x9a\x4d\x3a\x76\xcc\x4e\xa4\x32\
+\x27\x17\xf5\xee\x24\x94\x00\x35\xea\x46\x30\x42\x47\xf8\xad\x75\
+\xbe\xee\xc3\x71\x0a\x8d\x71\xe8\x00\xa8\x9b\xc1\xd6\xb6\x82\xab\
+\x56\x8e\xb6\x7d\xac\xee\x86\x0a\xc0\xa5\x96\x80\x35\x93\x01\x6e\
+\xd5\x61\x6c\x9d\x8c\xe5\x07\x21\x02\xe8\x50\xf3\x52\xf8\xf3\xcf\
+\x17\xd5\x38\xcf\x86\xd9\xfc\x30\x34\x00\x65\x6a\x46\x2e\xff\xf8\
+\xeb\x96\x63\x71\xa6\xe2\x22\x24\x00\x69\x81\xad\xdf\x53\x91\x73\
+\x03\xf6\xee\x42\x01\xb0\x10\xd8\xfb\xdf\xb6\x2d\xa1\x74\xbe\x0a\
+\x01\x40\x8f\x9e\x87\xff\xad\x0a\x7a\x25\xe1\x5b\xc1\xb2\x6f\xfa\
+\x03\x5c\xd1\xb3\xf0\x6b\x6f\xc8\xfc\x68\x83\x7b\xd1\x12\x43\xed\
+\x01\x3e\xd2\x73\xf0\xf3\x28\xa4\xd7\xd4\x46\x37\xc3\x39\x43\xdd\
+\x01\xf6\xe8\x19\x18\xfd\xd7\x5f\x76\xac\xcd\x92\x33\xd6\x1b\x60\
+\xce\xf8\xfd\xff\xee\x8a\x7f\xb6\xad\x4d\xd3\xde\xab\xd6\x00\x4f\
+\x8c\x9f\xff\x63\x2c\xd4\xdf\x3c\xff\x96\x95\x59\xe9\x0c\xd0\x60\
+\xfc\xfa\x39\x00\xc0\x70\x9b\xfc\x5b\x56\x51\x67\x00\x56\xd3\xb6\
+\x04\x80\xc9\x87\x2d\xef\xc8\x6c\x6a\x0c\x70\xc2\xf8\xed\x2b\xca\
+\xf6\x01\xee\x24\x31\xcc\x56\x3a\x00\xab\x71\xf3\xe0\x3d\x6b\x6d\
+\x9d\xce\xb4\x05\xf0\x59\x07\xc2\xf9\xfe\xa9\x8c\x8b\x62\x7b\xba\
+\x02\xcc\x58\xbf\xdc\xaf\x48\xb9\x29\x37\xe5\x6b\x0a\xf0\xcc\xfa\
+\xe5\x6d\x49\x77\x05\xb7\x35\x05\xb8\x63\x9e\x87\x28\x09\xe0\xc0\
+\xd7\x13\xe0\x56\xb4\x3e\x3f\xbd\xbe\x1f\xb9\x4b\xdf\x9b\x4f\xba\
+\xb5\x93\x98\xc0\x7f\x7e\xd3\x13\xa0\x26\x92\xfb\xf8\xf9\xc3\xef\
+\xef\x71\xd1\xca\x70\xff\xf3\xa1\x9e\x00\x97\xfc\xd9\x8f\x95\xd7\
+\xb5\xe6\x3d\x6e\x82\x17\x2d\x01\x8a\xfc\x3d\xfa\x11\xa1\x21\xad\
+\x71\x56\x13\x55\x2d\x01\xb8\x1b\xf9\x22\x39\x5e\x7a\x98\xe0\x9b\
+\x1b\xf1\x75\x04\x38\xb4\x24\xbc\xbe\x19\x5f\x31\x78\xd4\x11\xe0\
+\x80\x2f\xff\x25\xc6\xc4\x2a\x97\xc0\x95\x8e\x00\x7c\xf3\x5c\x39\
+\xd6\xd7\x3b\xdf\xe7\xa9\x45\x74\x04\xe0\x2a\xbe\x36\x3b\x5c\x7e\
+\xcc\x53\x13\xba\x1a\x02\xec\xc9\x3a\x17\x98\xa7\xcb\xdc\xd1\x10\
+\xc0\x96\x36\x90\x29\x04\x73\xc0\xae\x6c\x80\xb8\xb4\x17\xf7\xc6\
+\xb6\xcc\x69\x08\x20\xb1\xfd\xae\xb3\x67\xc8\xc3\xf9\x05\x7c\xe6\
+\x7c\x94\xc7\xae\x50\xa7\xfa\x01\x70\x2c\x77\x70\xc7\xfd\xb0\x47\
+\x96\x0f\xfa\x01\xb0\xdf\xda\x3e\xf7\xb3\x56\x4c\xcd\x56\x18\x3b\
+\x42\x02\x55\x37\x73\xf6\xac\xa6\x1f\x00\xfb\xa8\x7c\x81\xe9\xcc\
+\xf1\x96\x3d\xea\x5d\x00\x64\xa5\x76\xdf\x58\x4f\x3b\xd5\x0f\x80\
+\x19\xf2\x22\x14\x2c\xfe\x45\xfd\x68\x40\x36\xc0\x47\x66\xb4\x97\
+\xc8\xd3\x58\x65\xe0\x20\x84\x33\x42\x15\x99\x75\x6a\x52\x3f\x80\
+\xaa\x8c\x81\xd0\xaf\xf4\x89\xfe\xb0\x0f\xfa\x01\x30\xfb\xaf\x62\
+\xe7\xc7\xb5\x18\xd3\xca\xfa\x01\x7c\x63\x01\x3c\x83\xc4\x4a\x20\
+\xa6\x1f\x00\x2b\x40\xc4\x12\x8b\x6f\xf1\xe9\x63\x0b\x5b\x3f\x80\
+\x17\x16\x80\xe0\x11\xa2\xf4\xc9\xc1\x84\x7e\x00\x0b\x16\x80\xe0\
+\xbd\x29\xe7\x61\x6b\x06\x99\xc3\x41\xc1\xe3\x53\x6a\x61\xeb\x08\
+\x31\xbb\x82\x82\xab\x19\x2d\xd1\xcd\x07\x3b\x07\x60\x05\x49\x09\
+\x3e\x8e\x1e\x79\xfc\x51\x43\x80\xba\xdc\x22\x30\xa0\x3e\xec\x93\
+\x86\x00\x3d\x76\x94\x98\x48\x9a\x86\x6d\x3e\x80\xf1\x8b\x85\xb7\
+\x4e\xcf\x55\xc7\xc9\x48\x07\x60\x74\x5d\x44\x57\x73\x96\x7c\xa1\
+\xe7\x1a\x01\xb0\x9a\x01\xc1\xad\x90\x1e\x47\xe0\xb1\x66\x00\x8c\
+\xf1\x60\x7f\x83\x1f\x48\x1c\x0a\xf8\x3a\x02\x74\x65\x8e\x06\xc1\
+\x57\xbd\x3c\x2c\x1f\xc0\x95\x3a\x93\xbd\xa2\x3d\xab\xac\x25\x00\
+\x63\x16\xa7\x26\xb1\x12\x6c\xeb\x09\xf0\x49\x66\xac\xff\x5c\x62\
+\x85\x1a\x14\x00\xbd\xfb\x2e\x78\x9c\xec\x44\xed\x6c\x80\x12\x80\
+\x99\xcc\x69\xbc\xbe\xda\x91\x80\x9a\xed\xf3\x19\x89\x33\x22\xb4\
+\x36\xe5\x56\x57\x00\xfa\x18\xfe\xbb\xd0\xb3\x9a\x6a\x17\xc7\x77\
+\x71\x84\x86\xd8\x49\x5a\x94\x6e\x95\x9c\xb3\x89\x55\x00\xd0\xd7\
+\xc8\xc5\x76\xbb\x28\x3f\x96\x50\x09\x00\xf5\x04\x01\xb1\xd3\xf4\
+\x28\xab\xcd\x63\x7d\x01\xe8\x73\xe3\x22\xa7\x61\xac\xc8\x3b\x08\
+\xd2\xa0\x2f\x00\xec\xcb\xaa\x04\x06\xca\xf7\x0e\xaa\x01\xb8\x91\
+\xd5\x15\x22\xef\x43\x75\x56\x3a\x03\xb8\x31\x49\x8b\x43\x05\xc5\
+\xbb\x05\x94\x1d\xa8\x78\x26\xa7\x0c\xf8\xb6\xda\x4e\x80\x3a\x80\
+\x9e\x9c\x38\xb1\x27\xf5\x5b\x47\x15\x01\xd0\xbb\xc3\xdc\x71\x52\
+\xc4\x1d\x48\xb1\x89\xee\x00\xf7\x32\x62\x7c\x3d\xe2\x3a\xdb\x05\
+\xe8\x0e\x40\x8f\x97\x1b\x6e\xa9\x68\xbb\xfa\x03\xdc\x49\xf8\x04\
+\xb2\x0a\x17\x44\x94\x03\xf8\xe9\xad\xa7\x46\x1f\x89\x1b\x0e\xde\
+\x43\x00\x40\x6f\x08\xb8\xb2\x70\xa4\x70\x3d\x24\x00\x00\xf8\x6b\
+\xcb\x20\xd7\x96\xea\x3e\x90\x6a\x00\xd7\xd9\xaa\x10\xb8\xa4\x83\
+\x46\xd2\x5e\x48\x00\xa8\xb3\x39\xcc\xfb\x66\x7d\xd2\x19\x93\xf1\
+\x11\x84\x05\x00\x72\xd4\x00\xa7\xd9\x66\x7d\x20\xc9\x77\x34\x29\
+\x05\x98\x51\x37\xd1\xa5\x68\xbd\xb9\xab\x00\x5a\x40\xf5\x00\xe4\
+\x86\xec\xc7\x88\x96\xb8\x50\x4a\x3e\x68\xa4\x08\xa1\x02\x60\x6c\
+\xfb\x89\xd5\xd6\x4f\x8f\xcd\x89\x87\x11\xe5\xbc\x90\x01\xb0\x76\
+\xbd\x64\xd7\x34\xe9\x7e\x93\xd8\x7c\x9c\x84\xe1\x44\xc9\x3f\x12\
+\x2b\x7e\x3e\xd7\xfb\xfd\xa5\xbe\x37\xc8\x8b\xab\x67\x0a\xee\x68\
+\x53\x0e\xe0\x33\x77\x10\x38\xa5\xce\xf8\x47\x51\x58\x0e\xbe\xe6\
+\x29\x11\x36\x45\x15\xb7\xb3\x28\x07\x00\xbf\xcc\xb3\x9f\xda\x49\
+\xa5\x93\x8c\x20\xd3\x8a\x92\xdb\x69\xd4\x03\x30\xa6\x48\x79\x93\
+\xad\xe8\x96\xd6\x20\x00\xa0\x6b\x6f\x9d\xff\xcc\x2b\x84\x18\x00\
+\x5e\x33\x5b\xe6\xbf\xac\xec\x8a\xca\x60\x00\xc0\xfb\x1c\xdb\xe6\
+\xf5\x2b\xbc\x94\x21\x20\x00\x80\xe1\xe1\xc6\xa5\xff\x56\xe5\xdd\
+\x5c\x81\x01\x00\xb4\x13\x9b\x64\x3f\x7e\xa1\xf6\x76\xc2\x00\x01\
+\x60\x75\x2b\x4c\x60\xff\xad\xfa\x72\xc6\x20\x01\x00\xbc\xb6\xd0\
+\x71\x9a\xc9\x2f\x4b\x80\x48\x01\x00\xc0\xe0\x92\xf3\x48\x59\xa7\
+\x1c\xc8\x7d\x34\x81\x03\x00\xf8\xdf\x2b\xcc\x53\x06\x52\xa5\x5e\
+\x40\xb7\x12\xee\x00\x00\x00\x60\xda\xb9\xcc\x12\x7a\xfd\xb1\xcc\
+\xe5\xdd\x1b\x04\x96\x76\x04\x00\x00\xe0\xbf\x76\x6f\xab\x85\x5c\
+\x26\xe9\xd8\xb1\x98\x93\x3c\xc8\xe6\xce\xaa\xcd\xc7\x69\xc0\xf7\
+\x51\xee\x10\x40\x8f\x84\x00\x08\x80\x00\x08\x80\x00\x08\x80\x00\
+\x08\x80\x00\x08\x80\x00\x08\x80\x00\x08\x80\x00\x08\x80\x00\x08\
+\x80\x00\x08\x80\x00\x08\x80\x00\x08\x80\x00\x08\x80\x00\x08\x80\
+\x00\x08\x60\x2a\x80\x69\x09\x01\x10\x00\x01\x7e\x01\x98\x9b\x10\
+\x00\x01\x10\x00\x01\x8c\x4e\xff\x00\xf3\x6b\xd4\xa5\x75\x51\x85\
+\x33\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
+\x00\x00\x04\x14\
+\x89\
+\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
+\x00\x01\x00\x00\x00\x01\x00\x08\x03\x00\x00\x00\x6b\xac\x58\x54\
+\x00\x00\x00\x9f\x50\x4c\x54\x45\xf8\x7c\x00\xf8\x80\x00\xf8\x80\
+\x08\xf8\x84\x08\xf8\x84\x10\xf8\x88\x10\xf8\x88\x18\xf8\x8c\x18\
+\xf8\x8c\x20\xf8\x90\x20\xf8\x94\x28\xf8\x94\x30\xf8\x98\x30\xf8\
+\x98\x38\xf8\x9c\x38\xf8\xa0\x40\xf8\xa4\x48\xf8\xa4\x50\xf8\xa8\
+\x50\xf8\xa8\x58\xf8\xac\x58\xf8\xb0\x60\xf8\xb0\x68\xf8\xb4\x68\
+\xf8\xb4\x70\xf8\xb8\x70\xf8\xb8\x78\xf8\xbc\x78\xf8\xc0\x80\xf8\
+\xc4\x88\xf8\xc8\x90\xf8\xc8\x98\xf8\xcc\x98\xf8\xd0\xa0\xf8\xd4\
+\xa8\xf8\xd4\xb0\xf8\xd8\xb0\xf8\xd8\xb8\xf8\xdc\xb8\xf8\xe0\xc0\
+\xf8\xe0\xc8\xf8\xe4\xc8\xf8\xe4\xd0\xf8\xe8\xd0\xf8\xec\xd8\xf8\
+\xec\xe0\xf8\xf0\xe0\xf8\xf0\xe8\xf8\xf4\xe8\xf8\xf4\xf0\xf8\xf8\
+\xf0\xf8\xf8\xf8\xf8\xfc\xf8\x35\x75\xa4\x70\x00\x00\x00\x09\x70\
+\x48\x59\x73\x00\x00\x00\x48\x00\x00\x00\x48\x00\x46\xc9\x6b\x3e\
+\x00\x00\x03\x1b\x49\x44\x41\x54\x78\xda\xed\xdd\x61\x73\xd2\x40\
+\x10\x80\xe1\x8b\x10\x23\x1a\x01\x23\x69\x6c\x0b\xb1\x80\x0d\x62\
+\x10\x62\xe8\xff\xff\x6d\xb6\xd5\xd1\x92\x12\x72\x29\x38\x72\xbb\
+\xef\x7e\xce\xb0\xec\x33\xc9\x5d\xb8\xd9\x1d\xcc\x9d\xf2\x30\x00\
+\x00\x00\x00\x00\x00\xdc\x19\x85\x01\x00\x00\x00\xec\x02\xa8\x5a\
+\xfa\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
+\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
+\x00\x00\x00\x00\x00\x00\x00\x80\xff\x18\x45\xae\x1a\x20\x1b\x79\
+\x91\x5e\x80\xf5\xb8\x77\xff\x35\xde\x68\x05\x98\x0d\xbd\xa7\xbd\
+\x3b\xca\x00\xf2\x4b\xbf\xd2\xbc\xa4\x09\xa0\x48\xc3\xe7\xdd\x5b\
+\x7a\x00\x6e\x23\x6f\x5f\xfb\x9a\x12\x80\xfc\x2a\xa8\xe9\xdf\xd3\
+\x00\x50\xb9\xf5\xb5\x01\xcc\xab\xb7\xbe\x2a\x80\xaf\x89\xdf\xd0\
+\xc2\x2a\x19\x60\xf5\xf8\xc2\xa3\x15\xa0\x48\xdf\x5b\x35\x31\xcb\
+\x04\x28\xa7\x43\xcf\xb2\x8b\x5b\x20\xc0\x76\x1e\x75\xec\xdb\xd8\
+\xc5\x01\x64\x71\xb7\x55\x1f\xbf\x2c\x80\xec\xc2\x6f\x3b\xc8\x20\
+\x08\x60\x91\xbc\x7e\xc1\x24\x87\x14\x80\xac\x65\xf5\xb2\x00\xb2\
+\xd8\x7f\xf1\x2c\x8f\xf3\x00\xe5\x6c\xd4\x3d\x66\x98\xc9\x6d\x80\
+\xcd\xcd\xf0\xd5\x91\xd3\x5c\x0e\x03\xe4\xe3\xbe\x77\xfc\x38\x9b\
+\xa3\x00\xe5\x97\x8b\xe0\x34\xf3\x7c\x2e\x02\x2c\x27\x03\xef\x64\
+\x03\x8d\xae\x01\xe4\x69\xe4\x9b\xd3\x84\x83\x00\xab\x0f\xa7\x2a\
+\xde\x51\x80\xcc\xae\x32\x2f\x4a\x02\x99\x00\x0b\x9b\xf2\x3b\x97\
+\xeb\xfb\xd3\x00\x5f\x24\xc0\xb2\xb9\x2a\x7f\x5c\x3c\x5e\x9a\x88\
+\x04\xf8\xde\x54\x53\x2f\x2d\x7f\x5f\x3a\x15\x09\x50\x1e\xae\xe8\
+\xdd\xb4\xd5\xcd\xe2\xe2\x36\x78\xe8\xc9\x1e\xdc\xee\x6c\x18\x32\
+\x01\xfa\xf5\x0b\xff\xb2\x72\x26\x2a\x13\x20\xae\x29\x3f\x5e\xb5\
+\x7c\x5a\x5c\x05\x48\x6b\xf7\xbd\xbd\xa9\xe5\x01\xec\x59\xda\x82\
+\xc9\x8f\xda\xd4\x02\x7f\x0b\x54\xcf\xbb\x7b\x37\xdb\x03\xa9\x05\
+\x02\x0c\x77\x4a\x08\x67\x87\x53\x0b\x04\xf8\xfc\x74\xdf\xcb\x9a\
+\x52\x0b\x04\x58\xff\x59\xf8\x47\xdf\x9a\x53\x4b\x3c\x0f\xf8\xf5\
+\x26\xd0\x49\x56\x36\xa9\x25\x02\x3c\x6c\x84\xfe\x75\x61\x97\x5a\
+\x22\x40\xe1\x05\x93\xd2\x36\xb5\xc8\x33\xc1\x45\x8b\xd4\x7a\xfb\
+\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
+\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
+\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
+\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
+\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
+\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
+\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
+\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
+\x00\x00\x00\x00\x38\x5f\x80\xad\x76\x80\x4d\x33\x40\x21\x1a\xc0\
+\xe2\x7f\xda\x73\xd1\x00\x93\x66\x80\xa9\x68\x80\x7e\x33\x40\x2c\
+\x19\xc0\xe2\x09\x30\xfe\x56\x30\x40\x68\x01\x60\x52\xb9\x00\xb1\
+\x4d\xfd\xa6\xbb\x16\x0a\x50\x8e\x8c\x5d\xbc\xdd\x88\x04\x98\xf7\
+\x8c\x6d\x04\x99\x38\x80\xe5\xd8\xbe\xfc\x87\x18\xcc\x4a\x37\x01\
+\xae\x9f\xc7\x55\x12\x85\x1d\xd3\x3a\xbc\xf0\xe3\xa7\xea\x47\x4d\
+\xce\x1e\xa0\x34\xff\x34\x7c\x00\x00\x00\x00\x00\x00\x00\x00\x00\
+\x00\x87\x4f\x85\xcf\x23\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
+\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
+\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x40\x2b\x80\xb6\x00\
+\x00\x00\x00\xfe\x02\xe8\x0d\x00\x00\x00\x00\x00\xd5\xf1\x13\x3b\
+\x45\x7a\xc4\xe1\x22\xe3\x41\x00\x00\x00\x00\x49\x45\x4e\x44\xae\
+\x42\x60\x82\
+\x00\x00\x06\xe8\
+\x89\
+\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
+\x00\x01\x00\x00\x00\x01\x00\x08\x03\x00\x00\x00\x6b\xac\x58\x54\
+\x00\x00\x00\x8a\x50\x4c\x54\x45\x00\xfc\x78\x00\xfc\x80\x08\xfc\
+\x80\x10\xfc\x80\x10\xfc\x88\x18\xfc\x88\x20\xfc\x88\x20\xfc\x90\
+\x28\xfc\x90\x30\xfc\x90\x30\xfc\x98\x38\xfc\x98\x40\xfc\x98\x40\
+\xfc\xa0\x48\xfc\xa0\x50\xfc\xa0\x50\xfc\xa8\x58\xfc\xa8\x60\xfc\
+\xa8\x60\xfc\xb0\x68\xfc\xb0\x70\xfc\xb0\x70\xfc\xb8\x78\xfc\xb8\
+\x80\xfc\xb8\x80\xfc\xc0\x88\xfc\xc0\x90\xfc\xc0\x90\xfc\xc8\x98\
+\xfc\xc8\xa0\xfc\xd0\xa8\xfc\xd0\xb0\xfc\xd0\xb0\xfc\xd8\xb8\xfc\
+\xd8\xc0\xfc\xe0\xc8\xfc\xe0\xd0\xfc\xe0\xd0\xfc\xe8\xd8\xfc\xe8\
+\xe0\xfc\xe8\xe0\xfc\xf0\xe8\xfc\xf0\xf0\xfc\xf0\xf0\xfc\xf8\xf8\
+\xfc\xf8\x60\x3b\x5e\x10\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\
+\x00\x48\x00\x00\x00\x48\x00\x46\xc9\x6b\x3e\x00\x00\x06\x04\x49\
+\x44\x41\x54\x78\xda\xed\xdd\x61\x77\xa2\x38\x14\x06\x60\x42\x61\
+\x60\xa4\xba\xd0\x76\x74\x75\x51\x2a\x32\x50\x62\xf8\xff\x7f\x6f\
+\x3b\x9d\x3d\x67\xdb\x01\x14\x85\x24\x37\xe4\xcd\x77\xcf\xe9\x7d\
+\x2a\xe1\xe6\xe6\x26\x3a\x8d\xe5\xc3\x01\x00\x00\x00\x00\x00\x00\
+\x34\x8e\x85\x03\x00\x00\x00\xc0\x57\x00\xab\xa6\x3e\x00\x00\x00\
+\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
+\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
+\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
+\x00\x26\x1e\x55\x9e\xae\x93\x28\xf4\x5d\x97\x31\xd7\xf3\x83\x30\
+\x4a\xd6\x69\x56\x08\x1b\x00\xc4\x71\xf3\xe8\xf6\x75\x2c\x06\xf1\
+\xf6\xc8\xe7\x0c\x50\xed\x1e\xd9\xd5\xbe\xcd\x70\x9d\x8b\x59\x02\
+\xf0\x7f\x16\x43\x7b\x57\xd9\xea\x20\xe6\x06\x50\x24\xec\xa6\xfe\
+\x5d\x37\xc9\xe7\x04\x70\x8c\xee\xe8\x61\x0e\x52\x31\x13\x80\xe3\
+\xe2\xce\x36\x6e\x6f\xcb\x67\x00\x50\x44\x23\x3a\xd9\xdd\x9d\xe9\
+\x00\x75\x32\xb2\x99\x3f\x38\x1a\x0d\x90\xba\xe3\xcf\x33\x2c\x6b\
+\x63\x01\xca\xc5\x24\x27\x3a\x1e\x32\x43\x01\x36\x6c\xaa\x43\x2d\
+\x4f\xc2\x40\x80\x89\xfe\xfd\xff\xcd\x04\x95\x71\x00\x53\x3c\xfd\
+\x9f\xdf\x88\x85\x59\x00\x3c\x9e\xfa\x68\x97\x7b\x34\x0a\xe0\xdb\
+\xf4\x87\xdb\xd8\xc1\x20\x00\x2e\xe3\x78\x1f\xcb\xcd\x01\x28\xa4\
+\x1c\x70\x74\x4f\xc6\x00\x1c\xe5\x1c\xf1\xf4\x2a\x53\x00\x52\x49\
+\x87\x5c\xbf\x0b\x43\x00\x36\xb2\x8e\xf9\xbe\x18\x02\x90\xc8\x02\
+\x70\x32\x33\x00\x1e\xa5\x01\x78\xdc\x08\x80\x40\xde\x59\xf7\x17\
+\x23\x00\x98\x3c\x00\x56\x1a\x00\xc0\x1d\x89\x63\x69\x00\xc0\x80\
+\x3c\x88\xb9\x77\x7f\x4b\x0a\xfa\x00\x97\xf2\x20\x6f\xb5\xcd\x8a\
+\x8f\x99\x4c\xf0\x22\xdb\xae\xbc\x9b\x01\x12\xfa\x00\xbd\x79\xd0\
+\x62\xdb\x7e\x82\xcb\x4d\x78\xe3\x2c\xc0\xc9\x03\x74\xe7\x41\xee\
+\xba\x2f\x93\x3d\xc5\x37\x3d\x0f\x7f\x93\x07\xe8\xca\x83\xbc\xdd\
+\xa5\x34\xb6\x5c\xde\x52\x1e\x22\x0f\xd0\xde\x09\x60\x3f\xce\x57\
+\x3e\x93\xdd\x30\x19\x54\xd4\x01\x5a\x79\x50\x38\x60\xe6\xae\x87\
+\x7f\x09\x76\xd4\x01\xfe\x7c\xa2\xe3\x61\x8b\xb8\xe7\xa1\x00\x8f\
+\xc4\x01\xfe\xcc\x83\xd6\x43\x3f\xb8\x1e\xfa\x1e\x20\x0e\x50\xdc\
+\x19\xff\xf0\x55\xe4\x4f\xda\x00\xaf\x5f\xfe\xd8\xbf\xc6\x4d\x9f\
+\x9d\xe3\x40\x1b\xe0\x4b\x1e\xe4\xdf\x94\xb6\xd4\xc3\x76\x13\xd6\
+\xb4\x01\xbe\x3c\xca\xfb\xdb\x3e\x7b\x18\x04\xb0\xa2\x0d\xf0\xf9\
+\x49\xf6\xc7\xe7\x10\x5d\x29\x35\x6d\x80\x68\x4c\xfd\xe2\x34\x04\
+\x20\xa4\x0d\xf0\x39\x0f\xba\x7d\x33\x63\x48\x3e\xe4\xd3\x06\xf8\
+\x94\x07\xb1\xdb\xeb\xd8\x43\xf6\x14\x5c\xd2\x00\x7c\x64\xf9\xc6\
+\x57\x99\x09\xc9\x00\x28\x46\x66\xed\x2f\xa6\x7f\x03\x5e\x47\xa6\
+\x6c\xf9\x80\xe2\x38\x69\x80\x74\xec\x1f\xca\x14\x56\x04\x64\x00\
+\xac\xc7\x96\xef\xae\xa7\x02\x11\x69\x80\x64\x6c\xce\x7e\x7d\x51\
+\x98\x90\x06\xf8\xf4\x0f\xbc\xaf\xc3\x6f\x6f\xf8\x5a\x20\x18\x9b\
+\xb0\xe5\x86\xaf\x06\xd9\xd8\x7f\x54\xa9\x70\x6f\x44\x02\x00\x1f\
+\x93\x07\xff\x5e\x13\x9b\x5d\x11\x2a\xc6\xe4\xc1\x1f\x43\xa8\x7b\
+\x09\xc8\x00\xc8\xc6\x6f\x63\x5e\x03\xd8\x90\x06\x48\xc7\x57\xaf\
+\xaf\x01\x1c\x69\x03\x04\xee\xc8\xa9\xea\x7c\x6d\x25\x20\x48\x03\
+\x7c\x4c\x63\x3f\xf3\x43\xba\xbd\xfb\xd3\xca\x0a\x62\x44\x8f\xce\
+\x56\x57\x00\xf6\x73\x07\x38\x19\xbf\x3d\x3e\x72\x64\x97\x01\xe2\
+\x66\xee\x00\x3b\x65\xef\x00\xa2\x00\x2f\x8a\x0a\xa2\x64\x01\x2e\
+\xd7\x03\xb6\xf3\x07\xb8\xd8\x2a\xe1\xf2\xd9\x03\xd4\x33\xe8\x14\
+\x95\xf7\x12\x60\x6f\xf3\x07\xb8\x38\x07\x3e\x37\xf3\x07\xb8\x74\
+\xde\x90\x55\xf3\x07\xe0\x6c\x06\x07\x26\xc6\x8c\xbd\xba\x57\x00\
+\x4d\x80\x58\x4d\x7f\x1c\x59\x00\xe1\xaa\x68\x0b\x20\x0c\x70\xa9\
+\x47\xe6\x64\x03\xc0\x4a\x51\x9f\x3c\x55\x80\x0b\xef\x00\x9f\xdb\
+\x00\xb0\x55\xb4\x0c\x26\x0b\xd0\xdf\x1e\xf2\xd4\xd8\x00\xd0\xbf\
+\x0e\x08\xce\x56\x00\xf4\x96\x02\x98\x61\x37\x48\xdc\x39\x72\x85\
+\x29\x10\x49\x80\x48\xc5\x56\x00\x61\x80\xde\x7a\x78\x28\xec\x00\
+\xe8\xfb\x02\xb8\x55\x63\x05\x40\xdf\x2b\x80\x49\xbc\x4e\x8c\x14\
+\x40\xdf\x99\xf3\xb4\xb1\x03\x60\x27\xbd\x23\x8a\x36\x40\xdf\x61\
+\x91\xb8\xb1\x04\xa0\x67\x19\xb8\x14\x96\x00\xf4\xcc\x80\x0b\xc9\
+\xf7\x8a\x92\x01\xe0\xdd\xab\xa0\x50\xf6\xa5\xa2\x64\x00\x12\x3d\
+\xf1\x93\x01\xc8\x34\xc5\x4f\x05\xa0\xf6\x34\xc5\x4f\x05\xa0\xf3\
+\xde\xa1\x85\x8a\x7b\xd6\x69\x00\x74\xde\x38\x11\x9d\x1b\x5b\x00\
+\x72\xa6\xfe\xfd\x4f\x09\xa0\x73\x02\x58\x29\xba\x5e\x9e\x00\x80\
+\x58\x28\xcf\x7f\x69\x01\x24\x8a\xb6\x40\xa8\x02\xec\x54\x6c\x82\
+\x13\x06\xc8\x98\xe2\xf5\x2f\x31\x80\xc2\x95\x7a\x1a\x80\x3c\x40\
+\xe5\xc9\xee\x03\xa4\x0d\xc0\x03\xb5\xf5\x2f\x6a\x00\xe7\xf6\x0b\
+\x90\xed\x1b\x7b\x00\x44\xa4\xe8\xfa\x6c\xaa\x00\xed\x1a\x18\xcb\
+\x1a\x8b\x00\x62\x55\x17\xc8\x13\x05\xe8\x88\x3f\x6f\x2c\x02\x88\
+\x95\x5c\x9d\x4e\x17\x20\x56\xf6\x13\x12\x34\x01\xda\xf3\x9f\x57\
+\x36\xf6\x00\x88\xf6\x55\x41\x7e\xd5\xd8\x03\xd0\x11\x7f\xa0\x2b\
+\x7e\x1d\x00\xe7\x76\xfe\x13\xd6\x8d\x3d\x00\x7c\xa1\xa5\xfc\x4d\
+\x06\x80\x87\x7a\xca\xdf\x54\x00\xea\x76\xfc\x91\x68\xec\x01\xa8\
+\x03\x5d\xe5\x6f\x1a\x00\xd5\x37\x6d\xe5\x6f\x12\x00\x95\xaf\xaf\
+\xfc\x4d\x01\xa0\xf4\x35\x96\xbf\x09\x00\x14\x9e\xce\xf2\xb7\x7e\
+\x80\xe2\x41\x6b\xf9\x5b\x3b\xc0\xc9\xd5\x5b\xfe\xd6\x0d\x90\xbb\
+\xca\xfa\xbf\x49\x02\x1c\x5d\xdd\xe5\x6f\xbd\x00\xaf\x4c\x7b\xf9\
+\x5b\x2b\x40\x7b\xff\x4f\x7d\xf9\x5b\x27\xc0\x81\x11\x28\x7f\x6b\
+\x04\xd8\x33\x0a\xe5\x6f\x7d\x00\x29\x8d\xf2\xb7\x36\x80\x1d\x91\
+\xf2\xb7\x2e\x80\x2d\x95\xf2\xb7\x26\x80\x76\x03\xa0\x3f\x45\xf9\
+\x5b\x70\x43\x00\x7e\x8c\x3a\xfe\x24\xf8\x5b\x59\x9c\xf2\xec\xb0\
+\x4f\xb7\x9b\xf5\x4b\x12\xaf\x96\x51\x18\xf8\x0f\xec\xfe\xdb\x4a\
+\x15\x03\x74\x5d\x07\x53\xb7\xc3\xac\xab\xf7\x30\x5f\xdf\xc3\xdc\
+\xbd\x87\xf9\xfc\x2b\xcc\xef\x81\xef\xb9\x6a\xae\x93\x92\x09\xf0\
+\xd4\x79\x0b\x4a\xba\xdb\xbe\x87\x99\xbc\x87\xb9\xb8\x1a\x66\xff\
+\x48\x0d\x00\x90\xf7\xcb\xb3\x53\xde\xac\x2c\x0f\x20\x96\x19\x3f\
+\xfd\x39\x40\xac\xa4\xc6\x3f\xdd\x6d\x22\x92\x00\xc4\x52\x6e\xfc\
+\x4e\x49\x1b\x40\x44\x92\xe3\x9f\xee\x17\x07\xe5\xfc\xda\xdc\x42\
+\x76\xfc\x0e\xa7\x0c\xa0\x20\x7e\xe7\x4c\x18\x80\x87\xf2\xe3\x77\
+\x04\x5d\x80\x3a\x50\x10\xff\x74\xd9\xfa\xe4\x00\x6f\x4a\xe2\xa7\
+\x0b\x50\xf9\x8e\xd5\x00\xa5\xa2\xf8\xa9\x02\x94\x9e\x63\x35\x40\
+\xa1\x2c\x7e\xa2\x00\x2b\x07\x00\x00\x00\x00\x00\x00\xa0\x62\x08\
+\xdb\x01\x38\x00\x2c\x07\xa8\x6d\x07\xa8\x6c\x07\x28\x6c\x07\xa0\
+\x5e\x16\x37\x67\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
+\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\
+\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x60\x2b\x80\
+\x6d\x03\x00\x00\x00\xc0\xff\x00\xf6\x0e\x00\x00\x00\x00\x00\xb0\
+\x7a\xfc\x0b\x43\xd4\xc6\xc6\x44\x07\xe4\xaa\x00\x00\x00\x00\x49\
+\x45\x4e\x44\xae\x42\x60\x82\
+\x00\x00\x09\x13\
+\x89\
+\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
+\x00\x01\x00\x00\x00\x01\x00\x08\x03\x00\x00\x00\x6b\xac\x58\x54\
+\x00\x00\x00\xed\x50\x4c\x54\x45\x78\x00\xf8\x80\x00\xf8\x80\x04\
+\xf8\x80\x08\xf8\x80\x0c\xf8\x88\x10\xf8\x88\x14\xf8\x88\x18\xf8\
+\x88\x1c\xf8\x88\x20\xf8\x90\x20\xf8\x90\x24\xf8\x90\x28\xf8\x90\
+\x2c\xf8\x90\x30\xf8\x98\x30\xf8\x98\x34\xf8\x98\x38\xf8\x98\x3c\
+\xf8\x98\x40\xf8\xa0\x40\xf8\xa0\x44\xf8\xa0\x48\xf8\xa0\x4c\xf8\
+\xa0\x50\xf8\xa8\x50\xf8\xa8\x54\xf8\xa8\x58\xf8\xa8\x5c\xf8\xa8\
+\x60\xf8\xb0\x60\xf8\xb0\x64\xf8\xb0\x68\xf8\xb0\x6c\xf8\xb0\x70\
+\xf8\xb8\x70\xf8\xb8\x74\xf8\xb8\x78\xf8\xb8\x7c\xf8\xb8\x80\xf8\
+\xc0\x80\xf8\xc0\x84\xf8\xc0\x88\xf8\xc0\x8c\xf8\xc0\x90\xf8\xc8\
+\x90\xf8\xc8\x94\xf8\xc8\x98\xf8\xc8\x9c\xf8\xc8\xa0\xf8\xd0\xa0\
+\xf8\xd0\xa4\xf8\xd0\xa8\xf8\xd0\xac\xf8\xd0\xb0\xf8\xd8\xb0\xf8\
+\xd8\xb4\xf8\xd8\xb8\xf8\xd8\xbc\xf8\xd8\xc0\xf8\xe0\xc0\xf8\xe0\
+\xc4\xf8\xe0\xc8\xf8\xe0\xcc\xf8\xe0\xd0\xf8\xe8\xd0\xf8\xe8\xd4\
+\xf8\xe8\xd8\xf8\xe8\xdc\xf8\xe8\xe0\xf8\xf0\xe0\xf8\xf0\xe4\xf8\
+\xf0\xe8\xf8\xf0\xec\xf8\xf0\xf0\xf8\xf8\xf0\xf8\xf8\xf4\xf8\xf8\
+\xf8\xf8\xf8\xfc\xf8\x09\xd1\x39\xc7\x00\x00\x00\x09\x70\x48\x59\
+\x73\x00\x00\x00\x48\x00\x00\x00\x48\x00\x46\xc9\x6b\x3e\x00\x00\
+\x07\xcc\x49\x44\x41\x54\x78\xda\xed\xdd\x69\x43\xda\x4c\x10\x00\
+\xe0\x1c\x50\x90\xa3\x28\x2d\x52\x81\xaa\x78\x03\xe5\xa8\x82\x22\
+\x45\xa8\x81\x0a\x91\x64\xfe\xff\xcf\xe9\x87\xbe\xaf\x72\xe4\xce\
+\x26\x66\x36\xb3\xdf\x23\xd9\x47\xc8\x31\x3b\x33\x2b\x40\xcc\x87\
+\x40\x00\x04\x40\x00\x04\x40\x00\x20\xc4\x70\x10\x00\x01\x10\xc0\
+\x26\x40\xac\x2e\x7d\x04\x40\x00\x04\x40\x00\x04\x40\x00\x04\x40\
+\x00\x04\x40\x00\x04\x40\x00\x04\x40\x00\x04\x40\x00\x04\x40\x00\
+\x04\x40\x00\x04\x40\x00\x04\x40\x00\x04\x40\x00\x04\x40\x00\x04\
+\x40\x00\x04\x40\x00\x04\x40\x00\x04\x40\x00\x04\x40\x00\xac\x87\
+\xae\x0c\x5a\x67\x95\x2f\xf9\x74\x52\x96\x04\x29\xf1\x29\x9d\x2d\
+\x56\xce\x5b\x7d\x45\x8f\x03\x80\xd2\x3d\xfe\x2c\x99\xa4\x2c\x4a\
+\x85\x5a\x67\xc6\x33\xc0\xea\xae\x96\xb2\x4d\xdc\x4c\x55\x6f\x5f\
+\xb9\x04\xd0\xee\x0e\x25\x87\xc9\xab\xd2\xb7\xbe\xc6\x1b\xc0\xe4\
+\x58\x76\x95\xc0\x9b\x38\x9f\x73\x04\xa0\xff\x2c\xb8\xcf\x61\x16\
+\x2b\x13\x4e\x00\x5e\x1b\x9f\x3c\xe6\x71\x57\xe7\x1c\x00\xa8\x57\
+\x09\xef\x99\xec\xd2\xf9\x0a\x39\xc0\xab\x9f\xe9\x0b\x82\x20\x64\
+\xc6\x98\x01\xb4\x56\xd2\x77\x39\x83\x78\xa6\xa1\x05\xb8\x4b\x33\
+\xa9\xe8\x38\x58\xe2\x04\x50\xf7\x59\xd5\xb4\xa4\x9f\x51\x02\x3c\
+\xb0\xab\xea\x91\xc7\x18\x01\xae\x18\xd6\x35\x25\x9e\x10\x02\x1c\
+\xb2\xac\xec\x4a\x4c\xf1\x01\x24\x59\x02\x08\xa9\x25\x36\x80\x39\
+\xe3\xea\xbe\xa2\x8e\x0c\xe0\x8e\x75\x7d\xe3\x05\x32\x80\x73\xd6\
+\x00\xe2\x04\x17\xc0\x01\xf3\x12\xd7\x7d\x54\x00\xba\xcc\x1c\x40\
+\xe8\x60\x02\xf8\x1d\x40\x95\x73\x4a\x47\x04\xd0\x0d\xa2\xce\xfb\
+\x16\x11\xc0\x49\x10\x00\x79\x44\x00\xf9\x40\x4a\xfd\x27\x68\x00\
+\x34\xd1\xf4\x6e\x96\xab\x5c\x77\x87\x4f\x53\x45\x99\x8e\x07\x9d\
+\xcb\xf2\x9e\x1b\x80\x4b\x34\x00\x63\x93\x17\xdb\xb3\xe1\x4e\x8c\
+\x6b\xd9\x3f\x71\x1c\x33\xcc\xa1\x01\x68\x19\x86\x79\x47\x66\xf7\
+\xcc\x61\xd9\xa1\xc0\x1c\x0b\x40\xd5\x20\xc4\x6b\xb9\xe8\xa5\x54\
+\x1c\x01\x0c\xb0\x00\x64\x76\xbe\xbc\xb6\x31\x8d\x51\xd6\x01\xc0\
+\x15\x12\x80\xe5\xf6\x89\x9f\x38\x88\x6c\xae\x6a\xf6\x00\x65\x24\
+\x00\xc3\xad\x5f\x7f\xcf\xd9\x61\x0d\x5b\x80\xcf\x48\x00\x6e\x36\
+\x97\x37\x86\x4e\x8f\x6b\xdb\x2e\x13\x20\x01\xd8\x08\x87\x89\xf7\
+\xce\x0f\xbc\xb0\x01\x48\x22\x01\xd8\xb8\xb1\xf7\xdc\x1c\xf9\xc5\
+\x26\x28\x80\x03\xe0\xcf\xc6\xf5\xcf\x5d\x24\xcd\x7a\x29\x4d\xc6\
+\x01\xd0\x5f\x7f\x81\xd1\xfc\x5c\x3e\x90\xfe\x04\xd6\x7e\xc9\xa2\
+\xdb\x78\xf6\xca\x32\x9a\x9c\xc6\x01\x50\xf4\x13\xca\xb4\x0c\x26\
+\x16\x71\x00\xbc\x87\xc3\x92\xee\xf3\x9d\x9e\x2d\x53\x26\x50\x00\
+\xac\x4d\xe1\x07\x8b\xc7\xe8\xb5\x71\x83\x02\xa0\xe7\x2f\x8a\x67\
+\x15\x4c\x1a\xa2\x00\x38\x7d\x3b\xdf\x06\xeb\x70\xe2\x12\x05\xc0\
+\x5b\x4a\x98\xac\x7a\x39\xfc\x97\xf9\xfc\x0b\x28\x02\x22\xda\x5b\
+\x3e\xe4\x77\x4f\xc7\xbf\x84\xf7\x36\x1c\x0c\xc0\xd3\xdb\xf9\x7a\
+\xcb\x6b\x50\xcd\x01\x7e\xa3\x00\x68\xfb\x7c\x75\xd3\x43\x5c\x1c\
+\x0b\x04\xa0\xea\x73\x3d\x57\x33\x05\xe8\xe1\x00\xc8\xfa\x8c\xe2\
+\x2f\x4d\x9f\x83\x91\x2c\x8d\xfd\xec\xfd\x1b\x3f\x3d\x1e\x3f\xe3\
+\x62\x71\x94\x5d\x3c\xed\x3d\xae\xaa\xc7\x04\xc0\x2c\x2e\xf6\x0b\
+\x62\x02\x70\x6c\x3c\xff\x13\x88\x0b\x80\xf1\xcb\x50\x4e\x8b\x0b\
+\x80\x71\x7a\x99\x1c\x4c\xba\x6c\x14\x01\x9a\x86\xc1\xd0\x07\x88\
+\x0d\x40\xce\x08\xe0\x07\xc4\x06\x60\x64\x34\xff\x06\xc4\x07\xa0\
+\x18\x42\x1c\x28\xca\x00\x06\x49\xf6\x62\x07\xe2\x03\xf0\xba\x5b\
+\x64\x22\x0f\x20\x46\x00\xbb\x2b\xe4\x7b\x53\x88\x11\xc0\x6e\x66\
+\x4d\x49\x85\x18\x01\x0c\xb6\x73\xcb\xa4\x56\xc0\x9f\x18\x2d\x80\
+\xbb\xed\xf9\xe7\x7e\x43\x9c\x00\x1a\x5b\xf3\x97\xae\x83\x6f\xa8\
+\x10\x21\x80\xe5\x76\xa6\x5c\x51\x09\xe1\x53\xa3\x03\xd0\xdb\x5a\
+\x14\x4e\xdf\x85\xf2\xb1\x51\x01\x18\x6c\xa5\x16\xcb\x57\xdc\x35\
+\x50\xb0\xfa\xf2\xb7\xb6\xde\x7f\xa4\xfa\x32\xac\xcf\xfe\x78\x00\
+\xa5\x55\x92\x76\x6a\xe6\x07\x53\x95\x53\x00\x75\xf9\xdf\x58\xcc\
+\x95\xa7\x41\xab\x5e\x34\xcd\x08\x4a\xee\xd7\x1a\xc3\x05\x6f\x00\
+\xaa\xe8\xb6\x6c\xba\xda\x7d\xe1\x09\x60\xe0\xa5\x48\xa2\xd0\x5c\
+\x70\x03\xe0\xb1\x8e\x46\xac\x3c\x71\x02\xb0\x27\x78\x1d\xa5\x09\
+\x0f\x00\x33\x3f\xe5\x42\xd5\x17\xfc\x00\x1d\x7f\x15\xf4\x3d\xf4\
+\x00\x65\xc1\xdf\x38\x5a\xe1\x06\xd0\x7d\x76\xd4\x11\x84\xac\x82\
+\x1a\x60\xec\xbf\x6e\x30\xf9\x84\x19\x80\x45\x53\x11\xf9\x11\x31\
+\x00\x93\xb6\x3a\xf2\x08\x2d\x80\xeb\xe7\x60\x93\x9b\x81\x82\x15\
+\xa0\xcf\xa8\x7e\x38\xa3\x22\x05\x60\x56\x4f\x5e\x46\x0a\x90\x66\
+\x05\x20\x74\x51\x02\xcc\x98\xcd\x5f\x48\x2c\x30\x02\x6c\xa7\x3e\
+\x89\x92\x77\x81\x1a\x46\x80\x7f\xa9\x4f\x99\xf2\x45\xe7\x61\x32\
+\x57\x35\x00\x00\x6d\x39\x1b\xf5\xae\xca\x29\xf7\x02\x53\x84\x00\
+\xfa\x65\xf1\xfa\xd1\xb8\x80\x66\x71\x5b\x71\xf9\x94\x5c\xe1\x2a\
+\x2a\x0c\x00\xa0\xdf\x1f\xba\x79\x4c\x10\xe7\xbc\x01\x00\xc0\xfc\
+\xd8\x05\xc1\x25\x87\x00\x00\xb3\x23\xe7\x2d\x85\xb8\x04\x00\x18\
+\x38\xee\x26\x32\xe6\x13\x00\x96\xa5\x70\x7b\xcb\x45\x2f\x49\x4a\
+\xaf\x3b\x03\xf8\xcc\x2b\x80\x49\xa6\xe8\xee\x50\xb9\x05\xb0\xa9\
+\x1f\xff\x7f\x8c\xf8\x05\x58\x2b\xbc\xb4\x18\x2d\x8e\x01\x74\x27\
+\xcd\x18\x4f\x39\x06\x80\x85\x83\x27\xe3\x12\xcf\x00\x4e\x96\x50\
+\xf2\x5c\x03\x38\x08\xa0\xa6\xf8\x06\x18\xd9\x47\x45\xf8\x06\xb0\
+\xff\x0a\x48\x9c\x03\xd8\xe6\x52\x88\x9c\x03\xe8\x76\xad\xc9\x93\
+\x9c\x03\xd8\x46\xd1\x33\xbc\x03\x3c\xda\xa5\x0e\xf1\x0e\xb0\xb2\
+\x89\x0f\x7d\xe5\x1d\xc0\xee\x3e\x70\xc4\x3d\x40\x3d\xc6\xef\x02\
+\x00\x60\xdb\x5c\xb1\xc3\x3d\xc0\xd0\x1a\xe0\x89\x7b\x00\xc5\xfa\
+\x39\x48\xe3\x1e\x60\x11\x46\x8f\xe9\x28\x03\xbc\x0a\x21\xb4\x95\
+\x8b\x32\x80\x6e\x09\xd0\xe6\x1f\x40\xb3\x04\x78\x89\x2c\x80\xfa\
+\xc0\xa8\xd6\x7d\x69\x35\x7f\x56\x3d\xa5\x18\x03\xa8\xf7\xe7\x05\
+\x91\x55\xd3\x3f\xcb\x9d\x9a\x1a\x51\x04\xb8\xcc\x8b\x2c\xff\x3d\
+\x13\x2b\x80\x59\x14\x01\xde\x5b\x1f\x30\x49\xe7\xec\x87\xb1\xd1\
+\x02\x53\x80\xb3\xb7\xf3\x3b\x60\x71\x6e\x8d\xe0\xef\x01\x8c\x01\
+\xd6\x76\x17\x63\xd1\xf3\xe5\xbb\x45\x34\x48\x8b\x24\x80\xc2\x36\
+\x68\x9f\x0d\xa3\xb1\x24\xdb\xbb\xc0\xda\xee\x5a\xfe\xb7\x44\xb2\
+\xb8\x0b\x4a\x51\xcd\x13\x5c\x5b\xd2\x4b\xfb\xfe\x92\x5a\x84\x85\
+\x19\x76\x15\x63\x0b\x70\xca\xf2\x5b\x6a\xbe\xdf\x86\x34\x8f\x2a\
+\xc0\x7a\x43\x60\xf9\x8f\xcf\x07\xe1\x44\x28\xad\x65\xd9\x02\x4c\
+\x18\xe6\x74\x9b\xff\x02\xd2\x5a\x64\x01\x36\xf7\xd7\xf2\xd7\x01\
+\xe1\x4b\x38\x5b\x0d\x31\x7e\x17\xd8\xb8\x73\x25\xfd\x34\x01\x98\
+\x06\x9c\x17\x10\x10\xc0\xe6\x6e\x51\x87\xc0\xea\x2f\xad\x2f\x0a\
+\xcf\xa2\x0c\x70\xbd\x79\xb2\x4d\xcf\x7f\xc8\xbc\xc2\xae\x0f\x51\
+\x06\xd8\xba\x72\x89\x9e\x33\xb9\x0a\xc1\xae\x06\x04\x06\x30\x63\
+\x54\xe1\x65\x9a\x2a\x58\xd0\xa2\x0d\xa0\x6f\x57\x81\xec\x79\x8a\
+\x5c\x4d\xcc\x8a\x49\x12\xac\x77\xdb\x63\x1e\x12\xdb\xd9\x68\x33\
+\xeb\xe1\xb1\x5d\x35\xdb\x63\x43\x62\xbd\xbf\x04\x7b\x80\xdd\x6d\
+\x06\xb3\xae\x9f\x08\x35\xb3\x2c\x41\x31\x80\xde\x4a\xac\x01\x0c\
+\x82\x18\x29\x97\xfd\x70\xf5\x72\x88\xad\xc5\x99\x03\x18\x3d\xc0\
+\x26\xee\xdd\xfc\x85\x55\x29\xe8\x38\x68\xa0\x00\xc6\xc5\x81\x75\
+\xe7\xd7\xee\xc5\x7e\xc0\x05\x02\x01\x03\x80\xf1\xf5\x3b\xeb\xb4\
+\x2f\xfa\xd0\xb4\x62\xa4\x09\x38\x00\xcc\xf6\x5b\xae\x3a\xb9\x16\
+\xae\xce\x4c\x43\x00\x41\xf5\x96\x63\x0e\x50\x35\x9d\x42\xdd\xf6\
+\x91\xe0\xd6\xb4\x82\x32\x31\x02\x2c\x00\x16\xb1\x6c\xa9\x6a\x95\
+\xd3\xa0\xf7\x72\xe6\x11\x80\x67\x40\x03\x60\x9d\xe0\x99\xbd\x31\
+\x79\x36\x9e\x5e\x58\xd4\xcf\x1e\x06\xd8\x5c\x8f\x39\x80\x6d\x8d\
+\x78\xe6\xe4\x76\xeb\x85\x76\xd1\xaf\x5b\xed\x38\x2c\xfd\x00\x40\
+\x04\x00\x4e\x6a\xc2\xe5\x42\xe5\xac\xd1\xe9\x76\xdb\x8d\xcb\xea\
+\x81\x4d\xa5\x60\x36\xd0\xbe\xca\x01\x00\xe4\x05\xa6\xe3\x78\x05\
+\xc8\x00\xaa\x2c\xa7\x9f\x1f\x03\x60\x03\x68\xb0\x9b\x7e\xa2\x8d\
+\xb1\xaf\xf0\x03\xb3\xf9\xd7\xc2\xe8\xac\xca\x1e\x60\xce\x68\xfa\
+\x47\x53\x00\x94\x00\xeb\x2b\xa4\x9e\x87\x58\x7d\x06\xc0\x0a\xe0\
+\xbf\x61\x96\x58\x9b\x01\xe0\x05\xf0\xdb\x2f\x29\xdb\x5c\x00\x60\
+\x06\x80\xc7\x6f\xde\x9b\x86\xc9\xdf\xc7\x10\xea\x08\x26\x51\x72\
+\x71\x93\xf3\x34\xfb\x72\x6f\x05\xc0\x03\x00\x00\x4c\x2f\x32\x2e\
+\x5b\xa4\xd5\x1f\x35\x08\x7f\x04\x99\x2a\xab\xb4\x4a\xce\xee\x08\
+\x62\xae\xd6\x56\xe0\x63\x46\xc0\xb9\xc2\xfa\xb4\x5d\xcd\x5b\x29\
+\xc8\xd9\x4a\x73\xb4\x82\x8f\x1b\xa1\x24\x4b\xcf\x87\xdd\xab\xe3\
+\xc3\x62\x3e\x9d\x4c\xc8\x92\x20\x25\x52\x99\xfc\xfe\xd7\xf2\x69\
+\xb3\x3f\x59\xc0\x47\x8f\x28\x67\x8b\x13\x00\x01\x10\x00\x01\x10\
+\x00\x01\x10\x00\x01\x10\x00\x01\x10\x00\x01\x10\x00\x01\x10\x00\
+\x01\x10\x00\x01\x10\x00\x01\x10\x00\x01\x10\x00\x01\x10\x00\x01\
+\x10\x00\x01\x10\x00\x01\x10\x40\x80\x00\x71\x1b\x04\x40\x00\x04\
+\xf0\x0e\x10\xdf\x41\x00\x04\x40\x00\x04\x10\xeb\xf1\x17\xe9\x89\
+\x47\x68\xda\x1b\x7c\x00\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\
+\x60\x82\
+"
+
+qt_resource_name = b"\
+\x00\x06\
+\x07\x03\x7d\xc3\
+\x00\x69\
+\x00\x6d\x00\x61\x00\x67\x00\x65\x00\x73\
+\x00\x09\
+\x0a\x87\xa4\xa7\
+\x00\x73\
+\x00\x69\x00\x64\x00\x65\x00\x34\x00\x2e\x00\x70\x00\x6e\x00\x67\
+\x00\x09\
+\x0a\x88\xa4\xa7\
+\x00\x73\
+\x00\x69\x00\x64\x00\x65\x00\x35\x00\x2e\x00\x70\x00\x6e\x00\x67\
+\x00\x09\
+\x0a\x89\xa4\xa7\
+\x00\x73\
+\x00\x69\x00\x64\x00\x65\x00\x36\x00\x2e\x00\x70\x00\x6e\x00\x67\
+\x00\x09\
+\x0a\x84\xa4\xa7\
+\x00\x73\
+\x00\x69\x00\x64\x00\x65\x00\x31\x00\x2e\x00\x70\x00\x6e\x00\x67\
+\x00\x09\
+\x0a\x85\xa4\xa7\
+\x00\x73\
+\x00\x69\x00\x64\x00\x65\x00\x32\x00\x2e\x00\x70\x00\x6e\x00\x67\
+\x00\x09\
+\x0a\x86\xa4\xa7\
+\x00\x73\
+\x00\x69\x00\x64\x00\x65\x00\x33\x00\x2e\x00\x70\x00\x6e\x00\x67\
+"
+
+qt_resource_struct = b"\
+\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\
+\x00\x00\x00\x00\x00\x02\x00\x00\x00\x06\x00\x00\x00\x02\
+\x00\x00\x00\x5a\x00\x00\x00\x00\x00\x01\x00\x00\x16\x7f\
+\x00\x00\x00\x72\x00\x00\x00\x00\x00\x01\x00\x00\x1a\x97\
+\x00\x00\x00\x8a\x00\x00\x00\x00\x00\x01\x00\x00\x21\x83\
+\x00\x00\x00\x12\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
+\x00\x00\x00\x2a\x00\x00\x00\x00\x00\x01\x00\x00\x05\x42\
+\x00\x00\x00\x42\x00\x00\x00\x00\x00\x01\x00\x00\x0c\xed\
+"
+
+def qInitResources():
+ QtCore.qRegisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
+
+def qCleanupResources():
+ QtCore.qUnregisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
+
+qInitResources()
diff --git a/examples/script/helloscript.py b/examples/script/helloscript.py
new file mode 100755
index 00000000..5ae659f8
--- /dev/null
+++ b/examples/script/helloscript.py
@@ -0,0 +1,61 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+"""PySide2 port of the script/helloscript example from Qt v5.x"""
+
+import sys
+from PySide2 import QtWidgets, QtScript
+
+
+app = QtWidgets.QApplication(sys.argv)
+
+engine = QtScript.QScriptEngine()
+
+button = QtWidgets.QPushButton()
+scriptButton = engine.newQObject(button)
+engine.globalObject().setProperty("button", scriptButton)
+
+engine.evaluate("button.text = 'Hello World from PySide2!'")
+engine.evaluate("button.styleSheet = 'font-style: italic'")
+engine.evaluate("button.show()")
+
+sys.exit(app.exec_())
diff --git a/examples/scriptableapplication/README.txt b/examples/scriptableapplication/README.txt
new file mode 100644
index 00000000..28bdb44a
--- /dev/null
+++ b/examples/scriptableapplication/README.txt
@@ -0,0 +1,33 @@
+scriptableapplication demonstrates how to make a Qt C++ application scriptable.
+
+It has a class MainWindow inheriting QMainWindow for which bindings are generated
+using PySide2's shiboken2 bindings generator.
+
+The header wrappedclasses.h is passed to shiboken2 which generates class
+wrappers and headers in a subdirectory which are linked into the application.
+
+pythonutils.cpp has some code which binds the instance of MainWindow
+to a variable 'mainWindow' in the global (__main___) namespace.
+It is then possible to run Python script snippets like
+mainWindow.testFunction1() which trigger the underlying C++ function.
+
+Virtualenv Support
+If the application is started from a terminal with an activated python virtual environment, that
+environment's packages will be used for the python module import process. In this case, make sure
+that the application was built while the virtualenv was active, so that the build system picks up
+the correct python shared library.
+
+Windows Notes
+The build config of the application (Debug or Release) should match the PySide2 build config,
+otherwise the application will not function correctly. In practice this means the only supported
+configurations are:
+1) qmake release config build of the application + PySide2 setup.py without "--debug" flag +
+ python.exe for the PySide2 build process + python36.dll for the linked in shared library +
+ release build of Qt.
+2) qmake debug config build of the application + PySide2 setup.py WITH "--debug" flag +
+ python_d.exe for the PySide2 build process + python36_d.dll for the linked in shared library +
+ debug build of Qt.
+This is necessary because all the shared libraries in question have to link to the same C++ runtime
+library (msvcrt.dll or msvcrtd.dll).
+To make the example as self-contained as possible, the shared libraries in use (pyside2.dll,
+shiboken2.dll) are hard-linked into the build folder of the application.
diff --git a/examples/scriptableapplication/main.cpp b/examples/scriptableapplication/main.cpp
new file mode 100644
index 00000000..167eeb0f
--- /dev/null
+++ b/examples/scriptableapplication/main.cpp
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the PySide examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "mainwindow.h"
+
+#include <QApplication>
+#include <QDesktopWidget>
+
+int main(int argc, char *argv[])
+{
+ QApplication a(argc, argv);
+ MainWindow mainWindow;
+ const QRect availableGeometry = a.desktop()->availableGeometry(&mainWindow);
+ mainWindow.resize(availableGeometry.width() / 2, availableGeometry.height() / 2);
+ mainWindow.show();
+ return a.exec();
+}
diff --git a/examples/scriptableapplication/mainwindow.cpp b/examples/scriptableapplication/mainwindow.cpp
new file mode 100644
index 00000000..e754bcb9
--- /dev/null
+++ b/examples/scriptableapplication/mainwindow.cpp
@@ -0,0 +1,141 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the PySide examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "mainwindow.h"
+#include "pythonutils.h"
+
+#include <QtWidgets/QAction>
+#include <QtWidgets/QApplication>
+#include <QtWidgets/QMenu>
+#include <QtWidgets/QMenuBar>
+#include <QtWidgets/QPlainTextEdit>
+#include <QtWidgets/QStatusBar>
+#include <QtWidgets/QToolBar>
+#include <QtWidgets/QVBoxLayout>
+
+#include <QtGui/QFontDatabase>
+#include <QtGui/QIcon>
+
+#include <QtCore/QDebug>
+#include <QtCore/QTextStream>
+
+static const char defaultScript[] =
+ "print(\"Hello, world\")\n"
+ "mainWindow.testFunction1()\n";
+
+MainWindow::MainWindow()
+ : m_scriptEdit(new QPlainTextEdit(QLatin1String(defaultScript), this))
+{
+ setWindowTitle(tr("Scriptable Application"));
+
+ QMenu *fileMenu = menuBar()->addMenu(tr("&File"));
+ const QIcon runIcon = QIcon::fromTheme(QStringLiteral("system-run"));
+ QAction *runAction = fileMenu->addAction(runIcon, tr("&Run..."), this, &MainWindow::slotRunScript);
+ runAction->setShortcut(Qt::CTRL + Qt::Key_R);
+ QAction *diagnosticAction = fileMenu->addAction(tr("&Print Diagnostics"), this, &MainWindow::slotPrintDiagnostics);
+ diagnosticAction->setShortcut(Qt::CTRL + Qt::Key_D);
+ fileMenu->addAction(tr("&Invoke testFunction1()"), this, &MainWindow::testFunction1);
+ const QIcon quitIcon = QIcon::fromTheme(QStringLiteral("application-exit"));
+ QAction *quitAction = fileMenu->addAction(quitIcon, tr("&Quit"), qApp, &QCoreApplication::quit);
+ quitAction->setShortcut(Qt::CTRL + Qt::Key_Q);
+
+ QMenu *editMenu = menuBar()->addMenu(tr("&Edit"));
+ const QIcon clearIcon = QIcon::fromTheme(QStringLiteral("edit-clear"));
+ QAction *clearAction = editMenu->addAction(clearIcon, tr("&Clear"), m_scriptEdit, &QPlainTextEdit::clear);
+
+ QMenu *helpMenu = menuBar()->addMenu(tr("&Help"));
+ const QIcon aboutIcon = QIcon::fromTheme(QStringLiteral("help-about"));
+ QAction *aboutAction = helpMenu->addAction(aboutIcon, tr("&About Qt"), qApp, &QApplication::aboutQt);
+
+ QToolBar *toolBar = new QToolBar;
+ addToolBar(toolBar);
+ toolBar->addAction(quitAction);
+ toolBar->addSeparator();
+ toolBar->addAction(clearAction);
+ toolBar->addSeparator();
+ toolBar->addAction(runAction);
+ toolBar->addSeparator();
+ toolBar->addAction(aboutAction);
+
+ m_scriptEdit->setFont(QFontDatabase::systemFont(QFontDatabase::FixedFont));
+ setCentralWidget(m_scriptEdit);
+
+ if (!PythonUtils::bindAppObject("__main__", "mainWindow", PythonUtils::MainWindowType, this))
+ statusBar()->showMessage(tr("Error loading the application module"));
+}
+
+void MainWindow::slotRunScript()
+{
+ const QStringList script = m_scriptEdit->toPlainText().trimmed().split(QLatin1Char('\n'), QString::SkipEmptyParts);
+ if (!script.isEmpty())
+ runScript(script);
+}
+
+void MainWindow::slotPrintDiagnostics()
+{
+ const QStringList script = QStringList()
+ << "import sys" << "print('Path=', sys.path)" << "print('Executable=', sys.executable)";
+ runScript(script);
+}
+
+void MainWindow::runScript(const QStringList &script)
+{
+ if (!::PythonUtils::runScript(script))
+ statusBar()->showMessage(tr("Error running script"));
+}
+
+void MainWindow::testFunction1()
+{
+ static int n = 1;
+ QString message;
+ QTextStream(&message) << __FUNCTION__ << " called #" << n++;
+ qDebug().noquote() << message;
+ statusBar()->showMessage(message);
+}
diff --git a/examples/scriptableapplication/mainwindow.h b/examples/scriptableapplication/mainwindow.h
new file mode 100644
index 00000000..4dcafc73
--- /dev/null
+++ b/examples/scriptableapplication/mainwindow.h
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the PySide examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QtWidgets/QMainWindow>
+
+class QPlainTextEdit;
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+public:
+ MainWindow();
+
+ void testFunction1();
+
+private Q_SLOTS:
+ void slotRunScript();
+ void slotPrintDiagnostics();
+
+private:
+ void runScript(const QStringList &);
+
+ QPlainTextEdit *m_scriptEdit;
+};
+
+#endif // MAINWINDOW_H
diff --git a/examples/scriptableapplication/pyside2.pri b/examples/scriptableapplication/pyside2.pri
new file mode 100644
index 00000000..bd0eeef9
--- /dev/null
+++ b/examples/scriptableapplication/pyside2.pri
@@ -0,0 +1,19 @@
+PYTHON_INCLUDE = $$system(python $$PWD/pyside2_config.py --python-include)
+isEmpty(PYTHON_INCLUDE): error(Unable to locate Python)
+PYTHON_LFLAGS = $$system(python $$PWD/pyside2_config.py --python-link)
+
+PYSIDE2 = $$system(python $$PWD/pyside2_config.py --pyside2)
+isEmpty(PYSIDE2): error(Unable to locate PySide2)
+PYSIDE2_INCLUDE = $$system(python $$PWD/pyside2_config.py --pyside2-include)
+PYSIDE2_LFLAGS = $$system(python $$PWD/pyside2_config.py --pyside2-link)
+PYSIDE2_SHARED_LIBRARIES = $$system(python $$PWD/pyside2_config.py --pyside2-shared-libraries)
+CLANG_BIN_DIR = $$system(python $$PWD/pyside2_config.py --clang-bin-dir)
+
+INCLUDEPATH += $$PYTHON_INCLUDE $$PYSIDE2_INCLUDE
+LIBS += $$PYTHON_LFLAGS $$PYSIDE2_LFLAGS
+
+!build_pass:message(Using $$PYSIDE2)
+
+!win32 {
+ QMAKE_RPATHDIR += $$PYSIDE2
+}
diff --git a/examples/scriptableapplication/pyside2_config.py b/examples/scriptableapplication/pyside2_config.py
new file mode 100644
index 00000000..c81d8182
--- /dev/null
+++ b/examples/scriptableapplication/pyside2_config.py
@@ -0,0 +1,225 @@
+#############################################################################
+##
+## Copyright (C) 2017 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import os, glob, re, sys, imp
+from distutils import sysconfig
+if sys.platform == 'win32':
+ import winreg
+
+usage = """
+Utility to determine include/link options of PySide2 and Python for qmake
+
+Usage: pyside2_config.py [option]
+Options:
+ --python-include Print Python include path
+ --python-link Print Python link flags
+ --pyside2 Print PySide2 location
+ --pyside2-include Print PySide2 include paths
+ --pyside2-link Print PySide2 link flags
+ --pyside2-shared-libraries Print paths of PySide2 shared libraries (.so's, .dylib's, .dll's)
+ --clang-bin-dir Print path to the clang bin directory
+ -a Print all
+ --help/-h Print this help
+"""
+
+def cleanPath(path):
+ return path if sys.platform != 'win32' else path.replace('\\', '/')
+
+def sharedLibrarySuffix():
+ if sys.platform == 'win32':
+ return 'lib'
+ elif sys.platform == 'darwin':
+ return 'dylib'
+ return 'so'
+
+def sharedLibraryGlobPattern():
+ glob = '*.' + sharedLibrarySuffix()
+ return glob if sys.platform == 'win32' else 'lib' + glob
+
+# Return qmake link option for a library file name
+def linkOption(lib):
+ baseName = os.path.splitext(os.path.basename(lib))[0]
+ link = ' -l'
+ if sys.platform in ['linux', 'linux2', 'darwin']: # Linux: 'libfoo.so' -> '-lfoo'
+ link += baseName[3:]
+ else:
+ link += baseName
+ return link
+
+# Locate PySide2 via package path
+def findPySide2():
+ for p in sys.path:
+ if 'site-' in p:
+ pyside2 = os.path.join(p, 'PySide2')
+ if os.path.exists(pyside2):
+ return cleanPath(os.path.realpath(pyside2))
+ return None
+
+# Return version as "3.5"
+def pythonVersion():
+ return str(sys.version_info[0]) + '.' + str(sys.version_info[1])
+
+def pythonInclude():
+ return sysconfig.get_python_inc()
+
+def pythonLink():
+ # @TODO Fix to work with static builds of Python
+ libdir = sysconfig.get_config_var('LIBDIR')
+ version = pythonVersion()
+ version_no_dots = version.replace('.', '')
+
+ if sys.platform == 'win32':
+ suffix = '_d' if any([tup[0].endswith('_d.pyd') for tup in imp.get_suffixes()]) else ''
+ return "-L%s -lpython%s%s" % (libdir, version_no_dots, suffix)
+
+ if sys.platform == 'darwin':
+ return '-L%s -lpython%s' % (libdir, version)
+
+ # Linux and anything else
+ if sys.version_info[0] < 3:
+ suffix = '_d' if any([tup[0].endswith('_d.so') for tup in imp.get_suffixes()]) else ''
+ return "-lpython%s%s" % (version, suffix)
+ else:
+ return "-lpython%s%s" % (version, sys.abiflags)
+
+def pyside2Include():
+ pySide2 = findPySide2()
+ if pySide2 is None:
+ return None
+ return "%s/include/PySide2 %s/include/shiboken2" % (pySide2, pySide2)
+
+def pyside2Link():
+ pySide2 = findPySide2()
+ if pySide2 is None:
+ return None
+ link = "-L%s" % pySide2
+ for lib in glob.glob(os.path.join(pySide2, sharedLibraryGlobPattern())):
+ link += ' '
+ link += linkOption(lib)
+ return link
+
+def pyside2SharedLibraries():
+ pySide2 = findPySide2()
+ if pySide2 is None:
+ return None
+
+ if sys.platform == 'win32':
+ libs = []
+ for lib in glob.glob(os.path.join(pySide2, sharedLibraryGlobPattern())):
+ libs.append(os.path.realpath(lib))
+ if not libs:
+ return ''
+
+ dlls = ''
+ for lib in libs:
+ dll = os.path.splitext(lib)[0] + '.dll'
+ dlls += dll + ' '
+
+ return dlls
+ else:
+ libs = ''
+ for lib in glob.glob(os.path.join(pySide2, sharedLibraryGlobPattern())):
+ libs += ' ' + lib
+ return libs
+
+def clangBinPath():
+ source = 'LLVM_INSTALL_DIR'
+ clangDir = os.environ.get(source, None)
+ if not clangDir:
+ source = 'CLANG_INSTALL_DIR'
+ clangDir = os.environ.get(source, None)
+ if not clangDir:
+ source = 'llvm-config'
+ try:
+ output = run_process_output([source, '--prefix'])
+ if output:
+ clangDir = output[0]
+ except OSError:
+ pass
+ if clangDir:
+ return os.path.realpath(clangDir + os.path.sep + 'bin')
+ return ''
+
+option = sys.argv[1] if len(sys.argv) == 2 else '-a'
+if option == '-h' or option == '--help':
+ print(usage)
+ sys.exit(0)
+
+if option == '--pyside2' or option == '-a':
+ pySide2 = findPySide2()
+ if pySide2 is None:
+ sys.exit('Unable to locate PySide2')
+ print(pySide2)
+
+if option == '--pyside2-link' or option == '-a':
+ l = pyside2Link()
+ if l is None:
+ sys.exit('Unable to locate PySide2')
+ print(l)
+
+if option == '--pyside2-include' or option == '-a':
+ i = pyside2Include()
+ if i is None:
+ sys.exit('Unable to locate PySide2')
+ print(i)
+
+if option == '--python-include' or option == '-a':
+ i = pythonInclude()
+ if i is None:
+ sys.exit('Unable to locate Python')
+ print(i)
+
+if option == '--python-link' or option == '-a':
+ l = pythonLink()
+ if l is None:
+ sys.exit('Unable to locate Python')
+ print(l)
+
+if option == '--pyside2-shared-libraries' or option == '-a':
+ l = pyside2SharedLibraries()
+ if l is None:
+ sys.exit('Unable to locate the PySide sahred libraries')
+ print(l)
+
+if option == '--clang-bin-dir' or option == '-a':
+ l = clangBinPath()
+ if l is None:
+ sys.exit('Unable to locate Clang')
+ print(l)
diff --git a/examples/scriptableapplication/pythonutils.cpp b/examples/scriptableapplication/pythonutils.cpp
new file mode 100644
index 00000000..27f1bc71
--- /dev/null
+++ b/examples/scriptableapplication/pythonutils.cpp
@@ -0,0 +1,169 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the PySide examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "pythonutils.h"
+
+#include <QtCore/QByteArray>
+#include <QtCore/QCoreApplication>
+#include <QtCore/QDebug>
+#include <QtCore/QStringList>
+
+#include <sbkpython.h>
+#include <sbkconverter.h>
+#include <sbkmodule.h>
+
+/* from AppLib bindings */
+
+#if PY_MAJOR_VERSION >= 3
+ extern "C" PyObject *PyInit_AppLib();
+#else
+ extern "C" void initAppLib();
+#endif
+
+// This variable stores all Python types exported by this module.
+extern PyTypeObject **SbkAppLibTypes;
+
+// This variable stores all type converters exported by this module.
+extern SbkConverter **SbkAppLibTypeConverters;
+
+namespace PythonUtils {
+
+static State state = PythonUninitialized;
+
+static void cleanup()
+{
+ if (state > PythonUninitialized) {
+ Py_Finalize();
+ state = PythonUninitialized;
+ }
+}
+
+State init()
+{
+ if (state > PythonUninitialized)
+ return state;
+
+ // If there is an active python virtual environment, use that environment's packages location.
+ QByteArray virtualEnvPath = qgetenv("VIRTUAL_ENV");
+ if (!virtualEnvPath.isEmpty())
+ qputenv("PYTHONHOME", virtualEnvPath);
+
+ Py_Initialize();
+ qAddPostRoutine(cleanup);
+ state = PythonInitialized;
+#if PY_MAJOR_VERSION >= 3
+ const bool pythonInitialized = PyInit_AppLib() != nullptr;
+#else
+ const bool pythonInitialized = true;
+ initAppLib();
+#endif
+ const bool pyErrorOccurred = PyErr_Occurred() != nullptr;
+ if (pythonInitialized && !pyErrorOccurred) {
+ state = AppModuleLoaded;
+ } else {
+ if (pyErrorOccurred)
+ PyErr_Print();
+ qWarning("Failed to initialize the module.");
+ }
+ return state;
+}
+
+bool bindAppObject(const QString &moduleName, const QString &name,
+ int index, QObject *o)
+{
+ if (init() != AppModuleLoaded)
+ return false;
+ PyTypeObject *typeObject = SbkAppLibTypes[index];
+
+ PyObject *po = Shiboken::Conversions::pointerToPython(reinterpret_cast<const SbkObjectType *>(typeObject), o);
+ if (!po) {
+ qWarning() << __FUNCTION__ << "Failed to create wrapper for" << o;
+ return false;
+ }
+ Py_INCREF(po);
+
+ PyObject *module = PyImport_AddModule(moduleName.toLocal8Bit().constData());
+ if (!module) {
+ Py_DECREF(po);
+ if (PyErr_Occurred())
+ PyErr_Print();
+ qWarning() << __FUNCTION__ << "Failed to locate module" << moduleName;
+ return false;
+ }
+
+ if (PyModule_AddObject(module, name.toLocal8Bit().constData(), po) < 0) {
+ if (PyErr_Occurred())
+ PyErr_Print();
+ qWarning() << __FUNCTION__ << "Failed add object" << name << "to" << moduleName;
+ return false;
+ }
+
+ return true;
+}
+
+bool runScript(const QStringList &script)
+{
+ if (init() == PythonUninitialized)
+ return false;
+ bool result = true;
+ for (const QString& lineS : script) {
+ const QByteArray line = lineS.toUtf8();
+ if (PyRun_SimpleString(line.constData()) == -1) {
+ if (PyErr_Occurred())
+ PyErr_Print();
+ qWarning() << __FUNCTION__ << "Error at" << line;
+ result = false;
+ break;
+ }
+ }
+ return result;
+}
+
+} // namespace PythonUtils
diff --git a/examples/scriptableapplication/pythonutils.h b/examples/scriptableapplication/pythonutils.h
new file mode 100644
index 00000000..53e8c4da
--- /dev/null
+++ b/examples/scriptableapplication/pythonutils.h
@@ -0,0 +1,81 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the PySide examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef PYTHONUTILS_H
+#define PYTHONUTILS_H
+
+class QObject;
+class QString;
+class QStringList;
+
+namespace PythonUtils {
+
+enum AppLibTypes
+{
+ MainWindowType = 0 // SBK_MAINWINDOW_IDX
+};
+
+enum State
+{
+ PythonUninitialized,
+ PythonInitialized,
+ AppModuleLoaded
+};
+
+State init();
+
+bool bindAppObject(const QString &moduleName, const QString &name,
+ int index, QObject *o);
+
+bool runScript(const QStringList &script);
+
+} // namespace PythonUtils
+
+#endif // PYTHONUTILS_H
diff --git a/examples/scriptableapplication/scriptableapplication.pro b/examples/scriptableapplication/scriptableapplication.pro
new file mode 100644
index 00000000..2719160f
--- /dev/null
+++ b/examples/scriptableapplication/scriptableapplication.pro
@@ -0,0 +1,92 @@
+TEMPLATE = app
+CONFIG += no_keywords # avoid clash with slots in Python.h
+CONFIG += console force_debug_info
+QT += widgets
+
+include(pyside2.pri)
+
+WRAPPED_HEADER = wrappedclasses.h
+WRAPPER_DIR = $$OUT_PWD/AppLib
+TYPESYSTEM_FILE = scriptableapplication.xml
+
+QT_INCLUDEPATHS = -I$$[QT_INSTALL_HEADERS] -I$$[QT_INSTALL_HEADERS]/QtCore \
+ -I$$[QT_INSTALL_HEADERS]/QtGui -I$$[QT_INSTALL_HEADERS]/QtWidgets
+
+SHIBOKEN_OPTIONS = --generator-set=shiboken --enable-parent-ctor-heuristic \
+ --enable-pyside-extensions --enable-return-value-heuristic --use-isnull-as-nb_nonzero \
+ $$QT_INCLUDEPATHS -I$$PWD -T$$PWD -T$$PYSIDE2/typesystems --output-directory=$$OUT_PWD
+
+# MSVC does not honor #define protected public...
+win32:SHIBOKEN_OPTIONS += --avoid-protected-hack
+
+# Prepare the shiboken tool
+QT_TOOL.shiboken.binary = $$system_path($$PYSIDE2/shiboken2)
+win32 {
+ # Add the libclang/bin subdir to PATH.
+ CLANG_PATH.name = PATH
+ CLANG_PATH.value = $$CLANG_BIN_DIR
+ CLANG_PATH.CONFIG += prepend
+ exists($$CLANG_PATH.value): QT_TOOL_ENV = CLANG_PATH
+}
+qtPrepareTool(SHIBOKEN, shiboken)
+QT_TOOL_ENV =
+
+# Shiboken run that adds the module wrapper to GENERATED_SOURCES
+shiboken.output = $$WRAPPER_DIR/applib_module_wrapper.cpp
+shiboken.commands = $$SHIBOKEN $$SHIBOKEN_OPTIONS $$PWD/wrappedclasses.h ${QMAKE_FILE_IN}
+shiboken.input = TYPESYSTEM_FILE
+shiboken.dependency_type = TYPE_C
+shiboken.variable_out = GENERATED_SOURCES
+
+# A dummy command that pretends to produce the class wrappers from the headers
+# depending on the module wrapper
+WRAPPED_CLASSES = mainwindow.h
+module_wrapper_dummy_command.output = $$WRAPPER_DIR/${QMAKE_FILE_BASE}_wrapper.cpp
+module_wrapper_dummy_command.commands = echo ${QMAKE_FILE_IN}
+module_wrapper_dummy_command.depends = $$WRAPPER_DIR/applib_module_wrapper.cpp
+module_wrapper_dummy_command.input = WRAPPED_CLASSES
+module_wrapper_dummy_command.dependency_type = TYPE_C
+module_wrapper_dummy_command.variable_out = GENERATED_SOURCES
+
+# Get the path component to the active config build folder
+defineReplace(getOutDir) {
+ out_dir = $$OUT_PWD
+ CONFIG(release, debug|release): out_dir = $$out_dir/release
+ else:out_dir = $$out_dir/debug
+ return($$out_dir)
+}
+
+# Create hardlinks to the PySide2 shared libraries, so the example can be executed without manually
+# setting the PATH.
+win32 {
+ out_dir = $$getOutDir()
+ # no_link tell not to link to the output files, target_predeps forces the command to actually
+ # execute, explicit_dependencies is a magic value that tells qmake not to run the commands
+ # if the output files already exist.
+ hard_link_libraries.CONFIG = no_link target_predeps explicit_dependencies
+ hard_link_libraries.output = $$out_dir/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT}
+ hard_link_libraries.commands = mklink /H $$shell_path($$out_dir/${QMAKE_FILE_BASE}${QMAKE_FILE_EXT}) $$shell_path(${QMAKE_FILE_IN})
+ hard_link_libraries.input = PYSIDE2_SHARED_LIBRARIES
+}
+
+QMAKE_EXTRA_COMPILERS += shiboken module_wrapper_dummy_command
+win32:QMAKE_EXTRA_COMPILERS += hard_link_libraries
+
+INCLUDEPATH += $$WRAPPER_DIR
+
+# fixme: Hack to find wrappers
+PACKAGE_DIR = $$PWD/../../pyside_package/PySide2
+
+INCLUDEPATH += $$PACKAGE_DIR/include/PySide2/QtWidgets \
+ $$PACKAGE_DIR/include/PySide2/QtGui $$PACKAGE_DIR/include/PySide2/QtCore
+
+SOURCES += \
+ main.cpp \
+ mainwindow.cpp \
+ pythonutils.cpp
+
+HEADERS += \
+ mainwindow.h \
+ pythonutils.h
+
+OTHER_FILES += $$TYPESYSTEM_FILE $$WRAPPED_HEADER pyside2_config.py README.txt
diff --git a/examples/scriptableapplication/scriptableapplication.xml b/examples/scriptableapplication/scriptableapplication.xml
new file mode 100644
index 00000000..18e8277f
--- /dev/null
+++ b/examples/scriptableapplication/scriptableapplication.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0"?>
+<!--
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the PySide examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+-->
+<typesystem package="AppLib">
+ <load-typesystem name="typesystem_widgets.xml" generate="no"/>
+ <object-type name="MainWindow"/>
+</typesystem>
diff --git a/examples/scriptableapplication/wrappedclasses.h b/examples/scriptableapplication/wrappedclasses.h
new file mode 100644
index 00000000..c905e235
--- /dev/null
+++ b/examples/scriptableapplication/wrappedclasses.h
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the PySide examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef WRAPPEDCLASSES_H
+#define WRAPPEDCLASSES_H
+
+#include <mainwindow.h>
+
+#endif // WRAPPEDCLASSES_H
diff --git a/examples/texttospeech/texttospeech.py b/examples/texttospeech/texttospeech.py
new file mode 100644
index 00000000..12edf5d1
--- /dev/null
+++ b/examples/texttospeech/texttospeech.py
@@ -0,0 +1,108 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2017 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+"""PySide2 QTextToSpeech example"""
+
+import sys
+from PySide2.QtCore import Qt
+from PySide2.QtWidgets import (qApp, QApplication, QComboBox, QFormLayout,
+ QHBoxLayout, QLineEdit, QMainWindow, QPushButton, QSlider, QWidget)
+
+from PySide2.QtTextToSpeech import QTextToSpeech, QVoice
+
+class MainWindow(QMainWindow):
+ def __init__(self):
+ super(MainWindow, self).__init__()
+
+ centralWidget = QWidget()
+ self.setCentralWidget(centralWidget)
+ layout = QFormLayout(centralWidget)
+
+ textLayout = QHBoxLayout()
+ self.text = QLineEdit('Hello, PySide2')
+ self.text.setClearButtonEnabled(True)
+ textLayout.addWidget(self.text)
+ self.sayButton = QPushButton('Say')
+ textLayout.addWidget(self.sayButton)
+ self.text.returnPressed.connect(self.sayButton.animateClick)
+ self.sayButton.clicked.connect(self.say)
+ layout.addRow('Text:', textLayout)
+
+ self.voiceCombo = QComboBox()
+ layout.addRow('Voice:', self.voiceCombo)
+
+ self.volumeSlider = QSlider(Qt.Horizontal)
+ self.volumeSlider.setMinimum(0)
+ self.volumeSlider.setMaximum(100)
+ self.volumeSlider.setValue(100)
+ layout.addRow('Volume:', self.volumeSlider)
+
+ self.engine = None
+ engineNames = QTextToSpeech.availableEngines()
+ if len(engineNames) > 0:
+ engineName = engineNames[0]
+ self.engine = QTextToSpeech(engineName)
+ self.engine.stateChanged.connect(self.stateChanged)
+ self.setWindowTitle('QTextToSpeech Example ({})'.format(engineName))
+ self.voices = []
+ for voice in self.engine.availableVoices():
+ self.voices.append(voice)
+ self.voiceCombo.addItem(voice.name())
+ else:
+ self.setWindowTitle('QTextToSpeech Example (no engines available)')
+ self.sayButton.setEnabled(False)
+
+ def say(self):
+ self.sayButton.setEnabled(False)
+ self.engine.setVoice(self.voices[self.voiceCombo.currentIndex()])
+ self.engine.setVolume(float(self.volumeSlider.value()) / 100)
+ self.engine.say(self.text.text())
+
+ def stateChanged(self, state):
+ if (state == QTextToSpeech.State.Ready):
+ self.sayButton.setEnabled(True)
+
+if __name__ == '__main__':
+ app = QApplication(sys.argv)
+ mainWin = MainWindow()
+ mainWin.show()
+ sys.exit(app.exec_())
diff --git a/examples/tutorial/t1.py b/examples/tutorial/t1.py
new file mode 100644
index 00000000..b3251dbf
--- /dev/null
+++ b/examples/tutorial/t1.py
@@ -0,0 +1,57 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+# PySide2 tutorial 1
+
+
+import sys
+from PySide2 import QtWidgets
+
+
+app = QtWidgets.QApplication(sys.argv)
+
+hello = QtWidgets.QPushButton("Hello world!")
+hello.resize(100, 30)
+
+hello.show()
+
+sys.exit(app.exec_())
diff --git a/examples/tutorial/t10.py b/examples/tutorial/t10.py
new file mode 100644
index 00000000..081190c9
--- /dev/null
+++ b/examples/tutorial/t10.py
@@ -0,0 +1,192 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+# PySide2 tutorial 10
+
+
+import sys
+from PySide2 import QtCore, QtGui, QtWidgets
+
+
+class LCDRange(QtWidgets.QWidget):
+ valueChanged = QtCore.Signal(int)
+ def __init__(self, parent=None):
+ QtWidgets.QWidget.__init__(self, parent)
+
+ lcd = QtWidgets.QLCDNumber(2)
+ self.slider = QtWidgets.QSlider(QtCore.Qt.Horizontal)
+ self.slider.setRange(0, 99)
+ self.slider.setValue(0)
+
+ self.connect(self.slider, QtCore.SIGNAL("valueChanged(int)"),
+ lcd, QtCore.SLOT("display(int)"))
+ self.connect(self.slider, QtCore.SIGNAL("valueChanged(int)"),
+ self, QtCore.SIGNAL("valueChanged(int)"))
+
+ layout = QtWidgets.QVBoxLayout()
+ layout.addWidget(lcd)
+ layout.addWidget(self.slider)
+ self.setLayout(layout)
+
+ self.setFocusProxy(self.slider)
+
+ def value(self):
+ return self.slider.value()
+
+ @QtCore.Slot(int)
+ def setValue(self, value):
+ self.slider.setValue(value)
+
+ def setRange(self, minValue, maxValue):
+ if minValue < 0 or maxValue > 99 or minValue > maxValue:
+ QtCore.qWarning("LCDRange::setRange(%d, %d)\n"
+ "\tRange must be 0..99\n"
+ "\tand minValue must not be greater than maxValue" % (minValue, maxValue))
+ return
+
+ self.slider.setRange(minValue, maxValue)
+
+
+class CannonField(QtWidgets.QWidget):
+ angleChanged = QtCore.Signal(int)
+ forceChanged = QtCore.Signal(int)
+ def __init__(self, parent=None):
+ QtWidgets.QWidget.__init__(self, parent)
+
+ self.currentAngle = 45
+ self.currentForce = 0
+ self.setPalette(QtGui.QPalette(QtGui.QColor(250, 250, 200)))
+ self.setAutoFillBackground(True)
+
+ def angle(self):
+ return self.currentAngle
+
+ @QtCore.Slot(int)
+ def setAngle(self, angle):
+ if angle < 5:
+ angle = 5
+ if angle > 70:
+ angle = 70;
+ if self.currentAngle == angle:
+ return
+ self.currentAngle = angle
+ self.update()
+ self.emit(QtCore.SIGNAL("angleChanged(int)"), self.currentAngle)
+
+ def force(self):
+ return self.currentForce
+
+ @QtCore.Slot(int)
+ def setForce(self, force):
+ if force < 0:
+ force = 0
+ if self.currentForce == force:
+ return
+ self.currentForce = force;
+ self.emit(QtCore.SIGNAL("forceChanged(int)"), self.currentForce)
+
+ def paintEvent(self, event):
+ painter = QtGui.QPainter(self)
+
+ painter.setPen(QtCore.Qt.NoPen)
+ painter.setBrush(QtCore.Qt.blue)
+
+ painter.translate(0, self.height())
+ painter.drawPie(QtCore.QRect(-35, -35, 70, 70), 0, 90 * 16)
+ painter.rotate(-self.currentAngle)
+ painter.drawRect(QtCore.QRect(33, -4, 15, 8))
+
+ def cannonRect(self):
+ result = QtCore.QRect(0, 0, 50, 50)
+ result.moveBottomLeft(self.rect().bottomLect())
+ return result
+
+
+class MyWidget(QtWidgets.QWidget):
+ def __init__(self, parent=None):
+ QtWidgets.QWidget.__init__(self, parent)
+
+ quit = QtWidgets.QPushButton("&Quit")
+ quit.setFont(QtGui.QFont("Times", 18, QtGui.QFont.Bold))
+
+ self.connect(quit, QtCore.SIGNAL("clicked()"),
+ QtWidgets.qApp, QtCore.SLOT("quit()"))
+
+ angle = LCDRange()
+ angle.setRange(5, 70)
+
+ force = LCDRange()
+ force.setRange(10, 50)
+
+ cannonField = CannonField()
+
+ self.connect(angle, QtCore.SIGNAL("valueChanged(int)"),
+ cannonField.setAngle)
+ self.connect(cannonField, QtCore.SIGNAL("angleChanged(int)"),
+ angle.setValue)
+
+ self.connect(force, QtCore.SIGNAL("valueChanged(int)"),
+ cannonField.setForce)
+ self.connect(cannonField, QtCore.SIGNAL("forceChanged(int)"),
+ force.setValue)
+
+ leftLayout = QtWidgets.QVBoxLayout()
+ leftLayout.addWidget(angle)
+ leftLayout.addWidget(force)
+
+ gridLayout = QtWidgets.QGridLayout()
+ gridLayout.addWidget(quit, 0, 0)
+ gridLayout.addLayout(leftLayout, 1, 0)
+ gridLayout.addWidget(cannonField, 1, 1, 2, 1)
+ gridLayout.setColumnStretch(1, 10)
+ self.setLayout(gridLayout)
+
+ angle.setValue(60)
+ force.setValue(25)
+ angle.setFocus()
+
+
+app = QtWidgets.QApplication(sys.argv)
+widget = MyWidget()
+widget.setGeometry(100, 100, 500, 355)
+widget.show()
+sys.exit(app.exec_())
diff --git a/examples/tutorial/t11.py b/examples/tutorial/t11.py
new file mode 100644
index 00000000..070782b3
--- /dev/null
+++ b/examples/tutorial/t11.py
@@ -0,0 +1,264 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+# PySide2 tutorial 11
+
+
+import sys
+import math
+from PySide2 import QtCore, QtGui, QtWidgets
+
+
+class LCDRange(QtWidgets.QWidget):
+ valueChanged = QtCore.Signal(int)
+ def __init__(self, parent=None):
+ QtWidgets.QWidget.__init__(self, parent)
+
+ lcd = QtWidgets.QLCDNumber(2)
+ self.slider = QtWidgets.QSlider(QtCore.Qt.Horizontal)
+ self.slider.setRange(0, 99)
+ self.slider.setValue(0)
+
+ self.connect(self.slider, QtCore.SIGNAL("valueChanged(int)"),
+ lcd, QtCore.SLOT("display(int)"))
+ self.connect(self.slider, QtCore.SIGNAL("valueChanged(int)"),
+ self, QtCore.SIGNAL("valueChanged(int)"))
+
+ layout = QtWidgets.QVBoxLayout()
+ layout.addWidget(lcd)
+ layout.addWidget(self.slider)
+ self.setLayout(layout)
+
+ self.setFocusProxy(self.slider)
+
+ def value(self):
+ return self.slider.value()
+
+ @QtCore.Slot(int)
+ def setValue(self, value):
+ self.slider.setValue(value)
+
+ def setRange(self, minValue, maxValue):
+ if minValue < 0 or maxValue > 99 or minValue > maxValue:
+ QtCore.qWarning("LCDRange::setRange(%d, %d)\n"
+ "\tRange must be 0..99\n"
+ "\tand minValue must not be greater than maxValue" % (minValue, maxValue))
+ return
+
+ self.slider.setRange(minValue, maxValue)
+
+
+class CannonField(QtWidgets.QWidget):
+ angleChanged = QtCore.Signal(int)
+ forceChanged = QtCore.Signal(int)
+ def __init__(self, parent=None):
+ QtWidgets.QWidget.__init__(self, parent)
+
+ self.currentAngle = 45
+ self.currentForce = 0
+ self.timerCount = 0
+ self.autoShootTimer = QtCore.QTimer(self)
+ self.connect(self.autoShootTimer, QtCore.SIGNAL("timeout()"),
+ self.moveShot)
+ self.shootAngle = 0
+ self.shootForce = 0
+ self.setPalette(QtGui.QPalette(QtGui.QColor(250, 250, 200)))
+ self.setAutoFillBackground(True)
+
+ def angle(self):
+ return self.currentAngle
+
+ @QtCore.Slot(int)
+ def setAngle(self, angle):
+ if angle < 5:
+ angle = 5
+ if angle > 70:
+ angle = 70;
+ if self.currentAngle == angle:
+ return
+ self.currentAngle = angle
+ self.update()
+ self.emit(QtCore.SIGNAL("angleChanged(int)"), self.currentAngle)
+
+ def force(self):
+ return self.currentForce
+
+ @QtCore.Slot(int)
+ def setForce(self, force):
+ if force < 0:
+ force = 0
+ if self.currentForce == force:
+ return
+ self.currentForce = force;
+ self.emit(QtCore.SIGNAL("forceChanged(int)"), self.currentForce)
+
+ @QtCore.Slot()
+ def shoot(self):
+ if self.autoShootTimer.isActive():
+ return
+ self.timerCount = 0
+ self.shootAngle = self.currentAngle
+ self.shootForce = self.currentForce
+ self.autoShootTimer.start(5)
+
+ @QtCore.Slot()
+ def moveShot(self):
+ region = QtGui.QRegion(self.shotRect())
+ self.timerCount += 1
+
+ shotR = self.shotRect()
+
+ if shotR.x() > self.width() or shotR.y() > self.height():
+ self.autoShootTimer.stop()
+ else:
+ region = region.united(QtGui.QRegion(shotR))
+
+ self.update(region)
+
+ def paintEvent(self, event):
+ painter = QtGui.QPainter(self)
+
+ self.paintCannon(painter)
+ if self.autoShootTimer.isActive():
+ self.paintShot(painter)
+
+ def paintShot(self, painter):
+ painter.setPen(QtCore.Qt.NoPen);
+ painter.setBrush(QtCore.Qt.black)
+ painter.drawRect(self.shotRect())
+
+ barrelRect = QtCore.QRect(33, -4, 15, 8)
+
+ def paintCannon(self, painter):
+ painter.setPen(QtCore.Qt.NoPen)
+ painter.setBrush(QtCore.Qt.blue)
+
+ painter.save()
+ painter.translate(0, self.height())
+ painter.drawPie(QtCore.QRect(-35, -35, 70, 70), 0, 90 * 16)
+ painter.rotate(-self.currentAngle)
+ painter.drawRect(CannonField.barrelRect)
+ painter.restore()
+
+ def cannonRect(self):
+ result = QtCore.QRect(0, 0, 50, 50)
+ result.moveBottomLeft(self.rect().bottomLect())
+ return result
+
+ def shotRect(self):
+ gravity = 4.0
+
+ time = self.timerCount / 40.0
+ velocity = self.shootForce
+ radians = self.shootAngle * 3.14159265 / 180
+
+ velx = velocity * math.cos(radians)
+ vely = velocity * math.sin(radians)
+ x0 = (CannonField.barrelRect.right() + 5) * math.cos(radians)
+ y0 = (CannonField.barrelRect.right() + 5) * math.sin(radians)
+ x = x0 + velx * time
+ y = y0 + vely * time - 0.5 * gravity * time * time
+
+ result = QtCore.QRect(0, 0, 6, 6)
+ result.moveCenter(QtCore.QPoint(round(x), self.height() - 1 - round(y)))
+ return result
+
+
+class MyWidget(QtWidgets.QWidget):
+ def __init__(self, parent=None):
+ QtWidgets.QWidget.__init__(self, parent)
+
+ quit = QtWidgets.QPushButton("&Quit")
+ quit.setFont(QtGui.QFont("Times", 18, QtGui.QFont.Bold))
+
+ self.connect(quit, QtCore.SIGNAL("clicked()"),
+ QtWidgets.qApp, QtCore.SLOT("quit()"))
+
+ angle = LCDRange()
+ angle.setRange(5, 70)
+
+ force = LCDRange()
+ force.setRange(10, 50)
+
+ cannonField = CannonField()
+
+ self.connect(angle, QtCore.SIGNAL("valueChanged(int)"),
+ cannonField.setAngle)
+ self.connect(cannonField, QtCore.SIGNAL("angleChanged(int)"),
+ angle.setValue)
+
+ self.connect(force, QtCore.SIGNAL("valueChanged(int)"),
+ cannonField.setForce)
+ self.connect(cannonField, QtCore.SIGNAL("forceChanged(int)"),
+ force.setValue)
+
+ shoot = QtWidgets.QPushButton("&Shoot")
+ shoot.setFont(QtGui.QFont("Times", 18, QtGui.QFont.Bold))
+
+ self.connect(shoot, QtCore.SIGNAL("clicked()"), cannonField.shoot)
+
+ topLayout = QtWidgets.QHBoxLayout()
+ topLayout.addWidget(shoot)
+ topLayout.addStretch(1)
+
+ leftLayout = QtWidgets.QVBoxLayout()
+ leftLayout.addWidget(angle)
+ leftLayout.addWidget(force)
+
+ gridLayout = QtWidgets.QGridLayout()
+ gridLayout.addWidget(quit, 0, 0)
+ gridLayout.addLayout(topLayout, 0, 1)
+ gridLayout.addLayout(leftLayout, 1, 0)
+ gridLayout.addWidget(cannonField, 1, 1, 2, 1)
+ gridLayout.setColumnStretch(1, 10)
+ self.setLayout(gridLayout)
+
+ angle.setValue(60)
+ force.setValue(25)
+ angle.setFocus()
+
+
+app = QtWidgets.QApplication(sys.argv)
+widget = MyWidget()
+widget.setGeometry(100, 100, 500, 355)
+widget.show()
+sys.exit(app.exec_())
diff --git a/examples/tutorial/t12.py b/examples/tutorial/t12.py
new file mode 100644
index 00000000..6afd8809
--- /dev/null
+++ b/examples/tutorial/t12.py
@@ -0,0 +1,313 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+# PySide2 tutorial 12
+
+
+import sys
+import math
+import random
+from PySide2 import QtCore, QtGui, QtWidgets
+
+
+class LCDRange(QtWidgets.QWidget):
+ valueChanged = QtCore.Signal(int)
+ def __init__(self, text=None, parent=None):
+ if isinstance(text, QtWidgets.QWidget):
+ parent = text
+ text = None
+
+ QtWidgets.QWidget.__init__(self, parent)
+
+ self.init()
+
+ if text:
+ self.setText(text)
+
+ def init(self):
+ lcd = QtWidgets.QLCDNumber(2)
+ self.slider = QtWidgets.QSlider(QtCore.Qt.Horizontal)
+ self.slider.setRange(0, 99)
+ self.slider.setValue(0)
+ self.label = QtWidgets.QLabel()
+ self.label.setAlignment(QtCore.Qt.AlignHCenter | QtCore.Qt.AlignTop)
+
+ self.connect(self.slider, QtCore.SIGNAL("valueChanged(int)"),
+ lcd, QtCore.SLOT("display(int)"))
+ self.connect(self.slider, QtCore.SIGNAL("valueChanged(int)"),
+ self, QtCore.SIGNAL("valueChanged(int)"))
+
+ layout = QtWidgets.QVBoxLayout()
+ layout.addWidget(lcd)
+ layout.addWidget(self.slider)
+ layout.addWidget(self.label)
+ self.setLayout(layout)
+
+ self.setFocusProxy(self.slider)
+
+ def value(self):
+ return self.slider.value()
+
+ @QtCore.Slot(int)
+ def setValue(self, value):
+ self.slider.setValue(value)
+
+ def text(self):
+ return self.label.text()
+
+ def setRange(self, minValue, maxValue):
+ if minValue < 0 or maxValue > 99 or minValue > maxValue:
+ QtCore.qWarning("LCDRange::setRange(%d, %d)\n"
+ "\tRange must be 0..99\n"
+ "\tand minValue must not be greater than maxValue" % (minValue, maxValue))
+ return
+
+ self.slider.setRange(minValue, maxValue)
+
+ def setText(self, text):
+ self.label.setText(text)
+
+
+class CannonField(QtWidgets.QWidget):
+ angleChanged = QtCore.Signal(int)
+ forceChanged = QtCore.Signal(int)
+ def __init__(self, parent=None):
+ QtWidgets.QWidget.__init__(self, parent)
+
+ self.currentAngle = 45
+ self.currentForce = 0
+ self.timerCount = 0
+ self.autoShootTimer = QtCore.QTimer(self)
+ self.connect(self.autoShootTimer, QtCore.SIGNAL("timeout()"),
+ self.moveShot)
+ self.shootAngle = 0
+ self.shootForce = 0
+ self.target = QtCore.QPoint(0, 0)
+ self.setPalette(QtGui.QPalette(QtGui.QColor(250, 250, 200)))
+ self.setAutoFillBackground(True)
+ self.newTarget()
+
+ def angle(self):
+ return self.currentAngle
+
+ @QtCore.Slot(int)
+ def setAngle(self, angle):
+ if angle < 5:
+ angle = 5
+ if angle > 70:
+ angle = 70;
+ if self.currentAngle == angle:
+ return
+ self.currentAngle = angle
+ self.update()
+ self.emit(QtCore.SIGNAL("angleChanged(int)"), self.currentAngle)
+
+ def force(self):
+ return self.currentForce
+
+ @QtCore.Slot(int)
+ def setForce(self, force):
+ if force < 0:
+ force = 0
+ if self.currentForce == force:
+ return
+ self.currentForce = force;
+ self.emit(QtCore.SIGNAL("forceChanged(int)"), self.currentForce)
+
+ @QtCore.Slot()
+ def shoot(self):
+ if self.autoShootTimer.isActive():
+ return
+ self.timerCount = 0
+ self.shootAngle = self.currentAngle
+ self.shootForce = self.currentForce
+ self.autoShootTimer.start(5)
+
+ firstTime = True
+
+ def newTarget(self):
+ if CannonField.firstTime:
+ CannonField.firstTime = False
+ midnight = QtCore.QTime(0, 0, 0)
+ random.seed(midnight.secsTo(QtCore.QTime.currentTime()))
+
+ self.target = QtCore.QPoint(200 + random.randint(0, 190 - 1), 10 + random.randint(0, 255 - 1))
+ self.update()
+
+ @QtCore.Slot()
+ def moveShot(self):
+ region = QtGui.QRegion(self.shotRect())
+ self.timerCount += 1
+
+ shotR = self.shotRect()
+
+ if shotR.intersects(self.targetRect()):
+ self.autoShootTimer.stop()
+ self.emit(QtCore.SIGNAL("hit()"))
+ elif shotR.x() > self.width() or shotR.y() > self.height():
+ self.autoShootTimer.stop()
+ self.emit(QtCore.SIGNAL("missed()"))
+ else:
+ region = region.united(QtGui.QRegion(shotR))
+
+ self.update(region)
+
+ def paintEvent(self, event):
+ painter = QtGui.QPainter(self)
+
+ self.paintCannon(painter)
+ if self.autoShootTimer.isActive():
+ self.paintShot(painter)
+
+ self.paintTarget(painter)
+
+ def paintShot(self, painter):
+ painter.setPen(QtCore.Qt.NoPen);
+ painter.setBrush(QtCore.Qt.black)
+ painter.drawRect(self.shotRect())
+
+ def paintTarget(self, painter):
+ painter.setPen(QtCore.Qt.black)
+ painter.setBrush(QtCore.Qt.red)
+ painter.drawRect(self.targetRect())
+
+ barrelRect = QtCore.QRect(33, -4, 15, 8)
+
+ def paintCannon(self, painter):
+ painter.setPen(QtCore.Qt.NoPen)
+ painter.setBrush(QtCore.Qt.blue)
+
+ painter.save()
+ painter.translate(0, self.height())
+ painter.drawPie(QtCore.QRect(-35, -35, 70, 70), 0, 90 * 16)
+ painter.rotate(-self.currentAngle)
+ painter.drawRect(CannonField.barrelRect)
+ painter.restore()
+
+ def cannonRect(self):
+ result = QtCore.QRect(0, 0, 50, 50)
+ result.moveBottomLeft(self.rect().bottomLect())
+ return result
+
+ def shotRect(self):
+ gravity = 4.0
+
+ time = self.timerCount / 40.0
+ velocity = self.shootForce
+ radians = self.shootAngle * 3.14159265 / 180
+
+ velx = velocity * math.cos(radians)
+ vely = velocity * math.sin(radians)
+ x0 = (CannonField.barrelRect.right() + 5) * math.cos(radians)
+ y0 = (CannonField.barrelRect.right() + 5) * math.sin(radians)
+ x = x0 + velx * time
+ y = y0 + vely * time - 0.5 * gravity * time * time
+
+ result = QtCore.QRect(0, 0, 6, 6)
+ result.moveCenter(QtCore.QPoint(round(x), self.height() - 1 - round(y)))
+ return result
+
+ def targetRect(self):
+ result = QtCore.QRect(0, 0, 20, 10)
+ result.moveCenter(QtCore.QPoint(self.target.x(), self.height() - 1 - self.target.y()))
+ return result
+
+
+class MyWidget(QtWidgets.QWidget):
+ def __init__(self, parent=None):
+ QtWidgets.QWidget.__init__(self, parent)
+
+ quit = QtWidgets.QPushButton("&Quit")
+ quit.setFont(QtGui.QFont("Times", 18, QtGui.QFont.Bold))
+
+ self.connect(quit, QtCore.SIGNAL("clicked()"),
+ QtWidgets.qApp, QtCore.SLOT("quit()"))
+
+ angle = LCDRange("ANGLE")
+ angle.setRange(5, 70)
+
+ force = LCDRange("FORCE")
+ force.setRange(10, 50)
+
+ cannonField = CannonField()
+
+ self.connect(angle, QtCore.SIGNAL("valueChanged(int)"),
+ cannonField.setAngle)
+ self.connect(cannonField, QtCore.SIGNAL("angleChanged(int)"),
+ angle.setValue)
+
+ self.connect(force, QtCore.SIGNAL("valueChanged(int)"),
+ cannonField.setForce)
+ self.connect(cannonField, QtCore.SIGNAL("forceChanged(int)"),
+ force.setValue)
+
+ shoot = QtWidgets.QPushButton("&Shoot")
+ shoot.setFont(QtGui.QFont("Times", 18, QtGui.QFont.Bold))
+
+ self.connect(shoot, QtCore.SIGNAL("clicked()"), cannonField.shoot)
+
+ topLayout = QtWidgets.QHBoxLayout()
+ topLayout.addWidget(shoot)
+ topLayout.addStretch(1)
+
+ leftLayout = QtWidgets.QVBoxLayout()
+ leftLayout.addWidget(angle)
+ leftLayout.addWidget(force)
+
+ gridLayout = QtWidgets.QGridLayout()
+ gridLayout.addWidget(quit, 0, 0)
+ gridLayout.addLayout(topLayout, 0, 1)
+ gridLayout.addLayout(leftLayout, 1, 0)
+ gridLayout.addWidget(cannonField, 1, 1, 2, 1)
+ gridLayout.setColumnStretch(1, 10)
+ self.setLayout(gridLayout)
+
+ angle.setValue(60)
+ force.setValue(25)
+ angle.setFocus()
+
+
+app = QtWidgets.QApplication(sys.argv)
+widget = MyWidget()
+widget.setGeometry(100, 100, 500, 355)
+widget.show()
+sys.exit(app.exec_())
diff --git a/examples/tutorial/t13.py b/examples/tutorial/t13.py
new file mode 100644
index 00000000..34f2fe59
--- /dev/null
+++ b/examples/tutorial/t13.py
@@ -0,0 +1,396 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+# PySide2 tutorial 13
+
+
+import sys
+import math
+import random
+from PySide2 import QtCore, QtGui, QtWidgets
+
+
+class LCDRange(QtWidgets.QWidget):
+ valueChanged = QtCore.Signal(int)
+ def __init__(self, text=None, parent=None):
+ if isinstance(text, QtWidgets.QWidget):
+ parent = text
+ text = None
+
+ QtWidgets.QWidget.__init__(self, parent)
+
+ self.init()
+
+ if text:
+ self.setText(text)
+
+ def init(self):
+ lcd = QtWidgets.QLCDNumber(2)
+ self.slider = QtWidgets.QSlider(QtCore.Qt.Horizontal)
+ self.slider.setRange(0, 99)
+ self.slider.setValue(0)
+ self.label = QtWidgets.QLabel()
+ self.label.setAlignment(QtCore.Qt.AlignHCenter | QtCore.Qt.AlignTop)
+ self.label.setSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
+
+ self.connect(self.slider, QtCore.SIGNAL("valueChanged(int)"),
+ lcd, QtCore.SLOT("display(int)"))
+ self.connect(self.slider, QtCore.SIGNAL("valueChanged(int)"),
+ self, QtCore.SIGNAL("valueChanged(int)"))
+
+ layout = QtWidgets.QVBoxLayout()
+ layout.addWidget(lcd)
+ layout.addWidget(self.slider)
+ layout.addWidget(self.label)
+ self.setLayout(layout)
+
+ self.setFocusProxy(self.slider)
+
+ def value(self):
+ return self.slider.value()
+
+ @QtCore.Slot(int)
+ def setValue(self, value):
+ self.slider.setValue(value)
+
+ def text(self):
+ return self.label.text()
+
+ def setRange(self, minValue, maxValue):
+ if minValue < 0 or maxValue > 99 or minValue > maxValue:
+ QtCore.qWarning("LCDRange::setRange(%d, %d)\n"
+ "\tRange must be 0..99\n"
+ "\tand minValue must not be greater than maxValue" % (minValue, maxValue))
+ return
+
+ self.slider.setRange(minValue, maxValue)
+
+ def setText(self, text):
+ self.label.setText(text)
+
+
+class CannonField(QtWidgets.QWidget):
+ angleChanged = QtCore.Signal(int)
+ forceChanged = QtCore.Signal(int)
+ hit = QtCore.Signal()
+ missed = QtCore.Signal()
+ canShoot = QtCore.Signal(bool)
+ def __init__(self, parent=None):
+ QtWidgets.QWidget.__init__(self, parent)
+
+ self.currentAngle = 45
+ self.currentForce = 0
+ self.timerCount = 0
+ self.autoShootTimer = QtCore.QTimer(self)
+ self.connect(self.autoShootTimer, QtCore.SIGNAL("timeout()"),
+ self.moveShot)
+ self.shootAngle = 0
+ self.shootForce = 0
+ self.target = QtCore.QPoint(0, 0)
+ self.gameEnded = False
+ self.setPalette(QtGui.QPalette(QtGui.QColor(250, 250, 200)))
+ self.setAutoFillBackground(True)
+ self.newTarget()
+
+ def angle(self):
+ return self.currentAngle
+
+ @QtCore.Slot(int)
+ def setAngle(self, angle):
+ if angle < 5:
+ angle = 5
+ if angle > 70:
+ angle = 70;
+ if self.currentAngle == angle:
+ return
+ self.currentAngle = angle
+ self.update()
+ self.emit(QtCore.SIGNAL("angleChanged(int)"), self.currentAngle)
+
+ def force(self):
+ return self.currentForce
+
+ @QtCore.Slot(int)
+ def setForce(self, force):
+ if force < 0:
+ force = 0
+ if self.currentForce == force:
+ return
+ self.currentForce = force;
+ self.emit(QtCore.SIGNAL("forceChanged(int)"), self.currentForce)
+
+ @QtCore.Slot()
+ def shoot(self):
+ if self.isShooting():
+ return
+ self.timerCount = 0
+ self.shootAngle = self.currentAngle
+ self.shootForce = self.currentForce
+ self.autoShootTimer.start(5)
+ self.emit(QtCore.SIGNAL("canShoot(bool)"), False)
+
+ firstTime = True
+
+ def newTarget(self):
+ if CannonField.firstTime:
+ CannonField.firstTime = False
+ midnight = QtCore.QTime(0, 0, 0)
+ random.seed(midnight.secsTo(QtCore.QTime.currentTime()))
+
+ self.target = QtCore.QPoint(200 + random.randint(0, 190 - 1), 10 + random.randint(0, 255 - 1))
+ self.update()
+
+ def setGameOver(self):
+ if self.gameEnded:
+ return
+ if self.isShooting():
+ self.autoShootTimer.stop()
+ self.gameEnded = True
+ self.update()
+
+ def restartGame(self):
+ if self.isShooting():
+ self.autoShootTimer.stop()
+ self.gameEnded = False
+ self.update()
+ self.emit(QtCore.SIGNAL("canShoot(bool)"), True)
+
+ @QtCore.Slot()
+ def moveShot(self):
+ region = QtGui.QRegion(self.shotRect())
+ self.timerCount += 1
+
+ shotR = self.shotRect()
+
+ if shotR.intersects(self.targetRect()):
+ self.autoShootTimer.stop()
+ self.emit(QtCore.SIGNAL("hit()"))
+ self.emit(QtCore.SIGNAL("canShoot(bool)"), True)
+ elif shotR.x() > self.width() or shotR.y() > self.height():
+ self.autoShootTimer.stop()
+ self.emit(QtCore.SIGNAL("missed()"))
+ self.emit(QtCore.SIGNAL("canShoot(bool)"), True)
+ else:
+ region = region.united(QtGui.QRegion(shotR))
+
+ self.update(region)
+
+ def paintEvent(self, event):
+ painter = QtGui.QPainter(self)
+
+ if self.gameEnded:
+ painter.setPen(QtCore.Qt.black)
+ painter.setFont(QtGui.QFont("Courier", 48, QtGui.QFont.Bold))
+ painter.drawText(self.rect(), QtCore.Qt.AlignCenter, "Game Over")
+
+ self.paintCannon(painter)
+ if self.isShooting():
+ self.paintShot(painter)
+ if not self.gameEnded:
+ self.paintTarget(painter)
+
+ def paintShot(self, painter):
+ painter.setPen(QtCore.Qt.NoPen);
+ painter.setBrush(QtCore.Qt.black)
+ painter.drawRect(self.shotRect())
+
+ def paintTarget(self, painter):
+ painter.setPen(QtCore.Qt.black)
+ painter.setBrush(QtCore.Qt.red)
+ painter.drawRect(self.targetRect())
+
+ barrelRect = QtCore.QRect(33, -4, 15, 8)
+
+ def paintCannon(self, painter):
+ painter.setPen(QtCore.Qt.NoPen)
+ painter.setBrush(QtCore.Qt.blue)
+
+ painter.save()
+ painter.translate(0, self.height())
+ painter.drawPie(QtCore.QRect(-35, -35, 70, 70), 0, 90 * 16)
+ painter.rotate(-self.currentAngle)
+ painter.drawRect(CannonField.barrelRect)
+ painter.restore()
+
+ def cannonRect(self):
+ result = QtCore.QRect(0, 0, 50, 50)
+ result.moveBottomLeft(self.rect().bottomLect())
+ return result
+
+ def shotRect(self):
+ gravity = 4.0
+
+ time = self.timerCount / 40.0
+ velocity = self.shootForce
+ radians = self.shootAngle * 3.14159265 / 180
+
+ velx = velocity * math.cos(radians)
+ vely = velocity * math.sin(radians)
+ x0 = (CannonField.barrelRect.right() + 5) * math.cos(radians)
+ y0 = (CannonField.barrelRect.right() + 5) * math.sin(radians)
+ x = x0 + velx * time
+ y = y0 + vely * time - 0.5 * gravity * time * time
+
+ result = QtCore.QRect(0, 0, 6, 6)
+ result.moveCenter(QtCore.QPoint(round(x), self.height() - 1 - round(y)))
+ return result
+
+ def targetRect(self):
+ result = QtCore.QRect(0, 0, 20, 10)
+ result.moveCenter(QtCore.QPoint(self.target.x(), self.height() - 1 - self.target.y()))
+ return result
+
+ def gameOver(self):
+ return self.gameEnded
+
+ def isShooting(self):
+ return self.autoShootTimer.isActive()
+
+
+class GameBoard(QtWidgets.QWidget):
+ def __init__(self, parent=None):
+ QtWidgets.QWidget.__init__(self, parent)
+
+ quit = QtWidgets.QPushButton("&Quit")
+ quit.setFont(QtGui.QFont("Times", 18, QtGui.QFont.Bold))
+
+ self.connect(quit, QtCore.SIGNAL("clicked()"),
+ QtWidgets.qApp, QtCore.SLOT("quit()"))
+
+ angle = LCDRange("ANGLE")
+ angle.setRange(5, 70)
+
+ force = LCDRange("FORCE")
+ force.setRange(10, 50)
+
+ self.cannonField = CannonField()
+
+ self.connect(angle, QtCore.SIGNAL("valueChanged(int)"),
+ self.cannonField.setAngle)
+ self.connect(self.cannonField, QtCore.SIGNAL("angleChanged(int)"),
+ angle.setValue)
+
+ self.connect(force, QtCore.SIGNAL("valueChanged(int)"),
+ self.cannonField.setForce)
+ self.connect(self.cannonField, QtCore.SIGNAL("forceChanged(int)"),
+ force.setValue)
+
+ self.connect(self.cannonField, QtCore.SIGNAL("hit()"), self.hit)
+ self.connect(self.cannonField, QtCore.SIGNAL("missed()"), self.missed)
+
+ shoot = QtWidgets.QPushButton("&Shoot")
+ shoot.setFont(QtGui.QFont("Times", 18, QtGui.QFont.Bold))
+
+ self.connect(shoot, QtCore.SIGNAL("clicked()"), self.fire)
+ self.connect(self.cannonField, QtCore.SIGNAL("canShoot(bool)"),
+ shoot, QtCore.SLOT("setEnabled(bool)"))
+
+ restart = QtWidgets.QPushButton("&New Game")
+ restart.setFont(QtGui.QFont("Times", 18, QtGui.QFont.Bold))
+
+ self.connect(restart, QtCore.SIGNAL("clicked()"), self.newGame)
+
+ self.hits = QtWidgets.QLCDNumber(2)
+ self.shotsLeft = QtWidgets.QLCDNumber(2)
+ hitsLabel = QtWidgets.QLabel("HITS")
+ shotsLeftLabel = QtWidgets.QLabel("SHOTS LEFT")
+
+ topLayout = QtWidgets.QHBoxLayout()
+ topLayout.addWidget(shoot)
+ topLayout.addWidget(self.hits)
+ topLayout.addWidget(hitsLabel)
+ topLayout.addWidget(self.shotsLeft)
+ topLayout.addWidget(shotsLeftLabel)
+ topLayout.addStretch(1)
+ topLayout.addWidget(restart)
+
+ leftLayout = QtWidgets.QVBoxLayout()
+ leftLayout.addWidget(angle)
+ leftLayout.addWidget(force)
+
+ gridLayout = QtWidgets.QGridLayout()
+ gridLayout.addWidget(quit, 0, 0)
+ gridLayout.addLayout(topLayout, 0, 1)
+ gridLayout.addLayout(leftLayout, 1, 0)
+ gridLayout.addWidget(self.cannonField, 1, 1, 2, 1)
+ gridLayout.setColumnStretch(1, 10)
+ self.setLayout(gridLayout)
+
+ angle.setValue(60)
+ force.setValue(25)
+ angle.setFocus()
+
+ self.newGame()
+
+ @QtCore.Slot()
+ def fire(self):
+ if self.cannonField.gameOver() or self.cannonField.isShooting():
+ return
+ self.shotsLeft.display(self.shotsLeft.intValue() - 1)
+ self.cannonField.shoot()
+
+ @QtCore.Slot()
+ def hit(self):
+ self.hits.display(self.hits.intValue() + 1)
+ if self.shotsLeft.intValue() == 0:
+ self.cannonField.setGameOver()
+ else:
+ self.cannonField.newTarget()
+
+ @QtCore.Slot()
+ def missed(self):
+ if self.shotsLeft.intValue() == 0:
+ self.cannonField.setGameOver()
+
+ @QtCore.Slot()
+ def newGame(self):
+ self.shotsLeft.display(15)
+ self.hits.display(0)
+ self.cannonField.restartGame()
+ self.cannonField.newTarget()
+
+
+app = QtWidgets.QApplication(sys.argv)
+board = GameBoard()
+board.setGeometry(100, 100, 500, 355)
+board.show()
+sys.exit(app.exec_())
diff --git a/examples/tutorial/t14.py b/examples/tutorial/t14.py
new file mode 100644
index 00000000..609af40c
--- /dev/null
+++ b/examples/tutorial/t14.py
@@ -0,0 +1,451 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+# PySide2 tutorial 14
+
+
+import sys
+import math
+import random
+from PySide2 import QtCore, QtGui, QtWidgets
+
+
+class LCDRange(QtWidgets.QWidget):
+ valueChanged = QtCore.Signal(int)
+ def __init__(self, text=None, parent=None):
+ if isinstance(text, QtWidgets.QWidget):
+ parent = text
+ text = None
+
+ QtWidgets.QWidget.__init__(self, parent)
+
+ self.init()
+
+ if text:
+ self.setText(text)
+
+ def init(self):
+ lcd = QtWidgets.QLCDNumber(2)
+ self.slider = QtWidgets.QSlider(QtCore.Qt.Horizontal)
+ self.slider.setRange(0, 99)
+ self.slider.setValue(0)
+ self.label = QtWidgets.QLabel()
+ self.label.setAlignment(QtCore.Qt.AlignHCenter | QtCore.Qt.AlignTop)
+ self.label.setSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
+
+ self.connect(self.slider, QtCore.SIGNAL("valueChanged(int)"),
+ lcd, QtCore.SLOT("display(int)"))
+ self.connect(self.slider, QtCore.SIGNAL("valueChanged(int)"),
+ self, QtCore.SIGNAL("valueChanged(int)"))
+
+ layout = QtWidgets.QVBoxLayout()
+ layout.addWidget(lcd)
+ layout.addWidget(self.slider)
+ layout.addWidget(self.label)
+ self.setLayout(layout)
+
+ self.setFocusProxy(self.slider)
+
+ def value(self):
+ return self.slider.value()
+
+ @QtCore.Slot(int)
+ def setValue(self, value):
+ self.slider.setValue(value)
+
+ def text(self):
+ return self.label.text()
+
+ def setRange(self, minValue, maxValue):
+ if minValue < 0 or maxValue > 99 or minValue > maxValue:
+ QtCore.qWarning("LCDRange::setRange(%d, %d)\n"
+ "\tRange must be 0..99\n"
+ "\tand minValue must not be greater than maxValue" % (minValue, maxValue))
+ return
+
+ self.slider.setRange(minValue, maxValue)
+
+ def setText(self, text):
+ self.label.setText(text)
+
+
+class CannonField(QtWidgets.QWidget):
+ angleChanged = QtCore.Signal(int)
+ forceChanged = QtCore.Signal(int)
+ hit = QtCore.Signal()
+ missed = QtCore.Signal()
+ canShoot = QtCore.Signal(bool)
+ def __init__(self, parent=None):
+ QtWidgets.QWidget.__init__(self, parent)
+
+ self.currentAngle = 45
+ self.currentForce = 0
+ self.timerCount = 0
+ self.autoShootTimer = QtCore.QTimer(self)
+ self.connect(self.autoShootTimer, QtCore.SIGNAL("timeout()"),
+ self.moveShot)
+ self.shootAngle = 0
+ self.shootForce = 0
+ self.target = QtCore.QPoint(0, 0)
+ self.gameEnded = False
+ self.barrelPressed = False
+ self.setPalette(QtGui.QPalette(QtGui.QColor(250, 250, 200)))
+ self.setAutoFillBackground(True)
+ self.newTarget()
+
+ def angle(self):
+ return self.currentAngle
+
+ @QtCore.Slot(int)
+ def setAngle(self, angle):
+ if angle < 5:
+ angle = 5
+ if angle > 70:
+ angle = 70;
+ if self.currentAngle == angle:
+ return
+ self.currentAngle = angle
+ self.update()
+ self.emit(QtCore.SIGNAL("angleChanged(int)"), self.currentAngle)
+
+ def force(self):
+ return self.currentForce
+
+ @QtCore.Slot(int)
+ def setForce(self, force):
+ if force < 0:
+ force = 0
+ if self.currentForce == force:
+ return
+ self.currentForce = force;
+ self.emit(QtCore.SIGNAL("forceChanged(int)"), self.currentForce)
+
+ @QtCore.Slot()
+ def shoot(self):
+ if self.isShooting():
+ return
+ self.timerCount = 0
+ self.shootAngle = self.currentAngle
+ self.shootForce = self.currentForce
+ self.autoShootTimer.start(5)
+ self.emit(QtCore.SIGNAL("canShoot(bool)"), False)
+
+ firstTime = True
+
+ def newTarget(self):
+ if CannonField.firstTime:
+ CannonField.firstTime = False
+ midnight = QtCore.QTime(0, 0, 0)
+ random.seed(midnight.secsTo(QtCore.QTime.currentTime()))
+
+ self.target = QtCore.QPoint(200 + random.randint(0, 190 - 1), 10 + random.randint(0, 255 - 1))
+ self.update()
+
+ def setGameOver(self):
+ if self.gameEnded:
+ return
+ if self.isShooting():
+ self.autoShootTimer.stop()
+ self.gameEnded = True
+ self.update()
+
+ def restartGame(self):
+ if self.isShooting():
+ self.autoShootTimer.stop()
+ self.gameEnded = False
+ self.update()
+ self.emit(QtCore.SIGNAL("canShoot(bool)"), True)
+
+ @QtCore.Slot()
+ def moveShot(self):
+ region = QtGui.QRegion(self.shotRect())
+ self.timerCount += 1
+
+ shotR = self.shotRect()
+
+ if shotR.intersects(self.targetRect()):
+ self.autoShootTimer.stop()
+ self.emit(QtCore.SIGNAL("hit()"))
+ self.emit(QtCore.SIGNAL("canShoot(bool)"), True)
+ elif shotR.x() > self.width() or shotR.y() > self.height() or shotR.intersects(self.barrierRect()):
+ self.autoShootTimer.stop()
+ self.emit(QtCore.SIGNAL("missed()"))
+ self.emit(QtCore.SIGNAL("canShoot(bool)"), True)
+ else:
+ region = region.united(QtGui.QRegion(shotR))
+
+ self.update(region)
+
+ def mousePressEvent(self, event):
+ if event.button() != QtCore.Qt.LeftButton:
+ return
+ if self.barrelHit(event.pos()):
+ self.barrelPressed = True
+
+ def mouseMoveEvent(self, event):
+ if not self.barrelPressed:
+ return
+ pos = event.pos()
+ if pos.x() <= 0:
+ pos.setX(1)
+ if pos.y() >= self.height():
+ pos.setY(self.height() - 1)
+ rad = math.atan((float(self.rect().bottom()) - pos.y()) / pos.x())
+ self.setAngle(round(rad * 180 / 3.14159265))
+
+ def mouseReleaseEvent(self, event):
+ if event.button() == QtCore.Qt.LeftButton:
+ self.barrelPressed = False;
+
+ def paintEvent(self, event):
+ painter = QtGui.QPainter(self)
+
+ if self.gameEnded:
+ painter.setPen(QtCore.Qt.black)
+ painter.setFont(QtGui.QFont("Courier", 48, QtGui.QFont.Bold))
+ painter.drawText(self.rect(), QtCore.Qt.AlignCenter, "Game Over")
+
+ self.paintCannon(painter)
+ self.paintBarrier(painter)
+ if self.isShooting():
+ self.paintShot(painter)
+ if not self.gameEnded:
+ self.paintTarget(painter)
+
+ def paintShot(self, painter):
+ painter.setPen(QtCore.Qt.NoPen);
+ painter.setBrush(QtCore.Qt.black)
+ painter.drawRect(self.shotRect())
+
+ def paintTarget(self, painter):
+ painter.setPen(QtCore.Qt.black)
+ painter.setBrush(QtCore.Qt.red)
+ painter.drawRect(self.targetRect())
+
+ def paintBarrier(self, painter):
+ painter.setPen(QtCore.Qt.black)
+ painter.setBrush(QtCore.Qt.yellow)
+ painter.drawRect(self.barrierRect())
+
+ barrelRect = QtCore.QRect(33, -4, 15, 8)
+
+ def paintCannon(self, painter):
+ painter.setPen(QtCore.Qt.NoPen)
+ painter.setBrush(QtCore.Qt.blue)
+
+ painter.save()
+ painter.translate(0, self.height())
+ painter.drawPie(QtCore.QRect(-35, -35, 70, 70), 0, 90 * 16)
+ painter.rotate(-self.currentAngle)
+ painter.drawRect(CannonField.barrelRect)
+ painter.restore()
+
+ def cannonRect(self):
+ result = QtCore.QRect(0, 0, 50, 50)
+ result.moveBottomLeft(self.rect().bottomLect())
+ return result
+
+ def shotRect(self):
+ gravity = 4.0
+
+ time = self.timerCount / 40.0
+ velocity = self.shootForce
+ radians = self.shootAngle * 3.14159265 / 180
+
+ velx = velocity * math.cos(radians)
+ vely = velocity * math.sin(radians)
+ x0 = (CannonField.barrelRect.right() + 5) * math.cos(radians)
+ y0 = (CannonField.barrelRect.right() + 5) * math.sin(radians)
+ x = x0 + velx * time
+ y = y0 + vely * time - 0.5 * gravity * time * time
+
+ result = QtCore.QRect(0, 0, 6, 6)
+ result.moveCenter(QtCore.QPoint(round(x), self.height() - 1 - round(y)))
+ return result
+
+ def targetRect(self):
+ result = QtCore.QRect(0, 0, 20, 10)
+ result.moveCenter(QtCore.QPoint(self.target.x(), self.height() - 1 - self.target.y()))
+ return result
+
+ def barrierRect(self):
+ return QtCore.QRect(145, self.height() - 100, 15, 99)
+
+ def barrelHit(self, pos):
+ matrix = QtGui.QMatrix()
+ matrix.translate(0, self.height())
+ matrix.rotate(-self.currentAngle)
+ matrix, invertible = matrix.inverted()
+ return self.barrelRect.contains(matrix.map(pos))
+
+ def gameOver(self):
+ return self.gameEnded
+
+ def isShooting(self):
+ return self.autoShootTimer.isActive()
+
+ def sizeHint(self):
+ return QtCore.QSize(400, 300)
+
+
+class GameBoard(QtWidgets.QWidget):
+ def __init__(self, parent=None):
+ QtWidgets.QWidget.__init__(self, parent)
+
+ quit = QtWidgets.QPushButton("&Quit")
+ quit.setFont(QtGui.QFont("Times", 18, QtGui.QFont.Bold))
+
+ self.connect(quit, QtCore.SIGNAL("clicked()"),
+ QtWidgets.qApp, QtCore.SLOT("quit()"))
+
+ angle = LCDRange("ANGLE")
+ angle.setRange(5, 70)
+
+ force = LCDRange("FORCE")
+ force.setRange(10, 50)
+
+ cannonBox = QtWidgets.QFrame()
+ cannonBox.setFrameStyle(QtWidgets.QFrame.WinPanel | QtWidgets.QFrame.Sunken)
+
+ self.cannonField = CannonField()
+
+ self.connect(angle, QtCore.SIGNAL("valueChanged(int)"),
+ self.cannonField.setAngle)
+ self.connect(self.cannonField, QtCore.SIGNAL("angleChanged(int)"),
+ angle.setValue)
+
+ self.connect(force, QtCore.SIGNAL("valueChanged(int)"),
+ self.cannonField.setForce)
+ self.connect(self.cannonField, QtCore.SIGNAL("forceChanged(int)"),
+ force.setValue)
+
+ self.connect(self.cannonField, QtCore.SIGNAL("hit()"), self.hit)
+ self.connect(self.cannonField, QtCore.SIGNAL("missed()"), self.missed)
+
+ shoot = QtWidgets.QPushButton("&Shoot")
+ shoot.setFont(QtGui.QFont("Times", 18, QtGui.QFont.Bold))
+
+ self.connect(shoot, QtCore.SIGNAL("clicked()"), self.fire)
+ self.connect(self.cannonField, QtCore.SIGNAL("canShoot(bool)"),
+ shoot, QtCore.SLOT("setEnabled(bool)"))
+
+ restart = QtWidgets.QPushButton("&New Game")
+ restart.setFont(QtGui.QFont("Times", 18, QtGui.QFont.Bold))
+
+ self.connect(restart, QtCore.SIGNAL("clicked()"), self.newGame)
+
+ self.hits = QtWidgets.QLCDNumber(2)
+ self.shotsLeft = QtWidgets.QLCDNumber(2)
+ hitsLabel = QtWidgets.QLabel("HITS")
+ shotsLeftLabel = QtWidgets.QLabel("SHOTS LEFT")
+
+ QtWidgets.QShortcut(QtGui.QKeySequence(QtCore.Qt.Key_Enter),
+ self, self.fire)
+ QtWidgets.QShortcut(QtGui.QKeySequence(QtCore.Qt.Key_Return),
+ self, self.fire)
+ QtWidgets.QShortcut(QtGui.QKeySequence(QtCore.Qt.CTRL + QtCore.Qt.Key_Q),
+ self, QtCore.SLOT("close()"))
+
+ topLayout = QtWidgets.QHBoxLayout()
+ topLayout.addWidget(shoot)
+ topLayout.addWidget(self.hits)
+ topLayout.addWidget(hitsLabel)
+ topLayout.addWidget(self.shotsLeft)
+ topLayout.addWidget(shotsLeftLabel)
+ topLayout.addStretch(1)
+ topLayout.addWidget(restart)
+
+ leftLayout = QtWidgets.QVBoxLayout()
+ leftLayout.addWidget(angle)
+ leftLayout.addWidget(force)
+
+ cannonLayout = QtWidgets.QVBoxLayout()
+ cannonLayout.addWidget(self.cannonField)
+ cannonBox.setLayout(cannonLayout)
+
+ gridLayout = QtWidgets.QGridLayout()
+ gridLayout.addWidget(quit, 0, 0)
+ gridLayout.addLayout(topLayout, 0, 1)
+ gridLayout.addLayout(leftLayout, 1, 0)
+ gridLayout.addWidget(cannonBox, 1, 1, 2, 1)
+ gridLayout.setColumnStretch(1, 10)
+ self.setLayout(gridLayout)
+
+ angle.setValue(60)
+ force.setValue(25)
+ angle.setFocus()
+
+ self.newGame()
+
+ @QtCore.Slot()
+ def fire(self):
+ if self.cannonField.gameOver() or self.cannonField.isShooting():
+ return
+ self.shotsLeft.display(self.shotsLeft.intValue() - 1)
+ self.cannonField.shoot()
+
+ @QtCore.Slot()
+ def hit(self):
+ self.hits.display(self.hits.intValue() + 1)
+ if self.shotsLeft.intValue() == 0:
+ self.cannonField.setGameOver()
+ else:
+ self.cannonField.newTarget()
+
+ @QtCore.Slot()
+ def missed(self):
+ if self.shotsLeft.intValue() == 0:
+ self.cannonField.setGameOver()
+
+ @QtCore.Slot()
+ def newGame(self):
+ self.shotsLeft.display(15)
+ self.hits.display(0)
+ self.cannonField.restartGame()
+ self.cannonField.newTarget()
+
+
+app = QtWidgets.QApplication(sys.argv)
+board = GameBoard()
+board.setGeometry(100, 100, 500, 355)
+board.show()
+sys.exit(app.exec_())
diff --git a/examples/tutorial/t2.py b/examples/tutorial/t2.py
new file mode 100644
index 00000000..91ca2f34
--- /dev/null
+++ b/examples/tutorial/t2.py
@@ -0,0 +1,60 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+# PySide2 tutorial 2
+
+
+import sys
+from PySide2 import QtCore, QtGui, QtWidgets
+
+
+app = QtWidgets.QApplication(sys.argv)
+
+quit = QtWidgets.QPushButton("Quit")
+quit.resize(75, 30)
+quit.setFont(QtGui.QFont("Times", 18, QtGui.QFont.Bold))
+
+QtCore.QObject.connect(quit, QtCore.SIGNAL("clicked()"),
+ app, QtCore.SLOT("quit()"))
+
+quit.show()
+sys.exit(app.exec_())
diff --git a/examples/tutorial/t3.py b/examples/tutorial/t3.py
new file mode 100644
index 00000000..9dc50a1b
--- /dev/null
+++ b/examples/tutorial/t3.py
@@ -0,0 +1,62 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+# PySide2 tutorial 3
+
+
+import sys
+from PySide2 import QtCore, QtGui, QtWidgets
+
+
+app = QtWidgets.QApplication(sys.argv)
+
+window = QtWidgets.QWidget()
+window.resize(200, 120)
+
+quit = QtWidgets.QPushButton("Quit", window)
+quit.setFont(QtGui.QFont("Times", 18, QtGui.QFont.Bold))
+quit.setGeometry(10, 40, 180, 40)
+QtCore.QObject.connect(quit, QtCore.SIGNAL("clicked()"),
+ app, QtCore.SLOT("quit()"))
+
+window.show()
+sys.exit(app.exec_())
diff --git a/examples/tutorial/t4.py b/examples/tutorial/t4.py
new file mode 100644
index 00000000..77f593d2
--- /dev/null
+++ b/examples/tutorial/t4.py
@@ -0,0 +1,67 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+# PySide2 tutorial 4
+
+
+import sys
+from PySide2 import QtCore, QtGui, QtWidgets
+
+
+class MyWidget(QtWidgets.QWidget):
+ def __init__(self, parent=None):
+ QtWidgets.QWidget.__init__(self, parent)
+
+ self.setFixedSize(200, 120)
+
+ self.quit = QtWidgets.QPushButton("Quit", self)
+ self.quit.setGeometry(62, 40, 75, 30)
+ self.quit.setFont(QtGui.QFont("Times", 18, QtGui.QFont.Bold))
+
+ self.connect(self.quit, QtCore.SIGNAL("clicked()"),
+ QtWidgets.qApp, QtCore.SLOT("quit()"))
+
+
+app = QtWidgets.QApplication(sys.argv)
+widget = MyWidget()
+widget.show()
+sys.exit(app.exec_())
diff --git a/examples/tutorial/t5.py b/examples/tutorial/t5.py
new file mode 100644
index 00000000..0fdd2ac2
--- /dev/null
+++ b/examples/tutorial/t5.py
@@ -0,0 +1,78 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+# PySide2 tutorial 5
+
+
+import sys
+from PySide2 import QtCore, QtGui, QtWidgets
+
+
+class MyWidget(QtWidgets.QWidget):
+ def __init__(self, parent=None):
+ QtWidgets.QWidget.__init__(self, parent)
+
+ quit = QtWidgets.QPushButton("Quit")
+ quit.setFont(QtGui.QFont("Times", 18, QtGui.QFont.Bold))
+
+ lcd = QtWidgets.QLCDNumber(2)
+
+ slider = QtWidgets.QSlider(QtCore.Qt.Horizontal)
+ slider.setRange(0, 99)
+ slider.setValue(0)
+
+ self.connect(quit, QtCore.SIGNAL("clicked()"),
+ QtWidgets.qApp, QtCore.SLOT("quit()"))
+ self.connect(slider, QtCore.SIGNAL("valueChanged(int)"),
+ lcd, QtCore.SLOT("display(int)"))
+
+ layout = QtWidgets.QVBoxLayout()
+ layout.addWidget(quit);
+ layout.addWidget(lcd);
+ layout.addWidget(slider);
+ self.setLayout(layout);
+
+
+app = QtWidgets.QApplication(sys.argv)
+widget = MyWidget()
+widget.show()
+sys.exit(app.exec_())
diff --git a/examples/tutorial/t6.py b/examples/tutorial/t6.py
new file mode 100644
index 00000000..d720433f
--- /dev/null
+++ b/examples/tutorial/t6.py
@@ -0,0 +1,91 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+# PySide2 tutorial 6
+
+
+import sys
+from PySide2 import QtCore, QtGui, QtWidgets
+
+
+class LCDRange(QtWidgets.QWidget):
+ def __init__(self, parent=None):
+ QtWidgets.QWidget.__init__(self, parent)
+
+ lcd = QtWidgets.QLCDNumber(2)
+ slider = QtWidgets.QSlider(QtCore.Qt.Horizontal)
+ slider.setRange(0, 99)
+ slider.setValue(0)
+ self.connect(slider, QtCore.SIGNAL("valueChanged(int)"),
+ lcd, QtCore.SLOT("display(int)"))
+
+ layout = QtWidgets.QVBoxLayout()
+ layout.addWidget(lcd)
+ layout.addWidget(slider)
+ self.setLayout(layout)
+
+
+class MyWidget(QtWidgets.QWidget):
+ def __init__(self, parent=None):
+ QtWidgets.QWidget.__init__(self, parent)
+
+ quit = QtWidgets.QPushButton("Quit")
+ quit.setFont(QtGui.QFont("Times", 18, QtGui.QFont.Bold))
+ self.connect(quit, QtCore.SIGNAL("clicked()"),
+ QtWidgets.qApp, QtCore.SLOT("quit()"))
+
+ grid = QtWidgets.QGridLayout()
+ layout = QtWidgets.QVBoxLayout()
+ layout.addWidget(quit)
+ layout.addLayout(grid)
+ self.setLayout(layout)
+ for row in range(3):
+ for column in range(3):
+ grid.addWidget(LCDRange(), row, column)
+
+
+
+
+app = QtWidgets.QApplication(sys.argv)
+widget = MyWidget()
+widget.show()
+sys.exit(app.exec_())
diff --git a/examples/tutorial/t7.py b/examples/tutorial/t7.py
new file mode 100644
index 00000000..a9c53f68
--- /dev/null
+++ b/examples/tutorial/t7.py
@@ -0,0 +1,114 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+# PySide2 tutorial 7
+
+
+import sys
+from PySide2 import QtCore, QtGui, QtWidgets
+
+
+class LCDRange(QtWidgets.QWidget):
+ valueChanged = QtCore.Signal(int)
+ def __init__(self, parent=None):
+ QtWidgets.QWidget.__init__(self, parent)
+
+ lcd = QtWidgets.QLCDNumber(2)
+
+ self.slider = QtWidgets.QSlider(QtCore.Qt.Horizontal)
+ self.slider.setRange(0, 99)
+ self.slider.setValue(0)
+
+ self.connect(self.slider, QtCore.SIGNAL("valueChanged(int)"),
+ lcd, QtCore.SLOT("display(int)"))
+ self.connect(self.slider, QtCore.SIGNAL("valueChanged(int)"),
+ self, QtCore.SIGNAL("valueChanged(int)"))
+
+ layout = QtWidgets.QVBoxLayout()
+ layout.addWidget(lcd)
+ layout.addWidget(self.slider)
+ self.setLayout(layout)
+
+ def value(self):
+ return self.slider.value()
+
+ @QtCore.Slot(int)
+ def setValue(self, value):
+ self.slider.setValue(value)
+
+
+class MyWidget(QtWidgets.QWidget):
+ def __init__(self, parent=None):
+ QtWidgets.QWidget.__init__(self, parent)
+
+ quit = QtWidgets.QPushButton("Quit")
+ quit.setFont(QtGui.QFont("Times", 18, QtGui.QFont.Bold))
+
+ self.connect(quit, QtCore.SIGNAL("clicked()"),
+ QtWidgets.qApp, QtCore.SLOT("quit()"))
+
+ grid = QtWidgets.QGridLayout()
+ previousRange = None
+
+
+ layout = QtWidgets.QVBoxLayout()
+ layout.addWidget(quit)
+ layout.addLayout(grid)
+ self.setLayout(layout)
+
+ for row in range(3):
+ for column in range(3):
+ lcdRange = LCDRange()
+ grid.addWidget(lcdRange, row, column)
+
+ if previousRange:
+ self.connect(lcdRange, QtCore.SIGNAL("valueChanged(int)"),
+ previousRange.setValue)
+
+ previousRange = lcdRange
+
+
+
+app = QtWidgets.QApplication(sys.argv)
+widget = MyWidget()
+widget.show()
+sys.exit(app.exec_())
diff --git a/examples/tutorial/t8.py b/examples/tutorial/t8.py
new file mode 100644
index 00000000..d023de15
--- /dev/null
+++ b/examples/tutorial/t8.py
@@ -0,0 +1,153 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+# PySide2 tutorial 8
+
+
+import sys
+from PySide2 import QtCore, QtGui, QtWidgets
+
+
+class LCDRange(QtWidgets.QWidget):
+ valueChanged = QtCore.Signal(int)
+ def __init__(self, parent=None):
+ QtWidgets.QWidget.__init__(self, parent)
+
+ lcd = QtWidgets.QLCDNumber(2)
+ self.slider = QtWidgets.QSlider(QtCore.Qt.Horizontal)
+ self.slider.setRange(0, 99)
+ self.slider.setValue(0)
+
+ self.connect(self.slider, QtCore.SIGNAL("valueChanged(int)"),
+ lcd, QtCore.SLOT("display(int)"))
+ self.connect(self.slider, QtCore.SIGNAL("valueChanged(int)"),
+ self, QtCore.SIGNAL("valueChanged(int)"))
+
+ layout = QtWidgets.QVBoxLayout()
+ layout.addWidget(lcd)
+ layout.addWidget(self.slider)
+ self.setLayout(layout)
+
+ self.setFocusProxy(self.slider)
+
+ def value(self):
+ return self.slider.value()
+
+ @QtCore.Slot(int)
+ def setValue(self, value):
+ self.slider.setValue(value)
+
+ def setRange(self, minValue, maxValue):
+ if minValue < 0 or maxValue > 99 or minValue > maxValue:
+ QtCore.qWarning("LCDRange.setRange(%d, %d)\n"
+ "\tRange must be 0..99\n"
+ "\tand minValue must not be greater than maxValue" % (minValue, maxValue))
+ return
+
+ self.slider.setRange(minValue, maxValue)
+
+
+class CannonField(QtWidgets.QWidget):
+ angleChanged = QtCore.Signal(int)
+ def __init__(self, parent=None):
+ QtWidgets.QWidget.__init__(self, parent)
+
+ self.currentAngle = 45
+ self.setPalette(QtGui.QPalette(QtGui.QColor(250, 250, 200)))
+ self.setAutoFillBackground(True)
+
+ def angle(self):
+ return self.currentAngle
+
+ @QtCore.Slot(int)
+ def setAngle(self, angle):
+ if angle < 5:
+ angle = 5
+ if angle > 70:
+ angle = 70;
+ if self.currentAngle == angle:
+ return
+ self.currentAngle = angle
+ self.update()
+ self.emit(QtCore.SIGNAL("angleChanged(int)"), self.currentAngle)
+
+ def paintEvent(self, event):
+ painter = QtGui.QPainter(self)
+ painter.drawText(200, 200, "Angle = %d" % self.currentAngle)
+
+
+class MyWidget(QtWidgets.QWidget):
+ def __init__(self, parent=None):
+ QtWidgets.QWidget.__init__(self, parent)
+
+ quit = QtWidgets.QPushButton("Quit")
+ quit.setFont(QtGui.QFont("Times", 18, QtGui.QFont.Bold))
+
+ self.connect(quit, QtCore.SIGNAL("clicked()"),
+ QtWidgets.qApp, QtCore.SLOT("quit()"))
+
+ angle = LCDRange()
+ angle.setRange(5, 70)
+
+ cannonField = CannonField()
+
+ self.connect(angle, QtCore.SIGNAL("valueChanged(int)"),
+ cannonField.setAngle)
+ self.connect(cannonField, QtCore.SIGNAL("angleChanged(int)"),
+ angle.setValue)
+
+ gridLayout = QtWidgets.QGridLayout()
+ gridLayout.addWidget(quit, 0, 0)
+ gridLayout.addWidget(angle, 1, 0)
+ gridLayout.addWidget(cannonField, 1, 1, 2, 1)
+ gridLayout.setColumnStretch(1, 10)
+ self.setLayout(gridLayout)
+
+ angle.setValue(60)
+ angle.setFocus()
+
+
+app = QtWidgets.QApplication(sys.argv)
+widget = MyWidget()
+widget.setGeometry(100, 100, 500, 355)
+widget.show()
+sys.exit(app.exec_())
diff --git a/examples/tutorial/t9.py b/examples/tutorial/t9.py
new file mode 100644
index 00000000..37c0e651
--- /dev/null
+++ b/examples/tutorial/t9.py
@@ -0,0 +1,160 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+# PySide2 tutorial 9
+
+
+import sys
+from PySide2 import QtCore, QtGui, QtWidgets
+
+
+class LCDRange(QtWidgets.QWidget):
+ valueChanged = QtCore.Signal(int)
+ def __init__(self, parent=None):
+ QtWidgets.QWidget.__init__(self, parent)
+
+ lcd = QtWidgets.QLCDNumber(2)
+ self.slider = QtWidgets.QSlider(QtCore.Qt.Horizontal)
+ self.slider.setRange(0, 99)
+ self.slider.setValue(0)
+
+ self.connect(self.slider, QtCore.SIGNAL("valueChanged(int)"),
+ lcd, QtCore.SLOT("display(int)"))
+ self.connect(self.slider, QtCore.SIGNAL("valueChanged(int)"),
+ self, QtCore.SIGNAL("valueChanged(int)"))
+
+ layout = QtWidgets.QVBoxLayout()
+ layout.addWidget(lcd)
+ layout.addWidget(self.slider)
+ self.setLayout(layout)
+
+ self.setFocusProxy(self.slider)
+
+ def value(self):
+ return self.slider.value()
+
+ @QtCore.Slot(int)
+ def setValue(self, value):
+ self.slider.setValue(value)
+
+ def setRange(self, minValue, maxValue):
+ if minValue < 0 or maxValue > 99 or minValue > maxValue:
+ QtCore.qWarning("LCDRange::setRange(%d, %d)\n"
+ "\tRange must be 0..99\n"
+ "\tand minValue must not be greater than maxValue" % (minValue, maxValue))
+ return
+
+ self.slider.setRange(minValue, maxValue)
+
+
+class CannonField(QtWidgets.QWidget):
+ angleChanged = QtCore.Signal(int)
+ def __init__(self, parent=None):
+ QtWidgets.QWidget.__init__(self, parent)
+
+ self.currentAngle = 45
+ self.setPalette(QtGui.QPalette(QtGui.QColor(250, 250, 200)))
+ self.setAutoFillBackground(True)
+
+ def angle(self):
+ return self.currentAngle
+
+ @QtCore.Slot(int)
+ def setAngle(self, angle):
+ if angle < 5:
+ angle = 5
+ if angle > 70:
+ angle = 70;
+ if self.currentAngle == angle:
+ return
+ self.currentAngle = angle
+ self.update()
+ self.emit(QtCore.SIGNAL("angleChanged(int)"), self.currentAngle)
+
+ def paintEvent(self, event):
+ painter = QtGui.QPainter(self)
+
+ painter.setPen(QtCore.Qt.NoPen)
+ painter.setBrush(QtCore.Qt.blue)
+
+ painter.translate(0, self.rect().height())
+ painter.drawPie(QtCore.QRect(-35, -35, 70, 70), 0, 90 * 16)
+ painter.rotate(-self.currentAngle)
+ painter.drawRect(QtCore.QRect(33, -4, 15, 8))
+
+
+class MyWidget(QtWidgets.QWidget):
+ def __init__(self, parent=None):
+ QtWidgets.QWidget.__init__(self, parent)
+
+ quit = QtWidgets.QPushButton("Quit")
+ quit.setFont(QtGui.QFont("Times", 18, QtGui.QFont.Bold))
+
+ self.connect(quit, QtCore.SIGNAL("clicked()"),
+ QtWidgets.qApp, QtCore.SLOT("quit()"))
+
+ angle = LCDRange()
+ angle.setRange(5, 70)
+
+ cannonField = CannonField()
+
+ self.connect(angle, QtCore.SIGNAL("valueChanged(int)"),
+ cannonField.setAngle)
+ self.connect(cannonField, QtCore.SIGNAL("angleChanged(int)"),
+ angle.setValue)
+
+ gridLayout = QtWidgets.QGridLayout()
+ gridLayout.addWidget(quit, 0, 0)
+ gridLayout.addWidget(angle, 1, 0)
+ gridLayout.addWidget(cannonField, 1, 1, 2, 1)
+ gridLayout.setColumnStretch(1, 10)
+ self.setLayout(gridLayout)
+
+ angle.setValue(60)
+ angle.setFocus()
+
+
+app = QtWidgets.QApplication(sys.argv)
+widget = MyWidget()
+widget.setGeometry(100, 100, 500, 355)
+widget.show()
+sys.exit(app.exec_())
diff --git a/examples/utils/utils.py b/examples/utils/utils.py
new file mode 100644
index 00000000..ddba61b8
--- /dev/null
+++ b/examples/utils/utils.py
@@ -0,0 +1,49 @@
+#!/usr/bin/python
+
+#############################################################################
+##
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+import sys
+isPY3 = sys.version_info[0] == 3
+
+if isPY3:
+ text_type = str
+else:
+ text_type = unicode
diff --git a/examples/webenginewidgets/simplebrowser.py b/examples/webenginewidgets/simplebrowser.py
new file mode 100644
index 00000000..b895acb3
--- /dev/null
+++ b/examples/webenginewidgets/simplebrowser.py
@@ -0,0 +1,102 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2017 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+"""PySide2 WebEngineWidgets Example"""
+
+import sys
+from PySide2.QtCore import QUrl
+from PySide2.QtGui import QIcon
+from PySide2.QtWidgets import (QApplication, QDesktopWidget, QLineEdit,
+ QMainWindow, QPushButton, QToolBar)
+from PySide2.QtWebEngineWidgets import QWebEnginePage, QWebEngineView
+
+class MainWindow(QMainWindow):
+
+ def __init__(self):
+ super(MainWindow, self).__init__()
+
+ self.setWindowTitle('PySide2 WebEngineWidgets Example')
+
+ self.toolBar = QToolBar()
+ self.addToolBar(self.toolBar)
+ self.backButton = QPushButton()
+ self.backButton.setIcon(QIcon(':/qt-project.org/styles/commonstyle/images/left-32.png'))
+ self.backButton.clicked.connect(self.back)
+ self.toolBar.addWidget(self.backButton)
+ self.forwardButton = QPushButton()
+ self.forwardButton.setIcon(QIcon(':/qt-project.org/styles/commonstyle/images/right-32.png'))
+ self.forwardButton.clicked.connect(self.forward)
+ self.toolBar.addWidget(self.forwardButton)
+
+ self.addressLineEdit = QLineEdit()
+ self.addressLineEdit.returnPressed.connect(self.load)
+ self.toolBar.addWidget(self.addressLineEdit)
+
+ self.webEngineView = QWebEngineView()
+ self.setCentralWidget(self.webEngineView)
+ initialUrl = 'http://qt.io'
+ self.addressLineEdit.setText(initialUrl)
+ self.webEngineView.load(QUrl(initialUrl))
+ self.webEngineView.page().titleChanged.connect(self.setWindowTitle)
+ self.webEngineView.page().urlChanged.connect(self.urlChanged)
+
+ def load(self):
+ url = QUrl.fromUserInput(self.addressLineEdit.text())
+ if url.isValid():
+ self.webEngineView.load(url)
+
+ def back(self):
+ self.webEngineView.page().triggerAction(QWebEnginePage.Back)
+
+ def forward(self):
+ self.webEngineView.page().triggerAction(QWebEnginePage.Forward)
+
+ def urlChanged(self, url):
+ self.addressLineEdit.setText(url.toString())
+
+if __name__ == '__main__':
+ app = QApplication(sys.argv)
+ mainWin = MainWindow()
+ availableGeometry = app.desktop().availableGeometry(mainWin)
+ mainWin.resize(availableGeometry.width() * 2 / 3, availableGeometry.height() * 2 / 3)
+ mainWin.show()
+ sys.exit(app.exec_())
diff --git a/examples/widgets/animation/animatedtiles/animatedtiles.py b/examples/widgets/animation/animatedtiles/animatedtiles.py
new file mode 100755
index 00000000..d3b649d3
--- /dev/null
+++ b/examples/widgets/animation/animatedtiles/animatedtiles.py
@@ -0,0 +1,260 @@
+#!/usr/bin/env python
+
+#############################################################################
+##
+## Copyright (C) 2010 Riverbank Computing Limited.
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+from PySide2 import QtCore, QtGui, QtWidgets
+
+import animatedtiles_rc
+
+
+# Deriving from more than one wrapped class is not supported, so we use
+# composition and delegate the property.
+class Pixmap(QtCore.QObject):
+ def __init__(self, pix):
+ super(Pixmap, self).__init__()
+
+ self.pixmap_item = QtWidgets.QGraphicsPixmapItem(pix)
+ self.pixmap_item.setCacheMode(QtWidgets.QGraphicsItem.DeviceCoordinateCache)
+
+ def set_pos(self, pos):
+ self.pixmap_item.setPos(pos)
+
+ def get_pos(self):
+ return self.pixmap_item.pos()
+
+ pos = QtCore.Property(QtCore.QPointF, get_pos, set_pos)
+
+
+class Button(QtWidgets.QGraphicsWidget):
+ pressed = QtCore.Signal()
+
+ def __init__(self, pixmap, parent=None):
+ super(Button, self).__init__(parent)
+
+ self._pix = pixmap
+
+ self.setAcceptHoverEvents(True)
+ self.setCacheMode(QtWidgets.QGraphicsItem.DeviceCoordinateCache)
+
+ def boundingRect(self):
+ return QtCore.QRectF(-65, -65, 130, 130)
+
+ def shape(self):
+ path = QtGui.QPainterPath()
+ path.addEllipse(self.boundingRect())
+
+ return path
+
+ def paint(self, painter, option, widget):
+ down = option.state & QtWidgets.QStyle.State_Sunken
+ r = self.boundingRect()
+
+ grad = QtGui.QLinearGradient(r.topLeft(), r.bottomRight())
+ if option.state & QtWidgets.QStyle.State_MouseOver:
+ color_0 = QtCore.Qt.white
+ else:
+ color_0 = QtCore.Qt.lightGray
+
+ color_1 = QtCore.Qt.darkGray
+
+ if down:
+ color_0, color_1 = color_1, color_0
+
+ grad.setColorAt(0, color_0)
+ grad.setColorAt(1, color_1)
+
+ painter.setPen(QtCore.Qt.darkGray)
+ painter.setBrush(grad)
+ painter.drawEllipse(r)
+
+ color_0 = QtCore.Qt.darkGray
+ color_1 = QtCore.Qt.lightGray
+
+ if down:
+ color_0, color_1 = color_1, color_0
+
+ grad.setColorAt(0, color_0)
+ grad.setColorAt(1, color_1)
+
+ painter.setPen(QtCore.Qt.NoPen)
+ painter.setBrush(grad)
+
+ if down:
+ painter.translate(2, 2)
+
+ painter.drawEllipse(r.adjusted(5, 5, -5, -5))
+ painter.drawPixmap(-self._pix.width() / 2, -self._pix.height() / 2,
+ self._pix)
+
+ def mousePressEvent(self, ev):
+ self.pressed.emit()
+ self.update()
+
+ def mouseReleaseEvent(self, ev):
+ self.update()
+
+
+class View(QtWidgets.QGraphicsView):
+ def resizeEvent(self, event):
+ super(View, self).resizeEvent(event)
+ self.fitInView(self.sceneRect(), QtCore.Qt.KeepAspectRatio)
+
+
+if __name__ == '__main__':
+
+ import sys
+ import math
+
+ app = QtWidgets.QApplication(sys.argv)
+
+ kineticPix = QtGui.QPixmap(':/images/kinetic.png')
+ bgPix = QtGui.QPixmap(':/images/Time-For-Lunch-2.jpg')
+
+ scene = QtWidgets.QGraphicsScene(-350, -350, 700, 700)
+
+ items = []
+ for i in range(64):
+ item = Pixmap(kineticPix)
+ item.pixmap_item.setOffset(-kineticPix.width() / 2,
+ -kineticPix.height() / 2)
+ item.pixmap_item.setZValue(i)
+ items.append(item)
+ scene.addItem(item.pixmap_item)
+
+ # Buttons.
+ buttonParent = QtWidgets.QGraphicsRectItem()
+ ellipseButton = Button(QtGui.QPixmap(':/images/ellipse.png'), buttonParent)
+ figure8Button = Button(QtGui.QPixmap(':/images/figure8.png'), buttonParent)
+ randomButton = Button(QtGui.QPixmap(':/images/random.png'), buttonParent)
+ tiledButton = Button(QtGui.QPixmap(':/images/tile.png'), buttonParent)
+ centeredButton = Button(QtGui.QPixmap(':/images/centered.png'), buttonParent)
+
+ ellipseButton.setPos(-100, -100)
+ figure8Button.setPos(100, -100)
+ randomButton.setPos(0, 0)
+ tiledButton.setPos(-100, 100)
+ centeredButton.setPos(100, 100)
+
+ scene.addItem(buttonParent)
+ buttonParent.setTransform(QtGui.QTransform().scale(0.75, 0.75))
+ buttonParent.setPos(200, 200)
+ buttonParent.setZValue(65)
+
+ # States.
+ rootState = QtCore.QState()
+ ellipseState = QtCore.QState(rootState)
+ figure8State = QtCore.QState(rootState)
+ randomState = QtCore.QState(rootState)
+ tiledState = QtCore.QState(rootState)
+ centeredState = QtCore.QState(rootState)
+
+ # Values.
+ for i, item in enumerate(items):
+ # Ellipse.
+ ellipseState.assignProperty(item, 'pos',
+ QtCore.QPointF(math.cos((i / 63.0) * 6.28) * 250,
+ math.sin((i / 63.0) * 6.28) * 250))
+
+ # Figure 8.
+ figure8State.assignProperty(item, 'pos',
+ QtCore.QPointF(math.sin((i / 63.0) * 6.28) * 250,
+ math.sin(((i * 2)/63.0) * 6.28) * 250))
+
+ # Random.
+ randomState.assignProperty(item, 'pos',
+ QtCore.QPointF(-250 + QtCore.qrand() % 500,
+ -250 + QtCore.qrand() % 500))
+
+ # Tiled.
+ tiledState.assignProperty(item, 'pos',
+ QtCore.QPointF(((i % 8) - 4) * kineticPix.width() + kineticPix.width() / 2,
+ ((i // 8) - 4) * kineticPix.height() + kineticPix.height() / 2))
+
+ # Centered.
+ centeredState.assignProperty(item, 'pos', QtCore.QPointF())
+
+ # Ui.
+ view = View(scene)
+ view.setWindowTitle("Animated Tiles")
+ view.setViewportUpdateMode(QtWidgets.QGraphicsView.BoundingRectViewportUpdate)
+ view.setBackgroundBrush(QtGui.QBrush(bgPix))
+ view.setCacheMode(QtWidgets.QGraphicsView.CacheBackground)
+ view.setRenderHints(
+ QtGui.QPainter.Antialiasing | QtGui.QPainter.SmoothPixmapTransform)
+ view.show()
+
+ states = QtCore.QStateMachine()
+ states.addState(rootState)
+ states.setInitialState(rootState)
+ rootState.setInitialState(centeredState)
+
+ group = QtCore.QParallelAnimationGroup()
+ for i, item in enumerate(items):
+ anim = QtCore.QPropertyAnimation(item, 'pos')
+ anim.setDuration(750 + i * 25)
+ anim.setEasingCurve(QtCore.QEasingCurve.InOutBack)
+ group.addAnimation(anim)
+
+ trans = rootState.addTransition(ellipseButton.pressed, ellipseState)
+ trans.addAnimation(group)
+
+ trans = rootState.addTransition(figure8Button.pressed, figure8State)
+ trans.addAnimation(group)
+
+ trans = rootState.addTransition(randomButton.pressed, randomState)
+ trans.addAnimation(group)
+
+ trans = rootState.addTransition(tiledButton.pressed, tiledState)
+ trans.addAnimation(group)
+
+ trans = rootState.addTransition(centeredButton.pressed, centeredState)
+ trans.addAnimation(group)
+
+ timer = QtCore.QTimer()
+ timer.start(125)
+ timer.setSingleShot(True)
+ trans = rootState.addTransition(timer.timeout, ellipseState)
+ trans.addAnimation(group)
+
+ states.start()
+
+ sys.exit(app.exec_())
diff --git a/examples/widgets/animation/animatedtiles/animatedtiles.qrc b/examples/widgets/animation/animatedtiles/animatedtiles.qrc
new file mode 100644
index 00000000..c43a9797
--- /dev/null
+++ b/examples/widgets/animation/animatedtiles/animatedtiles.qrc
@@ -0,0 +1,11 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>images/Time-For-Lunch-2.jpg</file>
+ <file>images/centered.png</file>
+ <file>images/ellipse.png</file>
+ <file>images/figure8.png</file>
+ <file>images/kinetic.png</file>
+ <file>images/random.png</file>
+ <file>images/tile.png</file>
+</qresource>
+</RCC>
diff --git a/examples/widgets/animation/animatedtiles/animatedtiles_rc.py b/examples/widgets/animation/animatedtiles/animatedtiles_rc.py
new file mode 100644
index 00000000..19841641
--- /dev/null
+++ b/examples/widgets/animation/animatedtiles/animatedtiles_rc.py
@@ -0,0 +1,6144 @@
+# -*- coding: utf-8 -*-
+
+#############################################################################
+##
+## Copyright (C) 2013 Riverbank Computing Limited.
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: http://www.qt.io/licensing/
+##
+## This file is part of the PySide examples of the Qt Toolkit.
+##
+## $QT_BEGIN_LICENSE:BSD$
+## You may use this file under the terms of the BSD license as follows:
+##
+## "Redistribution and use in source and binary forms, with or without
+## modification, are permitted provided that the following conditions are
+## met:
+## * Redistributions of source code must retain the above copyright
+## notice, this list of conditions and the following disclaimer.
+## * Redistributions in binary form must reproduce the above copyright
+## notice, this list of conditions and the following disclaimer in
+## the documentation and/or other materials provided with the
+## distribution.
+## * Neither the name of The Qt Company Ltd nor the names of its
+## contributors may be used to endorse or promote products derived
+## from this software without specific prior written permission.
+##
+##
+## THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+## OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+## DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+## THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+## (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+## OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+# Resource object code
+#
+# Created: Wed Sep 15 16:46:54 2010
+# by: The Resource Compiler for PySide (Qt v4.7.0)
+#
+# WARNING! All changes made in this file will be lost!
+
+from PySide2 import QtCore
+
+qt_resource_data = b"\
+\x00\x00\x36\xe2\
+\x89\
+\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
+\x00\x00\x64\x00\x00\x00\x64\x08\x06\x00\x00\x00\x70\xe2\x95\x54\
+\x00\x00\x00\x01\x73\x52\x47\x42\x00\xae\xce\x1c\xe9\x00\x00\x00\
+\x06\x62\x4b\x47\x44\x00\xff\x00\xff\x00\xff\xa0\xbd\xa7\x93\x00\
+\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0e\xc4\x00\x00\x0e\xc4\x01\
+\x95\x2b\x0e\x1b\x00\x00\x00\x07\x74\x49\x4d\x45\x07\xd9\x03\x03\
+\x0e\x1c\x24\x7c\x1a\xa6\xff\x00\x00\x20\x00\x49\x44\x41\x54\x78\
+\xda\xed\x9d\x77\x98\x9d\x65\x9d\xf7\x3f\xf7\x53\x4e\x9f\x99\x33\
+\x33\x99\x4c\x66\x12\x32\xa9\xa4\x03\x91\x90\x10\x6a\xe8\x48\xd9\
+\x05\xa5\x88\xc8\xba\xeb\xcb\xb2\xae\x04\x51\x57\x5f\x57\x5d\x5d\
+\x76\x5d\x45\x51\x56\x50\x71\x59\x75\xa5\x59\xc0\x12\x3a\x16\x88\
+\x94\x00\x09\x29\xa4\x4d\xea\xb4\x4c\xa6\xcf\x9c\x39\xbd\x3d\xf5\
+\x7e\xff\x38\xf3\x3c\x99\x41\x94\x34\x7d\xdf\xeb\xbd\xb8\xaf\x2b\
+\x57\x32\xc9\xc9\x79\xca\xf7\xfe\xb5\xef\xaf\xdc\xf0\xee\x7a\x77\
+\xbd\xbb\xde\x5d\xef\xae\x77\xd7\xbb\xeb\xdd\xf5\xee\x7a\x77\xfd\
+\x7f\xbf\xc4\xb1\xfc\xe7\xba\xba\xba\xab\x0c\xc3\x08\x4e\x99\x32\
+\xe5\x73\x2b\x57\xae\x3c\x51\x51\x14\xb6\x6d\xdb\x46\x6d\x6d\xed\
+\xa1\x0b\xb8\x02\x09\x20\xe4\x1f\x5c\x4d\x55\xd5\x94\xa2\x28\xf9\
+\x72\xb9\xac\xbf\xfa\xea\xab\xb3\xfe\x6f\xbf\x8c\xda\xda\xda\x9f\
+\x5d\x77\xdd\x75\x57\x97\xcb\x65\x17\x40\x41\xe0\x48\x89\xf8\x23\
+\x6f\xc9\x71\x1c\x02\x81\x00\xaf\xbf\xfe\xba\xb3\x60\xc1\x82\xc2\
+\xc0\xc0\x40\x6c\xcb\x96\x2d\xd3\x2d\xcb\x4a\x1e\xed\x3d\x68\xc7\
+\xf2\x00\x8b\x16\x2d\xfa\xe1\xcc\x99\x33\xeb\x37\x6f\xde\x4c\xa9\
+\x54\xc2\xb6\x6d\xea\xeb\xeb\x69\x68\x68\x40\x08\x41\xbf\x95\x62\
+\xda\x05\x45\xaa\xa2\x3a\x4e\x3a\x88\x93\xd1\x71\x73\x3a\x76\x4a\
+\x43\x16\x35\x80\xb0\x94\xf2\x0f\xbe\x77\xda\xb4\x69\xa2\xb7\xb7\
+\x57\xfe\x25\x40\xa8\xaa\xaa\xba\x60\xc5\x8a\x15\x6b\x74\x5d\x37\
+\x1d\xc7\xa9\xe9\xef\xed\xd3\x6d\x0b\x84\x22\x31\x30\x09\xc5\x04\
+\xb2\xa0\x4d\xd8\x4c\x42\x08\xf6\xee\xdd\xcb\xd2\xa5\x4b\xbd\x8d\
+\x85\xa6\x69\xb1\x58\x2c\x86\xeb\xba\xa7\x85\x42\xa1\x6c\x6d\x6d\
+\xed\xae\x81\x81\x81\xec\x9f\x1d\x90\x45\x8b\x16\xb1\x77\xef\xde\
+\x90\xe3\x38\x28\x8a\xe2\x94\x4a\x25\x5c\xd7\xc5\x34\x4d\x6c\xdb\
+\xc6\xb2\x2c\xca\xe5\x32\x42\x08\x8a\xdd\x09\xba\xba\xc3\x48\x69\
+\x22\x30\x91\xaa\x8b\x40\x80\xa8\x3c\xf0\x38\x19\x95\x67\x9c\x71\
+\x86\x04\xc8\x66\xb3\xb4\xb6\xb6\x8a\xbf\x94\x54\x94\xcb\xe5\xe6\
+\xc9\x93\x27\x57\x9b\xa6\x89\x82\xe0\x60\xb8\x87\x85\x17\x2a\xd8\
+\xc3\x41\xec\x44\x10\x67\x34\x88\x8c\x0a\xa4\xa9\x20\x2d\xa5\xf2\
+\xd2\x34\x0d\x55\x55\x31\x4d\x13\x45\x51\x70\x5d\x17\xc3\x30\x30\
+\x4d\x53\x5e\x75\xd5\x55\xbf\x11\x42\xf0\xda\x6b\xaf\x5d\x00\xfc\
+\xfe\xcf\x0e\x48\x47\x47\xc7\x9c\xd3\x4e\x3b\xad\xad\xb6\xb6\x96\
+\x42\xa1\x80\x69\x9a\x13\x00\xf1\x6e\x4e\x51\x14\xa6\x4c\x6d\x22\
+\x1c\x0e\xa3\x08\x41\xab\x71\x80\xe5\x1f\x82\x40\x40\xc1\x1e\xd5\
+\xb1\x7a\xa3\x98\x83\x01\x9c\xe1\x20\x42\xa9\x28\x05\x29\x25\xc1\
+\x60\xf0\x2f\xab\xb3\x85\xf0\x37\x92\x86\x8a\x3b\x3f\x43\x20\x5e\
+\x43\x20\x5e\x82\x13\x4b\x13\x3e\x3b\xf4\xe8\x24\xdc\xa2\x8a\xeb\
+\xba\x48\x29\x31\x0c\x03\x21\x04\x52\x4a\x2c\xcb\xc2\x75\x5d\x61\
+\x18\x06\x9a\xa6\x01\xb8\x7f\x11\x95\x55\x2e\x97\x1b\x1a\x1a\x1a\
+\x08\x85\x42\xe4\xf3\x79\x0c\xc3\xf0\x6f\xce\x71\x1c\x1c\xc7\xf1\
+\x6f\x34\x10\x08\x54\xc0\x11\x82\x5e\x7b\x84\xf3\x62\x4d\xb8\x46\
+\x90\x25\x4b\x4e\x61\xe7\xe4\x57\x89\x08\x89\xa2\xe8\xa4\x5f\xae\
+\xa2\xb0\x27\x8c\x94\x12\xd7\x75\xff\xec\x20\x44\xa3\xd1\xb3\xae\
+\xb9\xe6\x9a\x75\xa5\x52\xa9\xf2\x42\x5d\x29\x43\xf5\x42\xb8\x29\
+\x9d\x19\xbb\x4e\x61\x74\x97\xac\x48\xf0\x5b\xe4\xb4\x6d\xef\x2e\
+\x66\xcc\x98\xe1\x03\x32\x5e\x42\xca\xe5\xb2\xbf\x31\xa5\x94\x94\
+\xcb\xe5\x8f\x57\x55\x55\x5d\x57\x55\x55\xf5\x40\x7f\x7f\xff\xa6\
+\x3f\xab\x0d\xb1\x6d\x1b\xc3\x30\x7c\x69\xf0\x6e\xc4\x71\x1c\x7f\
+\xb7\x09\x21\x50\x55\x15\xcb\xb2\x90\xae\x4b\x7d\x3a\xc4\xc1\xa7\
+\x15\x4e\x08\x2e\x26\x57\x3f\x05\x3b\x31\x17\xac\x30\x49\x3a\x29\
+\x0c\x98\x38\x79\xc7\x07\xe4\xec\xb3\xcf\xfe\x1f\x29\x65\x20\x99\
+\x4c\x86\x7b\x7b\x7b\xff\x36\x9b\xcd\xe6\x8f\x27\x20\x52\xca\xb0\
+\xaa\xaa\x15\x89\x96\x92\x5d\x93\x77\x8a\xf3\xaf\xac\xc3\x95\x36\
+\x76\x56\x43\x64\xc3\xd8\x59\x0d\x27\xab\x51\xde\x1f\x41\x3a\xc2\
+\x97\xa6\x72\xb9\x8c\xa2\x54\x54\x97\x07\x88\x27\x21\x8e\xe3\x54\
+\x9e\x57\x4a\xb9\x6a\xd5\xaa\xab\x9b\x9b\x9b\x79\xf0\xc1\x07\xd7\
+\x03\x7f\x1e\x40\xa6\x4d\x9b\xb6\xb0\x54\x2a\xcd\xb7\x6d\x1b\x29\
+\x25\x8e\xe3\x4c\x50\x59\x8e\xe3\x00\xf8\x2a\x4b\xd3\x34\xff\x33\
+\x0b\x1b\x66\x13\x4d\x55\x91\x24\x41\x77\x7f\x37\xf1\xf7\x14\xd0\
+\xcc\x00\xd1\x44\x9c\x48\xbd\x86\xac\x11\x48\x43\x01\x57\x80\xe0\
+\x23\x00\xe1\x70\x98\xdd\xbb\x77\x7f\x14\x38\x26\x40\x9a\x9a\x9a\
+\x18\x18\x18\x18\x0f\x88\x34\x4d\x13\xd3\x34\x31\x5d\x9b\x58\xb5\
+\x0e\xb6\xc2\xf2\xc9\xef\xa7\xaa\x25\xc4\x4b\x9d\xbf\x62\xfa\xbc\
+\x26\x86\x8c\x2e\xf2\x1d\x2a\x4e\xa9\x02\x80\xf7\x9c\xe3\xed\x86\
+\xf7\x67\x4f\x32\xc6\xde\x87\xc8\x66\xb3\x44\xa3\x51\x14\x45\x91\
+\x7f\x36\x95\x55\x5b\x5b\xbb\x66\xd9\xb2\x65\xf3\xd2\xe9\xb4\x6f\
+\x2f\x1c\xa7\xb2\xb3\x3d\x2f\x2b\x18\x0c\x32\x66\xf0\x09\x06\x83\
+\xb8\xae\x8b\x65\x59\xbe\xb1\x57\x51\xd8\x17\xee\xe0\xc2\x05\xd5\
+\x40\xf1\x2d\x0a\x5d\x92\x5e\x57\x43\xb9\x2d\x02\x80\x65\x59\xc7\
+\x45\x22\x06\x06\x06\x68\x6a\x6a\x9a\x04\x2c\x01\x1c\xc3\x30\x4e\
+\x4e\x24\x12\x64\xb3\x59\x6c\x5c\xec\x11\x9b\x9d\xcf\x17\xb8\xf2\
+\x7d\xf3\x79\xfa\xd5\x35\xcc\x6b\xbe\x82\xf7\xd4\xaf\xe4\xbf\xb6\
+\x7f\x8a\x6c\x2a\x87\x2e\xc3\xbe\x9b\xeb\x01\x02\x50\x28\x14\x70\
+\x1c\x07\xd7\x75\x29\x95\x4a\x9e\xed\xc0\xf3\x1c\x3d\x4d\xf1\x67\
+\x03\x44\x4a\xa9\x14\x0a\x05\x1f\x08\xdb\xb6\xc9\xe5\x72\xd8\xb6\
+\x4d\x3e\x9f\xf7\x75\x6b\xa9\x54\x42\x51\x14\xc2\xe1\x30\xb6\x6d\
+\x63\xdb\xf6\xa1\x87\x91\x02\xc2\x15\xf1\xff\xc8\xc2\xbb\x91\x8a\
+\x4b\xda\xed\x64\xe3\xd6\x2e\x92\x55\xeb\x18\x1d\xfb\x9c\xb7\x23\
+\x8f\xd7\x2a\x95\x4a\x37\x9f\x7f\xfe\xf9\x77\xaa\xaa\x8a\x40\x90\
+\x30\x33\x4c\x3f\xbd\x1a\x77\x38\x8c\x33\xda\x82\x48\xc3\x8f\xbe\
+\xf3\x53\x14\x55\xf0\x1a\x5b\x78\x55\x6e\x26\xa0\xcd\x27\x9f\x6c\
+\x27\x1a\x55\x91\x52\x7a\xb6\xc1\x07\xa4\x58\x2c\xfa\xef\x22\x9b\
+\xcd\x12\x8b\xc5\x7c\x30\xc6\x49\x4b\x63\x2c\x16\x9b\x95\xcf\xe7\
+\x3b\xff\x1c\x80\xf8\x2f\xd8\xb2\x2c\x6c\xdb\xf6\x5f\x9e\xa6\x69\
+\x3e\x10\xaa\xaa\xfa\xde\x4b\xb1\x58\xf4\x8d\xbd\x27\x21\x58\x92\
+\xd1\x5e\x83\xa9\xef\x99\xcb\x75\x3f\x5a\xca\xcf\x3e\xb2\x81\xa6\
+\x93\xd2\xac\xed\xc9\xb2\x27\xfb\x2a\xf9\x9c\xe9\xab\x3e\xa0\xce\
+\xbb\xfe\xf4\xe9\xd3\x93\x07\x0f\x1e\x74\x8f\xd2\x6e\x44\xbd\x0d\
+\x53\x74\x4d\xb4\x73\xfa\xa9\x9d\x1f\xc1\x92\x83\x48\x1b\x44\x36\
+\x86\x9d\x51\x71\x52\x3a\xf9\x2d\xd5\xa0\x48\x1c\x69\xfb\xb6\xc2\
+\x93\x90\x54\x2a\x85\xaa\xaa\x38\x8e\xe3\xc5\x1f\x08\x21\xd0\x34\
+\x0d\x45\x51\xc8\xe5\x72\x04\x83\x41\x22\x91\x08\xa6\x69\xca\x93\
+\x4f\x3e\xf9\x9b\xaa\xaa\xde\xf1\xca\x2b\xaf\x54\xfd\x39\x00\x91\
+\x1e\x10\xde\x4e\x51\x14\x05\xdb\xb6\x99\x34\x69\x12\x37\xdd\x74\
+\x13\xdf\xf9\xce\x77\xa8\xad\xad\x65\xfa\xf4\xe9\x74\x75\x75\x91\
+\xcd\x66\x7d\x63\xed\x38\x0e\x96\x10\xa8\xdb\x5c\x8a\xf9\xa9\xdc\
+\xf4\xab\x0f\x50\x1b\x38\x95\x9b\xd6\xdd\x88\xae\xa9\xa8\x76\x08\
+\x4d\x6b\x24\x5e\xe3\xc7\x28\xf2\xca\x2b\xaf\xdc\xe7\xfd\xff\xf5\
+\xeb\xd7\xcf\x07\xf6\x1d\xad\x94\x78\x2a\xc4\x74\x4d\xe2\xe1\x00\
+\x85\x8c\xcb\x4d\x27\xdf\x81\xab\x16\x59\xb3\xf7\x5e\x26\x37\x34\
+\x32\x9c\xef\x65\xf4\xd5\x30\x4a\x40\x4e\x50\xc9\xde\x86\x54\x55\
+\xd5\x07\x24\x16\x8b\x21\x84\xf0\x37\xa1\xa2\x28\xfe\x35\x02\x81\
+\x00\x96\x65\x09\x21\x04\xe1\x70\xb8\x70\xb8\xf7\xa8\x1c\xce\x87\
+\xa6\x4c\x99\x32\x69\xca\x94\x29\x2f\xb9\xae\x3b\xcd\xb3\x05\xd9\
+\x6c\x25\x08\xbd\xea\xaa\xab\x68\x6c\x6c\xe4\x57\xbf\xfa\x15\xcd\
+\xcd\xcd\x00\xac\x5d\xbb\x96\xdb\x6f\xbf\x9d\x50\x28\x84\xa6\x69\
+\xbe\x71\x37\x0c\x83\x72\xa9\x84\xd0\x04\xa1\x58\x90\xda\xda\x5a\
+\xba\xd5\x21\x16\x7c\xbc\xcc\xac\x8f\x16\x69\xb9\x75\x94\xc9\xd7\
+\x24\x89\x9f\x6e\x10\x69\x16\x04\x83\x01\x11\x0c\x06\x09\x06\x83\
+\xd4\xd7\xd7\xe3\x38\xce\x31\xe9\x30\xc3\x30\xbc\x00\x0e\x45\x28\
+\x9c\x14\x7e\x3f\xa1\x6a\x9b\xe7\xdf\x78\x9d\x45\xda\xf5\xac\x3e\
+\xe3\x6e\x6a\x42\xf5\x94\xcb\xe5\xca\xbd\x96\xcb\x98\xa6\x49\x36\
+\x9b\xf5\x37\x56\x20\x10\xf0\xa5\xe1\xb2\xcb\x2e\x23\x12\x89\x50\
+\x5f\x5f\xcf\xdc\xb9\x73\x7d\x60\x34\x4d\xf3\xb5\x87\xe7\x7d\x1d\
+\x57\x40\x92\xc9\x64\xed\x05\x17\x5c\x70\x6e\x28\x14\x8a\x58\x96\
+\xe5\x5f\xb8\x5c\x2e\xf3\xe1\x0f\x7f\x18\xc3\x30\xb8\xff\xfe\xfb\
+\x59\xbe\x7c\xb9\xaf\x3b\xbd\x1b\x5f\xb0\x60\x01\xb7\xdd\x76\xdb\
+\x04\xe3\xee\xc5\x2d\xa6\x61\xe2\x04\x4c\x34\x4d\x25\x9b\x74\xb8\
+\x6a\xe1\xc7\xa8\x9b\x1a\x23\xb2\x38\x4b\xed\x15\xc3\xe8\x0b\x52\
+\x18\xa5\x31\x6f\xc8\x34\x8f\xd8\x40\x36\x34\x34\x5c\x1e\x8d\x46\
+\x6f\x8a\xc5\x62\x37\x4a\x29\x97\x0c\x0d\x0d\x31\x38\x38\x48\x62\
+\x68\x84\x81\x37\xb3\xf4\xed\x18\xe0\xb9\x35\x6b\xd9\xf1\xfa\x0e\
+\xf6\x6d\xda\xc3\xfd\x0f\x7c\x97\x9d\x2f\x76\x91\x2f\x64\x7d\xe0\
+\x3c\x0f\xca\xf3\xa2\xce\x3e\xfb\x6c\xaa\xab\xab\x91\x52\x92\x48\
+\x24\x7c\xa3\x9e\x48\x24\x18\x93\x06\x5f\x75\x65\xb3\x59\x5f\x5d\
+\x1f\x57\xa3\xee\xf9\xdf\xde\xc5\x15\x45\xe1\xfc\xf3\xcf\xa7\xb5\
+\xb5\x95\xc7\x1f\x7f\x9c\xba\xba\x3a\x9e\x7a\xea\x29\x9e\x79\xe6\
+\x19\x42\xa1\x10\x57\x5d\x75\x15\xa7\x9f\x7e\x3a\xa9\x54\x8a\xfb\
+\xef\xbf\x9f\xbe\xbe\x3e\x0c\xc3\x20\x99\x4c\xfa\xd1\xb8\x69\x9a\
+\x20\x41\x6a\x92\x72\xc9\xe1\xae\xf7\x3e\xc5\xa3\xad\xdf\xe0\xa6\
+\xf9\x5f\x65\xed\x8e\x17\x50\x1b\xfa\x78\xcd\xde\x56\xb1\x23\x4a\
+\x65\x67\x1e\xe9\x9a\x3c\x79\xf2\xb7\x97\x2d\x5b\x36\xcb\xb2\x2c\
+\x54\xa1\x50\xac\x4e\xcb\x58\xb5\x26\xdc\xac\x8e\x9d\xd4\xe9\xdb\
+\x36\x0c\x02\xea\xb5\x69\x8c\xa6\x73\x24\x64\x96\xa6\xc0\x0a\xf6\
+\x8f\xbe\x44\x53\xa0\xc9\x7f\x91\x9e\x4d\xb4\x2c\x8b\x48\x24\xe2\
+\x7b\x91\x1b\x37\x6e\x24\x16\x8b\x91\x48\x24\xa8\xae\xae\x46\x08\
+\xc1\xb4\x69\xd3\x18\x1e\x1e\x26\x9f\xcf\xfb\x31\xdb\x91\x48\xb6\
+\x72\xb8\x80\x78\x60\x14\x8b\x45\xa6\x4d\x9b\xc6\xbf\xfc\xcb\xbf\
+\xa0\x69\x1a\xcf\x3d\xf7\x1c\x7d\x7d\x7d\xc4\x62\x31\x82\xc1\xa0\
+\xef\xee\x6e\xdb\xb6\x0d\x4d\xd3\x26\xf8\xff\x9e\xcd\x39\x24\x21\
+\x95\x28\x3f\xa0\x46\x98\xd6\x38\x85\x84\xd8\x85\xb4\x42\x48\x09\
+\x8e\xb4\x70\x1d\x07\xc3\x34\x7c\xd1\xb7\xde\xe2\x07\x37\x35\x35\
+\xbd\xd3\x7d\x3b\xe5\x72\x99\x72\xb9\xcc\xee\x6c\x17\x91\x73\x07\
+\x45\xe8\xac\x7e\x42\x97\x75\x50\xf5\xe1\x7d\xd4\x7c\xf0\x00\xa1\
+\x73\xfb\x11\x33\x93\x95\xeb\x58\x26\x96\x7b\x28\x9e\xf0\x24\xbd\
+\xbe\xbe\x1e\x4d\xd3\xd0\x75\x9d\x97\x5e\x7a\xc9\xb7\x29\xba\xae\
+\xfb\x52\x14\x0e\x87\x31\x0c\xc3\x07\xcf\xb3\x35\x63\x80\x34\xad\
+\x5c\xb9\x52\xd6\xd7\xd7\xcf\x3f\x6e\x46\xdd\x8b\x3b\x4c\xd3\xa4\
+\x54\x2a\x31\x30\x30\x40\x24\x12\x61\x68\x68\x08\xc7\x71\xe8\xef\
+\xef\xf7\xe9\xe8\xd1\xd1\xd1\x0a\x97\x35\x65\x0a\x9f\xfd\xec\x67\
+\x71\x1c\x87\x60\x30\x88\xaa\x1e\x72\x1f\xbd\x77\xeb\xb4\x97\xd8\
+\xf0\xef\x2a\xa7\xfe\xdb\xa9\x00\x3c\xcf\x87\xde\xf6\xfa\xd9\x6c\
+\x96\xf9\xf3\xe7\x77\x79\xee\xf0\xd0\xd0\xd0\xbf\x0d\x0c\x0c\xdc\
+\xf1\x4e\x5e\xa1\x07\xa6\x29\x2d\x14\x14\xc8\x4c\xe6\x8e\xcb\xbf\
+\x47\x7b\x7a\x33\xdf\x7b\xf9\xdf\x58\xbc\x64\x0e\xdd\x75\x9d\x64\
+\x77\x69\xbe\x34\x18\x86\x41\x2a\x95\xf2\x8d\xf3\xf5\xd7\x5f\xcf\
+\x9a\x35\x6b\xc8\x64\x32\xd4\xd5\x55\x9c\xbe\xd1\xd1\x51\xff\x1a\
+\xf5\xf5\xf5\x98\xa6\x49\x38\x1c\x66\x68\x68\x08\x55\x55\x89\xc7\
+\xe3\xe8\xba\x4e\x2e\x97\x03\x60\xee\xdc\xb9\xec\xda\xb5\xcb\x39\
+\x2e\x80\x58\x96\x55\xf0\x5e\xa0\xa2\x28\x14\x8b\x45\x3e\xf3\x99\
+\xcf\x50\x5d\x5d\xed\xe7\x3e\xc6\x7b\x22\xde\x9f\x93\xc9\x24\x81\
+\x40\xc0\x07\xe4\x87\x3f\xfc\x21\x86\x61\xf0\xf1\x8f\x7f\xdc\xe7\
+\xbb\x54\x54\x96\x2c\x59\x52\x51\x89\xd2\x21\x39\xf7\x00\x73\x16\
+\x46\x70\x72\x2a\xd6\x70\x08\x7b\x28\x88\x35\x18\x44\x48\x05\xa1\
+\xbb\xfe\x35\x86\x86\x86\x0e\xdb\x90\xdb\x96\x8d\xab\x3a\x08\x45\
+\x70\xdd\x82\x4f\xb3\xbe\xf7\x49\x9c\x91\x69\x5c\x37\xf7\x4b\x9c\
+\x7f\xea\x99\xdc\xfe\xe8\xe5\xbe\x6b\xab\xaa\xaa\x1f\x03\x79\x6c\
+\xc3\x96\x2d\x5b\x2a\xe4\xe3\x98\x73\x32\x69\xd2\x24\xa4\x94\x08\
+\x21\x28\x95\x4a\xfe\xc6\x54\x55\x95\x50\x28\x44\xb1\x58\x24\x12\
+\x89\xf8\xa1\x80\x65\x59\xfe\xf7\x1f\x33\x20\xb5\xb5\xb5\xb7\x2c\
+\x5d\xba\xf4\x2e\x8f\x2e\x39\xe1\x84\x13\x48\xa5\x52\x04\x02\x01\
+\xd2\xe9\xb4\xaf\x82\xa4\x94\x28\x8a\xe2\xb3\x9f\xde\xee\x1a\xa3\
+\x16\x5c\x65\x2c\x9a\x9a\x36\x6d\x1a\x8e\xe3\x50\x28\x14\x10\x08\
+\x6c\x69\x51\x2c\x16\x29\x97\xcb\xf4\x59\x49\x5a\xa6\x3b\xc8\x48\
+\x89\xc6\x49\xd3\x49\x4d\xed\x43\x0a\x07\xd3\x35\x51\x4a\x61\x86\
+\x1e\x99\x5c\x49\x74\x1d\x01\x45\x62\x59\x16\xb6\x65\x21\x15\x89\
+\xa2\x09\x1a\xaa\x9b\x39\x58\xfa\x3d\xc9\x24\x64\xdd\x7e\xea\x4e\
+\x30\x08\x07\x23\x5e\xcc\x33\x41\xe5\x78\x2a\xb6\xa7\xa7\x87\x50\
+\x28\x84\xeb\xba\xac\x5e\xbd\x9a\xad\x5b\xb7\xd2\xd9\xd9\xe9\x7b\
+\x52\xaa\x5a\x61\x80\x6b\x6a\x6a\xc8\x66\xb3\xa8\xaa\x4a\x2c\x16\
+\xf3\xd5\x9e\x17\xbb\x1d\x8e\x53\xf2\x8e\x80\x98\xa6\x39\xb5\xa9\
+\xa9\xa9\xa6\xa7\xa7\x07\xd3\x34\xb9\xe7\x9e\x7b\xd8\xb3\x67\x0f\
+\x37\xde\x78\x23\x3f\xf8\xc1\x0f\x48\x24\x12\xd4\xd6\xd6\x12\x0c\
+\x06\x79\xe9\xa5\x97\x58\xb8\x70\x21\xbb\x76\xed\xa2\xa7\xa7\x87\
+\xb9\x73\xe7\xb2\x6d\xdb\x36\xf6\xef\xdf\x7f\xfb\x82\x05\x0b\xbe\
+\xf3\xec\xb3\xcf\x72\xd1\x45\x17\x51\x2e\x97\x7d\x95\x25\x74\xc5\
+\xf7\xbe\x5c\xc7\x45\x55\x04\xa1\xec\x7c\x3e\x71\xd1\x9d\x68\x32\
+\xca\x17\x9e\xf8\x08\x1f\x3e\xfb\x46\x7e\xb6\xfd\x6e\x2c\xcb\xac\
+\xe4\x52\xfe\xc8\x83\x0d\x0c\x0c\x30\x6b\xd6\xac\x3b\xa3\xd1\xe8\
+\x54\x00\xe9\xca\x29\xc9\xd1\x14\xd2\x75\x41\xb7\xe9\xfc\xa5\xc2\
+\x77\x5f\xf8\x16\x69\xf7\x20\x46\x36\x88\x4d\x89\xee\x75\x9d\x74\
+\x0d\xe6\x30\xcd\xb0\x0f\x48\x38\x1c\x66\xc6\x8c\x19\x0c\x0e\x0e\
+\x62\x9a\x66\xaa\x54\x2a\xf5\x38\x8e\xb3\x44\x51\x14\x71\xd7\x5d\
+\x77\x49\xd7\x75\x85\xb7\x01\x3d\x1b\x0b\xf8\x86\x1c\x20\x95\x4a\
+\x11\x8b\xc5\xfc\x4d\x7a\xb8\x34\x8a\x76\x38\x06\xdd\x34\x4d\x0a\
+\x85\x02\xaa\xaa\xf2\xa3\x1f\xfd\x88\x6f\x7f\xfb\xdb\xfc\xf4\xa7\
+\x3f\x65\xfd\xfa\xf5\xa8\xaa\x8a\xae\xeb\x68\x9a\x46\x2a\x95\x62\
+\xef\xde\xbd\xe4\xf3\x79\xca\xe5\x32\x89\x44\xc2\x53\x5f\x21\x55\
+\x55\xd9\xb0\x61\x03\xaf\xbf\xfe\xba\xef\xab\x8f\xbd\x34\xdf\xdf\
+\xb7\xb1\x71\x71\x59\xd6\x70\x19\x8f\x6c\xfb\x2a\xb3\xb4\xf3\xb9\
+\xf6\xa4\xd5\xb4\xd4\x4c\x41\xa0\x54\xd4\x9c\x22\xde\xc9\xb3\xfa\
+\xfb\xe9\xd3\xa7\xd7\x0b\x21\x28\x38\x65\x58\x38\x4c\x7d\x3c\x8c\
+\xd3\x1f\xc1\xea\x0b\x93\x19\x4d\x22\x88\x11\xaa\x98\x65\x8a\x43\
+\x92\x46\x71\x22\x1d\x66\x87\xcf\x38\x54\x57\x57\x13\x8f\xc7\x49\
+\xa5\x52\x98\xa6\xf9\xec\x9e\x3d\x7b\x6e\x8a\xc7\xe3\xd7\x5a\x96\
+\x35\xcb\xb2\xac\xaf\x5d\x70\xc1\x05\xac\x58\xb1\x82\x47\x1f\x7d\
+\xd4\xb7\xab\x5e\x10\xe9\x51\x4a\x8a\xa2\x30\x3c\x3c\x4c\x34\x1a\
+\x3d\x22\x5e\xeb\xb0\x00\xf1\xbe\xcc\x73\xf5\x4e\x3b\xed\x34\x5f\
+\x2d\x8d\xb7\x1f\x42\x08\x7a\x7b\x7b\xfd\x3f\x1f\x38\x70\xc0\xf3\
+\xbc\xd2\xfb\xf7\xef\xff\xab\xb1\xe8\x95\x50\x28\xf4\xf8\x89\x27\
+\x9e\xa8\x7e\xf1\x8b\x5f\xe4\x73\x9f\xfb\x1c\xa6\x69\x56\xf2\x29\
+\xaa\x8d\x10\x10\xd0\x22\x38\xae\x8d\x61\x9a\x64\x64\x8a\xae\x4c\
+\xe2\x10\x85\x21\xf0\x77\xe6\xdb\x2d\x8f\x85\x05\x78\x23\xbf\x9f\
+\xeb\x4f\xaf\xc1\xb2\x73\x94\x5a\x06\xa9\xd6\xc2\x08\x47\x45\x1a\
+\x2a\xc5\x3d\x51\xf2\xdb\x62\x20\x2a\x3b\x3d\x95\x4a\xf9\xd7\x28\
+\x95\x4a\xa4\x52\xa9\x09\xcf\x98\x4e\xa7\x7f\x01\x9c\xb8\x6a\xd5\
+\xaa\xaf\xdd\x79\xe7\x9d\xe8\xba\x8e\x61\x18\x74\x75\x75\xb1\x74\
+\xe9\x52\x7e\xf9\xcb\x5f\xf2\xbe\xf7\xbd\x8f\x2d\x5b\xb6\xb0\x67\
+\xcf\x1e\x2e\xbd\xf4\x52\x86\x86\x86\x58\xbb\x76\xad\xbf\xa9\x17\
+\x2c\x58\xf0\x66\x6b\x6b\xeb\xaa\x6c\x36\xbb\xe5\x98\x25\xc4\x33\
+\x70\x93\x27\x4f\x66\x68\x68\xc8\xb7\x15\xde\x4d\xbb\xae\xeb\xff\
+\xf2\x78\xac\xb1\x07\x7c\x42\xd7\xf5\xbd\xc3\xc3\xc3\xaf\x7a\xdf\
+\xd9\xd2\xd2\x22\x9f\x7b\xee\x39\x5e\x7c\xf1\x45\x96\x2f\x5f\xce\
+\x86\x0d\x1b\x2a\xbb\x2c\xe4\x32\xb4\xce\xe2\xf9\xf8\xd3\xc8\xc8\
+\x28\xfd\xca\x1b\x18\x56\x89\xaa\x1a\x9d\x83\x43\x06\x85\xa2\xed\
+\xdf\x53\x2c\x16\x3b\x77\xf1\xe2\xc5\x5f\x02\x84\x61\x18\x76\x5b\
+\x5b\xdb\x57\x3c\xbe\xc9\xf7\x8e\x85\x44\x22\x59\x20\xae\x67\xc5\
+\x7b\x4e\x21\x6d\xf6\xb3\x61\xdf\x6b\x64\x42\xfb\x29\x06\x6c\x2c\
+\xcb\x44\x22\xd1\x34\xcd\x27\x32\x5d\xd7\x95\xaa\xaa\x0a\xc7\x71\
+\x88\xc7\xe3\x24\x12\x89\xf1\xe8\x2b\x43\x43\x43\xec\xde\xbd\x9b\
+\xe6\xe6\x66\x3c\x97\x7a\xe3\xc6\x8d\x00\xbc\xf6\xda\x6b\x94\xcb\
+\x65\x74\x5d\xe7\xb5\xd7\x5e\xa3\xa1\xa1\xc1\xbf\x5f\xc3\x30\xa8\
+\xa9\xa9\x89\x59\x96\xa5\x1f\xab\x97\x25\x6d\xdb\x46\x55\x55\x1e\
+\x7e\xf8\x61\xa6\x4e\x9d\xca\x23\x8f\x3c\xc2\xce\x9d\x3b\x09\x85\
+\x42\x24\x93\x49\xa2\xd1\x28\x83\x83\x83\x04\x02\x01\x62\xb1\x18\
+\x23\x23\x23\x64\x32\x19\xd2\xe9\x34\x6d\x6d\x6d\x57\xbf\xdd\x2e\
+\x7e\xf6\xd9\x67\xa9\xad\xad\x25\x97\xcb\xf9\x34\x45\xa9\x54\xa4\
+\x2e\xb9\x08\x07\x0b\x91\xa9\xa1\xcf\x19\x22\x34\xbd\x8c\x99\x0d\
+\xd0\xc8\x3c\x26\xaf\xa8\xe4\xb5\xa5\x25\x40\x61\x95\x10\xac\x1a\
+\x8b\x69\x4a\x1e\x20\xe3\x25\x44\x00\x03\xfd\x79\xfe\xf3\x6f\x3e\
+\xce\xc7\x7f\x7d\x36\x5f\x3e\xe7\x69\x6a\xec\x79\xa8\x35\x29\xbe\
+\xb5\xe9\xab\x18\x86\x09\xa2\xc2\x59\x79\x2a\x54\xd3\x34\x31\x38\
+\x38\xd8\x39\x38\x38\xb8\x4d\x08\xe1\x06\x02\x81\xb5\x6f\xdd\xa0\
+\xab\x57\xaf\xc6\xb6\x6d\x42\xa1\xd0\x04\x35\x74\xf0\xe0\xc1\x09\
+\x3f\x1f\x38\x70\xc0\xb7\x21\x85\x42\xe1\x0f\x3e\x7f\x54\x80\x28\
+\x8a\x32\xc7\xb2\x2c\x54\x55\xa5\x54\x2a\x51\x2c\x16\x99\x3b\x77\
+\x2e\x6f\xbe\xf9\x26\x4b\x96\x2c\x61\x78\x78\x98\xda\xda\x5a\xb2\
+\xd9\x2c\xe5\x72\x99\x48\x24\xc2\x39\xe7\x9c\xc3\x33\xcf\x3c\xf3\
+\x47\x2f\xae\x69\x1a\x5f\xfa\xd2\x97\x7c\x43\xe8\xc5\x0b\x05\xa5\
+\x4c\xa9\x54\x42\xa4\x05\x42\x08\x76\xe8\xfb\x78\xef\x19\x35\xd8\
+\xd6\x78\xcf\x4a\xe2\x18\x0a\x99\x17\xea\x30\x87\x03\x80\xfc\x03\
+\xb0\x7d\x9a\x45\x07\xc7\x86\x80\xae\xa3\x29\x01\x10\x90\xc8\x0f\
+\xf2\x46\xff\x03\x48\x57\x8e\xa9\xc0\x8a\x94\x37\x34\x34\xf8\x36\
+\x40\x51\x94\x5f\x67\x32\x99\xd5\x6f\x17\x8e\x79\xae\xbc\xb7\xeb\
+\x0f\x33\xed\xed\x7f\xff\xb1\x02\x32\xbd\xb6\xb6\xf6\x46\xc3\x30\
+\xa4\xa6\x69\xe2\xee\xbb\xef\xa6\xb1\xb1\x91\xbd\x7b\xf7\xe2\xba\
+\x2e\x83\x83\x83\x18\x86\x41\x38\x1c\xa6\x50\x28\x20\xa5\x64\x74\
+\x74\x94\x5d\xbb\x76\xfd\x49\xee\xa9\x58\x2c\xe6\xa5\x94\xde\xb5\
+\x83\xe1\x70\x58\x77\x1c\x07\xdd\x52\x71\xdc\x43\x2a\x47\x09\x09\
+\x2c\xc7\x66\x45\xf4\x16\x16\xcf\x5c\xc0\x96\xe4\xe3\xe4\x92\x1a\
+\xbb\xdd\xe7\x70\xb4\x18\x96\x09\x12\x39\xc1\xa6\xb8\xae\x2b\x7d\
+\x03\x1a\x12\xc4\x27\x85\x28\x18\x65\x02\x21\x95\x9a\xaa\x5a\x4c\
+\xa5\x88\x16\xd2\x40\xa9\x00\x22\x91\xbe\xfa\x6d\x6e\x6e\x66\x68\
+\x68\x88\xb7\x2b\x4d\x02\x08\x04\x02\xed\x1d\x1d\x1d\x8d\xf3\xe7\
+\xcf\x1f\x9a\x32\x65\x0a\x37\xdc\x70\x03\x8f\x3d\xf6\x98\x6f\x7b\
+\xbc\x80\xd7\xdb\x60\x1e\xc3\xa1\xeb\xba\xcf\x8a\x1f\x2b\x20\x11\
+\x21\x04\xb9\x5c\x4e\xd4\xd7\xd7\x33\x3c\x3c\xcc\xe0\xc0\x10\x20\
+\x10\x02\x1f\xf1\x72\xb9\xec\x07\x54\xde\x36\x8e\xc5\x62\xa2\x54\
+\x2a\xbd\x6d\xf4\x2c\x84\xf0\x2b\xe9\x66\xce\x9c\xf9\xa0\xaa\xaa\
+\x1f\xbe\xfc\xf2\xcb\xfd\x00\xec\x90\x2b\x29\x49\x0d\x0a\xfe\xee\
+\xe6\x9b\xb9\xe9\x67\x4b\xf9\x97\xb3\x1f\xa3\x18\x2f\x30\xd3\x6c\
+\xe6\x27\xbf\x79\x02\xc3\x90\x9e\x0d\x08\x5d\x74\xd1\x45\x23\x80\
+\x14\x8e\xa8\xb3\x2c\x89\xa2\xc0\x22\x3b\xc2\xf0\xc3\x0a\xd7\x3f\
+\x74\x2d\x52\x09\x71\xfd\x7f\x5d\x83\x65\x5b\x04\xb5\x08\xdb\x5b\
+\x7b\xa9\x8a\xc4\x7d\x4a\xdd\x23\x3f\xff\x18\x18\xe3\xf2\x22\x32\
+\x16\x8b\xf1\xe2\x8b\x2f\xb2\x71\xe3\x46\x5a\x5a\x5a\xd8\xba\x75\
+\x2b\xe1\x70\x98\xf5\xeb\xd7\xfb\x36\x31\x12\x89\xd0\xd2\xd2\xc2\
+\xae\x5d\xbb\x18\x1d\x1d\xf5\x93\x74\xc7\xac\xb2\xa4\x94\xe8\xba\
+\xce\xbe\x7d\xfb\x90\xae\xa4\x66\xb1\x4e\x24\xac\x92\xeb\xb7\x29\
+\x0e\x39\x48\xf7\x6d\xd5\x9c\x28\x97\xcb\x9d\x8a\xa2\x7c\xf3\xed\
+\x9c\x84\xb7\xb0\x00\xfa\x07\x3e\xf0\x01\xe6\xcc\x99\xc3\x07\x3f\
+\xf8\x41\x6e\xbd\xf5\x56\x3f\xcf\x20\x10\x54\x05\xe3\xd8\xb2\x44\
+\xbc\xaa\x8a\xe6\xda\xa9\x3c\xbf\xe3\xd7\x3c\xd1\x77\x1f\xb6\xd5\
+\x88\x69\xb9\x50\xd9\xe1\xa2\xa6\xa6\x66\x92\x40\xd0\x35\x6d\x0f\
+\xa7\x5d\x14\xc6\x18\xac\xd4\x55\xd9\x83\x01\x9c\xac\x06\x96\x8e\
+\x5b\x52\x50\x75\x0d\x4d\x53\x29\xe5\x4d\x6c\x23\xe5\x25\xdd\x64\
+\x34\x1a\x15\x23\x23\x23\x84\x42\xa1\x77\xe4\xf8\x1c\xc7\xe1\x95\
+\x57\x5e\x21\x1e\x8f\xe3\xba\x2e\xfd\xfd\xfd\x7e\xa2\xca\x4b\xc8\
+\x79\xec\x6f\x5d\x5d\x1d\x03\x03\x03\x68\x9a\xe6\x05\x91\xb1\xe3\
+\x02\xc8\xec\xd9\xb3\x2b\x14\x40\xb2\x22\x9a\x51\x29\x89\xd4\xcb\
+\x09\xa5\x3b\x9e\x97\x35\xb6\xe3\x7a\x06\x06\x06\xfe\xeb\x70\xe9\
+\x8d\xb9\x73\xe7\xfa\x51\xed\x21\x75\x27\xb0\x5d\x13\x45\x68\x80\
+\xa0\x64\x15\xd1\x54\x8d\xa0\x16\xc5\x71\x5c\x4c\xd3\xf2\x83\x39\
+\xcb\xb2\x28\x38\x65\x6a\xa7\x29\x48\x5b\x25\x5a\x1f\x46\x99\x62\
+\x61\xcc\x4f\xf8\x9b\x60\xe0\xa1\x49\x48\x5b\xf1\x3d\x41\x8f\x5b\
+\x53\x55\x55\x74\x75\x75\x3d\xe0\xed\x11\x5d\xd7\x7f\xfd\xa7\xee\
+\xd7\x75\x5d\x3e\xf9\xc9\x4f\xfa\xdf\x33\x7e\xed\xdb\x77\x28\x7f\
+\xd6\xdf\xdf\xef\x7b\xa1\xf1\x78\x1c\xc7\x71\xa8\xaa\xaa\xfa\x72\
+\x3a\x9d\x7e\xe1\x98\x00\x59\xb1\x62\x05\x97\x5d\x76\x19\x67\x9f\
+\x7d\x36\xdf\xfb\xde\xf7\x68\x6d\x6d\xe5\xe4\x93\x4f\xe6\xf5\xd7\
+\x5f\x67\xee\xdc\xb9\x64\x32\x19\x5a\x5b\x5b\x09\x87\xc3\xcc\x9c\
+\x39\x93\x37\xde\x78\xe3\xb0\x29\xf2\x40\x20\xc0\x0b\x2f\xbc\xc0\
+\xde\xbd\x7b\xe9\xed\xed\xf5\x19\x54\x21\x04\x85\xd6\x1c\x43\x46\
+\x23\xff\xeb\xa5\x5b\x18\xcc\xea\x7c\xea\xb1\x4f\x60\x18\x36\x79\
+\x27\x8e\x5d\x14\x44\x22\x87\xa4\xae\xa2\x1e\x25\xca\xeb\x93\x39\
+\xf8\x86\xe0\xc1\x07\x7e\xc4\xfe\x9e\x2e\x7e\xbb\xf7\xa7\xfc\xed\
+\xaa\x8f\x72\xf7\xba\x5b\x31\x4d\x0b\x69\x1f\x02\x42\xd7\x75\x9f\
+\x4a\x1f\x19\x19\xf9\xc8\xe1\xde\x73\x3e\x9f\x27\x12\x89\x1c\x02\
+\xc3\x01\xcb\x74\xc7\xee\x05\x84\x2a\x50\xd4\x31\x6d\x30\xf6\x91\
+\xd1\xd1\x51\x5f\x3d\x1e\x8b\x84\xb8\xde\x2e\x88\xc7\xe3\x84\xc3\
+\x61\x9f\x74\x0b\x04\x02\x2c\x5d\xba\x94\xee\xee\x6e\xaa\xab\xab\
+\x7d\xa3\xa5\xeb\xfa\x3b\x5e\xf4\x2d\x2a\x2b\xa0\x28\x0a\x07\x0f\
+\x1e\xf4\x8a\x06\x64\xb9\x5c\x16\x00\xe5\x62\x91\x69\x2b\x66\x92\
+\xcb\xe5\x88\x69\x75\xa4\x67\x1c\xa0\x69\x46\x80\xaa\xb4\x8e\x93\
+\x1d\xfb\x95\xd6\x70\x73\x1a\x62\xec\x49\xc2\xe1\x30\xe9\x54\x9a\
+\xf5\x3d\xcf\xb2\xe9\xcd\x2e\x2e\x3e\xf9\x06\x1a\x63\xd3\x11\x28\
+\x95\x58\xc7\xaa\x48\xd4\xbc\x79\xf3\xfc\x6c\xe6\xe1\x12\x95\x00\
+\x35\x35\x35\x23\x1d\x1d\x1d\x4d\xa7\x9c\x72\xca\x40\x2a\x95\x42\
+\x48\x70\x67\x0b\x96\x5f\x59\x43\x7e\xc0\xa1\x38\x6c\x93\x1b\x70\
+\x28\x0e\xd9\x18\x19\x17\xcf\x24\x79\xef\xf0\x4f\xd9\xa8\x77\x04\
+\x24\x1a\x8d\x2e\x07\xd8\xb6\x6d\x1b\x89\x44\x82\xe1\xe1\x61\x8a\
+\xc5\x4a\xe9\xce\xee\xdd\xbb\xfd\xc0\xd0\x03\xcd\x75\x5d\x5e\x7e\
+\xf9\xe5\x23\x4a\x26\x25\x93\xc9\x2f\x0e\x0d\x0d\x7d\x77\xcc\x8d\
+\x9c\xbe\x60\xc1\x82\x87\x0f\x79\x23\x95\x0a\x96\x72\xb9\x4c\xca\
+\xcd\x31\x75\xae\x89\xa8\xb2\x69\x9c\xd6\x44\xd9\xcd\x51\x72\x12\
+\x28\x0a\xd8\x79\x95\xe1\x9f\x4e\xf6\x1f\x5c\x4a\x89\x57\xb2\x9e\
+\x29\x8d\x92\x35\x12\x08\x45\x4c\x00\x24\x93\xc9\x70\xf5\xd5\x57\
+\xf3\xf4\xd3\x4f\xfb\x31\xc8\xe1\xac\x4c\x26\x83\xae\xeb\x52\xd3\
+\x34\x9a\x9a\x9a\x2a\x36\xa2\x7f\x80\x8e\x07\x15\x2c\xc7\x45\x28\
+\x3a\xae\xab\xa2\x11\x40\x09\xbb\x7e\x4e\xc4\x53\xe5\xc7\x04\x88\
+\xae\xeb\x7f\xe3\x65\xf8\xfa\xfa\xfa\xfc\xa4\xcc\xf8\xdf\x8f\x75\
+\x15\x0a\x85\xbd\xc0\xde\xb1\x1f\xe7\x7b\x8c\x80\x10\x02\xa5\x50\
+\x79\x89\xa6\x61\x62\x2b\x0e\xaa\xaa\xd0\xa2\xae\xe2\xef\x56\xde\
+\x4a\x4d\xa0\x9e\x0f\x7c\xef\x7c\x6e\xbb\xea\x56\x7e\xb1\xfe\xfb\
+\x13\xe8\x73\xdb\xb1\x59\x30\xe9\x34\x92\x53\x54\x06\x72\xdd\x04\
+\xd5\xd3\x51\x50\x30\xcd\x32\xae\x55\x89\x83\x32\x99\x0c\x4f\x3f\
+\xfd\xb4\xef\x96\x1e\xe9\x52\x14\x85\x07\x1e\x78\x80\xe1\xe1\x61\
+\x84\x10\x3c\xfe\xf8\xe3\xc4\xe3\x71\x3a\x3b\x3b\x69\x6e\x6e\x66\
+\xcb\x96\x2d\xcc\x9a\x35\x0b\xc7\x71\xd8\xb7\x6f\x1f\xcd\xcd\xcd\
+\x74\x74\x74\x1c\x1b\x97\x25\xa5\x54\x63\xb1\x18\x7b\xf6\xec\x41\
+\x08\x41\xf4\x7c\x9d\x15\x17\xd5\x20\x01\x23\x27\x49\xee\x35\x18\
+\x6d\xb7\xc8\x74\x98\x98\x85\x43\xf9\x90\x9a\x9a\x9a\x11\xe0\x7d\
+\x47\x5b\xa6\xfa\xd3\x9f\xfe\x94\x42\xa1\xc0\xe7\x3f\xff\x79\xbf\
+\x30\xc1\x52\x4d\x84\x90\x9c\x3c\xe5\x6c\x7e\xd7\xfe\x00\xa9\xce\
+\x06\xae\x58\xf8\xb7\xcc\xa8\x59\x84\xed\x54\xaa\x60\x3c\x09\xe9\
+\xee\xee\xe6\x6b\xff\xfb\xbb\x95\xc4\x56\x29\xc5\xc6\x9f\xec\xe2\
+\xc0\x20\x64\x53\x79\x8f\x02\x92\x8a\xa2\x08\xaf\x8e\xea\x9d\x76\
+\xed\xdb\xd9\x55\x8f\x5d\x9e\x3f\x7f\x3e\x5d\x5d\x5d\x8c\x8c\x8c\
+\x78\xcf\xce\xc9\x27\x9f\xcc\xe6\xcd\x9b\x19\x19\x19\x61\xd1\xa2\
+\x45\xa4\x52\x29\x46\x47\x47\xd1\x34\xed\xd8\x24\xc4\x8b\xaa\x3d\
+\xef\xc9\xd9\xa9\xf1\x66\x47\x96\x7c\xbf\x83\x55\x94\x28\x9e\xf1\
+\x52\x55\x54\x55\xfa\xb9\x91\x40\x20\xe0\x0e\x0c\x0c\x1c\x55\xd3\
+\xca\xbc\x79\xf3\x68\x6e\x6e\x66\x74\x74\x94\xe6\xe6\xe6\x4a\x85\
+\xbd\x65\xe2\xe0\x00\x02\x4d\x09\x60\x4b\x0b\xdb\xb1\x18\x48\x0f\
+\xd3\x95\x0e\xa3\x09\xdd\x8f\x5f\x34\x4d\x03\xcd\xa1\xa4\xa6\x70\
+\xb2\x1a\x8a\xd4\xc9\xe6\xb2\xc4\xf4\x38\xb9\x5c\x07\x8a\xa2\xa0\
+\xeb\xba\x28\x14\x0a\x3b\x37\x6d\xda\xf4\x4f\x42\x08\x55\x51\x94\
+\x23\x2e\x91\x54\x55\x95\xaf\x7c\xe5\x2b\xcc\x9f\x3f\x9f\xcd\x9b\
+\x37\xa3\xeb\x3a\x1d\x1d\x1d\xb8\xae\xcb\xab\xaf\xbe\x8a\xa6\x69\
+\x24\x93\x49\xda\xdb\xdb\xc7\x9b\x00\xa4\x94\x35\xc7\x22\x21\x48\
+\x29\xf9\xd1\x8f\x7e\xc4\xac\x59\xb3\xb8\xf7\xde\x7b\x2b\x65\x93\
+\x73\x4a\x7e\x92\xaa\x58\x2c\x22\xa5\x64\xd2\xa4\x49\x74\x75\x75\
+\x91\xc9\x64\x8e\xb8\x3a\x64\x42\x85\x79\x5b\x1b\x2f\xbd\xf4\x12\
+\x2d\x2d\x2d\x1c\x38\x70\x80\x78\x3c\x5e\x49\xc3\x62\xa3\x6b\x21\
+\x52\xc6\x20\xd3\xa7\xcc\xa3\x7e\x5a\x1d\x9b\x7a\xba\xa9\x8d\x4c\
+\x1e\x8b\xba\x0f\xb9\xc0\x7a\x5c\x52\xf7\xfe\x01\x46\x9e\xae\xc3\
+\xe8\xad\xd0\x2b\x8e\xe3\xf8\xe5\x3b\x63\xbf\x27\x8b\xc5\xe2\xf3\
+\x47\x73\x8f\x63\x84\xab\xab\xeb\xba\xb2\x73\xe7\xce\x4a\x0b\x85\
+\x00\x55\x55\x90\x12\x62\x91\x18\x96\x6b\x55\x1c\x2c\x81\x1f\xab\
+\x8d\xd5\x78\x2d\x38\x26\x09\x99\x37\x6f\x1e\xb3\x67\xcf\xe6\x84\
+\x13\x4e\x60\xd9\xb2\x65\x6c\xdd\xba\x95\x65\xcb\x96\xf1\xe4\x93\
+\x4f\x72\xf1\xc5\x17\xb3\x7b\xf7\x6e\x36\x6c\xd8\xc0\x99\x67\x9e\
+\x49\x73\x73\x33\xcf\x3e\xfb\xec\x9f\xa4\xc7\xdf\x69\x45\x22\x11\
+\xbe\xf5\xad\x6f\x21\x84\x60\x68\x68\xa8\x52\x01\x68\x98\xd8\xaa\
+\xcb\x86\xff\x1e\x64\x93\xf9\x55\xe6\x35\x2e\xc1\x95\x2e\x3b\xfa\
+\x36\xd1\xfa\x68\x1b\x1d\x23\xbd\x14\x86\x0e\xbd\x2c\x4d\x53\x59\
+\xf7\xb5\x61\x8c\xd1\x51\x9c\x92\x64\xc6\x8c\x19\xe8\xba\xce\xd1\
+\xaa\xa8\xb7\xf1\x0c\x87\x76\xee\xdc\x79\xf1\xac\x59\xb3\x5e\x28\
+\x95\x4a\xb8\x2a\x4c\xbd\x21\xca\xc9\xcb\x63\xd8\x8e\x43\x53\x78\
+\x1e\xc3\x46\x3b\x8e\xe1\x72\xf0\xd5\x12\xfb\x9e\xc8\xa3\xa8\x15\
+\xa7\x27\xe2\xf9\xea\x47\x0b\x48\x67\x67\x27\xbf\xfc\xe5\x2f\x39\
+\xe5\x94\x53\x78\xe5\x95\x57\xc8\xe5\x72\xf4\xf4\xf4\x60\x18\x06\
+\x4f\x3e\xf9\xa4\x5f\x99\xf1\x9b\xdf\xfc\x86\x40\x20\xe0\xa7\x3e\
+\x8f\x72\x8d\x0e\x0d\x0d\x7d\x43\xd7\x75\x6b\xec\xc1\x3f\x98\x4a\
+\xa5\x66\xe4\xf3\x79\x2c\x53\x32\x2b\x3c\x83\x19\x33\xa6\x57\xa4\
+\x54\x1a\x2c\xbb\x7e\x16\x55\x91\x32\x0d\xc3\x27\x63\x0d\x06\x71\
+\x46\x2b\x69\x27\xa1\x48\x50\x24\x4c\x83\x5c\x2e\xc7\xc8\xc8\x08\
+\xd1\x68\x94\x78\x3c\xce\x69\xa7\x9d\xc6\xcb\x2f\xbf\x7c\x5c\x1c\
+\x12\x3f\xcd\x2b\xa1\xd4\x6a\xb3\x63\x7f\x8e\x7c\xaf\x83\x6d\x6c\
+\xc4\x2e\x4a\xec\x72\xa5\x3f\x51\x0f\x68\xbe\x23\x70\xac\xd4\x49\
+\x34\x1a\x8d\xf2\xf4\xd3\x4f\xf3\xc4\xe3\x4f\x1c\xf2\x46\x84\xc7\
+\x49\x29\x7e\x4f\x8b\x50\x2a\x89\xac\xea\xea\x6a\x69\xdb\xf6\xd1\
+\xea\xac\x91\xde\xde\xde\xff\xed\xfd\x50\x5f\x5f\xbf\x5c\x51\x94\
+\x19\xaa\xa2\x80\x03\xae\xe3\x92\xcf\xe7\x11\xc0\x66\xab\x8d\x4b\
+\x5a\xa2\xb8\x4a\x8e\xe0\xd4\x22\x8a\x2c\xa1\x6a\x0a\x76\x5a\xa7\
+\xbc\x2f\x46\x7e\x5b\xd4\x67\x01\xbc\xea\xc1\x7c\x3e\x5f\xc9\xe5\
+\x8b\xe3\xd3\x31\x67\x59\x16\xb7\xdc\x72\x0b\x00\x2f\xae\x7d\x11\
+\x51\x56\xd0\xb4\x02\x42\x17\x18\xba\x81\xac\x96\x7e\x6c\x94\x48\
+\x24\x0e\x2b\x6b\xa8\xbd\x83\x41\xaf\xf7\x92\xf9\xae\x0a\x93\xe6\
+\x05\xd0\x75\x81\xb4\x75\xe6\x4e\x5e\x48\x47\x6a\x07\x28\x50\x4e\
+\x39\xa4\xbb\x7c\x1d\x2e\x6c\xdb\xee\xe0\xf8\x2c\x25\x10\x08\x30\
+\x7d\xe1\xc2\x4a\x46\xcf\x1a\xa3\xd6\xbd\x88\x58\x11\xac\xac\xbe\
+\x85\xf7\x9d\x7e\x2d\x3b\x86\x5f\xe6\x85\x2d\x2f\xa1\x35\x0f\xd3\
+\xd6\x37\xe0\x13\x85\x5e\xc2\xca\x8b\x05\xd6\xaf\x5f\xef\xf1\x55\
+\xc7\xbc\xce\x3e\xfb\x6c\x2e\xb8\xe0\x02\xe6\xcc\x99\x43\xa1\x50\
+\xa0\xb7\xb7\x97\x8b\x2f\xbe\x98\xc7\x1f\x7f\x9c\xf3\xce\x3b\x8f\
+\x62\xb1\xc8\xab\xaf\xbe\xca\xfc\xf9\xf3\x89\xc5\x62\x3c\xf5\xd4\
+\x53\x7e\x09\xee\x51\x01\xa2\x28\x8a\xa8\xaf\xaf\xa7\x90\x2f\x60\
+\x45\x24\x4b\x3f\x52\x47\x75\x8d\x86\x74\x25\xc9\xb6\x7e\xea\xf6\
+\x55\x31\xbc\xdd\xc0\x1a\x75\x88\xc5\x82\xbe\x27\x31\x34\x34\xf4\
+\xe6\xf1\x78\x60\xd7\x75\xb9\xfd\xf6\xdb\xa9\xae\xae\xe6\x8a\x2b\
+\xae\xe0\xa2\x8b\x2e\xaa\xe4\x20\x24\x10\x82\x4c\xba\xc4\x65\x67\
+\x5c\xcf\x2d\xbf\x3c\x93\x9f\xff\xcd\x2e\x4e\x08\x2d\x25\xe1\xec\
+\x67\xf7\xfa\x3b\x30\x0c\xcd\x0f\x5a\xcb\xe5\x32\xd1\x68\x94\x60\
+\x30\x78\x58\xae\xe7\xe1\xae\x6d\xdb\xb6\x31\x75\xea\x54\x06\x06\
+\x06\x50\x55\x95\xda\xda\x5a\x76\xec\xd8\x81\x10\x82\x8e\x8e\x0e\
+\xbf\x16\x78\xe7\xce\x9d\xac\x5c\xb9\xf2\xd8\xe9\x77\x8f\x7b\x29\
+\x95\x4b\xe8\x8e\xce\x9b\x77\xa7\x91\x16\x58\xc5\x43\x39\x74\xa1\
+\x4c\xd4\x8d\x47\x42\x9b\x1c\xce\x32\x4d\x93\xfa\xfa\x7a\xbf\xe2\
+\xdc\xb2\xac\x4a\x27\x6f\x08\x0c\xc3\x25\x14\x0c\xe0\x52\xa9\x3f\
+\xeb\x1e\x3a\xc8\xc6\xfc\x63\x28\xa8\x13\x92\x47\x1e\xf7\xd4\xd6\
+\xd6\x36\xb7\x58\x2c\x8e\x00\xb2\xa1\xa1\xc1\x38\x1e\x36\xe4\xea\
+\xab\xaf\x46\xd3\xb4\x3f\x48\x56\xb5\xb7\xb7\xfb\xc4\xa2\x94\x92\
+\x5f\xfc\xe2\x17\x95\xf7\x75\xac\xf4\xfb\x25\x97\x5c\xc2\x87\x3e\
+\xf4\x21\x5c\xd7\xe5\xc9\x27\x9f\xa4\xab\xab\x8b\x68\x34\xca\xc1\
+\x83\x07\x89\xc5\x62\x54\x55\x55\x71\xe0\xc0\x01\x72\xb9\x1c\x8d\
+\x8d\x8d\xf4\xf4\xf4\x1c\xb7\x1d\x28\x84\xe0\x87\x3f\xfc\x21\xcb\
+\x96\x2d\xe3\x3f\xfe\xe3\x3f\x0e\x05\x7f\x08\xa4\x0b\xf1\x78\x88\
+\x64\x26\x4d\x4d\xa0\xbe\xe2\x56\x4a\x9b\x80\x88\x20\x5d\x89\x65\
+\xd9\x7e\xad\x98\x57\xd6\xa9\xeb\x7a\xce\x75\xdd\x0c\x70\x44\xfc\
+\xd5\x1f\x91\x5e\x73\x7c\xbe\xc7\x09\x40\x75\x5c\xc5\x71\x5d\x26\
+\x87\x67\x50\x72\xd3\x14\xac\x2c\x42\x48\x8c\xac\x8b\x5b\x92\x7e\
+\xf6\xf0\xa8\x01\x19\x6b\xc0\xa4\xb5\xb5\x95\x1b\x6e\xb8\x81\x6d\
+\xdb\xb6\x51\x2a\x95\xa8\xab\xab\x63\xd9\xb2\x65\x6c\xdc\xb8\x91\
+\x60\x30\x48\x38\x1c\x26\x93\xc9\x1c\xf7\xb6\x66\x29\xa5\x5b\x55\
+\x55\x25\x77\xec\xd8\x51\x29\x59\xf0\x4a\x50\x25\x48\x21\x89\x45\
+\xc2\x3c\xbe\xfb\x7e\xbe\x75\xe5\x6f\xf8\xcd\xfe\x87\x78\xa9\xe3\
+\x65\xce\x3a\xe9\x74\x5e\x73\x37\x62\x18\xa6\xcf\xe8\x7a\x54\x8c\
+\x6d\xdb\xb3\xea\xeb\xeb\x03\xa3\xa3\xa3\x3d\xc7\x7a\x6f\xb6\x6d\
+\xb7\x09\x21\x2a\xc5\x82\x08\x46\x96\x48\xfe\xee\xf6\x66\x24\x2e\
+\x51\x33\x42\x50\x0f\x72\x70\xb8\x80\x55\x90\xbc\x7e\x57\x0a\xe9\
+\x54\x34\xce\x31\xb9\xbd\x42\x08\xbe\xf9\xcd\x6f\x72\xfb\xed\xb7\
+\xf3\xc9\x4f\x7e\x92\xb6\xb6\x36\x5c\xd7\x9d\xd0\x5f\x38\xd6\x9f\
+\x8d\x94\x92\x9e\x9e\x9e\xe3\x0a\x48\x2a\x95\xba\xe8\xf9\xe7\x9f\
+\xa7\xa5\xa5\xa5\x7d\xce\x9c\x39\xb3\xb3\xd9\x6c\xa5\x6e\x58\x28\
+\x14\x6a\x24\x25\x33\xca\x7e\xf9\x1c\xdf\x79\x56\x67\xd5\xe9\xa7\
+\x90\x50\x76\xf0\xcc\xbe\x5d\x0c\xb5\xe5\x48\xa5\x2a\x01\x6b\x28\
+\x14\xa2\xa5\xa5\x85\x52\xa9\xc4\xb5\xd7\x5e\xfb\x7a\x5b\x5b\xdb\
+\x86\x75\xeb\xd6\xad\x3c\x1e\x0e\x87\xef\xfa\x0a\x85\xba\x83\x92\
+\x7d\x4f\x15\x18\xda\x6e\x90\xef\xdb\x38\x41\x35\xa9\x42\x03\x8d\
+\xb7\xcd\x9f\x1c\xb1\x0d\x89\xc7\xe3\xdc\x77\xdf\x7d\x7e\xc2\xc8\
+\x2b\x34\x00\xd0\x35\x1d\x5d\x3b\xe4\x0a\x7b\xe5\xa3\xfb\xf7\xef\
+\x9f\x71\x3c\xed\x88\x57\x2d\xef\xbd\x00\x81\x40\x35\x5c\xb4\x30\
+\xe4\x7b\xe1\xf5\xce\x9f\xf3\xe4\x4f\x7e\x4c\x79\x44\x62\x95\x5c\
+\xca\x69\xd7\x8f\x85\x54\x55\x25\x9d\x4e\x13\x0a\x85\x18\x19\x19\
+\x39\xa2\x5e\x8d\xc3\x21\x18\x2f\xbc\xf0\x42\x6e\xbc\xf1\x46\xbe\
+\xf5\xad\x6f\xa1\xf6\xa9\x10\xcc\xd1\x38\x1b\xbf\x7f\xbf\x5c\x2e\
+\x53\x55\x55\x45\x2a\x95\xc2\xeb\x8b\x3f\x6a\x40\x62\xb1\x98\xdc\
+\xb4\x69\x53\xa5\x92\x23\x06\x0b\xcf\x8f\xa1\x07\x04\x4a\xa9\x9e\
+\x0b\x16\x5f\xca\xef\x3a\x1f\x41\x0b\xa8\x8c\xee\x33\x19\xd8\x5c\
+\xf6\x12\x4e\x52\xd7\xf5\x29\xc7\x13\x10\xd7\x75\x1d\x2f\x69\xa5\
+\xaa\x2a\x8b\x17\x2f\xa6\xb3\xbd\x83\xd7\xfe\xa9\x5c\xd9\x1b\x0a\
+\xa0\x54\x28\x12\xe1\xba\x84\x42\xd2\xa7\x2a\xbc\x11\x18\x63\x3d\
+\x7f\xc7\xb5\x91\xb4\x58\x2c\xf2\xe9\x4f\x7f\x9a\x54\x2a\xc5\x27\
+\x3f\xf9\x49\x1e\x7a\xe8\x21\x4e\x5f\x79\x3a\xdd\xdd\xdd\xcc\x9b\
+\x37\x8f\xdf\xfe\xf6\xb7\xac\x5c\xb9\x12\x5d\xd7\xc9\x66\xb3\xec\
+\xd8\xb1\xc3\xaf\x9a\x3f\x2a\x40\x42\x63\x4f\x66\xdb\x36\xb2\xda\
+\x65\xc6\x39\x35\x68\x08\xac\xb2\xc1\xeb\x23\x3f\x43\xb5\xc3\x24\
+\x5a\x0d\x92\xfb\x2b\xc1\xcf\x98\xdb\x2b\x86\x87\x87\x8f\xc9\xaa\
+\xc7\xe3\xf1\x96\xb9\x73\xe7\x1e\x08\x04\x02\x15\x4f\x4f\x51\x71\
+\x84\x4d\xa9\x54\xe2\xdb\xdf\xfe\x36\x4d\x4d\x4d\x24\x12\x09\x7e\
+\xf7\xbb\xdf\xf9\x05\x04\x00\x23\x23\x23\x4c\x9d\x3a\x95\x64\x32\
+\xc9\xc8\xc8\x08\xaa\xaa\x92\x4c\x26\x09\x85\x42\x94\xcb\x65\x02\
+\x81\xc0\x71\x05\x24\x14\x0a\xb1\x63\xc7\x0e\x66\xcf\x9e\xcd\x0b\
+\x2f\xbc\xe0\xf7\xd0\x8c\x8e\x8e\xfa\x95\x90\x83\x83\x83\xc4\xe3\
+\x71\xbf\x78\xf0\x9d\x58\x8c\x77\xb4\x21\x9e\x1b\x5b\x9d\x83\x0d\
+\x77\x64\xdf\x32\xaa\xa8\xa2\x46\x82\x11\x7d\x82\x18\x1f\x87\x9d\
+\x17\x98\x3d\x7b\x36\xb6\x6d\xa3\x0a\x95\x56\x75\x3f\x67\xdd\x10\
+\x64\xfd\x7f\x38\xbe\x2b\x3c\x6f\xde\x3c\x1e\x7b\xec\x31\x9a\x9b\
+\x9b\xa9\xad\xad\x65\xde\xbc\x79\xdc\x73\xcf\x3d\x68\x9a\xc6\xc2\
+\x85\x0b\xd1\x75\x9d\x5f\xff\xfa\xd7\x7e\x56\xd0\xab\x5e\x3f\x9e\
+\x80\x84\xc3\x61\xbe\xfa\xd5\xaf\x4e\x50\x43\xad\xad\xad\x00\xec\
+\xdf\xbf\xdf\xa7\xe8\xc7\xab\xde\x63\x02\x44\x4a\xc9\x3f\xfe\xe3\
+\x3f\x32\x77\xee\x5c\x6a\x6b\x6b\x79\xe2\x89\x27\x38\x78\xf0\x20\
+\x9a\xa6\xf9\x85\xd4\x73\xe7\xce\xa5\xbd\xbd\x9d\x44\x22\x41\x73\
+\x73\x33\x07\x0e\x1c\x38\x2e\xee\xae\xd7\x68\xa3\x09\x95\x4c\x3c\
+\x03\x72\x32\x91\x48\x84\xaf\x7f\xfd\xeb\x9c\x7a\xea\xa9\x7e\xed\
+\x97\xc7\x24\xe8\xba\x4e\xb1\x58\x64\xd7\xae\x5d\x7e\x4f\xbc\xe7\
+\xf7\x8f\xa7\x2c\x8e\x17\x20\xf1\x78\xfc\x1b\x5e\x40\x08\x20\x15\
+\x89\xa6\x09\x5c\x17\xa2\xa1\x28\x05\x23\x57\x69\x10\x12\xe0\xda\
+\x87\x18\xdf\x77\xba\xbe\xf6\x4e\x5c\xcd\xfc\xf9\xf3\xc9\xe5\x72\
+\x5c\x7a\xe9\xa5\xfc\xfe\xf7\xbf\x67\xce\x9c\x39\xd4\xd7\xd7\x33\
+\x73\xe6\x4c\x1e\x7a\xe8\x21\x74\x5d\x67\xd2\xa4\x49\x78\xcd\xa0\
+\xc7\xc3\xcb\x1a\x3f\xa1\x47\x52\x29\x42\x28\x17\x25\xf9\xb4\x41\
+\x44\x53\x59\xbb\xb6\x52\xdd\xa9\xab\x41\x14\xad\x52\x23\xe6\x35\
+\x00\x79\x76\xc2\x8b\xc8\xbd\xde\x72\x2f\x4d\x6b\x59\xd6\xa4\x50\
+\x28\x74\x9d\x10\x22\x00\x88\xba\xba\xba\x57\xfb\xfa\xfa\xba\x8e\
+\xc2\xae\x4d\xaf\xaf\xaf\xaf\xd8\x04\x45\xa0\x9d\xaf\x73\xe9\xb5\
+\x93\x28\x96\x0d\x2e\x3b\xf1\x66\xb6\x8c\x3e\x45\x62\x28\x49\xae\
+\xdf\x61\xc3\x37\x93\x3e\xcb\x1c\x8d\x46\x87\x8f\x1a\x90\x60\x30\
+\xc8\xbd\xf7\xde\xcb\xe7\x3e\xf7\x39\x3e\xf6\xb1\x8f\xd1\xdf\xdf\
+\xef\x8b\xbd\x37\xdb\x24\x95\x4a\x61\x59\x16\xa5\x52\xc9\xcf\x85\
+\xc8\xb1\xc8\xf0\xad\x0d\x34\x47\x0a\x88\x61\x18\x38\x28\xa8\xaa\
+\x42\x6f\xa7\xc1\xdd\xf7\x7e\x95\x6f\x3c\xfb\x2f\x7c\xe1\xfc\x2f\
+\x13\x8f\xc4\xf9\x9f\xad\x5f\xa4\xfd\x37\x39\x8c\x11\xc5\xaf\xec\
+\x38\xe1\x84\x13\x68\x6c\x6c\x64\xfb\xf6\xed\xd4\x35\x55\x71\xc2\
+\xcc\x46\x96\x4f\x5a\x86\xea\xea\x15\x07\x40\x30\x47\x22\x1f\xf3\
+\xd2\xd0\x3f\xfc\xe1\x0f\xff\x06\xe8\x3a\x8a\x7b\x94\xe3\x55\xb4\
+\x18\x81\xe1\x5d\x65\x12\x7b\x2d\xbe\xfa\xdd\x7b\x49\xee\xb3\x70\
+\x4d\x89\xa2\x0b\x14\x4d\xf1\x35\x8e\x10\x42\x39\x26\x1b\x92\x48\
+\x24\xb8\xfd\xf6\xdb\x0f\xeb\x26\xbd\x1e\x43\x21\xc4\xa2\xa6\x43\
+\x9e\x9f\xf6\x00\x00\x16\x56\x49\x44\x41\x54\xa6\xa6\x53\x06\x06\
+\x06\xb6\x1d\x43\xe0\x55\x01\x5d\x2a\xa8\x42\x05\x14\x96\x2e\x3b\
+\x85\x86\xb6\x2a\x96\xaf\x38\x8d\x29\xb5\x4d\xac\x29\xa9\x54\x6d\
+\x8c\xa0\xe4\x85\xaf\xd3\x67\xcc\x98\xe1\x79\x88\x4c\x3a\xdd\xa5\
+\xf9\xec\x34\xd2\x4d\xe3\x00\xc6\x40\x00\xa3\x2d\x42\xb9\x33\x82\
+\x10\x15\xde\x4d\x55\xd5\xa3\x76\x40\x54\x55\x65\xe1\xc2\x85\x9c\
+\x74\xd2\x49\x6c\xd8\xb0\x81\x81\x35\x15\xa3\x1e\x70\x1c\x26\x37\
+\xba\x7e\xac\xe6\x6d\x62\x6f\xb0\xdb\x51\x03\x32\x3c\x3c\xdc\xe5\
+\xba\xee\x5c\xaf\x80\xa0\xe9\xac\x30\x91\x88\x82\xb4\x75\xde\x77\
+\xd2\x2d\x3c\xb3\xef\x87\xd8\x18\xd8\x86\xe4\xc0\xef\x8b\x7e\x0a\
+\xb5\xaa\xaa\x2a\x52\x2c\x16\xe3\x47\xf2\x70\x53\xa6\x4c\x79\x5f\
+\xb1\x58\xbc\x10\x70\xa5\x94\xf1\xce\xce\xce\x8a\xee\x97\x82\xb2\
+\x61\x32\xd0\x53\xe2\xab\x89\x6f\xb2\xa7\x6d\x98\x3b\xb6\xfd\x2b\
+\xb1\x50\x35\x1b\x0e\x1e\xc4\xee\x8b\xa2\x58\x41\x7f\x07\xb6\xb6\
+\xb6\xfa\x6d\x69\x81\x62\x33\x77\x5e\xf4\x23\x36\xf6\xfe\x96\x1f\
+\xbc\xf8\x9f\xcc\x9c\x51\xc7\x50\x39\x4f\x76\x77\xa5\xb6\x57\xd7\
+\xf5\x63\xa2\xe2\x83\xc1\x20\xdf\xfc\xe6\x37\x89\xc5\x62\x34\x35\
+\x35\xb1\x63\xc7\x0e\xce\x3d\xf7\x5c\xd6\xac\x59\xc3\xca\x95\x2b\
+\x69\x6b\x6b\x43\x08\xc1\xac\x59\xb3\xc8\x64\x32\xbc\xf2\xca\x2b\
+\xc7\xc6\xf6\x5a\x96\xd5\x16\x0c\x06\x2f\xf6\xf2\xd5\xd3\x2f\x09\
+\x13\x8f\x6b\xe4\xfa\x6d\x7e\x33\x70\x1f\xb6\x22\x28\x0c\x38\xa4\
+\xbb\x0f\x19\x4d\x5d\xd7\x7d\x37\xf4\x08\x49\xc4\x5b\xaf\xbb\xee\
+\xba\xf3\xa5\x94\xb8\x48\x32\x55\xa3\x34\x4d\x0f\xe0\x66\xbc\xfa\
+\x2b\x9d\x74\x22\xc7\xa9\x0d\xe7\x60\x16\x6d\x92\xc5\x24\xa7\x37\
+\x5d\xc9\xb3\x5b\x9f\x21\x18\x74\x7c\x09\x55\x14\x05\xe9\x4a\xa4\
+\x25\xb8\x76\xf9\x87\xf8\xef\x0d\xff\xca\xf2\xd8\x87\x58\xd9\x70\
+\x23\x2b\x17\x2c\xe0\x3b\xad\x5f\x99\xd0\xfb\x7e\xb4\x80\x48\x29\
+\x9d\xf1\x05\xe5\x9e\x93\xe3\xb9\xd9\x5e\xc7\x59\x77\x77\x37\x81\
+\x40\x80\xda\xda\x5a\x7f\x9c\xd3\xb1\x90\x8b\x0a\x40\x75\x75\x35\
+\xb6\x6d\xb3\xe3\x6b\x45\xac\x9c\x44\x68\x20\x14\x10\xaa\x57\x81\
+\xa1\xa2\x69\x87\x22\xe3\xa3\x1c\xab\xa4\x27\x93\x49\x5c\xd7\x25\
+\x63\x17\x99\x73\x45\x06\x5b\xad\xa8\x7d\x29\x6c\x74\x4d\x85\xa4\
+\x82\x71\x20\x4a\xfe\x8d\xb1\xe1\x30\x63\xde\xd4\xf8\x12\xa0\x48\
+\x38\x4c\x32\x98\xe3\xcc\x8f\x45\x38\xff\xfc\x0b\xf8\xd1\xce\xe7\
+\x18\x4a\x8d\xb0\xb7\x7f\x27\xc5\x9a\xed\xa8\x54\x6a\x6c\x85\x7a\
+\x74\xe3\x93\x00\x1a\x1b\x1b\x4f\x94\x52\xae\x08\x85\x42\x5c\x73\
+\xcd\x35\xc4\x62\x31\x7f\x13\x6e\xdd\xba\x15\x45\x51\xd8\xb3\x67\
+\x8f\x5f\xf4\x31\x30\x30\xe0\x17\x18\x1e\x2b\x20\x9c\x7c\xf2\xc9\
+\x7c\xe9\x4b\x5f\xc2\xb6\x6d\x1e\x7e\xf8\x61\x0e\x1c\x38\x30\x61\
+\x8e\x47\x3c\x1e\x67\x70\x70\xd0\x8f\x46\xbd\xc1\x34\x47\x9b\x81\
+\x73\x5d\x17\xcb\xb1\x51\x84\x42\xba\x27\xcc\x23\x7f\xff\x3b\xfa\
+\x0b\xfb\xb9\xe3\xb7\x7f\xc7\xec\xc6\x79\x74\x96\xdb\x30\xca\x21\
+\x14\xfd\xd0\x44\x37\xdf\xf5\xf4\x8a\xf6\x14\x85\x40\x40\xc7\xb2\
+\x0c\x34\x25\x88\xaa\x68\x04\xb4\x20\x21\xad\x42\x85\x1b\xa6\x81\
+\xa2\x8a\xa3\x9e\xc7\x55\x2a\x95\x5a\x9a\x9b\x9b\xc3\x85\x42\x81\
+\xaa\xaa\x2a\x9f\x32\x1a\xbf\xfe\x58\xb1\xa0\x17\x30\x1e\x35\x20\
+\x2b\x56\xac\x60\xf7\xee\xdd\xfc\xf5\x5f\xff\x35\x67\x9c\x71\x06\
+\x42\x08\x22\x91\x4a\x1b\xb1\x97\x0e\x2d\x16\x8b\x0c\x0f\x0f\xd3\
+\xdc\xdc\xcc\xe0\xe0\xa0\x6f\x97\x8f\xf4\x41\xbd\xb9\x8d\x16\x15\
+\x55\xb0\x7a\xd5\xbf\xf2\xf3\x3d\x5f\x27\x79\xa0\x9a\x05\xda\x55\
+\xdc\x72\xc6\xdf\xf3\x99\x9e\xf7\x57\x5c\x5c\xa7\xa2\x72\x82\xc1\
+\xa0\x3f\xdb\xd1\x75\x5d\x0c\xd3\xc4\x2a\x18\x64\xd7\x2c\xe6\x8b\
+\xbf\xfa\x22\x8e\xb4\xd9\xcb\xe3\x94\x0d\x8b\xcc\xcb\x02\xe4\x0c\
+\x66\xcf\x96\x20\x2a\xb9\x8a\xcb\x2f\xbf\xfc\x7f\x84\x10\xdf\x07\
+\xd8\xbc\x79\x73\xc7\xde\xbd\x7b\x97\x1c\xae\x27\x98\x4e\xa7\x2b\
+\x1d\xc4\x01\xb8\xe4\xdf\x1a\x50\x54\x01\xa8\x34\xd7\x9f\x40\x7f\
+\xea\x00\xa3\xfb\x4c\x0e\xbc\x58\x24\xd5\x5e\x91\xe0\xaa\xaa\x2a\
+\xf2\xf9\xfc\xfd\xc7\x14\x18\xfe\xfc\xe7\x3f\xe7\x03\x1f\xf8\x00\
+\x77\xdf\x7d\x37\xeb\xd7\xaf\xf7\xfd\xfd\x7c\x3e\xef\xd3\x25\xa9\
+\x54\x6a\x42\xaa\x54\x4a\x49\x63\x63\xe3\x97\x14\x45\xb9\xa5\xaf\
+\xaf\xef\xc0\x91\x4a\x88\x83\x83\x22\x55\xa6\xd4\x4d\x61\xff\x40\
+\x91\xa2\x05\x1d\xc3\xfb\x79\x72\xef\x7d\xd8\xb6\x85\x65\x55\x74\
+\xa9\x69\x9a\x04\x83\x41\x4e\x3d\xf5\x54\xf6\xee\xdd\x4b\x22\x91\
+\x20\x9d\x4e\x63\xba\x26\x56\xd9\xc6\x30\x2a\x53\x91\x76\xd7\x6e\
+\xe6\x9c\x6b\x63\x38\xb9\xca\x1c\x45\x37\x13\xc4\xc9\x6a\x38\x19\
+\x0d\x6b\x20\x18\x40\xfa\x33\x15\x83\x47\x60\x43\xd0\xf5\x4a\x3d\
+\x98\xee\x2a\x0c\x6c\x36\x29\x0e\x3b\x14\x86\x1c\x5e\x1d\x48\x50\
+\x4e\xb9\x95\xba\x35\x4d\xf8\xb5\x08\x63\x36\xcb\x3e\x26\x1b\xe2\
+\xba\x2e\x0f\x3c\xf0\xc0\xa1\x1b\xf1\x02\x4d\x01\x99\x74\x06\xcf\
+\xad\x16\xa2\xc2\xdb\x78\x63\xfd\xe6\xcc\x99\x73\x51\x26\x93\xa9\
+\x07\xfe\x28\x20\xf3\xe6\xcd\x7b\x8f\xae\xeb\x42\x51\x14\x67\x78\
+\x78\x38\x56\x2e\x55\x26\x7b\x5a\x8a\x4d\xbe\x3f\xc0\xae\x5d\xbb\
+\x48\xe4\x0a\xa4\x07\x6c\xb2\x89\x2c\xa3\x07\x8b\xe4\x07\x2d\x4c\
+\x4b\xa2\xc8\x0a\x80\x86\x61\xd0\xdc\xdc\xcc\x8e\x1d\x3b\x50\x94\
+\x4a\xeb\xb4\x23\x0f\x4d\x1e\x32\x5c\x8b\x70\x2d\x28\x8e\xc6\xb4\
+\xfa\x05\xc4\x67\x54\xb1\x73\x70\x03\x75\x91\xc9\x64\xe5\x10\x03\
+\x0f\x36\xe0\x14\x0e\xa9\xbc\x23\x49\x2f\x57\x55\x55\xb1\x7a\xf5\
+\x6a\xf6\xec\xd9\xc3\x81\x7d\x07\x08\x18\x65\x54\xc7\x21\x56\xef\
+\x62\xd7\xd8\xfe\x98\x0e\x2f\x6e\xf3\xbc\xbf\x63\x89\x43\xfe\xfb\
+\xe0\xc1\x83\x17\xdb\xb6\x3d\x53\x08\x41\x31\x26\x39\xf5\xf2\x6a\
+\xf4\x80\xa0\x30\x52\xc5\xfb\xcf\xb8\x9e\x67\xf6\xfd\x00\x4d\xd5\
+\x19\xda\x6e\x30\xb8\xb5\x84\x50\x84\x3f\xed\xe7\x1d\x1e\xb0\xe1\
+\xb4\xd3\x4e\xdb\xac\xaa\xaa\x10\x42\x20\x91\x50\x5b\x82\x6c\x10\
+\xe1\xa8\xb0\x11\x9e\xd8\xf8\xd4\x21\xde\x88\x1a\x76\x1c\x18\x64\
+\xf4\x60\x0c\x47\xe6\xb0\x4d\xe9\x1b\x73\xaf\x16\xcc\x9b\xec\xe6\
+\x9a\xae\xdf\x6a\x6d\x49\x07\x45\x55\xe8\xde\x6f\xf3\x95\x5b\xbf\
+\xc2\x0f\xd6\x7e\x97\x4b\x5a\x6e\xe1\x8a\x25\x1f\xe4\x53\xcf\x5f\
+\x80\x65\x5a\xd8\xa6\x73\x44\x80\x78\x69\xd9\x6f\x7f\xfb\xdb\x24\
+\x12\x09\x6e\xbe\xf9\x66\x9e\x7b\xee\x39\xbf\x72\xb1\xbd\xbd\x9d\
+\x65\xcb\x96\x11\x0e\x87\xd9\xb6\x6d\x1b\xdb\xb6\x6d\x63\xe9\xd2\
+\xa5\x6c\xd8\xb0\xe1\x1d\xbf\xfb\x4f\x02\x92\xcb\xe5\xb6\x36\x37\
+\x37\x0f\x1b\x86\x31\x53\x08\x81\xa1\x3b\xb4\x9c\x57\x8d\x9d\x92\
+\xa4\x3b\x0c\x1e\xfd\xed\x03\x14\x07\x04\x56\xd1\xa2\x9c\x92\x84\
+\xc2\x21\xdf\xf5\x7d\xa7\xf6\x30\x40\x2f\x97\xcb\xc2\xb6\x6d\x10\
+\xb0\x35\xb2\x8b\xf7\x9e\x5f\x87\x2b\x5d\x1c\xc3\x45\xb1\x83\x48\
+\x4b\xc1\xc9\xab\xe4\x5e\xab\xc1\x29\xaa\x3e\xb1\x98\x4c\x26\xfd\
+\xe0\xd1\xa3\x47\x5c\xd7\xa5\xb3\xb3\x53\xbe\xf1\xc6\x1b\xe2\xd1\
+\x47\x1f\x65\xdb\xb6\x6d\x15\xc7\x43\x3a\xa8\x9a\xc2\x09\xd5\x4b\
+\x38\x98\xdf\xcd\x48\xf9\x20\xff\xeb\xc4\xdb\x09\x6a\x21\x42\xa1\
+\x20\x96\x63\x63\x99\xbe\x1a\x7a\x47\x44\x6a\x6a\x6a\x3e\x71\xde\
+\x79\xe7\x7d\xa3\xb5\xb5\x95\x47\x1e\x79\x84\x2f\x7f\xf9\xcb\xf4\
+\xf5\xf5\xb1\x77\xef\x5e\x72\xb9\x9c\x4f\xd3\xac\x5d\xbb\x96\x99\
+\x33\x67\xd2\xd3\xd3\x83\xe3\x38\x8c\x8e\x8e\x1e\x9f\xc1\x01\x95\
+\x0d\x21\x38\xe9\xa4\x93\xe8\xee\xea\x66\xe3\xe7\xca\x48\x7b\xcc\
+\x21\x16\x1a\x08\x15\xe9\x38\x84\x42\xba\xff\x72\xbc\x12\xfc\x77\
+\xba\x01\xbf\x3c\x07\x49\xa0\xae\xd2\xd9\x74\xd6\xa4\x0f\xd3\x32\
+\xb9\x85\xa7\x3b\xbe\xc7\xcc\xaa\x53\xd8\x9a\xfa\x0d\xf6\xc6\x30\
+\xb6\x75\xa8\x8a\x64\x7c\x1b\x44\xa1\x50\xb8\x63\xff\xfe\xfd\xff\
+\x3e\x69\xd2\xa4\x81\x91\x91\x91\xc6\xb5\x6b\xd7\xb2\x68\xd1\x22\
+\x36\x6e\xdc\x58\xe9\xc8\x52\x5d\x92\xbf\x2f\xd3\x3b\x75\x90\x7b\
+\x36\x3f\x40\x32\x97\xe0\x0b\xbf\xfb\x12\xaa\xa2\xd2\x9d\x05\x2b\
+\x7f\x48\x32\x26\x4f\x9e\x7c\xc2\xb4\x69\xd3\x5e\x05\x54\xc7\x71\
+\xd8\xb9\x73\xe7\x75\xc9\x64\xb2\xe7\x2d\x6c\x44\xad\xa2\x28\x9a\
+\x94\x92\x4d\x9b\x36\x71\xd1\x45\x17\xf9\xe4\xe6\x5b\xd7\xfe\xfd\
+\xfb\x7d\x82\x73\xeb\xd6\xad\xc4\xe3\xf1\x63\x07\xc4\xb2\x2c\x6e\
+\xbd\xf5\x56\xce\x3b\xef\x3c\x0c\xc3\xe0\xb1\xc7\x1e\xf3\x07\x41\
+\x7a\x9e\xd6\x9c\x39\x73\xd8\xbb\x77\xaf\x4f\x0d\x0c\x0c\x0c\x78\
+\x37\xb9\x70\xda\xb4\x69\xc9\xde\xde\xde\xb7\xe3\x8a\x1c\x8f\xaf\
+\x92\x02\x14\x45\xd0\xbd\xcf\xe6\xdb\x7f\x75\x13\xff\xf0\xe3\x2b\
+\xf8\xe2\xc5\xdf\x27\x1e\x6e\x60\x74\x7b\x27\x83\xd6\x08\x86\xe1\
+\xf8\x80\x7b\xc4\xe1\xb8\x2a\x49\xa9\xaa\x2a\xb7\xde\x7a\x2b\x9f\
+\xff\xfc\xe7\xb9\xff\xfe\xfb\xfd\x09\x3c\xb6\x70\xd1\x8a\x1a\xb1\
+\x13\xaa\x28\x65\x2c\x0a\x96\x60\x64\xd9\x56\xe2\xb1\x10\x93\x46\
+\xc2\xd8\xf5\x41\xdc\xb2\x8a\x34\x14\xa4\xa9\x84\x91\xe2\x4c\x2f\
+\xf7\xfd\xe6\x9b\x6f\x86\xde\x4e\x5d\x8d\x4f\x5b\x2b\xaa\x4a\xb8\
+\x4a\x23\x10\x14\x87\x3a\xa6\x04\xd8\x25\x17\xbb\xa4\xf8\x36\x57\
+\x51\x14\x4a\xa5\x92\x65\x9a\x66\xe2\x98\x00\x71\x1c\x87\xd9\xb3\
+\x67\x93\x4c\x26\x39\xe5\x94\x53\x08\x85\x42\x9c\x72\xca\x29\x44\
+\xa3\x51\xa2\xd1\x28\x3f\xf9\xc9\x4f\xa8\xa9\xa9\xe1\xcc\x33\xcf\
+\x24\x9d\x4e\xb3\x6e\xdd\x3a\x02\x81\x00\xb6\x6d\xf3\x9e\xf7\xbc\
+\xe7\xe1\xf6\xf6\xf6\x1f\xf7\xf6\xf6\xde\x34\x46\x36\x36\x01\xab\
+\x01\xd3\x75\xdd\xea\xde\xde\xde\x4a\x01\x32\x60\x5a\x26\xf9\x6c\
+\x8c\x3b\xef\xfc\x1a\x3d\xed\x59\x1e\x1f\x7a\x86\x4c\x21\xc3\x2b\
+\x7d\x6f\x52\xe8\x0a\x13\xd3\x6b\x3d\xb6\x94\xaa\xaa\x2a\x72\xb9\
+\xdc\x84\xd1\x17\x42\x08\xda\xda\xda\xb8\xe9\xa6\x9b\xc8\xe5\x72\
+\x54\x55\x55\x55\x66\x09\x0b\x17\xdc\xb1\x39\xed\xc0\x90\x36\xc2\
+\xc2\x85\x01\x6c\xcb\x84\xa6\x89\x23\x93\xb2\x9b\xc7\x2a\x1e\x85\
+\xf4\x0b\x23\xfe\x18\xf1\xd9\xd0\xd0\x30\xd6\x82\x00\xb5\xe7\x04\
+\x59\x7c\x5a\x8c\xa1\xed\x65\x46\xf7\x59\x8c\xee\x36\x71\xed\xb7\
+\x75\x04\x0e\x0c\x0e\x0e\xde\x77\x4c\x80\x44\x22\x11\xee\xbc\xf3\
+\x4e\xce\x3c\xf3\x4c\xee\xb9\xe7\x1e\x8a\xc5\xe2\x84\xec\x97\x69\
+\x9a\xac\x5d\xbb\x16\xdb\xae\x64\xf4\x82\xc1\xa0\xff\xef\xde\xf0\
+\x2e\x6f\x8d\x8c\x8c\xac\xba\xf2\xca\x2b\x3f\xef\x51\xf4\x19\xb3\
+\x28\x6b\x67\x3b\x42\x26\xc3\xb8\xc9\x00\xd8\x92\x3d\x6f\x76\x32\
+\x59\x59\xc0\xa6\x8d\x95\xe9\xdc\xd3\xb4\xe5\x74\xba\x1d\x7e\x8e\
+\x3a\x12\x89\x10\x0c\x06\xfd\x91\x47\xe3\xa8\x97\x7b\x86\x87\x87\
+\xab\x84\x10\x6e\xb9\x5c\x5e\x2e\x84\xb8\xb8\x5c\x2e\xe3\x28\x2e\
+\xa1\x50\x78\xac\xe2\x51\x80\x2a\x31\x4d\x87\x0f\xcc\xbc\x93\xee\
+\xec\x2e\x4e\x9a\xb5\x98\xff\x7a\xee\x3e\xec\xba\x76\x1c\x27\x82\
+\x65\x5a\xa0\xc8\xb7\x8d\xe2\x03\x81\xc0\x6c\x29\x65\x9d\x37\x48\
+\x61\xd1\xa2\x45\x04\x02\x01\xfa\x5e\xeb\x65\xe7\xcb\x12\x49\x00\
+\x29\x75\x62\x91\x90\xaf\x52\xbd\x5f\x5e\x61\xc8\x31\xab\x2c\xdb\
+\xb6\x83\x8a\xa2\xf0\xda\x6b\xaf\x55\xf4\xa1\x64\xc2\x64\x05\x21\
+\xc0\xb6\x1c\x84\x52\x31\xe6\x5e\x2e\xa2\x50\x28\x4c\x18\x2c\xec\
+\x3d\x93\x33\x6e\x50\x72\x76\x61\xa7\x98\x79\x46\x14\xcb\x35\x71\
+\x1c\x17\x25\x17\xab\xc4\x07\xde\xec\xdc\x31\xf7\xd2\x9b\x17\x2c\
+\xa5\xf4\xe9\xfe\xfa\xfa\x7a\x12\x89\x43\xd2\x9f\x4c\x26\xbf\xe6\
+\x19\xfb\xc9\x93\x27\x7f\x4c\xd3\xb4\x8b\xa5\x94\x08\x1b\xb0\x5d\
+\xff\x50\x00\xcb\x34\x48\xec\x93\x54\x35\x57\xf3\xfc\x9b\x3f\xc6\
+\x3a\xf0\x31\x16\x28\x67\x12\x53\x56\xf0\x58\xef\x4f\xc9\x8d\x06\
+\x40\x48\x6f\xf0\xd8\x29\x81\x40\xa0\x5e\x55\x55\x51\x2a\x95\x76\
+\x5f\x72\xc9\x25\xed\x3d\x3d\x3d\x58\x96\x25\x6b\x6b\x6b\xc5\x3f\
+\xff\xf3\x3f\xb3\x78\xf1\x62\xee\xbd\xf7\x5e\xf6\xed\xdb\xc7\xe2\
+\xc5\x8b\x79\xf3\xcd\x37\x69\x69\x69\xa1\xbf\xbf\x9f\x74\x3a\xcd\
+\x94\x29\x53\x90\x52\xb2\x7d\xfb\x76\xd2\xe9\xf4\xb1\x03\x72\xe0\
+\xc0\x81\xbf\xcb\xe5\x72\x9b\xd4\x31\x7e\x22\x1f\x72\x39\xff\x96\
+\x3a\xca\x59\x07\xbb\x24\x29\xa5\x5c\xd2\x5d\x16\x99\x03\x36\xee\
+\x38\xa0\x26\x4d\x9a\xe4\xd1\x2b\x55\xb1\x58\x6c\x46\x3e\x9f\x3f\
+\x00\xb8\xe3\x77\x4a\x38\xa2\x61\x14\x25\x97\xcf\xfc\x27\x26\xd7\
+\xd5\xf2\xf3\x3d\xdf\x20\x56\xd7\x48\xa2\xf9\x00\xc9\xf5\x21\x5f\
+\xf7\x3a\x8e\x43\x3a\x9d\x46\x4a\x49\x38\x1c\xc6\xb2\x2c\x06\x06\
+\x06\xbc\x06\x98\xb7\xf3\x1c\x54\x4d\xd3\x58\xbd\x7a\x35\xf9\x7c\
+\x9e\x1f\xff\xf8\xc7\x7e\x02\xad\xae\x5c\x45\x68\xeb\x1c\xee\xda\
+\x7c\x17\xaa\x32\x87\xdf\x06\x9e\x20\xa4\xeb\x48\x43\x65\x8a\xb3\
+\x98\xa6\x13\xbd\x9d\x26\xb9\xfa\xea\xab\x7f\xee\x55\x8e\xac\x59\
+\xb3\x66\xaa\x57\x13\x6c\xdb\xb6\x37\x8f\xd7\x1f\x36\xe3\xba\x2e\
+\x93\x27\x4f\x66\xfa\xf4\xe9\x94\xcb\x65\x66\xcc\x98\xc1\xba\x75\
+\xeb\xfc\x64\xde\xce\x9d\x3b\x8f\x8f\x97\x65\x59\xd6\xd6\x40\x20\
+\x20\x3d\x35\x13\x01\x76\xfe\xc0\x7c\x4b\x6e\x5d\x27\xa4\xeb\xa0\
+\x1f\x8a\x62\x35\x4d\xc3\xb2\x2c\x1a\x1b\x1b\xff\x7a\xc9\x92\x25\
+\x97\xbd\xf8\xe2\x8b\x5f\xb5\x2c\xeb\xe4\xbe\xbe\xbe\x43\x63\x9d\
+\xde\x28\xa0\xb5\x57\xb3\xeb\xc4\x36\xbe\xb1\xf9\x19\x66\x4e\x99\
+\x89\x1e\x9f\x42\xdb\xe0\x4e\xf2\x43\xae\x5f\x1c\xf0\x16\xd1\x2f\
+\x77\x74\x74\x3c\x34\x96\xf1\x33\x34\x4d\x7b\xe5\xed\x72\x29\xef\
+\x7b\xdf\xfb\xa8\xaf\xaf\xe7\xb6\xdb\x6e\xe3\xd1\x47\x1f\xf5\x53\
+\xba\xae\x74\x29\x9b\x15\xb5\xbb\x21\xdd\xca\x7b\x6f\x0d\x4f\x18\
+\x33\x65\x0d\x07\x30\x7b\xc2\x98\x07\xc3\x38\x39\x8d\xf1\xb3\x54\
+\xbc\x2a\x7a\x2f\xc6\xb9\xed\xb6\xdb\x08\x06\x83\x94\x4a\x25\xa4\
+\x94\x7c\xff\xfb\xdf\x9f\xd0\x7f\x22\xa5\x64\xf7\xee\xdd\xb4\xb6\
+\xb6\x1e\x36\x89\x79\x58\xed\xa7\xae\xeb\xf2\xd1\x8f\x7e\x94\x73\
+\xce\x39\x87\x8e\x8e\x0e\x76\xee\xdc\x49\x67\x67\xa7\x3f\xdb\xc3\
+\x34\x4d\x4e\x3f\xfd\x74\xf6\xef\xdf\xcf\x9e\x3d\x7b\x98\x3d\x7b\
+\x36\x1d\x1d\x1d\x7e\x26\xb1\x5c\x2e\xeb\xe7\x9e\x7b\xee\xbf\x2a\
+\x42\x61\x58\x1b\x96\xd3\x4f\x12\xc2\x1c\x0c\x63\x0f\x07\x71\x53\
+\x3a\x3b\x36\xee\xa5\x45\x3d\x11\x67\xc4\xa5\x77\x78\x90\x26\x6d\
+\x29\xeb\x13\xaf\xfb\xbd\xe0\x5e\x71\xc0\x18\x91\x98\x4f\x24\x12\
+\x1f\xfd\x93\x0f\xa5\x69\xbc\xf2\xca\x2b\xac\x59\xb3\x86\x91\x91\
+\x11\x8a\xc5\xa2\x3f\x4f\xd7\x2b\x0b\x02\x28\x0a\x93\x68\x6d\x0c\
+\x92\xd3\xb8\xfd\x92\x2f\xf1\x8b\xd6\xff\x64\x24\x32\x82\x3d\x37\
+\x4b\x62\xb3\x45\xea\xe5\x2a\x54\xad\xd2\xb2\x7d\xd6\x59\x67\xad\
+\xf3\x00\x29\x95\x4a\x84\xc3\x95\xf3\x4e\x8a\xb9\x4a\x39\xa9\x50\
+\x15\x94\x3f\x5e\xd6\x2c\x01\x91\x4a\xa5\xa2\xc7\x05\x10\x29\x25\
+\xd7\x5c\x73\x0d\x5b\xb6\x6c\x61\xd5\xaa\x55\x24\x12\x09\x16\x2d\
+\x5a\xc4\xf6\xed\xdb\x69\x68\x68\xa0\xb3\xb3\x93\x9a\x9a\x1a\x16\
+\x2e\x5c\x48\x20\x10\xa0\xbd\xbd\xdd\x1f\x00\xe9\xbd\x80\xfe\xfe\
+\x7e\x1c\x29\xa9\xbe\x3e\x2f\xc2\x8b\x63\x84\x97\x66\x41\x91\x48\
+\x53\xc1\x4e\x6b\xb8\x59\x9d\xd4\xf3\xb5\x38\x96\x8b\xe6\x1e\xaa\
+\x2e\xf1\x06\xa7\xd5\xd5\xd5\x4d\x98\x35\xff\x4e\x91\x74\xb1\x58\
+\xe4\x9c\x73\xce\xf1\xc1\xf4\xf4\x77\x5d\x5d\x9d\xff\xbd\x4d\x3d\
+\x2a\x7b\xbf\x5c\x87\xed\x66\xf8\x9b\xff\xfc\x18\x02\x9d\x40\x40\
+\x45\x1a\x51\x14\x5d\x22\x74\x13\xd5\x55\xbc\xd1\xb8\xb3\x0c\xc3\
+\xc0\xb6\x6d\xaa\xab\xab\x2b\xc9\x27\x04\xb5\x4b\x82\xe8\x08\xf2\
+\x03\x0e\x46\xc6\x9d\x30\x9c\xc8\x93\x0a\x4d\xd3\x44\x36\x9b\x7d\
+\xc3\xb6\xed\xf7\x1e\x17\x40\x74\x5d\xe7\xfa\xeb\xaf\xe7\xae\xbb\
+\xee\xe2\xeb\x5f\xff\x3a\xdd\xdd\xdd\x13\x4e\xd2\x29\x16\x8b\x74\
+\x75\x75\x91\xcb\xe5\xfc\x29\x9d\xaa\xaa\x92\xcd\x66\xa9\xad\xad\
+\xc5\x75\x5d\x7f\xc8\xc0\xc0\x03\x36\x6f\x28\xde\xb0\x49\x65\x1c\
+\x65\x61\x52\xb4\xda\x68\x69\x69\x99\x90\xb7\xf7\x26\xea\x7c\xf4\
+\xa3\x1f\xe5\xfe\xfb\xef\x3f\xac\x32\x23\xc3\x30\x72\xb6\x6d\x77\
+\x7b\x75\x5d\x42\x88\xe9\xaa\xaa\x0a\x4f\xda\xfd\x89\xa8\x01\x8d\
+\x9a\x49\x31\x2c\xcb\x62\xb4\x6c\x53\x7d\xe9\x10\xb5\x93\x74\x64\
+\x49\xc3\x1c\x0a\x52\xec\x08\x40\x22\xea\x57\x4e\x7a\xf1\x47\x28\
+\x14\xe2\x13\x9f\xf8\x04\xc9\x64\x92\xed\xdb\xb7\x57\x1a\x95\x6a\
+\x2d\x64\xfc\x90\xf3\xe1\xfd\xee\x15\x5d\x94\x4a\xa5\x72\x22\x91\
+\x48\x1d\x17\x40\xbc\xb9\x8a\x5f\xf8\xc2\x17\xfe\xe8\x67\xf2\xf9\
+\xbc\x4f\xcd\x4b\x29\x19\x3b\xb1\xcc\x67\x81\x87\x86\x86\x2a\x85\
+\xda\x93\xe3\xa8\xaa\x4a\x5b\x5b\x9b\x3f\xcb\x77\xf1\xe2\xc5\x63\
+\xd4\x47\xd9\xcf\x71\xd8\xb6\xed\xe7\x0e\xaa\xaa\xaa\xfc\xf9\x86\
+\x87\x03\x48\x3a\x9d\x7e\x70\xd3\xa6\x4d\x0f\x7a\x3f\x4f\x9f\x3e\
+\xdd\x52\x55\x55\x3b\xf1\xc4\x13\xe9\xee\xee\xf6\x81\xf6\x5e\x98\
+\x61\x18\x24\x7b\x46\x68\x5e\x7f\x12\xd9\x52\x89\x75\xeb\xd6\xa1\
+\x69\x1a\xcb\x97\x2f\xa7\xa1\xa1\x81\x36\xa5\x7d\xc2\x09\x3a\x17\
+\x5e\x78\x21\x93\x27\x4f\xe6\x33\x9f\xf9\x0c\x8f\x3c\xf2\x08\x2f\
+\xbf\xfc\x32\x97\x5d\x76\x19\xbf\xff\xfd\xef\x99\x35\x6b\x16\xc3\
+\xc3\xc3\x6c\xd8\xb0\x81\x58\x2c\xc6\xa9\xa7\x9e\xca\x73\xcf\x3d\
+\x77\xd8\xa4\xe5\x61\x01\x92\x4a\xa5\xfe\x2a\x9b\xcd\x7e\xa3\xa6\
+\xa6\x66\x51\x3e\x9f\xf7\xcb\xfb\xc7\x1b\xaa\xb7\x1a\x2d\xaf\xc8\
+\xce\x03\xc5\xcb\x75\x54\x55\x55\x11\x08\x04\x68\x6a\x6a\x62\xe6\
+\xcc\x99\x0c\x0c\x0c\x4c\x38\xbf\x6a\xfc\x31\x42\xe3\x8b\x93\xbd\
+\xe1\x68\x47\x93\xfc\x92\x52\xb2\x6e\xdd\x3a\x86\x86\x86\x58\xbd\
+\x7a\xb5\x1f\x4b\x79\x52\xe8\x79\x4a\xb6\x6d\x93\x4e\xa7\x39\xeb\
+\xac\xb3\x88\xc5\x62\x24\x93\x49\x32\x99\xcc\xf8\x53\xd8\x30\x4d\
+\x93\xbd\x7b\xf7\x72\xdb\x6d\xb7\x31\x32\x32\xc2\x8e\x1d\x3b\x70\
+\x5d\x97\xed\xdb\xb7\xe3\xba\x2e\xfb\xf6\xed\xf3\x9f\xbd\x50\x28\
+\x30\x38\x38\x78\x44\x2c\xf2\x61\x01\x92\x4c\x26\x7f\x5d\x57\x57\
+\xf7\xcf\xcb\x97\x2f\x67\xf5\xea\xd5\x74\x77\x77\xb3\x79\xf3\x66\
+\xba\xba\xba\x08\x04\x02\x7e\xe2\x7e\xea\xd4\xa9\xf4\xf5\xf5\x91\
+\x4e\xa7\x99\x34\x69\x92\xcf\x7e\xfa\x25\x3d\xe3\x62\x10\xcb\xb2\
+\xc8\xe7\xf3\x3e\x4d\x3e\xfe\x40\xb1\xf1\xb3\x73\xc7\x5e\x5c\x6a\
+\x60\x60\xe0\xe1\xb1\xff\x37\x72\x34\x65\x45\x86\x61\xf8\x52\x9b\
+\xcd\x66\xfd\xef\x1f\x3f\x74\xdf\x53\x4b\xa6\x69\xfa\x07\xd5\x78\
+\xff\xe6\xfd\xbd\xe3\x38\x8c\x8c\x8c\xb0\x6a\xd5\x2a\x5f\x9d\x43\
+\xa5\x9b\xca\x1f\xeb\x31\x6e\x83\xbe\xf1\xc6\x1b\x47\xd4\x42\x77\
+\x24\xe7\x87\x88\x8f\x7f\xfc\xe3\x0c\x0e\x0e\x72\xed\xb5\xd7\x62\
+\xdb\x36\xb3\x67\xcf\xa6\xaf\xaf\x0f\xdb\xb6\xa9\xab\xab\x43\x88\
+\x4a\x32\xa6\xbd\xbd\x9d\x62\xb1\x48\x30\x18\xf4\x87\x24\x7b\xb6\
+\xc0\x03\xc4\x2f\xf3\x19\x03\x61\xbc\x24\xa9\xaa\x4a\x20\x10\xa0\
+\xa5\xa5\xc5\x9b\x3b\x35\xd2\xd9\xd9\xf9\x89\xf1\x31\xce\xf8\xa0\
+\xf0\x70\x54\xee\xc5\x17\x5f\xcc\x45\x17\x5d\xc4\xf0\xf0\xb0\xaf\
+\xb2\x42\xa1\x90\x9f\x8a\xf6\xd4\xd7\x78\x06\x60\xfc\xe1\x67\xde\
+\xdc\xc9\xb1\x0d\x3a\x81\x4c\x1c\x5f\x72\xfb\x76\xd7\x96\x52\x76\
+\x49\x29\xfb\x8e\x37\x20\x7c\xfa\xd3\x9f\xe6\xa1\x87\x1e\xe2\x67\
+\x3f\xfb\x19\x2f\xbe\xf8\xe2\x84\xf3\x38\x0c\xc3\x20\x1a\x8d\xfa\
+\x65\xf7\xde\x91\x0e\x9e\x6b\xec\xa9\xaf\xf1\xa7\xd5\x8c\x3f\xe9\
+\xcd\x7b\x21\xc5\x62\xd1\xaf\x32\x9c\x3a\x75\x2a\xe9\x74\xfa\x0f\
+\x28\x87\x23\x01\xc3\x53\x59\x4d\x4d\x4d\xec\xde\xbd\xdb\x57\xb7\
+\x9e\x5a\x1c\x7f\x14\x85\xf7\x67\x4f\x5a\xc7\xd7\x54\x99\xa6\x89\
+\xae\xeb\xdc\x71\xc7\x1d\x5c\x70\xc1\x05\xfc\xfb\xbf\xff\xbb\x97\
+\x5f\xf7\x59\x6b\x4f\xda\xab\xaa\xaa\xfc\x41\x3d\x52\x4a\x76\xed\
+\xda\x35\xeb\xb8\x4b\x88\xe7\x3e\x7e\xf0\x83\x1f\x9c\xd0\x53\x38\
+\xde\x76\x78\x93\x9d\x3d\xfd\x59\x55\x55\xe5\x9f\xc4\xe3\xed\x4a\
+\x8f\x23\xf2\xa4\xc5\xf3\x46\x3c\x8a\xc4\xa3\xab\xa5\x94\x13\x06\
+\x80\x1d\xcb\x4a\xa7\xd3\xb3\x36\x6f\xde\x8c\x65\x59\xf9\xe9\xd3\
+\xa7\x77\xac\x5a\xb5\xaa\xf6\x53\x9f\xfa\x14\x37\xdf\x7c\x33\xf9\
+\x7c\xde\xef\xb5\xf7\xdc\x5a\x6f\x1c\xdf\x78\x9a\x3f\x93\xc9\x30\
+\x7b\xf6\x6c\xce\x3d\xf7\x5c\xa2\xd1\x28\xe7\x9c\x73\x0e\x1b\x36\
+\x6c\xe0\x92\x4b\x2e\x61\xcd\x9a\x35\x5c\x79\xe5\x95\x3c\xf9\xe4\
+\x93\x2c\x5c\xb8\x90\xda\xda\x5a\x54\x55\xe5\xb9\xe7\x9e\x9b\x30\
+\xed\xfa\x78\x03\xf2\x8b\xee\xee\xee\xed\x8a\xa2\xac\x7e\xef\x7b\
+\xdf\x8b\xa2\x28\xb4\xb7\xb7\x63\x18\x86\x3f\xef\xdc\xd3\xb7\x35\
+\x35\x35\x38\x8e\xe3\x0f\x94\x14\x42\x90\x4a\xa5\xfc\x01\xf5\xe3\
+\x55\x96\x57\xd1\xe7\x7d\x6e\xac\x5a\x5d\x3a\x8e\x23\x6c\xdb\xa6\
+\xa6\xa6\x86\x4c\x26\xa3\x1e\x23\x20\x7e\x4e\xa3\x58\x2c\xba\x77\
+\xdd\x75\x17\xeb\xd7\xaf\xa7\xba\xba\x9a\x91\x91\x11\x7f\xf7\x8f\
+\xb7\x67\x1e\xd5\x32\x3e\xd1\x96\xcb\xe5\xd8\xbd\x7b\x37\x0d\x0d\
+\x0d\x78\xe7\xff\x7a\x6e\xef\xd6\xad\x5b\xb1\x6d\x9b\x9e\x9e\x1e\
+\x7f\x10\x8d\x37\x92\xe9\x88\xec\xdd\xe1\x7c\xc8\x3b\xab\x0f\xd0\
+\x96\x2c\x59\x62\x6d\xdd\xba\x95\x9d\x3b\x77\xd2\xd3\xd3\xc3\x96\
+\x2d\x5b\x58\xb1\x62\x05\x3f\xf8\xc1\x0f\xb8\xf0\xc2\x0b\xe9\xec\
+\xec\x24\x18\x0c\x32\x7f\xfe\x7c\x3a\x3b\x3b\x79\xf5\xd5\x57\xc9\
+\x66\xb3\x0c\x0f\x0f\x13\x8b\xc5\xfc\x72\x53\xef\x04\x01\x29\xa5\
+\xdf\x9f\x18\x8d\x46\xfd\x03\x51\x06\x07\x07\x13\xe5\x72\xf9\xe5\
+\x31\xbb\xb4\x67\x64\x64\xe4\x8b\x1c\x87\x75\xe2\x89\x27\x26\x6e\
+\xbc\xf1\xc6\xfa\x4b\x2f\xbd\x94\xcf\x7e\xf6\xb3\x0c\x0c\x0c\x50\
+\x2a\x95\xfc\x39\xed\x85\x42\x81\x29\x53\xa6\xf8\x07\x9c\x79\xe3\
+\x6f\x55\x55\x65\xe6\xcc\x99\x64\x32\x19\xff\xb4\x87\xb7\x73\x1e\
+\xde\x9a\xe6\xb5\x6d\x9b\x37\xdf\x7c\x53\x1c\x57\x09\x19\xa7\xc3\
+\x15\xcb\xb2\x78\xf8\xe1\x87\xb9\xec\xb2\xcb\x78\xf4\xd1\x47\x49\
+\x26\x93\xbc\xf0\xc2\x0b\x48\x29\x19\x1c\x1c\x64\xdf\xbe\x7d\x95\
+\xb3\xa5\xba\xbb\x27\x64\x10\xbd\xc1\x2f\xe9\x74\x9a\x60\x30\xe8\
+\x0f\x4f\x8e\x46\xa3\xbe\xd4\x18\x86\xc1\xec\xd9\xb3\xc9\x64\x32\
+\x28\x8a\xb2\x2b\x93\xc9\x5c\xc3\x71\x5e\xba\xae\xf3\xe4\x93\x4f\
+\xf2\xd4\x53\x4f\x91\xcf\xe7\x99\x3c\x79\x32\x9f\xfd\xec\x67\xf9\
+\xf4\xa7\x3f\xed\x0f\x4b\xf3\x46\x8d\xc7\xe3\x71\x9f\x36\xff\xfc\
+\xe7\x3f\xcf\x7d\xf7\xdd\xe7\x8f\x05\xf4\xc8\x4e\x4f\x9d\xd7\xd5\
+\xd5\x91\xcf\xe7\x49\xa5\x52\x34\x36\x36\x32\x3c\x3c\x8c\x65\x59\
+\x7d\x8a\xa2\xe4\xff\x2c\x2a\xcb\x5b\xa1\x50\x88\x7b\xee\xb9\x87\
+\xfb\xee\xbb\xcf\x8f\x13\x3c\x75\xd3\xdd\xdd\x8d\x10\xc2\x1f\x76\
+\xe6\xdd\x6c\x55\x55\x95\x4f\xc5\x7b\x27\x2d\x7b\xb6\xc6\x3b\xef\
+\xd0\x8b\x3f\xf6\xec\xd9\x73\x5c\xfb\x00\xdf\xba\x46\x47\x47\x5f\
+\x09\x87\xc3\xd5\x63\xf7\xb6\xf2\x1b\xdf\xf8\x46\xe4\xb5\xd7\x5e\
+\xf3\xef\xcd\xb3\x61\xe3\x8f\xde\x70\x5d\x97\x55\xab\x56\x31\x75\
+\xea\x54\x96\x2d\x5b\xc6\xd3\x4f\x3f\x4d\x75\x75\x35\x5b\xb6\x6c\
+\xa1\xb9\xb9\x99\xad\x5b\xb7\xb2\x72\xe5\x4a\x0a\x85\x02\xed\xed\
+\xed\x1c\x3c\x78\x90\x68\x34\x4a\x6f\x6f\xef\xe5\xdd\xdd\xdd\xdb\
+\x8f\xa4\x0b\xe0\x48\xad\xa5\x36\x73\xe6\xcc\x27\xa3\xd1\x68\x40\
+\xd7\xf5\x0b\x4f\x3c\xf1\x44\x42\xa1\x10\xaa\xaa\xb2\x6f\xdf\x3e\
+\xbf\x05\x39\x1c\x0e\xfb\xd3\x0d\x42\xa1\x90\x7f\x1c\x50\x26\x93\
+\x21\x97\xcb\x4d\xe0\xb9\x82\xc1\x20\x17\x5e\x78\x21\x2f\xbf\xfc\
+\x32\xde\xbc\x75\x21\x04\xed\xed\xed\xaf\x0f\x0c\x0c\x9c\x79\x3c\
+\xc1\x18\xb3\x47\xfe\xcf\x73\xe7\xce\xdd\x7b\xed\xb5\xd7\xce\xbb\
+\xf9\xe6\x9b\xb9\xfc\xf2\xcb\x59\xb6\x6c\x19\x2d\x2d\x2d\x3c\xf9\
+\xe4\x93\xbe\x6a\xfd\x87\x7f\xf8\x07\x1e\x79\xe4\x11\x0c\xc3\xe0\
+\x86\x1b\x6e\x60\xd3\xa6\x4d\x8c\x8e\x8e\xfa\xae\xb0\xd7\x93\xa2\
+\xeb\xba\x7f\x0c\x47\x30\x18\x44\xd7\x75\xba\xbb\xbb\x97\x1d\x3c\
+\x78\x70\xcb\x91\xdc\xe3\x91\xf6\x9f\xd9\x5d\x5d\x5d\x97\xb7\xb6\
+\xb6\x5e\x17\x0a\x85\x38\xf3\xcc\x33\xf9\xc2\x17\xbe\x40\x34\x1a\
+\xa5\xb9\xb9\x99\xa9\x53\xa7\x52\x55\x55\xc5\x8c\x19\x33\xa8\xa9\
+\xa9\xa1\xae\xae\x8e\x48\x24\x82\xeb\xba\x7e\xa0\xb5\x72\xe5\x4a\
+\x02\x81\x00\x0d\x0d\x0d\xc4\xe3\x71\x82\xc1\x20\xd1\x68\x94\xb1\
+\x81\xcd\x6f\x6e\xdf\xbe\xfd\x9f\xb6\x6f\xdf\xfe\x19\xe0\x2b\xc7\
+\x5b\x3a\xc6\x83\x31\x26\xa1\xca\x0b\x2f\xbc\xc0\x25\x97\x5c\x82\
+\x10\x82\x7b\xee\xb9\xc7\x3f\x9f\x70\xc3\x86\x0d\x18\x86\xc1\x15\
+\x57\x5c\x41\x22\x91\x40\xd7\x75\x7e\xf9\xcb\x5f\xd2\xdd\xdd\x4d\
+\xa1\x50\xa0\x58\x2c\x4e\x38\x39\xc7\x73\xed\x43\xa1\x90\xf4\xcb\
+\x91\x5c\xf7\x88\xdd\xc3\xa3\x3a\x2d\x5a\xd3\xb4\x80\x10\x82\x07\
+\x1f\x7c\x90\x87\x1e\x7a\xe8\x0f\xfe\xfd\xe0\xc1\x83\x7f\xd4\x39\
+\x78\xab\x1b\xeb\x38\x0e\xbf\xfd\xed\x6f\xbd\x49\x6f\xbb\x72\xb9\
+\xdc\x7f\x02\xef\x58\xb6\x7f\x3c\x56\x36\x9b\x95\x9e\x8a\x12\x42\
+\xf0\xfc\xf3\xcf\x73\xfa\xe9\xa7\xb3\x63\xc7\x0e\x36\x6c\xd8\x40\
+\x7d\x7d\x3d\x0f\x3e\xf8\x20\x0f\x3e\xf8\x20\x77\xdf\x7d\xb7\xef\
+\xba\x7b\x41\xaf\x77\xc2\x90\x97\xbe\x1e\x53\x6f\xa2\xad\xad\xed\
+\x5c\xc7\x71\xf6\xd4\xd5\xd5\x25\x8e\xf4\x9e\x8e\xca\xc1\x0f\x85\
+\x42\xb1\xba\xba\xba\xcf\x85\x42\x21\x17\xb8\x2a\x1c\x0e\x2f\x3e\
+\x1c\xbd\xef\x4d\x7a\xf0\xa6\x3c\x7b\x99\x36\xcf\xdf\x4f\xa7\xd3\
+\x6b\x7a\x7a\x7a\xde\xcf\x5f\x7e\x45\x16\x2f\x5e\x5c\xf0\xfa\x45\
+\x74\x5d\x67\xe9\xd2\xa5\xec\xdb\xb7\xcf\x77\xc9\x0f\xc7\x7d\xf5\
+\xf8\xb1\xed\xdb\xb7\xcf\x2d\x14\x0a\xed\x47\x73\x23\xc7\x3c\x38\
+\xaa\xb9\xb9\xf9\xe7\x4d\x4d\x4d\xd7\x1e\xce\x5c\x73\x0f\x14\x8f\
+\xce\xae\xa9\xa9\xa1\x50\x28\x14\x5b\x5b\x5b\xa3\xe3\xbe\x8f\xfe\
+\xfe\xfe\xbf\x34\x20\xc1\x96\x96\x96\x6d\xf1\x78\x5c\xe4\xf3\xf9\
+\x48\x63\x63\xe3\x09\x52\x4a\x0a\x85\xc2\x61\x8f\x90\x2d\x14\x0a\
+\x98\xa6\x79\x9f\xeb\xba\x56\xb9\x5c\xfe\x8f\xa1\xa1\xa1\xd1\xff\
+\x2b\x80\x00\x81\xb1\xef\x09\x86\x42\xa1\xa5\x87\x1b\xd7\x78\x51\
+\x7b\x38\x1c\x4e\x64\x32\x99\x5d\xfc\x3f\xb2\x82\xc1\x60\x6d\x38\
+\x1c\xfe\x47\xd7\x75\x9d\x23\x60\x08\x64\x20\x10\x48\x9e\x7c\xf2\
+\xc9\xff\xf3\xc2\x0b\x2f\x48\xde\x5d\xef\xae\x77\xd7\xbb\xeb\xdd\
+\xf5\xee\x7a\x77\xbd\xbb\xde\x5d\xff\x8f\xad\xff\x03\x21\xf6\x70\
+\xa0\xc1\x03\x97\x85\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\
+\x82\
+\x00\x00\x7e\xd7\
+\xff\
+\xd8\xff\xe0\x00\x10\x4a\x46\x49\x46\x00\x01\x01\x00\x00\x01\x00\
+\x01\x00\x00\xff\xdb\x00\x43\x00\x04\x02\x03\x03\x03\x02\x04\x03\
+\x03\x03\x04\x04\x04\x04\x05\x09\x06\x05\x05\x05\x05\x0b\x08\x08\
+\x06\x09\x0d\x0b\x0d\x0d\x0d\x0b\x0c\x0c\x0e\x10\x14\x11\x0e\x0f\
+\x13\x0f\x0c\x0c\x12\x18\x12\x13\x15\x16\x17\x17\x17\x0e\x11\x19\
+\x1b\x19\x16\x1a\x14\x16\x17\x16\xff\xdb\x00\x43\x01\x04\x04\x04\
+\x05\x05\x05\x0a\x06\x06\x0a\x16\x0f\x0c\x0f\x16\x16\x16\x16\x16\
+\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\
+\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\
+\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\x16\xff\xfe\x00\
+\x10\x54\x69\x6d\x65\x20\x66\x6f\x72\x20\x4c\x75\x6e\x63\x68\xff\
+\xc0\x00\x11\x08\x02\x00\x02\x00\x03\x01\x22\x00\x02\x11\x01\x03\
+\x11\x01\xff\xc4\x00\x1b\x00\x00\x02\x03\x01\x01\x01\x00\x00\x00\
+\x00\x00\x00\x00\x00\x00\x00\x02\x03\x01\x04\x05\x00\x06\x08\xff\
+\xc4\x00\x44\x10\x00\x02\x01\x02\x04\x04\x04\x03\x07\x02\x04\x05\
+\x04\x01\x05\x01\x01\x02\x03\x00\x11\x04\x12\x21\x31\x05\x41\x51\
+\x61\x13\x22\x32\x71\x42\x81\x91\x14\x23\x52\xa1\xb1\xc1\xd1\x62\
+\xe1\x06\x33\x72\xf0\x24\x43\x82\x92\xf1\x15\x53\x73\xa2\x25\x34\
+\x35\x54\x63\x93\xa3\xff\xc4\x00\x19\x01\x01\x01\x01\x01\x01\x01\
+\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x02\x03\x04\x05\
+\xff\xc4\x00\x21\x11\x01\x01\x01\x00\x03\x01\x01\x01\x00\x03\x01\
+\x01\x00\x00\x00\x00\x00\x01\x11\x02\x21\x31\x41\x12\x51\x22\x32\
+\x61\x71\x42\xff\xda\x00\x0c\x03\x01\x00\x02\x11\x03\x11\x00\x3f\
+\x00\xfa\x73\xfc\x3c\xe0\xa6\x23\x07\x32\x67\x92\x16\xcc\xb9\xc5\
+\xcd\xbf\x5a\xb1\x32\xca\xaa\x5e\x17\xce\xa0\x7a\x1f\x5b\x0e\xd5\
+\x9f\x23\xb2\xc9\xf6\x98\x6e\x1c\xa8\x0c\x47\x50\x74\x3f\x3a\xbd\
+\x82\xc5\x26\x29\x43\x0b\x09\x47\xa9\x3a\xfb\x57\xca\x97\xe3\xd5\
+\x7f\xae\x86\x48\xa6\x8b\x35\x95\x18\x1b\x10\x4f\xe9\x44\x6e\x0d\
+\x8d\xfe\xa6\xaa\x4e\xf2\x61\x84\xb0\xe5\xf2\x48\x6e\x1a\x9b\x83\
+\x90\xcb\x85\xbb\x6a\x50\xe5\xbf\x5a\x74\x58\x6f\x97\xa0\xa9\x0a\
+\x0d\xb5\x00\x93\x61\xae\xe6\x80\x9a\xe6\xf3\x44\xc8\x5b\x2d\xfd\
+\x27\xa1\xa8\x0d\x49\xd8\xb1\xa6\x21\x1c\xd4\x30\x3b\x83\xad\xe9\
+\x7e\x73\x1a\x99\x4a\x99\x2d\xe6\x20\xef\xd0\xd0\x7d\xe6\x6b\xf4\
+\xfa\x54\x8d\xc3\x48\x22\x95\xf0\xb9\xf2\xe5\x6f\x21\xd8\x51\xba\
+\x46\xc7\xcf\x18\xbe\xf7\x53\x63\x59\xf8\xec\xdf\x6b\x7c\xdb\x93\
+\x7a\xbb\x87\xb8\xc2\x47\x98\xdc\x90\x48\x3d\xa9\x94\x9f\x11\x44\
+\x16\x8d\x42\xdf\x73\xcc\xfc\xe8\x89\x04\x52\x41\xa9\x56\x07\x4b\
+\xfb\x53\xa0\xdc\xce\x08\x2a\xda\x8a\xcb\xe2\x03\xc3\xc7\x4a\x8a\
+\x6c\x03\x6d\xbd\x68\xc6\x0b\x38\x51\xcc\xda\xb2\xb8\x8c\x82\x4c\
+\x7c\xae\xb7\xb1\x6e\x74\x72\xf0\xc0\xec\x6f\x7b\x93\xce\x8b\x0d\
+\x27\x85\x88\x49\x00\x00\xab\x5e\xf6\xab\x58\x3c\x22\x18\x95\xe6\
+\x04\x97\xf4\xa8\x36\xb0\xea\x6a\x31\x78\x03\x94\xbe\x1d\xf3\x00\
+\x2e\x55\xb7\x1f\xcd\x67\x29\xd6\x93\x32\xba\x87\x8d\xae\x8d\xa8\
+\xa5\x3b\x00\x7a\x9e\x95\x9d\xc3\x71\xde\x00\xf0\xa6\x1f\x76\x5a\
+\xc4\x73\x53\xd6\xb4\xbd\x3a\x83\x70\xda\x86\x1c\xeb\x72\xeb\x38\
+\x15\xb0\xf4\xef\x52\xa1\x6c\x43\x2a\xb0\x3b\xdc\x57\x7c\xbe\x94\
+\x24\xf7\x1f\x5a\x90\xd4\x42\xa3\xcb\x12\x0f\x6b\xff\x00\x35\x24\
+\xa9\x50\xa0\x00\x06\xc0\x0d\xa9\x57\x27\x9d\xba\x69\x44\xa4\xfc\
+\xc5\x5a\x85\x1a\x90\xf7\x36\xb5\x54\xe3\x99\x1b\x18\x3c\x48\xd1\
+\xfe\xed\x75\x61\xda\xae\x29\xaa\x1c\x70\xff\x00\xc6\x8f\xfe\x35\
+\xfd\x2a\xe5\xe1\x9e\xab\xc6\x17\x35\x91\x42\x03\xba\x8d\x98\x7e\
+\xc6\xb5\x78\xba\x80\xd1\x95\xd8\x2e\x5b\xf5\xaa\xbc\x12\x11\x28\
+\x92\x47\x51\xa7\x95\x75\xd2\xe6\xac\xe3\xbe\xf3\x02\x8e\x3e\x12\
+\x2e\x2f\xce\xd6\xfd\xa8\x93\xa5\x7d\x54\xb8\x03\x7a\xec\xca\x7e\
+\x21\x4b\xf8\x87\x6a\x25\xbd\x0b\x13\xb9\x04\xec\x3b\x6e\x6b\x9a\
+\x8a\xd4\x2c\x39\xd4\x80\x47\x31\xbd\x06\x30\xe6\xc0\xca\xed\x9b\
+\x3a\x5b\xce\xbb\x81\xad\xff\x00\x6a\x61\xa8\x55\x0c\x59\x1a\xd9\
+\x64\x52\xa6\xf5\x12\x7f\xc3\xae\x35\x8d\xe4\x42\xc6\x45\x60\xca\
+\x2d\x98\x58\xef\xde\xb4\x25\x5b\x12\x1b\x4d\x6d\x58\x5c\x2d\x12\
+\x3e\x26\x60\x9d\x6d\x73\x6c\xc7\x4d\x79\x56\xfc\x8b\x93\x10\x63\
+\x72\x58\x91\x74\x66\xdc\xf6\xa3\x87\x70\x5f\x55\x9f\x43\x61\xa9\
+\xed\x43\x6b\x6f\xb9\xab\x24\x03\x4b\x75\xa5\x69\x40\x51\x90\x0a\
+\x65\x62\x74\x37\x52\x37\x53\xd4\x57\x05\xae\x22\xf5\x2d\x49\xb6\
+\xed\x6b\x7e\x35\x1f\xa8\xe5\x43\xe2\xc4\x08\x50\xfe\x23\x1d\x95\
+\x2b\x85\xd4\xdc\x13\x7a\x25\x20\x12\x42\x28\x62\x2c\x58\x0d\x6a\
+\x43\x65\x2f\x13\xa8\x8a\x40\x59\x2d\xc8\xfe\x95\x9a\x3c\xad\x60\
+\xac\xec\x3e\x1c\xa4\x0f\x99\x35\x78\x12\x0d\xc6\xe2\xaa\x71\x04\
+\x64\x93\x30\x27\xc3\x7d\x46\xba\x03\x45\x51\xc1\xb7\xbb\x06\x62\
+\x2c\x48\x16\x00\x74\x02\xac\xf0\xd9\x15\x49\x85\x8e\x8e\x7c\xbd\
+\x8d\x67\x83\x46\xad\x6a\x25\x6a\xc6\xb9\x1a\xd7\x0b\x83\x71\xca\
+\xab\xe1\xb1\x4b\x22\x65\x93\xd6\x07\xab\xf1\x7f\x7a\x31\x20\x2c\
+\x43\xe9\x6d\x81\xad\xeb\x18\xa1\xc7\x11\x17\x1c\x4c\x7a\x19\x14\
+\x35\xba\x13\x56\x38\x2c\xb7\x8d\xb0\xa7\x65\x05\x90\xfe\xb4\x9e\
+\x3f\x28\x6c\x4c\x68\x2d\x71\x18\xd7\x99\xbd\x17\x04\x04\x45\x34\
+\xa7\x73\x65\x1d\x7a\xd6\x3f\xfa\x6b\xe2\xe3\x9a\x84\x01\x89\x42\
+\x4d\x9f\x43\x42\x58\x5e\xd7\xd7\xa5\x09\x6e\x95\xa6\x41\x26\x26\
+\x31\x03\x86\x3f\x7c\x01\x51\xa6\xe7\xad\x23\x86\xe1\x8c\x83\xc6\
+\x95\x88\x04\xd8\x2d\xae\x5a\x83\x8a\xa9\x13\x78\xc0\x8b\x4a\x6f\
+\x6e\x95\x67\x0f\x2f\x8d\x1a\xac\x4a\xd0\xaa\x8b\x33\xff\x00\x15\
+\x9f\x6f\x6d\x7c\x5c\x67\x55\xd6\x42\x16\xda\x05\x1a\x9f\xa5\x04\
+\x99\xe7\x50\xa6\xf1\x45\xbe\xbb\xb5\x02\x14\x8c\x5a\x21\x6e\xad\
+\xf1\x1f\x9d\x71\x90\x03\xa9\x37\xf6\xad\xeb\x23\x48\x9a\x31\xf7\
+\x13\x1e\xeb\x20\xd0\xd1\x78\xae\x83\xfe\x22\x2c\xa3\xf1\xa6\xd4\
+\xb5\x95\x76\xd4\x7b\x8a\x62\xb8\xea\xba\xf2\x3c\xea\x46\x73\xd0\
+\xdc\x1d\x88\xe7\x52\x80\xad\xd0\x00\x5c\x1b\x12\x76\x5f\x7f\xe2\
+\x94\x09\x51\x68\xe6\x55\x5e\x4b\x6b\x95\xf6\x34\x48\x6c\x81\x40\
+\xb2\x8b\x9b\x53\xa8\xdb\xc9\xcb\x10\x49\xfc\x2c\xa3\x2d\x03\x62\
+\x10\x3e\x49\x94\xc4\xdd\xb5\x53\x42\x5a\xba\x40\x25\x89\xa3\x6d\
+\xac\x48\x3d\x2d\x56\xa3\x1a\x45\x44\x32\x31\xba\x81\x7d\x39\xd5\
+\x19\xe6\x97\x13\x32\x85\x51\xd1\x54\x1d\xaa\xd4\x66\xd8\x78\xd4\
+\x8f\xf9\x60\x10\x45\x70\xc8\xa6\xe9\x1a\x21\x3a\x5c\x51\x50\x62\
+\xc3\x28\x60\x1d\xf3\xb3\x68\x75\xda\xf5\x54\x48\xfe\x3e\x43\x2b\
+\x65\x24\xa9\x3f\x95\x5d\x8c\xfd\xea\xfb\x8a\xcc\x9c\xda\x57\xff\
+\x00\x51\xa2\xd3\x1d\xc3\x6d\xf6\x93\x98\x5c\x05\x3a\x75\xa5\x63\
+\x70\x46\x3b\xe2\x30\xac\x4a\x83\x7c\xbc\xd6\xbb\x86\xb9\x18\xc5\
+\x5f\xc4\x32\x9f\xa5\x5e\x85\xf2\xbd\xef\xd4\x1a\xcc\xee\x35\x55\
+\xa1\xe2\x90\xa2\x78\x38\xe9\x14\xc8\x79\xef\xcb\xe2\xa7\x60\xd3\
+\x26\x0e\xf9\x95\x83\xbd\xee\xa7\x41\x61\xfd\xeb\x17\xfc\x49\xc3\
+\x8c\x0e\x31\x50\xa9\x31\xc9\x7c\xd6\x37\xb1\xae\xe0\xd8\x99\xe1\
+\xe1\xb6\x8a\x42\xa1\x24\xb6\x52\x34\x37\xd7\x5a\xcc\xe5\x65\xca\
+\xb3\xae\x9b\x6e\xf6\xd1\x6c\x68\x4e\x6b\xf9\xaf\x7a\xa0\x9c\x4b\
+\x12\x18\x1f\x0e\x0f\xfb\x05\x13\x71\x4c\x4b\x10\x7c\x38\x7f\xec\
+\x15\xaf\xd4\x18\xd3\x43\x70\x0f\x5a\x2b\x58\xd5\x7c\x06\x26\x3c\
+\x62\x15\x0b\xe1\xc8\x2e\x72\x03\x70\x45\x34\xe7\xb5\x81\xd2\xb4\
+\x30\x73\x42\x93\x15\x2e\x4a\x95\xd2\xe0\x6e\x28\xa2\x8d\xa2\x4c\
+\xb1\x48\x1d\x7f\x03\x8b\x7d\x0d\x04\x57\x53\xae\xa0\xfe\x54\x38\
+\xfc\x60\xc3\x1f\x0e\x34\x57\x92\xda\x96\xd4\x2f\x6a\x91\xe4\x82\
+\xac\x40\x2a\x40\xf3\x29\xdc\x7f\x6a\x35\x46\x71\x70\x85\x87\x61\
+\x58\xd2\x71\x0c\x49\x95\x9f\xc4\xc8\xea\x97\x19\x74\x02\xda\xdb\
+\xfd\xf5\xa3\xc5\x62\x67\x32\x12\xd3\x39\xb0\x07\xd5\xf3\xab\xf5\
+\x17\xe6\xb4\x71\xb8\x85\xc1\xc4\x4b\x79\xe4\x20\x80\xb7\xf4\xf2\
+\xd6\xb2\xf8\x72\x3e\x27\x14\x91\x90\x3c\xcd\xa9\xb5\x01\xbb\xef\
+\x7d\x79\x5f\x53\x5a\x9c\x1f\x0c\x70\xf0\x99\x9a\xf9\xdc\x59\x54\
+\xe9\x61\xd6\x8f\xf6\xa7\xc8\xb6\xe5\x73\x1c\xa2\xc3\x61\xed\x50\
+\x09\x0d\x70\x6c\x6a\x06\xdb\x1f\xa5\x4d\xbb\x37\xd2\xb6\xca\x8f\
+\x19\xc3\x02\x46\x2a\x35\x16\xd9\xc0\x1e\x93\xd6\x83\x84\xe3\x15\
+\x41\x86\x66\x61\x1b\x7a\x58\x8d\x14\xd6\x88\x3b\x82\x0d\x98\x59\
+\xae\x39\x56\x46\x3b\x0c\xd8\x69\xb2\xda\xe8\x7d\x27\xa8\xac\xde\
+\xae\xc6\xa7\x7d\x35\x9d\x48\xb0\xb8\x20\xf3\x06\xe0\x8a\xeb\x5a\
+\xb1\xf0\x38\xa9\xb0\xc0\x04\x71\x6e\x68\xfb\x1a\xbb\x17\x16\xc3\
+\xb8\x1e\x2c\x45\x49\x3a\xe5\x3b\x55\x39\x41\x8b\x55\x23\x71\xdb\
+\x5f\xf7\xfe\xf9\x50\xc5\x2e\x1e\x60\x0c\x53\x29\xec\x74\x34\x44\
+\x32\xee\x08\x27\x5a\xd0\x48\x36\xac\xfe\x38\x6f\x8d\x5f\xfe\x35\
+\xfd\x2a\xfa\x02\xcc\x00\xdc\x9a\xcd\xe2\xb2\x2c\xb8\xd3\x93\x50\
+\xa0\x28\x3d\x6d\x47\x2f\x0c\xf5\x7f\x84\xa8\x5e\x1c\x08\xbd\xdd\
+\xc9\x3f\x2f\xfc\xd3\xb1\x0b\x9e\x1c\x42\x87\xf4\xb6\x6b\x5b\x9f\
+\x4a\x5f\x0e\x42\x9c\x3e\x3c\xc4\xf9\xae\xc0\x76\xd3\xf8\xa6\xb2\
+\x33\x33\x34\x4c\x15\xdd\x6c\x41\xd8\xd6\xa7\x81\x9a\xa0\x58\x7b\
+\x5e\x8d\x45\x71\x8d\x94\x90\x45\x99\x7c\xae\xbc\xd4\xd4\x81\x58\
+\x29\x14\x2d\x72\x3c\xba\x5f\x99\xa2\x61\xa8\x53\xcf\x5a\x83\x50\
+\x2d\x87\xbf\xd6\x81\xb5\xdf\x5e\xc6\x98\xfb\xd4\x11\x65\x66\xcb\
+\x98\xa8\xbe\x51\xce\xa3\x15\x78\xa6\x1c\xe2\x62\x13\x46\x01\x96\
+\x31\x66\x00\xea\xc3\x91\xab\x03\x12\x24\x68\x0b\xb1\x19\x72\x80\
+\xe0\xe9\xca\xd7\xe9\xd2\x83\x0d\x24\xf2\x44\x25\xcf\x0c\x77\x24\
+\x0f\xbb\xd6\xba\x7c\x1e\x21\xf0\x4c\xf0\xe4\x66\x6b\xa9\xfa\xdf\
+\x4a\x3f\xec\x2d\x19\x90\xac\x84\x11\x6e\x63\xda\x82\xb3\xb8\x57\
+\x11\x95\x30\x82\x2c\x4a\x67\x11\xbe\x43\x7d\xc0\xde\xb4\xe3\xc9\
+\x2c\x62\x48\x5b\x3a\x1f\x91\x1e\xf4\xcb\xbe\x0b\x30\x04\x0a\x16\
+\x02\xd4\xc6\x68\xc7\xc4\x5b\xba\xad\xc7\xd6\xa0\xa8\xb0\x20\x82\
+\x0e\xc7\xad\x40\xa2\x05\x08\xb5\x31\x96\x84\x8b\x54\x90\x68\x5d\
+\x16\x58\x8c\x6c\x6d\xcc\x1e\x95\xcd\xa6\xa6\x87\x29\x27\x36\xa0\
+\xde\xf5\x15\x29\x50\xc7\x21\x46\xdd\x4d\xa8\x41\xe9\x57\xb1\x11\
+\x89\xd4\x5c\x59\xc6\xc7\xaf\x6a\xa2\xc0\xab\x15\x61\x62\x37\xac\
+\x59\x8d\x4a\x90\x4d\x3e\x2c\x49\xf4\xcb\xa8\xda\xe3\x71\x55\x6f\
+\x5d\x7a\x34\xa7\x8f\xc8\x3e\xd0\xb6\xd4\x78\x6a\x01\x1b\x5e\xd5\
+\x73\x87\x00\x38\x54\x40\xf3\x66\xfd\xab\x33\x8a\xbb\xae\x1e\x2c\
+\x4a\x00\x42\xf9\x25\x16\xf5\x74\xbd\x68\xf0\xf9\x23\x6e\x15\x1f\
+\x86\x49\x0a\xc7\x97\x5a\x65\xff\x00\x2a\x3e\x1a\xd6\xe5\xa1\xa8\
+\x0e\x08\x25\xae\x00\xde\x96\xcf\x6e\xbf\x4a\x28\x88\xf2\x86\x1a\
+\xb4\x83\xf2\xb9\xfd\x85\x68\x25\xd5\x64\x70\xf3\x29\x27\xe1\x4b\
+\xe8\xa3\xa5\x10\x60\x14\x28\x00\x01\xb0\x14\xbb\xeb\x5d\x7a\xba\
+\x43\x2c\x6d\xa5\x72\x30\xca\x29\x6c\x6d\xef\xca\xb8\x69\xa5\x5a\
+\x8e\x06\x89\x5a\x92\x0d\x12\xb5\x29\x65\x5a\x8c\x30\x35\x5d\x4d\
+\x12\x35\x4c\x9f\x5c\x40\x24\xa6\xe0\x7a\xf5\xff\x00\xeb\xfc\xd0\
+\x17\x2a\x42\x8b\x67\x6f\x48\x3c\xbb\xd4\x82\x15\x02\x8f\x48\xff\
+\x00\x77\xa9\x08\x9b\x9b\xd4\x11\xde\x84\x3d\xf6\xd6\xa0\xbd\xb7\
+\x23\xeb\x52\x31\x48\x5b\xb1\x36\x0a\x09\x27\xa5\x63\x3b\x8b\xeb\
+\x7b\x9e\xd5\x7f\x1d\x2e\x5c\x26\x50\x48\x69\x3f\x21\x59\x6e\xc1\
+\x98\xef\xd0\x56\x79\x56\xb8\xc1\xe0\x64\xf0\xf1\x68\xcc\x35\x0c\
+\x34\xeb\x5a\x39\x7c\xe5\x17\x5d\x6d\x59\x4e\x03\x32\xdb\x42\x35\
+\xbd\x6a\xc2\x56\x58\xf3\xa9\xf5\x8b\x36\xba\x8e\xbf\x90\xfc\xea\
+\xe2\x68\x64\x4f\x1a\x42\xc5\xc0\x86\xd9\x00\x23\xd6\x3a\x8a\xa7\
+\x2f\x0c\xf0\x30\xe5\x70\x65\xa5\x42\xd9\x9a\xfe\xa1\xa7\x4a\xba\
+\xc7\x31\xe9\xd2\xdc\xaa\x23\x2c\xb2\x7a\x8f\x63\x4d\x92\x86\x3b\
+\xa3\xa7\xad\x19\x7d\xc5\xa8\x49\xb0\xbd\x6f\x78\xae\x48\x56\x39\
+\xb9\xf9\x85\xff\x00\x5a\x5c\x98\x4c\x14\xda\x98\x8c\x6d\xf8\x90\
+\xfe\x76\xac\xfe\x3f\x87\x59\x38\x49\x64\xc3\xe2\x04\xcb\xb8\x37\
+\xb5\x6c\x61\xf1\x98\x4c\x42\x66\x0f\xe0\xb7\x30\xfb\x7c\x8d\x52\
+\x9f\x86\x4c\x83\x3c\x4c\x26\x5e\x76\xdc\x7c\xaa\xab\x2b\x29\x21\
+\x94\xa9\xee\x2d\x54\xde\x2b\x25\x6c\x4b\x8c\x82\x05\xbc\x72\x2c\
+\xb2\x7c\x39\x76\x15\x9a\x03\x4b\x29\x21\x49\x66\xd7\x4d\xeb\xb0\
+\x78\x69\xb1\x0f\x68\xd0\x91\xcc\xf2\x15\xb1\x82\x85\x30\x89\x64\
+\x21\xa4\x3e\xa7\xfe\x29\x9b\xc8\x75\x08\x83\x85\x46\xb1\xb0\x9d\
+\xdb\x33\xa9\xba\x0f\xad\x89\xf9\x55\xb6\x83\x0c\x14\x2f\xd9\xe3\
+\x6f\x28\xd5\xb5\x3b\x51\x2f\x99\x48\xe6\xde\x50\x7d\xcd\xbf\x9a\
+\x97\x20\xb9\x23\x6a\xdc\x92\x33\xb4\x2a\xb0\x2b\x02\x30\xd1\x29\
+\x1b\x10\x2f\x4d\xb9\x66\x24\x9b\x93\x4b\x8f\xcc\xc4\x8e\x5b\x53\
+\x29\x89\x1a\xe5\xa9\xb1\xae\x16\xe6\x6b\x98\xd9\x49\xed\xa5\x29\
+\xd6\xa8\x3a\xae\x56\x50\xc3\x7b\x11\x7a\x9b\x2d\xb6\xbf\x73\x5c\
+\xbb\x91\xc8\x54\x83\x68\xb6\xf0\x22\x3f\xf4\xd4\x18\xb0\xcc\x7c\
+\xf8\x48\x4f\xfd\x34\xc0\xb6\xa8\x22\xf5\x62\x55\x93\x87\xe1\x1e\
+\x5f\xba\xcd\x13\x5b\xad\xc7\xf6\xa0\x64\xe2\x38\x4d\x98\xbc\x63\
+\x6f\x89\x4d\x5a\x37\x0d\x99\x45\x3a\x37\x36\x0c\xa4\x8b\xd1\x91\
+\x6b\x2a\x4c\x76\x25\x90\xa5\xd5\x2f\xbe\x55\xb1\xaa\xca\x09\x6b\
+\x0d\x49\x35\xb9\x2c\x30\x4b\xfe\x64\x22\xfd\x57\x43\x41\x87\xc2\
+\x61\xe1\x93\xc4\x5c\xce\xc3\x60\xc0\x58\x51\xf9\xa7\x4e\x2a\x11\
+\x55\x00\xb0\x55\x02\xdd\x2b\x80\xa9\x00\x93\x73\xb9\xa3\x51\x6a\
+\xd8\x0c\xd8\x78\xe7\x00\xb1\x2b\x22\x8b\x07\x53\x62\x7b\x1a\xa2\
+\xd1\x49\x1b\xb2\x4c\xcc\x59\x45\xc3\x6d\x98\x75\xf7\xad\x20\x34\
+\xa9\x75\x57\xc8\x19\x43\x00\xd6\xb1\xe8\x7f\xf1\x55\xe3\xa2\x56\
+\x4b\x58\x68\x05\xaa\x37\x15\xa3\x26\x16\x17\x37\x19\x93\xdb\x51\
+\x48\x93\x04\xc3\xd0\xe8\x7d\xf4\xb5\x66\xf1\xa7\x54\x9c\x54\x29\
+\x20\xdc\x55\x87\xc2\xce\x2f\x78\xc9\x03\x98\xda\x97\xe1\x3d\xfd\
+\x24\x77\x22\xb3\x94\xe9\x4e\xa1\x73\x46\xa2\xc0\x79\xd7\x4e\x47\
+\x7f\xce\xad\xe0\x98\xae\x0d\x2c\x6d\xe6\x6f\xda\xab\x61\xe1\x97\
+\x13\x8a\x92\x65\x5b\x46\xab\x91\x6f\xa0\x35\x71\x63\x11\xc2\xb1\
+\x83\x7b\x5e\xe7\xbd\x31\x52\x78\x86\x14\x62\x90\x98\xc0\x59\x46\
+\xb6\x03\x47\xfe\xf5\x9d\x83\x90\xc3\x8b\x11\x9f\xf2\xd4\x5e\x71\
+\xd7\xb5\x6c\x00\xf9\x08\x8d\x82\xbf\x22\x6b\x27\x1b\x1f\x87\x2b\
+\x8c\x99\x4b\xbe\x63\xf4\x1f\xbd\xe8\xe5\xfd\x53\xf8\xd7\x39\xd5\
+\x82\xa3\x10\xb6\xf2\xdb\x41\x6a\x5a\x15\x71\x29\x4b\x65\x12\x79\
+\x6c\x3a\xd2\x70\x38\x94\x7c\x11\x85\x9b\x2c\x80\x64\x43\xd6\xfc\
+\xbf\x5a\xbb\xe1\xd9\x02\x46\xb9\x94\x6d\x93\x51\x7a\xd4\xec\x2a\
+\xc8\x72\xe9\x6b\x93\xb5\x09\x4e\xac\x6a\xc1\x85\xef\x72\x8d\x7e\
+\xca\x68\x1d\x0a\x9b\x10\x47\xb8\xa3\x11\x05\x05\xef\xb9\xee\x76\
+\xa8\x2b\x4d\x22\x81\x8e\xb4\x22\x8a\xd2\xe7\x84\x4c\x08\x26\xce\
+\x3d\x2d\xd7\xb5\x3c\xda\xd7\xa0\x61\xa5\xf9\xd4\x65\x66\x3a\xb2\
+\x39\x56\xb8\x23\x7b\xd0\x93\x57\x38\xa2\x66\x8c\x4c\x37\x1e\x56\
+\xfd\xaa\x8b\x1b\x0a\xe7\x7a\x6e\x09\x54\x4b\x14\xb0\x1d\x9d\x0f\
+\xc8\x8d\x69\x5f\xe1\x59\xbe\xe9\xa1\x61\xe5\x67\xca\x3b\x5c\x51\
+\xc6\xc1\x23\x9a\x46\xf4\xa4\x64\x9e\xf5\x47\x81\xb6\x48\xd5\x94\
+\xf9\xbc\x71\x6a\xcf\x96\x26\xe3\x1b\x1a\x82\xcc\x27\xc3\x00\x37\
+\x72\x68\xa6\x53\xe3\xb2\x81\xf1\x1a\x01\x63\x2f\x8a\x0f\x96\x21\
+\x95\x3b\x9e\x66\xba\x32\x33\xbf\x5a\x82\x75\xb0\xff\x00\xc5\x0d\
+\xeb\x97\x46\x6d\x77\xa9\x27\xda\xbb\x9d\x75\x70\xde\xa4\x2a\x90\
+\x6a\x39\x54\xd3\x10\xd0\xd3\x03\x64\x42\xf6\xb9\x1a\x28\xea\x4e\
+\xd4\x90\x69\x80\xda\x4d\xae\x22\xd0\x77\x63\xfc\x0a\x52\x63\xfb\
+\xbb\x82\x09\x63\xbb\x6e\x4d\x48\x24\xea\x7e\x40\xd0\x83\x7a\x9a\
+\x90\x89\x07\x71\x52\x2c\x06\x77\xb2\xa8\xde\x84\x15\x55\x2e\xe6\
+\xca\x39\xd5\x3c\x5e\x20\xcc\xd6\x02\xc8\x36\x14\x5b\x83\x03\x89\
+\x93\xc6\x94\xb9\x03\xa0\x1d\x05\x21\x92\xcd\x75\x36\xa3\x35\x04\
+\x8a\xc3\x65\x5f\xcc\xb5\x67\x0d\x2b\xc3\x2c\x65\x6d\xac\x4e\x4d\
+\xc6\xf5\x5d\x56\xee\x14\x6a\x49\xb7\xbd\x4c\x72\x07\xc4\x62\x82\
+\x6a\x11\x15\x45\xba\x03\x44\xa9\x7e\x3c\x5c\x0f\xeb\x56\x43\xdb\
+\x51\x4f\x50\x1c\x5e\x36\x57\x1d\x8d\x64\x0a\x62\x31\x06\xe0\xdb\
+\xda\xb5\x39\x0c\x69\x6c\xda\xe9\x71\x61\x44\x06\x97\xa4\x61\xf1\
+\x80\x8c\xb3\xeb\xfd\x7c\xfe\x75\x64\xa8\xdc\x5a\xc4\x68\x46\x97\
+\xad\xb3\x5c\xb7\x07\x43\x63\x4d\x12\x39\xd4\xe5\x3d\xca\x82\x69\
+\x2c\x72\xdb\x98\xa9\x57\x61\xa9\x1e\x53\x50\xc3\x73\xb1\x16\x26\
+\xc3\xa0\x16\x15\x22\x81\x5b\x37\xa4\x7c\xcd\x18\xbf\x36\x3f\x41\
+\x4a\x74\x8f\x92\x48\x17\xf1\x3d\xea\x09\x62\xd6\x1a\x8e\x75\x2c\
+\xa0\xcb\x19\x37\x25\x41\x35\x23\x7a\x90\xb3\x05\xd0\x2d\x16\xb7\
+\xd5\x8f\xca\x84\x6d\x5c\x09\x02\xd7\x07\xde\x94\xe2\xa4\x9b\x96\
+\xa8\x28\xdb\x02\x2a\x6f\xad\x10\xd4\x8d\x0d\xc9\xe9\x52\x72\xa8\
+\x55\xb5\x16\x8a\x73\x3b\x2a\x29\x1b\xb1\xb5\x04\xf8\xa8\x20\x66\
+\x4d\x65\x91\x77\x51\xa0\x53\xd0\x9f\xda\xb3\xb1\x12\xc9\x34\x85\
+\xdd\xd2\xe7\x90\x52\x40\xf9\xdc\x55\x6e\x26\xce\x42\x40\x2b\x66\
+\x07\x62\xa6\xf4\x8c\x77\x88\x90\x06\x8c\xb2\xea\x73\x5a\x83\x84\
+\x43\x7c\x33\xb3\xb4\x85\x58\xf9\x47\xa7\xf4\xa7\xcb\x87\x71\x1b\
+\x08\xe5\xf2\x91\xaa\xb6\xa4\x53\xec\x4a\x8b\x8e\x21\x72\xcb\x15\
+\xcd\xbd\x6b\xa7\xe5\x56\x70\xe7\x34\x21\x85\xf2\x9d\x45\x72\x44\
+\x90\xc2\x2d\xe6\x2c\x75\xa6\x40\xb9\x70\xca\xa3\x93\x35\xbd\xaf\
+\x54\xd4\xe1\x44\x05\xeb\x82\xd1\x28\x26\xf6\xd0\x6d\x7a\xd2\x48\
+\x5b\x0b\xd4\x8e\xc0\x9e\xfb\x57\x05\x51\xc8\x5f\xa9\xd4\xd4\xee\
+\x69\x65\xda\xfe\x1f\xfe\xd5\xd7\xfb\xc4\x5d\x8e\x62\x6c\x7b\x0f\
+\xef\x47\x6b\x0d\x28\x5e\xe6\x64\x51\xba\xdc\xb5\xb9\x02\x2a\x48\
+\xa8\x22\x8f\x27\xf5\x1f\xca\xa0\xa1\xe4\x7e\xa2\xa4\x00\x0d\xe9\
+\x38\xec\x49\x45\x31\x2b\x12\xe7\x43\xae\xd5\x65\x6e\x1b\x6d\x7d\
+\xeb\x39\x22\x95\x66\x0e\xf0\x3b\x00\x6e\x47\x5a\xcd\xff\x00\x86\
+\x1f\x02\xb2\xe1\x54\x35\xee\x4d\xcd\xeb\x88\xa3\x12\xac\xad\x65\
+\xb8\x6e\x61\x86\xd5\x05\x3a\xde\xa2\x56\xec\x40\xb0\xb6\xe6\x93\
+\x89\xc2\xfd\xa4\x12\x08\xf1\x53\x4d\x46\x8e\x3a\x1a\xb4\x16\xc2\
+\xc0\x0a\x12\x32\xb6\x61\x7d\x4e\xb4\x62\x62\x48\x0a\xb5\x8d\xee\
+\xa7\x40\x16\xc0\x1b\x5a\xfd\x4d\x44\x5e\x3d\xad\x11\x7d\x39\x29\
+\x35\xbe\x58\x93\x72\x17\xe6\xa2\xa4\x3b\x0f\x4d\x97\xb8\x00\x7e\
+\x95\x9f\xc1\xd6\x03\x3c\xe0\x0c\xcf\x28\xbf\x22\x48\xa6\x61\xf1\
+\xf3\xc5\xe5\x73\xe2\x25\xad\x95\x8d\x6b\xc8\x24\x2d\x7b\x86\x1d\
+\x1e\xc6\xdf\x5a\xcc\xe2\xf0\x2a\x05\x96\x34\x20\x31\xb3\x0e\x86\
+\xb3\x65\x9d\xc3\x2e\xae\x12\xaf\x1a\xc8\x9e\x97\x17\x1d\xbb\x50\
+\x30\xa4\xf0\x96\x27\x0d\x24\x7f\x81\x81\x1e\xd4\xf7\x36\x17\xa7\
+\xde\xd9\xa4\xbe\x8e\xbf\x33\x42\xe6\xf4\xc6\x16\xd4\xee\x69\x46\
+\xa3\x09\xc7\xe9\x82\x3d\xd8\x56\x73\x5c\xe8\x35\x26\xae\x71\x77\
+\xb1\x48\x47\xc2\x2e\xde\xe6\xa9\x62\xa7\x4c\x14\x1e\x2b\x1b\xca\
+\xeb\xf7\x4b\x6d\xbb\xd7\x3e\x57\xb6\xa2\xaf\x1d\x9b\xc2\x85\x70\
+\x68\xd7\x6b\xde\x50\x0e\xe7\x90\xa3\xc3\x44\x62\x96\x08\x94\x5d\
+\xa3\x21\x9d\xbb\x92\x0d\x67\x60\x95\xe7\xc6\x78\xb2\x02\xe1\x4e\
+\x76\xef\x5b\x5c\x31\x95\xf1\xf9\xdf\x51\x18\x2d\x6f\xc4\xfc\xcf\
+\xcb\x6a\xe7\x3b\xba\x6a\xd3\xc8\x71\x39\xb2\x02\x88\xc6\xee\xe7\
+\x7f\x61\x52\xcc\x2c\x15\x45\x94\x0b\x01\xd2\x82\xe5\x9c\xb9\xe7\
+\xb5\x41\x35\xd7\x46\x08\xb5\x85\xcd\x70\x3a\x77\x26\x80\xea\x40\
+\x3c\xb5\x35\x20\xd5\xab\x0c\x06\xa6\xf4\xbb\xd4\x83\x56\xac\x30\
+\x1a\x9b\xd0\x03\x5c\xc7\xc8\x6d\x48\x36\x36\xf3\x02\x3e\xa6\xa3\
+\x0e\x4f\x84\x62\x63\x77\x8d\x89\x3a\xef\x7e\x74\x31\x9c\xc4\x5b\
+\x9d\x4a\x10\x59\xa6\xe6\xf6\x0b\xfe\x91\xce\xa4\x60\x34\x59\x95\
+\x10\xbc\x86\xca\x3f\x3a\x05\xb6\xb7\x36\x00\x5c\x9e\x95\x4b\x19\
+\x3f\x8b\x2d\x97\xd0\xbe\x9a\x6d\xc4\x3c\x4e\x21\xa6\x6e\x8a\x36\
+\x14\xb0\x69\x63\x7a\x9a\xe7\xad\x0c\xb5\x01\x3a\xd4\x1a\x83\xb6\
+\xd5\x27\x2b\x59\xb4\xb8\x3c\xaf\x4c\xb2\x87\x18\x85\x40\xa7\x30\
+\x59\x00\xf8\x81\xa1\xf0\xbc\xb6\xbe\xbd\x68\xd5\x5d\xa0\x75\x00\
+\x06\xb8\x61\x7e\x76\x35\x62\x73\xa6\x59\x19\x46\xb6\x24\x5e\xba\
+\xf6\xda\xb9\x87\x89\x69\xd5\x8f\x9c\x93\xa8\xdb\xb5\x72\x86\xce\
+\x41\xb1\xef\x6a\x52\x41\xab\x7c\x3e\x7c\xad\xe1\x39\xf2\x36\xdd\
+\x8d\x55\xd3\x99\x14\x2e\x5c\x37\x31\xd2\xad\xc5\x5b\x0e\x32\xdc\
+\x30\xfa\xd1\x0b\x5a\xd5\x53\x09\x29\x9a\x1b\x31\xf3\xa0\xb6\xa7\
+\x71\x56\x86\x80\x03\x5d\x18\xb0\x43\xb5\x4d\xc2\xa9\x63\xb2\x8b\
+\xd4\x0a\x56\x39\x98\x61\xec\xa2\xe1\x8f\x98\xda\xa0\x6c\x0d\x9e\
+\x1f\x14\xee\xe4\xdf\xb5\xb6\x14\x42\xa8\xe1\xa7\x96\x2f\x2a\xea\
+\xa7\xe1\x3b\x56\x83\x03\x60\x76\xd3\x50\x29\x9d\x9a\xe0\x6a\x75\
+\xa0\x37\xb5\xaf\xad\x12\x85\x03\xaf\xb9\xa4\x08\x0b\xd3\x10\x12\
+\xac\x01\xb3\x5b\xca\x6f\xce\x81\x4f\x73\x44\x46\x9b\x9f\xad\x31\
+\x31\xf1\x0a\xd0\x49\xe1\xce\xad\xab\x12\xb2\x01\xa1\xbe\xb6\x3d\
+\x0d\x5d\xc0\x60\x1d\x8a\xc9\x88\x5c\x89\xbd\xb9\xb5\x5c\x8f\xcc\
+\xb9\x5c\x93\xd6\xfa\xdb\xda\x8a\x16\x24\x34\x6e\xc1\x9a\x33\x6b\
+\xf5\x1c\xa8\x9c\x61\xd1\x46\xd7\x94\x20\x00\x28\x16\x00\x72\xa7\
+\x0d\x28\x10\x5b\x5b\x6b\x46\x2b\x71\x9a\x15\x48\xd5\x8b\x91\x60\
+\x35\x3d\xab\x91\x6d\x1a\x8b\x58\xda\xf6\xe9\x7d\x69\x8c\xb7\x0a\
+\xa7\x62\x75\xee\x00\xbf\xeb\x6a\xe6\x1a\x9d\x75\xa4\x16\xe3\xc8\
+\x7a\xda\xa4\x0b\x00\x3a\x57\x38\xf2\xdb\xae\x82\x8c\x81\x7a\x92\
+\x02\xde\x88\x0b\x54\xd7\x54\x9c\xc4\x2a\x96\x3b\x28\xb9\xa8\x41\
+\x65\xd7\xd4\x75\x63\xd4\xd4\x4d\xfe\x4b\xdc\x5c\x65\x35\x26\xe0\
+\xdb\xa6\xf5\x24\xd4\x13\x6a\x16\xbd\xea\x00\x26\xa4\xe3\xbd\x71\
+\x2d\xc8\xfe\x75\x39\x4d\x2e\x50\xd2\x44\x52\x3b\x00\x77\x73\xb7\
+\xb0\xeb\x52\x55\xe2\x52\xa3\x32\x84\x37\x65\xdd\x87\xe9\x44\x98\
+\xd4\xca\x03\xa3\x16\xe7\x6e\x74\xa9\x30\x53\x2f\xa4\x07\x03\xf0\
+\xd4\x70\xf4\x07\x17\xe6\xf8\x41\x36\x35\xcf\x6e\x95\xb5\x67\x71\
+\x75\x80\x01\xcb\x3b\xd8\x9a\x0c\xe9\x98\xa4\x9f\x76\xdf\x85\xb9\
+\xd3\x8e\xa6\xe6\xb9\x80\x6b\x66\x45\x6b\x6d\x71\xb5\x69\x00\x45\
+\xa6\x9f\x91\xa9\x29\x6e\x67\xf2\xa9\x78\xe3\x65\x39\xa3\x5d\xb7\
+\x02\xc4\x50\xc4\xd9\xe0\x46\xce\x3d\x3e\x6b\x9a\x52\x0a\xeb\xea\
+\x34\xb9\x21\x57\x86\x44\x37\x62\xca\x48\xbf\x5a\x6a\xb2\x35\xc2\
+\x48\xac\x57\x70\x2a\x50\x0c\xe3\xbe\x94\x16\x3f\x0a\x39\x71\x4c\
+\xa6\xde\x64\x23\x5e\xb5\x66\xe0\xc9\xa6\xc2\xa8\xc8\x4c\x38\x9b\
+\x8b\x82\x8f\x71\x7a\xbe\xb9\x58\x67\x8c\xdd\x48\xbd\xeb\x9c\x34\
+\x12\x52\x98\x84\x46\x91\xfd\x2b\xaf\xbf\x6a\x73\x8b\xd6\x6f\x13\
+\x9c\x3b\x78\x69\xe8\x53\xf5\xef\x45\xb9\x14\x21\x4f\x8d\x8c\xcc\
+\xfa\xdc\x96\x3e\xc3\x5a\xc1\xe2\x18\x89\x31\x78\xb2\xe7\x5b\x9b\
+\x28\xe8\x39\x0a\xdb\xc3\xb0\x13\x1c\xc6\xc0\xa9\x1f\x95\x52\x8b\
+\x87\x4d\x83\x66\xc4\x4c\x97\x0a\x6d\x19\xe4\x4f\x5a\xe3\xca\x5b\
+\x1b\x82\xc2\xa1\xc3\x44\xaa\x06\xb1\x83\x24\x96\xeb\xc8\x55\xbe\
+\x10\xa0\x49\x3e\x97\x29\x18\x5b\xdf\xbe\xbf\x9d\x54\x04\x29\x8a\
+\x36\xf5\x4a\x73\xb0\xe7\x94\x6d\xf9\xd5\xae\x18\x24\x2d\x3a\x44\
+\xe3\xc4\xca\x0b\xb7\x25\x37\xda\x9e\x3e\xaa\xb2\xc0\x8f\x50\x23\
+\xde\x84\xef\x40\x1a\x68\x0d\xb1\x0d\x9e\x36\x3a\x38\xd6\xd4\x63\
+\x23\x1f\x2c\xa8\x49\xd8\x66\xad\x00\x8b\x8b\xe9\x7b\x9a\x91\xf4\
+\xa2\x64\x65\x17\x2a\x6d\xd6\xa3\x42\x2a\x28\x6b\x01\x52\xa7\xad\
+\x44\xa6\x28\x55\x5a\x5c\xde\x6d\x94\x6f\x45\x04\xb1\xcf\x71\x1e\
+\x60\x47\x23\xce\xa0\x91\x6e\xf5\xc4\x12\x35\x36\xed\x53\xb5\x48\
+\xda\xb4\x10\x54\x88\x88\x5d\x59\xfc\x8b\xee\x69\xae\x6e\xe6\xdb\
+\x00\x05\x40\x03\xc6\x4e\xaa\x85\x80\xbf\x3b\xef\x43\x23\xac\x51\
+\xf8\x8d\xaf\x41\xd6\xa4\x5f\x10\x97\x22\x78\x2a\x75\x6d\x5b\xf8\
+\xaa\x60\x9a\xe7\x66\x77\x2e\xc6\xe4\x9b\x93\x52\x39\x56\x6b\x43\
+\x02\xa7\x95\x08\x3a\x51\x0d\xeb\x29\x04\x50\xb0\x60\xd7\xb5\xc0\
+\xa6\xd8\x74\xa8\x75\xb8\x22\xfb\xd3\x88\xef\x05\xf9\x21\x3d\xc6\
+\xb5\x24\xac\x0c\x1a\x56\xb3\x0f\x4a\x0d\xc9\xac\xd7\x5c\x4c\x1e\
+\x4b\x48\x8c\xdb\x00\x77\xab\x98\x18\x4e\x1d\x3c\x59\x35\x95\x87\
+\x97\x36\xa5\x7b\xd3\x2a\x31\x87\x84\x8b\x13\x0b\x11\x76\x3e\xe7\
+\x95\x72\x6a\x5a\xdf\x2a\xeb\xf5\xe7\xbd\x4d\xea\x4e\x51\x94\x00\
+\x45\x8f\x5e\xb5\x22\xba\xbb\x2e\x9b\x9f\xad\x21\x31\xb9\x49\x43\
+\x8d\xc7\x3a\xd2\x84\x89\x22\xce\x9a\x8b\xed\xcc\x56\x51\x36\x36\
+\x3a\x53\x20\x91\xd1\xcb\x46\xc4\x5a\x99\x55\x8d\x4b\x54\xa1\x00\
+\x12\xc7\xcb\x6b\x9b\xf3\x15\x49\x71\x92\x81\x62\x15\xbd\xc5\x41\
+\xc4\xcb\x23\x58\x90\x01\xd0\xe5\x00\x56\xb5\x9c\x58\xc2\x61\x85\
+\xbc\x56\x0d\x72\x6e\xa8\x3e\x1e\x97\xa7\x15\xb1\x25\x9e\xc7\x9d\
+\xda\xb3\x56\x79\x64\x46\x57\x91\x89\x89\xb2\x93\xd7\xa5\x40\xd7\
+\x5b\xd1\x2c\x58\xd4\x02\xfa\x06\x53\xff\x00\x50\xae\x60\x41\xda\
+\xb3\x05\x36\x09\xe4\x8d\xb4\x37\x1f\x84\xed\x4f\xe9\x62\xfa\xd3\
+\x06\xd4\xb8\xd8\x3a\x07\x5d\x9b\xf2\xa6\x2e\xd5\xa0\x20\x01\xde\
+\xa0\x69\xc4\xd4\x2e\xc6\x31\x71\xf2\xa2\x5d\xaa\x20\xb1\xe2\x33\
+\x5f\x70\x2c\xbe\xd5\xa4\xb1\xa0\x52\x49\xb0\x1b\x93\x47\x1d\x9a\
+\xc5\x48\x61\xd4\x1a\x4e\x25\x4b\x61\xca\xdf\x42\xcb\x7f\xad\x48\
+\xc3\xc6\x8f\x65\x2c\x17\x9a\xdf\x46\xa5\x91\xe6\x2e\xf7\x43\xa6\
+\xc0\xf6\xbe\xff\x00\xef\xb5\x1e\x45\xb6\xda\xf5\xe7\x5d\x1f\xa6\
+\xf6\xde\x8a\x94\x05\x8d\x43\x66\xd4\x9e\xf4\x43\x7a\x16\x34\x4a\
+\x74\xd6\xa4\x9a\xea\xeb\x8a\x1c\xc2\x94\xe9\x54\xb2\x15\x07\x5e\
+\x55\xc0\xb1\x17\x68\xf5\xff\x00\x58\xa1\x2c\x7a\xd4\x66\xd6\x84\
+\x98\x9d\x1e\xfb\x02\x0e\xa0\x9d\xa8\xb3\x0b\x79\x6c\xdd\xf6\x1f\
+\x5f\xe2\x80\xb2\x8f\x31\x03\xdf\x2d\xeb\xb3\x12\x6e\xdf\x2e\xd5\
+\x21\x9b\x11\xad\xdf\xb5\xac\xbf\xef\xde\xf4\x2e\xe6\xfe\x60\x2d\
+\xd6\xf5\xd7\xbd\x0b\x79\xc6\x50\x7d\xcf\x4a\x92\x6f\xad\x03\xa8\
+\xfb\x44\x72\x58\x5c\xdd\x4f\x7d\x28\xc0\x00\x58\x72\xa8\x27\xfe\
+\x2a\x34\xe8\xa4\x9a\xaa\x75\xaa\x40\xa3\xcb\x50\xc2\xc6\xa4\x5c\
+\xc8\xcd\x19\x55\x60\xb9\xb4\x24\xf4\xa4\xc7\x87\x85\x37\x5c\xe7\
+\xab\x6d\x56\x0d\x09\xd2\x8b\x09\x5e\x16\x49\x43\xc4\xaa\x0d\xac\
+\xcb\x7b\x5c\x51\x33\x0c\xc0\x15\x74\x27\x6b\xda\xc7\xe6\x2a\x49\
+\xa8\x60\x0a\x95\x61\x70\x68\x2a\x7c\x4f\x04\x66\x63\x34\x63\xcd\
+\x6f\x32\xdb\x53\x59\x2a\xf3\xe1\xa5\x25\x4b\x46\xdb\x11\xd2\xb7\
+\x46\x60\xc6\x27\x60\x40\x17\x43\x6d\xfb\x52\x78\x94\x69\x36\x19\
+\xdd\x96\xef\x18\xba\xd8\x7a\x8f\x4a\xc7\x2e\x3b\xdc\x32\xa8\xcb\
+\x8e\x57\x87\xc1\xb8\x49\xd8\x02\x75\xdc\x7f\x35\x9d\x38\x2a\x6c\
+\x45\x88\xe5\x59\xf8\xa9\x1d\xe5\x69\x09\xb3\x5f\x97\x2a\xbd\x04\
+\x87\x11\x82\x59\x08\xf3\x29\xc8\xdd\xfa\x57\x1f\xd7\xe9\xbc\xc1\
+\x61\x20\x32\xbd\xce\x8a\x37\x35\x7c\xb9\x06\xc0\x0c\xbb\x65\x23\
+\x4a\xe5\x8c\x43\x08\x8c\x6f\xbb\x77\x34\x27\x7a\xde\x63\x2c\xdf\
+\xf1\x07\x0e\xcf\x3a\xe2\xa2\x94\x45\x1e\x50\xa7\xa8\xf6\xa6\x70\
+\x22\x82\x39\xa1\x8c\x10\xa1\x6f\x73\xbb\x1b\xef\x57\x27\x8f\xc6\
+\xc2\xcb\x0d\xae\x4a\xdd\x7d\xc5\x65\xf0\x79\x44\x38\xd0\x1b\x69\
+\x01\x43\xaf\x5a\xc5\x92\x72\xd3\xf1\xa2\x48\xca\x54\x8b\xa9\xd0\
+\x8a\x50\x83\x0a\x3f\xe4\x9f\xfb\xcd\x36\x45\x2a\xc5\x48\xb5\x42\
+\x0b\xb0\x1d\x6b\x55\x17\x88\xfb\x98\x0c\xb0\xb3\x26\x52\x01\x52\
+\xd7\x06\x81\x31\x98\x72\x2e\xca\xea\x7a\x0d\x41\xa1\xc5\xbb\xcf\
+\x29\xc3\xc2\x9a\x29\xd7\xa9\x34\x71\x61\x22\x44\xfb\xe0\x5d\x8f\
+\x20\x6c\x05\x1d\xef\x49\x59\xd9\xf1\x78\xbf\x28\xb6\x6d\x85\xf6\
+\x14\xd9\x60\x6c\x32\x89\x92\x4b\xd8\xd8\xe9\x6a\x60\xc3\x45\x71\
+\xe1\x33\xc6\xc0\xe8\x77\xae\xc7\x44\xde\x5f\x1b\x13\x7e\x8b\x60\
+\x09\xa3\x3e\xa3\xa1\x94\x4d\x00\x93\x2e\x53\x7b\x1a\x9b\xda\xa8\
+\xe0\x38\xa6\x0f\x33\x61\x56\x17\x36\x37\x52\xc6\xc4\x9a\x62\xf1\
+\x34\xcc\x73\x61\x11\x11\x7d\x44\xb1\xbd\x33\x94\xfe\xac\x5a\x9a\
+\xcb\x87\x33\x92\x57\xc2\x20\x83\xfb\x55\x4c\x64\xad\x24\xd7\x61\
+\x6b\x01\xa7\x4a\xa9\x8d\xe3\x4d\x89\x4f\x0f\x09\x04\x6a\x11\xae\
+\xaa\xe7\xd5\xdf\x5e\x74\x2f\xc5\x1d\x90\xc9\x16\x1a\x1c\xc3\xd6\
+\x18\x6a\xa7\xb8\xac\xde\x70\xc9\x56\x2a\x41\xe5\x49\xc0\x71\x11\
+\x89\xc4\x24\x32\xe1\xa3\x05\xcd\x8b\x2e\x96\xf9\x53\xf2\x9f\x10\
+\xa2\x82\x4d\xed\xa5\x32\xcb\xe2\x12\xd1\xa8\xa7\xc1\x83\x00\x03\
+\x33\x5b\xfa\x56\xad\x45\x1e\x1d\x76\x88\x1f\xf5\x1b\xd3\x38\x8d\
+\x51\x14\x68\x8c\xc2\xe0\x6d\xb9\xab\x86\x08\x1e\xf6\x4c\xa6\xc4\
+\xe8\x74\xdb\xa5\x67\x62\xa2\xc5\x62\x2f\xe1\x36\x74\x1b\x22\xe9\
+\x6f\x95\x36\x62\xd5\xec\x3c\xb1\x4a\xf3\x0c\xa1\x4b\x1b\xc7\xdb\
+\xda\xa8\xc6\xcd\x98\xa9\xdc\x1a\xb3\xe2\x69\x1e\x1c\xc5\x95\xa2\
+\x6d\x5c\x0e\x55\x5d\x47\x9d\x18\x1b\xe6\x4b\x93\xd6\x8a\xa0\xc5\
+\x10\xa8\x5a\x9a\x88\xb4\xb5\xed\x52\x37\xb6\x95\x0a\x68\x59\x19\
+\xd8\xb0\xd8\x9d\x29\x64\x65\x14\x9b\x9b\xd7\x01\xc8\x0a\x88\x83\
+\xa9\xf3\x03\x6f\xd2\x8c\x6a\x34\x37\xa5\x04\xae\xc3\xa9\xa2\x16\
+\x45\xcf\x6d\x07\xa4\x75\x3d\x05\x43\x0b\x2e\x7b\x85\x09\xa9\x27\
+\xa5\x70\x60\xe0\x4a\xc4\xa9\x22\xc8\xbf\x84\x75\xf7\x35\x27\x22\
+\xf8\x51\xe5\x24\x66\x26\xec\x7b\xd7\x66\x3c\x87\xd6\xac\x43\x84\
+\x77\x50\xc6\xc8\xa7\x9b\x6e\x69\xc9\x84\x81\x46\xa5\x98\xfd\x29\
+\xca\xb5\x48\x13\xf8\x4f\xca\xb9\x58\xb3\x10\x45\xb4\xab\xb2\x61\
+\x52\xc4\xc6\xc4\x11\xc8\xd5\x2d\x4c\x9a\x82\x32\xe8\x6f\x56\x25\
+\xae\x1f\x29\x56\x31\x9d\x9b\x6f\x7a\xbd\x01\xba\xeb\x58\xf9\xd8\
+\x3f\x90\x6c\x77\xad\xa5\xb1\x01\x80\xd0\x80\x45\xab\x5c\x45\x31\
+\x05\xcd\xaa\xb9\x97\x2e\x3d\xa6\xb1\x2b\x9a\xd7\xb7\x2a\xb5\x0f\
+\xa8\x77\xa1\x89\x8a\xc0\x97\x50\x57\x28\xfe\xf5\xb0\x31\x22\x3b\
+\xaa\x23\x06\xbf\x98\xf6\x03\x5f\xd6\x8c\x6b\xf3\xaa\x39\xbe\xcf\
+\x8b\xce\x05\xc1\x1b\x7b\xd5\xd6\x60\xa0\x1e\xa0\x10\x29\x94\x25\
+\x5a\xea\x3d\xa8\xae\x6d\xbd\x2d\x76\xb7\x4d\x28\x81\xa4\x26\x88\
+\x11\x6a\x1b\xd0\x96\xb5\x48\x4c\x45\x09\x34\x2c\xff\x00\x2a\x0c\
+\xe3\x6b\x8f\xad\x1a\x70\xcb\xf7\xae\x2c\x05\x29\x9a\xc3\x5a\x12\
+\xe4\xec\x3e\xb4\x69\xc1\xca\xcd\x75\x03\xad\xea\x73\x6b\x4b\x5d\
+\xfa\x93\xce\x88\x54\x86\x4f\x97\xb5\xf5\x34\xd4\x17\x00\x2e\xdc\
+\xad\x42\x8a\x58\x58\x0b\xde\x80\x2c\xda\xc5\x19\xd7\x62\xdf\x86\
+\x90\x99\xa7\x0a\x08\x89\x73\x11\xbb\x72\x14\x58\x24\x60\x8d\x2c\
+\x9e\xb9\x3f\x4a\x88\xb0\x8c\x8b\xe6\x90\x38\xbd\xec\x05\x81\xf7\
+\xa6\xc6\x7c\xbb\x9b\x8a\x64\xbb\xda\x15\x03\xef\xbe\xd4\x67\x6a\
+\x5c\x84\x09\x3c\xc7\x4b\x5c\x55\x40\x49\xb8\xb8\x04\xd0\x33\x5d\
+\x8a\xda\xdf\x3a\xe9\x65\xb9\xb2\x7d\x6b\x88\x0a\x2c\x3e\x66\x83\
+\x11\x41\x23\x85\x5b\xd4\xbb\x59\x49\xe9\x55\xee\xce\xf7\x35\x9b\
+\x49\x81\x6e\xa4\x1d\x58\x8b\xdf\xa1\xaa\x78\xec\x40\x66\x40\x9b\
+\x2f\xab\xdf\x9d\x5b\x53\xf7\x83\xde\xb2\xb1\x0d\x7c\x64\xeb\x71\
+\x96\xf9\x94\x74\xbe\xf5\x9e\x57\xa3\x18\xdc\x6a\x1f\x07\x18\xf6\
+\x5b\x23\x1b\xaf\x71\x45\xfe\x1c\x90\x0e\x21\xe1\xc8\x7e\xed\x81\
+\x2c\x3a\x5b\x9d\x5e\xc5\xc2\xb8\xb8\x7c\x22\x40\x75\xf4\x13\xfa\
+\x56\x56\x0d\x5a\x0e\x20\x61\x95\x4a\xb3\x02\xba\xf2\xbd\x70\xb3\
+\x39\x6b\x7f\x1e\x8a\x60\x44\x87\x36\xf4\xa3\xbd\x55\xc1\xe3\x8a\
+\x0f\x03\x11\x72\xb7\xd1\x8e\xeb\x57\x19\x48\x20\x8d\x41\xd8\x8e\
+\x75\xd3\x75\x90\x83\x95\x83\x0e\x55\x9d\xc5\xb0\x6c\x92\x36\x22\
+\x11\x78\x98\xdf\x4f\x84\xd6\x8b\x29\x1a\x10\x45\x72\x12\xbb\x73\
+\xde\xfc\xe8\xb3\x54\xac\xfc\x16\x39\x72\x88\xb1\x37\x2a\x36\x7e\
+\x62\xad\x23\xc0\xd6\x29\x89\x8c\xdf\x5d\x4d\x88\xa8\xc4\x61\x30\
+\xb3\xfa\x94\xc4\xdd\x50\x68\x7e\x55\x56\x4e\x16\x6f\xf7\x58\x88\
+\xdb\xb3\x79\x68\xff\x00\x28\x57\xd7\xcc\x09\x59\xa2\xb7\x36\x0c\
+\x29\x12\x62\xb0\x48\x4e\x69\xcb\x11\xc9\x53\x7f\x9d\x51\x7e\x1d\
+\x8b\x52\x09\x8b\x32\xdf\x52\xa6\xf5\x57\x1c\x78\x96\x1f\x10\x50\
+\x61\x7e\xef\xe1\x1e\x1d\xc5\xa8\xbc\xac\xf8\xa4\x5d\xc4\x71\x57\
+\x23\x26\x1a\x31\x10\x23\x56\xdd\xbe\xb5\x51\xdd\x84\xb9\x14\xe7\
+\xc4\xb0\xcc\x4b\x1d\x10\x75\x34\x98\xb1\x2c\x49\x69\xf0\x91\x8c\
+\xbb\xe5\x26\xff\x00\x41\x54\x31\x3c\x59\xa2\xe2\x06\x58\xf0\xec\
+\x88\xde\xa2\x41\x0c\x47\x6e\x95\xca\xf2\xfb\x6b\x58\xb1\x89\xc2\
+\xa6\x1d\xd5\xdf\x10\xac\xc4\xde\xda\xaf\xf2\x68\x31\xf8\xb9\x31\
+\x01\x54\xbe\x60\xa3\x5b\x0b\x02\x7a\xda\x93\x2a\xf8\x89\xe3\xc4\
+\xe6\x44\x6d\xcf\x31\xef\x4a\xbd\x62\xdf\xe1\xc1\x03\x56\xa3\x2e\
+\x71\x38\x42\xba\xc9\x21\x2a\x6d\xbb\x27\x7a\xa8\x0d\x6d\xff\x00\
+\x87\x11\x15\xd3\x13\x3a\x80\x21\xd1\x6f\xbe\xa6\xf4\xf1\x9b\x55\
+\xab\x5c\x23\x87\x36\x1f\x33\x31\xb4\x8c\x37\xe4\x83\xf9\xad\x18\
+\x55\x21\x5c\xb1\xdf\xbb\x1d\xcd\x40\x91\x65\x17\x8e\x55\x23\xa5\
+\xec\x6a\x76\xd2\xbd\x32\x49\xe3\x14\x60\xd1\x03\x4b\x06\x8d\x01\
+\x63\x60\x09\x34\x83\x22\x60\x1a\xe7\x60\x09\x3e\xd5\xd8\x13\x93\
+\x04\xad\xac\x62\xec\xcd\xd6\xdc\xa9\x32\x9c\xc5\x70\xe8\x41\x67\
+\x20\xc9\x6d\x40\x14\xeb\xac\x85\x93\x65\x71\x94\x76\x1c\xa9\x4a\
+\x98\xb9\xd2\x46\x00\x2a\xbe\x5d\xd9\x86\xff\x00\x2a\x59\x66\x73\
+\x76\x37\xa5\xa0\x14\xc1\x58\x68\x42\xa4\x50\xd7\x7c\x27\xda\xa4\
+\x33\xf8\x79\x9e\x42\x8f\x9d\x00\xd0\xd8\x68\x28\x97\x6a\x60\xa2\
+\xe7\x50\x45\xcf\x7a\xea\x95\x3e\x60\x06\xa7\x90\x1b\xd2\x02\xaa\
+\xb2\xe2\x0c\x24\xb3\xac\x76\x39\x07\xc4\xd5\xa1\x87\xc3\xa4\x07\
+\xc5\x94\x03\x21\xe5\xc9\x6a\xbc\x90\x7d\x90\x7d\xa8\x00\x25\x63\
+\x62\x06\xb9\x68\xf0\xb3\x4f\x89\x3e\x75\x40\xa3\x98\x16\xb5\x33\
+\xaa\xaa\xcb\x48\xa4\xdc\xb1\xd7\x99\x15\xc4\x81\xb9\x1f\x5a\x51\
+\x56\x67\x0a\x4d\xc0\xfc\xaa\x7c\x21\x9a\xf7\xb0\xe9\x4b\x26\xd5\
+\x7c\x72\x82\x4c\x80\x00\x6d\xaf\x7a\x70\x04\x68\x18\xfc\xea\x55\
+\x41\x3e\x7d\x6f\xa1\x1d\xaa\x4c\xf1\x7a\xd2\xe1\x6d\x9b\x0c\xc2\
+\xf7\x28\x74\xf6\xac\xe9\x30\xec\x98\x96\x41\x7c\xbc\xb5\xb5\xe9\
+\xd8\x1c\xd0\xe2\x75\x07\x2b\x0b\x1a\xb8\xf5\x5a\xad\x50\xc5\x41\
+\x3d\x05\xc5\x14\x63\x2d\xd0\xdb\xf1\x0f\xdc\x7d\x7f\x5a\x50\x0f\
+\x7c\xad\x6b\x5f\x53\x45\x24\x81\x02\x3b\x1b\x0c\xc5\x49\xec\x45\
+\x74\x64\xae\x27\x1d\xd2\x36\x52\x6f\xaa\xfc\xea\xc3\x00\xa7\x28\
+\xdc\x00\x09\xf9\x50\x0c\xb3\x48\x1a\xf7\x8e\x3d\x8f\x26\x34\x4e\
+\x75\x26\xa4\x90\x6d\x5c\x1a\x80\x1a\xea\x92\x58\x96\xbd\xc9\x02\
+\xfb\x50\xb5\xed\xeb\x6f\xad\x40\x3e\x51\xdc\x57\x1a\x90\x6c\x4f\
+\xa8\xde\xd5\x24\x0e\x82\xba\xf5\x0c\x68\x48\x20\x03\xa5\x75\xea\
+\x2a\x54\x5c\xda\x84\x25\x37\x15\x18\xcc\x4a\xe1\x80\x45\x01\xe5\
+\x22\xf6\x3b\x20\xea\x6b\x95\xd4\x11\x93\xef\x09\x3c\x81\xb0\xf9\
+\xd6\x5c\xce\xcf\x33\xb3\x1b\xb3\x31\x2c\x7a\x9a\xad\xc8\xa2\xcb\
+\x62\xf1\x32\x8b\x3e\x25\xb2\xfe\x18\xd7\x2d\xe8\xb0\xb8\x89\x62\
+\x23\xc3\x62\x00\x37\xb7\x5a\xab\x1d\x59\xc1\x46\x65\x9d\x63\x51\
+\xab\x1b\x51\xde\x9a\xdd\x27\xee\xc3\x81\xba\x83\x6a\x15\x4d\x2f\
+\x7d\x4e\xa6\x9c\x40\xd8\x6c\x05\x85\x01\x16\x3a\x6d\xd2\xbb\xb0\
+\x5b\xf9\x54\x9b\x6c\x2f\x4b\x68\xc1\xf5\x6a\x7a\xd3\x24\x04\xe8\
+\x4e\x9d\x05\x41\xd3\x5a\x2a\x21\xa2\x50\x41\x51\xa8\xeb\x40\xf9\
+\xb7\x16\x14\xe6\xa5\x3d\x66\x98\x53\x82\x7d\x76\xf6\x14\x04\xd3\
+\x1c\xd2\x98\xd6\x69\x46\x62\x1a\xfd\x2b\x37\x8a\x2f\x83\x2f\x8e\
+\x6f\xb8\x52\x79\x32\x9a\xd0\xaa\xdc\x4d\x5a\x54\x11\x78\x25\xd2\
+\xd7\x24\x75\xac\x5f\x0c\x50\x93\x46\x20\x6d\x43\x3c\x29\x8c\x8c\
+\x24\xa1\x83\x29\xf2\xc8\xa3\x51\xef\x44\xe2\x64\x16\x43\x13\x90\
+\x2c\x33\x8b\x11\x55\x27\x4e\x22\xe4\xdc\x48\x47\xf4\x9f\xe2\xb9\
+\xd6\x88\xc4\x1c\x46\x1d\x8a\xe2\x62\xf1\x50\x68\x24\x1b\xfd\x69\
+\xf8\x3e\x27\x04\x70\x18\xb3\xba\x03\xb1\x61\x7c\xbf\x3a\x94\xc1\
+\xe2\xda\x2f\xbe\x25\x54\xf2\x60\x49\x34\xb1\xc3\xb0\xef\x7f\x0a\
+\x44\x27\x98\x91\x8a\x5b\xf5\xac\xf7\x3c\x3d\x35\xb0\xc6\x29\x30\
+\xaa\xd1\xe2\x52\x4b\x5e\xe6\xfa\xd7\x1c\x9c\xe4\x4f\xfb\xab\xcf\
+\x62\x70\xf8\x9c\x0c\x99\xd6\xe8\x2f\xa3\x2b\xdc\x1f\xca\x8a\x3e\
+\x2d\x36\xd8\x80\xb3\x2f\x32\x56\xcd\xf5\xa7\xf7\x3e\x8c\x6e\xbf\
+\x87\x6b\xf8\xd1\xe9\xfd\x54\x99\x24\x85\x75\x69\x47\xfd\x3a\xd5\
+\x28\x24\xc3\x62\x85\xb0\xf2\x15\x7b\x5f\xc3\x7d\x3f\x3a\x19\x94\
+\xa9\xb3\x0b\x11\x4d\xe5\xd2\xc5\xa6\xc5\xc2\x86\xe8\xae\xc7\xbe\
+\x82\x82\x6e\x21\x24\xa9\xe1\x95\xca\x84\x58\x8c\xc4\xfe\xb5\x50\
+\xd4\x56\x3f\x54\x86\x4c\x34\xa4\xfd\xd6\x3a\xea\x0e\xce\x4a\xda\
+\x97\x34\x18\xd4\x5c\xca\xe9\x32\x0d\xf6\x20\x8e\xf7\xa7\x57\x2b\
+\x14\x60\x54\xd8\xd1\x90\xeb\x35\x22\x84\xc8\x64\xc3\x01\x0c\x84\
+\x1c\xd1\x1f\x44\x9e\xdd\x0d\x56\xc4\xc7\x97\x12\x63\x41\xec\x08\
+\xd6\xb6\x71\x18\x13\x8b\x9d\x1a\x01\x95\x9f\x57\xe8\x2b\x51\x70\
+\xf8\x68\xe1\x10\x01\xaa\x8b\x09\x40\xd5\x4d\x13\x86\xad\x79\xdc\
+\x26\x0f\xc3\x0b\x2e\x24\x58\x9d\x55\x39\x9f\x7a\xbe\xb3\xc4\x8c\
+\xa9\x3b\x64\x59\xd0\x59\xc0\xd8\x82\x77\xfa\xd0\x63\xf0\xd2\xe1\
+\xe6\xb4\x87\x30\x6d\x43\xfe\x2a\x56\x2b\x0e\xf8\x98\x62\x58\x99\
+\x3c\x80\xdf\x33\x58\xd1\xe7\x8b\xd6\xa6\x0b\x08\xe6\x70\xe5\xbc\
+\x8b\x66\x0c\xba\xde\xae\x66\x0f\x3b\x2a\x87\x76\xbf\x9b\x28\x00\
+\x2f\xcc\xd6\x3f\x0a\x3c\x4f\x02\xa5\x22\x78\x24\x43\xbc\x65\xef\
+\x7f\x6a\xd6\xc0\xbc\x72\x42\x23\xb1\x8a\x76\xf3\x34\x64\xdf\xf3\
+\xae\xbc\x2f\x4c\xd3\x4a\x91\x6b\x42\xef\xfe\x97\x1a\x7b\xd4\xa3\
+\x5e\xe2\x42\x07\xff\x00\xd6\x87\x4f\x99\xe7\x42\x47\x6a\x95\x51\
+\x7b\x90\x0d\x6c\x08\xb1\x0b\x95\x55\x54\x74\x51\x52\x80\x93\x43\
+\x94\x11\x6d\x7e\xb4\x8c\x6b\x65\xfb\x95\x63\x7f\x8f\xf8\xab\x71\
+\x2b\x83\xde\xd4\xc0\x53\x28\x2d\x2a\x29\x23\x66\x3a\xd2\x63\x8c\
+\xbf\x94\x31\xa6\xaa\xa0\x3e\x33\x59\xf4\x01\x01\x1c\x86\x99\xab\
+\x11\xa3\x4a\x84\x17\x91\x85\xb9\x65\x20\x93\xec\x2b\xac\x4a\x12\
+\x30\xb3\xda\xdb\xdc\x54\x09\x5b\x93\x28\xee\x00\x15\xd7\xb9\xb9\
+\x37\xfc\xe9\x06\xd9\xef\xe5\x85\x35\xe4\xf2\x58\xd4\x48\xd9\x06\
+\x66\xc3\x4e\x07\x5b\x83\x40\xb7\xb0\x06\xa5\x4b\x03\x71\x71\x4a\
+\xc0\x7d\xa8\xb7\x97\x0d\x03\xbb\x75\x61\x7a\xbf\xc3\x9a\x35\x16\
+\x95\x44\x53\x30\xbd\x8e\xdf\xf9\xa8\xe1\xea\xce\xc5\xdf\xd2\xbc\
+\x86\x97\x35\x66\x78\xa3\x9c\x5a\x54\xb9\xea\x34\x35\xa9\x2f\xa2\
+\xd0\xca\xab\x88\x21\x33\x5e\x34\xd5\xcf\xe2\x3d\x05\x1a\xe8\x32\
+\x8d\x14\x6c\x06\xc2\xb8\x21\x48\xc2\x20\xb2\x8d\xaf\x5d\x66\x3a\
+\x11\x61\xce\x96\x51\x1f\xa3\xe7\x44\x05\x48\x15\xd6\xa9\x38\x54\
+\xaa\xdc\xf4\x00\x5c\x9e\x82\x88\x21\x22\xf6\xd3\xa9\xaa\xdc\x47\
+\x12\x91\x44\x61\x8d\x83\x3b\x8b\x31\x07\xd2\x29\xea\x7a\x99\x7f\
+\xe2\x39\xde\x5c\x44\x6f\x1b\x11\x1b\x0c\xaa\x3a\x5a\x91\xc3\xb1\
+\x72\xe1\xa5\xf5\x96\x46\xf5\x03\xaf\x3a\x2c\x59\xcf\x85\x0d\x63\
+\xf7\x6c\x0f\xd7\x4a\xaa\xbe\xab\x74\xae\x36\xf7\xad\xe3\xd9\x42\
+\xe2\x58\x04\x8b\xb7\xed\xca\xa2\x64\x12\xc2\x63\x26\xda\x82\x0d\
+\x66\x7f\x87\xb1\x36\xc2\x80\x7f\xe5\xb1\x56\x17\xe4\x79\xd6\xa9\
+\xec\x6e\x0e\xc6\xbd\x12\xec\x61\x2b\x65\x01\x57\x45\x5d\xab\x98\
+\xde\xa2\xba\x94\xea\xe1\xb8\xae\xae\xa9\x05\x3d\x03\xda\xa1\x88\
+\x02\xa2\x43\x96\xe7\x91\xde\x96\x5c\x6f\x63\x6e\xb4\x6a\x13\x35\
+\xea\x2f\x43\x7b\xed\xad\x70\xa1\x08\x7f\x73\x40\x5c\xca\xb9\x22\
+\x46\x2a\x4d\x99\xf9\x5a\x8b\x42\xac\xa4\x8f\x30\x22\x81\xa6\x8e\
+\x1c\x22\xc8\xdb\x81\x60\xbd\xea\x49\xc7\x62\x57\x0d\x0e\x55\x3e\
+\x72\x2c\x8b\xd0\x75\xac\xe4\x6b\xeb\x49\x9e\x57\x9a\x63\x23\x9b\
+\x93\x4d\x48\xe4\x45\x0c\xc8\xc0\x75\x22\xb1\xfa\xda\xd6\x61\xa9\
+\xbd\x6e\x70\x7c\x3f\x81\x17\x88\xe3\xef\x1f\x6e\xc2\xb0\xe1\xb6\
+\x71\x7d\xaf\xad\x7a\x53\xea\x1d\x2c\x2d\xf4\xae\x9c\x27\x6c\xf2\
+\x30\x1d\x2a\x0d\x4a\x54\x91\x5d\x59\x29\xc5\x03\xfa\x69\xac\x29\
+\x6c\x39\x51\x51\x47\x7a\x5c\x83\xa9\x03\xdc\x8a\x29\xdf\xc2\x89\
+\xa4\x3c\xb6\xf7\xac\xa4\xbc\xd8\x91\x9c\x17\xcc\x75\xb5\x63\x95\
+\x31\x79\xd7\x4b\xdd\x6d\xfe\xa1\x49\x25\x4e\xc7\x37\xfa\x05\xff\
+\x00\x3d\xa8\xca\x46\x86\xe9\x1a\x2d\xb9\xda\x85\x89\x3b\x92\x68\
+\x20\x21\xef\xea\x11\x8e\xde\x66\xfe\x28\x48\xb1\x37\x79\x1b\xdc\
+\x81\xfb\x51\x31\xa0\x63\x59\xa8\xb3\x06\x1b\x35\xfc\x22\x4f\x3b\
+\xb5\x42\xbc\x71\xe9\x1a\xe4\xf6\x1a\xd4\xb1\xa0\x26\x82\x23\x3b\
+\x6f\xe2\x3d\xfd\xcd\x04\x92\x17\x5b\x00\xbe\xf9\x05\x4e\x9d\x3f\
+\x2a\x06\x00\xf2\xb7\xb5\x45\xca\xea\x17\x21\x8a\x36\x5e\x61\x96\
+\xa9\x71\x0c\x0c\x0e\x9e\x26\x1f\x07\x11\xfc\x48\x14\xdc\x77\xab\
+\x7a\xdb\xad\x40\x24\x1b\x8b\x82\x3a\x51\x64\xa9\x84\xcb\x00\x24\
+\x1c\x32\x0e\xb6\xb8\x22\xb4\x70\x03\x0f\x89\x83\x2b\x02\x64\x5d\
+\x02\x97\xd6\xdf\x4a\xb3\x89\x86\x1c\x40\x1e\x34\x76\x61\xf1\x2d\
+\x81\xaa\x72\xf0\xdb\x31\x31\x62\x00\x3c\x83\x0b\x7e\x75\xcf\xf3\
+\x65\x6b\x61\xcd\x86\xc3\x29\xb3\x40\xe0\x8e\xae\x69\x58\x98\x70\
+\x91\x2e\x62\x18\x5f\x61\x7b\xd4\x88\xf8\xbc\x63\x2c\x72\x19\x07\
+\xf4\xb0\x6b\x50\xcb\x3e\x35\x7c\x98\x8c\x1e\x7d\x39\x2d\xbf\x4a\
+\x7a\xfe\x01\x61\xa3\xc2\x4b\x19\x61\x1b\x12\xbb\xdd\xad\x4e\x8d\
+\x63\x12\x00\xb0\xc6\xba\xda\xe0\x6b\x55\x63\xe2\x10\x44\x32\x36\
+\x19\x96\xfe\xa0\x0d\xa8\xcf\x11\xc1\x5e\xf9\x27\xfa\x8a\xb6\x21\
+\xc4\xa0\x33\xce\x45\x99\xd8\x81\xfd\x20\x69\x52\x8a\xcc\xc0\x0d\
+\x49\xa0\x18\xec\x26\x63\xe4\x93\x2b\xea\xb7\x61\x6c\xdd\x3b\x5e\
+\xaa\x62\xf8\x94\x85\x5a\x28\xa2\x10\x83\xa1\xeb\x46\xc8\x85\xc6\
+\xa6\x8d\x82\x40\x87\x31\x8c\x9c\xcd\xcb\xda\xa9\x28\xa1\x07\x5a\
+\x35\x3a\x57\x3d\xde\xda\xc4\x93\x6a\xe4\x62\xae\x19\x4d\x88\xd8\
+\xd7\x1a\x8e\x75\x44\xdd\xc3\x4d\xf6\x9c\x1a\x4c\x4f\x9c\x79\x5f\
+\xdf\xad\x1a\x9a\xce\xe0\xb8\x85\x8e\x46\x86\x56\xb4\x72\x0d\xfa\
+\x1e\x46\xb4\x8a\x95\x6b\x1a\xed\xc6\xec\x66\xa5\x9f\xc3\x85\xe5\
+\xe6\xa3\x4f\x7a\xce\x04\x93\x73\xa9\x35\x77\x19\xff\x00\xed\xf2\
+\x7f\xa9\x6b\x3f\x52\xb6\x1b\xde\xae\x4a\x2c\x46\xaa\x50\xeb\x9a\
+\x31\xff\x00\xfd\x0f\xf1\xfa\xd1\x31\x2c\xd7\x63\x44\xe1\xcb\xf9\
+\xc5\x8f\x4b\x5a\xd5\x39\x68\x41\x17\xe5\xa5\x4d\x8f\x3b\x9a\x20\
+\xbd\x68\x82\xd3\x8b\x42\xa2\x8a\xd4\x40\x57\x01\x48\x5e\xc1\xae\
+\x5c\x2a\xdb\xe2\x24\xd3\x00\x3a\xd8\x6b\x6d\x2f\xd6\x87\x00\x73\
+\x61\xb2\xde\xe5\x0e\xdd\xa8\xe5\x0c\x19\x55\x05\xdc\xec\xbf\xb9\
+\xad\xb2\xab\x84\x5c\x44\xa5\x9b\xc6\x65\x50\x75\x37\xe7\x56\x82\
+\xb8\xf8\x8c\xab\xce\xfa\x30\xfe\x68\xa0\x87\xc2\x84\x25\xee\x49\
+\xbb\x7b\xd1\xaa\xda\x99\x10\x14\x06\x17\x53\x7b\x6e\x2d\x62\x3d\
+\xe8\x71\x32\xc7\x86\x8c\x33\x82\xcc\xde\x95\x15\x60\xda\xe1\xc8\
+\xdb\x46\x3d\x8f\xf0\x6a\x97\x1e\x53\x68\x4d\xb4\x00\x8f\xce\xab\
+\xd4\x4a\x38\xbc\x44\xb3\xb9\x2c\x48\x5e\x4a\x36\x15\x56\x6b\x86\
+\x03\x91\xa6\xb6\xf4\x32\x8c\xc9\xa6\xe0\xd7\x2b\xdb\x63\x2b\x9a\
+\x39\x13\x7c\xc8\x6c\x2b\x32\x31\x6a\xd6\xc3\xa4\x84\x24\x99\x18\
+\xaf\x33\x6a\xcd\x99\x32\x4c\xeb\xd1\x88\xac\xf2\x89\x77\x80\x37\
+\xdf\xc9\x17\xfe\xe2\x7e\x63\x51\x5b\x38\x2c\x46\x82\x29\x2d\x6f\
+\x84\xf4\xaf\x3d\xc3\xa4\xf0\xb1\xd1\x49\x6d\x98\x56\xcc\xca\x15\
+\xca\x8e\x46\xba\x70\xbd\x0a\xd2\x20\x8f\xe6\xa2\xb3\xe2\x9a\x58\
+\xfd\x0e\x40\xe9\x4e\x18\xd9\x00\xf3\x22\x37\xca\xd5\xd3\xf5\x19\
+\xc5\xaa\x83\xb5\x57\x18\xdd\x75\x85\x7e\x44\xd7\x1c\x62\x69\xf7\
+\x47\xbf\x9a\xad\x8b\x0c\x7d\xe8\x0d\x29\xf1\x84\xe8\xb0\xaf\xd4\
+\x9a\x53\xe3\xa4\x07\x41\x18\xed\x96\x8d\x87\x0f\xc8\x3b\xfd\x6a\
+\x42\xad\xf6\xaa\x9f\x6c\x97\xf1\xaf\xd0\x51\x2e\x32\x41\xba\xa3\
+\x0f\x6a\x36\x2c\x5b\x05\x63\x46\x91\xb4\x54\x17\xf7\xac\x8c\x4c\
+\xad\x2c\xcd\x2d\xaf\x7d\xd0\x73\x1d\xbb\xd6\x9a\x62\x20\x91\x1a\
+\x39\x03\x28\x75\xb1\xe9\x59\x93\xc4\x62\x90\xad\xee\xa7\xd2\x7a\
+\xd6\x79\x18\xb1\xc2\x70\xcb\x2c\xa6\x56\xf3\x46\x9a\xfb\x9e\x95\
+\xab\x9f\x30\x2a\xe0\x32\x9f\x84\xed\x59\x3c\x3b\x10\xd0\xc8\xc0\
+\x65\xcb\x26\xe0\xec\x4f\x7a\xd5\x4b\x32\x07\x5f\x49\xfc\x8f\x4a\
+\xd7\x0f\x05\x51\xc7\x41\xe0\x4a\x0a\xff\x00\x96\xfa\xaf\x6e\xd5\
+\xb1\x80\x98\x4f\x83\x47\xbe\xaa\x32\xb5\x52\xc7\x28\x6c\x03\xdf\
+\xe1\x21\x85\x07\xf8\x7e\x52\x27\x78\x4e\xce\xb7\x1e\xe2\xb5\x3a\
+\xa2\xf8\xd8\x8d\xb5\xb1\xa6\x83\xa5\x57\x06\xfa\xd3\x11\xb4\xae\
+\xac\x8d\xe9\x2f\xbd\x30\x9b\xd0\xb6\xba\x54\x95\xf1\x68\x1e\x02\
+\xa4\x68\x59\x7f\x5a\x51\x45\x40\x42\x22\xa8\xec\x2a\xcc\x80\x98\
+\xd8\x0d\xed\x71\xdf\x9d\x2d\xc0\x3a\x8d\x8e\xa2\xb1\x61\x55\x90\
+\x69\x6a\x5b\x69\x56\x1d\x75\xa4\xc8\xa4\x56\x69\x25\xa8\x1f\x4a\
+\x61\x14\xb7\x15\x84\x5b\x9d\x68\x68\xce\xf5\x0c\x2a\x32\x80\xef\
+\x43\xa5\xe8\x88\xd2\x84\xd4\x50\x68\x6b\x89\xa8\xbd\x1a\x93\x42\
+\xdb\x57\x72\xa8\x6b\x05\x2c\xcc\xaa\xa3\x99\x34\x20\x10\x2f\xb5\
+\x48\x69\x14\x59\x64\x70\x3b\x35\x46\x68\x7f\xf7\xd0\x7b\xd1\x32\
+\x90\x3b\x75\x07\x4a\x93\xbc\x57\x1b\x90\x7d\xd4\x1f\xda\x93\x24\
+\x78\x69\x2e\x24\xc3\x47\xee\x83\x29\xa3\x61\xce\x85\xa8\xa6\x14\
+\xd8\x4c\x13\x23\x28\x59\x10\x1d\xfc\xc1\x81\xf9\x50\xae\x0b\x09\
+\x75\x52\xf2\xca\x3e\x1c\xda\x11\xfd\x34\xeb\x50\xca\xa4\x02\x14\
+\x7d\xe3\x8f\x20\xef\xd6\xb3\x90\x99\x19\x48\x85\xa1\x85\x23\xe5\
+\xe9\xb9\xa3\xce\x24\x19\x65\x8e\x37\x1d\x0a\x8f\xda\x97\x23\x03\
+\x26\xfa\xf3\xf7\xa9\x43\xad\x86\xf5\xa0\xa7\xc5\x70\x89\x08\x59\
+\xa1\x2d\xe1\xb9\x37\x07\xe1\x3d\x2a\x90\xad\x4e\x35\x2a\xc7\x85\
+\x18\x60\xc0\xbb\x36\x67\x03\x90\xe5\x59\x43\x38\x37\xbe\x9d\xab\
+\x9f\x39\x34\xc3\x2d\xa5\x5a\xc3\x71\x0c\x4c\x4a\x13\x30\x74\x02\
+\xc1\x5c\x5c\x0a\xa6\xcc\x2e\x32\xde\xe3\xad\x19\x3a\x5f\x29\x17\
+\xa2\x74\xbd\x6b\xc5\x8a\x87\x17\x87\x92\x30\x9e\x1c\x85\x7d\x37\
+\xd0\xfb\x55\x58\xe3\x66\x6c\x80\x6b\xfa\x52\x38\x79\x61\x89\x89\
+\x81\xd4\xb8\xd6\xb5\xf1\x50\x09\x99\xd6\x18\xec\xaa\x7c\xe8\x3e\
+\x3d\x34\x1e\xdd\xab\xa4\xff\x00\x28\x3c\x5e\x6c\xad\xe4\x91\x03\
+\x0e\xa7\x7a\x54\xd8\x20\x7c\xd0\xb5\xff\x00\xa4\xef\x56\x05\x88\
+\x2d\x96\xc6\xe4\x10\x77\x16\xa9\xb7\x3d\x2f\x5d\x71\x86\x6b\x23\
+\x23\x65\x60\x41\x1b\x83\x51\x6a\xd2\x9d\x12\x58\xfc\xe8\x73\x5b\
+\x46\xb6\xd5\x9f\x30\x68\xc9\x52\x3c\xc3\x4b\x56\x6c\x6a\x22\xa4\
+\x0a\x08\xcb\xde\xe7\x5f\x7a\x60\x64\x04\x29\x0e\xcc\x75\x08\xa3\
+\x5a\x91\x98\x67\x68\x98\x32\x9b\x66\x60\xbf\xef\xe5\x5a\x3e\x81\
+\x68\xc5\xc1\xd7\x37\x36\xee\x6b\x32\xc7\x38\x67\x00\x65\xf4\x20\
+\x37\xd7\xa9\xab\x58\x09\xf4\xf0\xa4\x3a\x7c\x24\xf2\xad\x71\xa2\
+\xac\x80\x48\xe9\x5d\x62\x07\x5a\x3b\x5b\x43\x5d\x5b\x08\x16\x23\
+\x5d\x54\x8b\x1a\x46\x22\x29\xe6\x84\xc2\x02\xb8\x02\xea\xd7\xb1\
+\x27\xa5\x3f\x28\xde\xd5\x0c\x0a\xea\x9a\x1d\xed\x45\x4c\x09\x4b\
+\x47\x7f\xf8\x69\x49\x1c\x88\xfe\x2b\x94\x87\x85\x64\x00\x8b\xe8\
+\x47\x42\x2b\x5f\x88\x61\x9a\x71\xe2\xc1\xfe\x67\xc4\x2f\xbf\x71\
+\x54\x57\x0f\x2b\x4c\x10\xc6\x47\x8b\xdb\x98\xfe\x47\xe9\x5c\xef\
+\x1c\xad\x4a\xd2\xc2\x1f\x0f\x86\x21\x51\xb4\x45\x88\xeb\xad\x60\
+\x71\xa8\xc0\xc5\x78\xaa\x34\x70\x09\xf7\xb5\x7a\x0c\x53\x2a\xe0\
+\xce\x5d\xb2\x84\x51\x59\xfc\x6b\x0c\x17\xc2\x4b\x82\x64\x8c\xe5\
+\x27\xad\xf4\xfe\x29\xe7\x36\x08\xc4\xad\xd5\x7f\x17\x0f\x14\xa3\
+\xe2\x40\x0f\xb8\xac\x47\x5f\x2e\x70\x08\x04\x90\x41\xf8\x4f\x31\
+\x5a\x7c\x20\x93\xc3\x98\x1f\x86\x4d\x3e\x95\x8e\x3e\xe3\x55\x61\
+\x45\xc8\x02\xa4\xa9\xcb\x7d\x0d\xba\x1b\xd0\x48\xc5\x30\xee\xe3\
+\x70\x2c\x3e\x75\x21\x12\x28\xe3\x91\x17\xd3\x6c\xdf\xd4\x0d\x6c\
+\x3a\xb9\xb4\x15\x2c\x32\xb1\x1d\x2a\x18\x12\x45\xad\x61\xca\xf5\
+\x00\x15\x36\xd7\x5a\x19\x0a\xc7\x11\x76\x07\x28\x36\xd0\x53\x09\
+\x6c\xd9\x42\xeb\xef\x43\x32\x13\x86\x93\x31\xbf\x97\x6b\x54\x41\
+\x19\x49\x14\xb4\x6c\x0d\xb7\x16\xd4\x57\x65\xe9\x4a\xc1\xe1\xa4\
+\xc8\x25\x49\x42\x13\xe9\x16\xde\xac\x44\xfe\x20\x60\xcb\x96\x44\
+\xf5\x2f\xef\x44\xff\x00\xa8\x20\x75\x15\x24\x02\x2c\x45\xc5\x16\
+\x95\x1f\x5a\x51\x7f\x67\x66\x04\xa0\xcc\x2d\xa8\x1b\xd1\xe0\xb1\
+\x72\xe1\x9f\x2c\x77\x65\xb8\xcf\x13\x7c\x5e\xdd\x0d\x1c\x32\x34\
+\x52\x07\x4d\xc5\x5c\x9e\x1c\x3e\x2e\x21\x29\x05\x5b\x9b\x2f\x2f\
+\x7a\xa4\xfe\x2d\x51\xe2\x1c\x60\x3e\x58\x63\x8c\x04\x27\xef\x05\
+\x8d\xea\xd7\x03\x8f\x36\x29\x67\x43\x78\xd0\x5e\xff\x00\xb5\x4a\
+\x70\x9c\x37\xda\x04\xcd\x3b\x16\x03\x5f\x2e\xe7\xad\x5c\x8a\x35\
+\x89\x6d\x0e\x97\xd4\x92\x3d\x5e\xe2\xb5\x25\xdd\xa2\xe7\xc5\x85\
+\x24\x53\x01\xb8\xa4\x23\x66\x21\x6d\x95\xed\xe9\xeb\xdc\x75\xa3\
+\x0d\x63\xa9\xb5\x74\x60\xca\xeb\xd7\x02\x0d\x56\x9b\x14\xd1\x4a\
+\xc8\xf1\x03\x6d\x88\x3b\xd5\x6e\x25\x9b\xeb\x42\xe2\xde\x65\x17\
+\xe6\x54\x73\xf6\xef\x41\x87\xc4\x47\x30\xb0\xf2\xb7\xe1\x3c\xe8\
+\xf3\x6b\x56\xea\x29\x80\x6f\x4d\xc8\x3b\x11\x48\x11\xda\xf9\x97\
+\xe7\x56\x25\xba\x13\x2c\x6a\x48\xf8\xd0\x7e\xa2\xa1\xca\x90\x19\
+\x48\x65\x3b\x11\xce\x8b\x0c\x54\x91\x2d\xb5\x2d\x94\xf2\xb5\x5a\
+\x75\x06\x94\xc9\x58\xb0\xab\x32\x91\xc8\x7c\x8d\x03\xe6\x03\xd2\
+\x6a\xc3\x2d\xa8\x6d\x59\x4a\xb9\x81\xed\x42\xe5\x6d\xbd\x14\xb1\
+\x95\x6b\x5b\x4a\xe0\x05\xb6\x15\x34\x43\xb0\x1d\x6a\x01\xb8\xb8\
+\xd0\x51\xca\x97\x3a\x69\x4b\x54\x65\x3b\xdc\x56\x6a\x49\x02\xdb\
+\x5f\xde\x86\x50\x81\xa2\x76\x00\x05\x72\x09\xe9\x71\x44\x76\xae\
+\xd0\x82\xad\xaa\xb0\xb1\x15\x20\xc8\x5b\x35\x9c\x66\x1c\xc1\xd6\
+\x80\x8f\x08\xf8\x90\x6a\xa7\xd7\x1f\xf1\x44\x97\xcf\xe0\xbe\xac\
+\xa2\xea\xdf\x8c\x54\xae\x8c\x0e\x97\x15\x17\x2b\x24\xa9\x9e\x32\
+\x48\xe6\x08\xda\x84\xad\x74\x51\x04\xc4\x4d\x97\x45\x75\x0c\xa0\
+\x1e\xf5\x24\x74\x63\x42\x27\x15\x2b\x40\xea\x88\x80\x16\xb7\x9d\
+\x85\xc5\x31\x62\x60\xe5\x54\x34\x92\x36\xef\xcc\xfb\x76\xa9\x0c\
+\x1a\x3c\xb2\x00\x50\xee\x0d\x54\xe3\x12\xcd\x87\x85\x30\xb8\x7c\
+\x59\x8d\x59\x73\x12\x45\xcd\x8d\x17\xae\xd2\xd4\x91\x88\x96\xf3\
+\xba\xc6\xbd\xcd\xef\x55\x66\xe2\x49\x1d\xd7\x0a\xa4\x9b\x7a\xdf\
+\x97\xb5\x50\x88\xb1\xf2\xac\xcc\xe3\xf0\xcc\x74\x6f\x63\xca\xad\
+\xe1\x38\x78\x95\x81\x93\x34\x00\x9d\x15\xac\x4b\x7b\x56\x76\xdf\
+\x0a\xb2\xe6\x91\xaf\x62\xce\x4e\xbc\xcd\x5e\xc3\x70\xc9\x99\x33\
+\x4a\xcb\x08\x23\x4c\xda\x93\xf2\xab\xf8\x68\xe2\xc3\x8c\x98\x68\
+\x80\x6e\x6e\xda\xb7\xf6\xae\x79\x61\x56\x39\xe5\x24\x8d\xca\xae\
+\x6b\x7c\xe9\x9c\x27\xd1\xaa\x91\xf0\x60\xe4\x01\x8c\x4b\x9d\x00\
+\xc8\x75\xaa\x33\x06\x8e\x46\x8d\xac\x72\x92\x2f\xd6\xb7\xf0\xcd\
+\x1e\x51\x88\x0d\x78\xd2\xec\x49\x16\xda\xb1\x1c\x78\xd2\xb1\x03\
+\xd6\xd7\x03\xde\x9e\x5c\x64\xf1\x4a\x77\x02\x84\xcb\x8d\x0c\x7d\
+\x11\xf9\x9e\xb7\x20\x8c\x04\x90\xa9\xd5\xa4\xd7\xb5\xa9\x38\x5c\
+\x32\xe1\x30\x8b\x11\xf5\xb6\xb2\x69\xf9\x55\xc4\x06\xf9\x94\x8b\
+\x91\x62\x1b\x66\xe9\xec\x6b\x7c\x78\xe4\xc6\x6d\x42\x92\x54\x16\
+\x3e\x66\x25\x9b\xb5\xff\x00\xd8\xa9\x06\x93\x01\xcf\x96\x55\x1e\
+\x52\xa3\xf4\xb5\x36\xb4\x04\x0d\x74\xa8\x26\x8f\x21\xb6\x61\xe9\
+\x6e\x86\x86\xf5\x20\xd2\x99\xec\x0a\xb1\x07\x71\x52\x4f\xfc\x4b\
+\x8d\x8f\x82\xb6\xfa\xd5\xae\x20\x83\xc3\x38\x83\xb2\x0f\x38\xeb\
+\x58\xf1\x4e\xff\x00\x6b\x38\x86\x42\x55\xae\x0e\x9a\x5a\xb1\x7a\
+\x6a\x2e\x8a\x35\xa1\x4c\xae\x99\xa3\x60\xcb\xfa\x51\x8e\x94\xa6\
+\x86\x0a\x6f\x16\x3c\xac\x46\x75\x1a\x77\x14\xda\xce\x81\xcc\x72\
+\x87\x07\x63\x5a\x4c\x3c\xda\x6c\x75\x15\xb9\x59\xa9\xa8\x22\xa4\
+\x6d\x5c\x69\x45\x95\x2a\x6e\xbf\x4f\xe2\xa6\xe5\xd3\x29\x73\x66\
+\xd8\xf4\x3d\x68\x88\xa0\x65\x20\xdd\x34\x3d\x3a\xd4\x95\xe3\x49\
+\x65\xc4\x2a\x4a\xbe\x55\x62\x49\xb6\xfa\xd4\x7f\x88\xd4\xb6\x06\
+\x39\x47\xc2\xf6\x3d\xaa\xcc\x57\x08\x01\xb8\xae\xc6\x28\x7c\x04\
+\x88\xcb\x71\xa1\xac\xe7\x49\x82\xf8\x49\x64\x8f\xed\x09\x18\x39\
+\xc7\xde\xa0\xdd\xba\x30\xef\x56\xb0\x91\x78\x18\x35\x8c\x9b\xb3\
+\x9c\xe7\xf6\xa6\x66\x21\x81\x5d\x2d\xa5\xab\xac\x02\x15\x1b\x29\
+\xba\xff\x00\xa4\xff\x00\xb3\x58\x93\x1a\xd7\x05\x0e\x8c\x8c\x6c\
+\x18\x5a\xfd\x2a\xa3\x62\x4c\x70\x18\x0a\xdc\xdb\x2a\x91\xef\x56\
+\x74\xcc\x09\xda\xd5\x2e\xb0\xbc\xaa\xcd\x18\x62\x39\xd5\x40\x97\
+\x3b\x46\xac\xc1\x41\x65\x04\xde\xa0\x82\x39\xaf\xbd\xa8\x9d\xff\
+\x00\x2e\x54\x05\xa9\x4e\x1a\x0b\x0b\xf7\x35\x28\x03\x5d\x18\x68\
+\xc2\xc6\x82\xfa\xd7\x4a\xe6\x38\x19\xc6\xe3\x41\xda\xf5\x27\x46\
+\x2d\x87\x41\xcc\x5c\x7e\x74\x13\xab\xf8\xab\x88\x8c\xdd\x90\x79\
+\xd7\xa8\xa6\x40\x19\xf0\xf1\x04\x17\x25\x2d\xa7\x5a\xb5\x86\xc2\
+\x28\x23\xc6\x24\x96\xd3\x28\x36\xb5\xea\xcd\x4a\x6e\x41\x01\x94\
+\xdd\x58\x5c\x50\xd5\xfc\x3a\xe1\x9e\x20\x82\x38\x83\x47\x71\x66\
+\x3c\xaf\x4a\xc4\xc3\x87\x22\xf0\xc8\xa5\xbf\x00\xd6\x9c\x5a\xab\
+\x4d\xc3\xca\x62\x7b\xee\xa7\x42\x3a\xd2\xb5\x04\x82\x2c\x6a\x77\
+\x34\x16\x9c\x46\xf1\xa9\x06\xe0\xec\x68\xef\x54\xb8\x7b\xb3\x46\
+\x50\x1f\x49\x24\x03\xd2\xad\x8a\xdc\xac\x98\x32\xba\xe5\x71\x71\
+\xf9\x8e\xe2\x97\x2c\xb2\xc5\x20\x49\xc9\x92\x36\xd5\x5f\x98\xf7\
+\xa2\x5a\x62\x3e\x53\x72\x74\x3a\x1a\x50\xa3\x7f\x28\x2b\xe6\x1e\
+\xf5\xd8\x88\xd7\x11\x1f\xf5\x0d\x8f\xec\x6a\xbe\x2c\xf8\x0c\xb3\
+\xc4\x72\x82\x6c\x40\xf4\x9a\x6e\x16\x5f\x19\x4b\x65\xca\xcb\xbd\
+\xb9\x8a\xb7\xe5\x0a\x48\xae\xd2\x05\x4f\x55\xf4\xab\xe2\x56\x5b\
+\x2e\x23\xca\xc7\x66\xf8\x5b\xe7\xd6\x95\x2c\x46\x2c\x40\xc4\x47\
+\x72\xb7\xf3\x2d\xef\x6a\x6b\x32\x11\x63\x62\x0e\xd7\xe7\x54\x98\
+\x85\x72\x06\x61\xb7\x51\x49\x90\xe4\x6c\xcb\xa2\xc8\x6c\x47\x2c\
+\xdd\x6a\x56\x24\x56\xcc\x85\x93\xfd\x26\xd4\xbc\x44\x02\x4d\x4c\
+\xd2\x5f\x95\xf5\x15\x5d\x43\x06\xf4\x2f\x42\x09\x03\x5f\x50\x16\
+\x36\xd9\xbb\xd4\x92\x0a\xdf\xad\x04\x04\xde\x81\x85\x11\xde\x85\
+\xa8\x41\x61\xa5\x25\xc6\xb4\xe6\x34\xa6\x35\x94\x4c\x82\x96\x69\
+\xce\x39\x52\xd8\x6b\x53\x40\x61\x42\x45\x19\xa1\xac\xa2\xe7\x42\
+\xf1\x66\x53\x69\x22\xd5\x4f\xed\x52\xb9\x65\x8d\x65\x5d\x2f\xbd\
+\xb9\x1a\x35\xd1\xae\x39\x52\x9e\x19\x52\x63\x26\x1e\x40\x81\x86\
+\xa0\x9d\x8d\x45\xd3\x12\x98\xac\x39\x20\x9c\xca\x41\x15\xd7\x63\
+\x7b\x0f\x9d\x32\x30\x14\x16\xbe\x79\x1b\xd4\xe7\xf4\x1d\xa8\x58\
+\x00\x2e\x36\xe9\x42\x2c\x29\x1b\xd5\x4f\xf1\x08\x6f\x16\x27\x03\
+\xca\x63\x02\xfe\xd5\x7c\xed\x4a\xe2\x31\x78\xbc\x3d\xf6\xcd\x17\
+\x98\x1e\xdc\xe8\xb3\xa5\xac\xfe\x0b\x1a\xcb\x8e\x51\x20\xb8\x00\
+\x9b\x56\xb3\xbf\x8a\x32\xc9\xe9\xf8\x6d\xf0\xfb\x56\x67\x04\x36\
+\xc7\x82\x7f\x09\xfd\x2a\xfa\x99\x5d\xc8\x81\x63\xc8\x86\xc5\x9f\
+\x99\xa3\x87\x8a\x8d\x56\x76\x19\x67\x99\x5a\x3f\xe9\xf5\x37\x63\
+\x4d\x57\xd3\x2e\x55\xc9\xf8\x6d\xa5\x0a\xa9\x63\x94\x80\xaf\xbe\
+\x50\x6e\x1b\xb8\x35\xda\x83\x62\x2d\x5b\x05\x71\x29\x46\x1f\x02\
+\xd8\x54\x56\x19\x9a\xe0\xf2\x2a\x75\xa5\xff\x00\x87\xe2\x0d\x88\
+\x69\x98\x5d\x62\x17\x00\xf3\x3c\xa9\x9c\x63\xcc\x72\x58\xe9\x11\
+\x00\xf2\xba\x9f\xe2\x8f\x81\x9f\xff\x00\x1d\x25\xbf\xf7\x47\xe9\
+\x47\xff\x00\x47\xe2\xf0\x39\xef\x7e\x74\xd8\x90\x0f\x88\xe9\xa9\
+\xa4\x47\x47\x88\x7c\x98\x29\x9b\x63\x96\xc0\xf7\x35\xb6\x04\xa5\
+\x40\x01\x54\x01\xca\xc2\x8a\x92\x9a\x0f\x2e\x9d\xb9\x1a\x60\x61\
+\x60\x7a\xd4\x85\x7a\x91\x40\x0d\xe8\x85\x49\xd3\x58\xe0\xe6\x56\
+\x1a\x3a\x65\xff\x00\x7f\x4a\xa2\x80\xc5\x12\x46\x0e\xca\x2f\xde\
+\xae\x62\xce\x5c\x04\xff\x00\x89\x92\xca\x3b\xd5\x18\x24\x12\xc4\
+\xac\xcc\xaa\xca\x2c\xe0\x9b\x5a\xab\xe9\x89\xca\xab\x8b\x81\x96\
+\xca\x5e\xf9\x80\xd8\xd3\x4e\xf4\x99\xd1\xe6\x64\x31\xb0\x44\x4d\
+\x9c\xf3\xee\x05\x1f\x88\x43\x85\x94\x7a\x8d\x84\x8b\xb1\xf7\xa2\
+\x13\x2b\x4f\x0c\xd9\xb0\xc8\xda\x6d\x63\x59\x7b\x1b\x1d\xc5\x5f\
+\xe1\xcc\x0e\x19\x97\x9a\x9b\xd6\xb8\xfa\x29\xe4\xd7\x03\x51\x5d\
+\x5b\x02\xae\x35\xc2\xba\xa4\x1a\x92\x33\x44\xeb\xd5\x48\xa9\x22\
+\xba\x2f\x58\x1d\x74\xa9\x32\x69\x8b\xa8\xf7\x4d\xbd\x8f\xf7\xa8\
+\x98\x65\x91\x97\xa1\x22\xa0\xb8\x46\x88\x9d\x03\x12\xa7\xe7\x5c\
+\xcb\x98\xe9\x60\x37\xae\xf4\x8b\x57\x35\xd5\x85\xc5\xb7\xa1\x26\
+\xf5\x24\x31\xae\xd0\x2b\x33\x1b\x2a\x8b\x9a\x93\x50\x50\x3c\x61\
+\x0e\xcc\xd7\x3e\xc0\x5f\xf8\xa8\x82\x19\xe1\x95\xb2\xa1\x60\x79\
+\x06\xe7\x57\x70\xf8\x4c\xe8\x7c\x6d\x10\xfc\x36\xd4\xd0\x43\x85\
+\x18\x84\x0e\x55\x54\x21\xf2\x5b\x4f\x95\x5b\xc3\xc8\xef\x9d\x25\
+\x5b\x3c\x7c\xfa\x8a\x64\xfe\x8b\x5d\x0c\x71\x61\x80\x48\x97\x2c\
+\x6f\xb1\x26\xe5\x5b\xdf\xbd\x17\xa5\xae\x46\xa0\xd4\x92\x2c\x41\
+\x17\x07\x71\xd6\xa2\xc4\x28\x55\x90\x10\x3f\x1a\xdf\x4e\x97\xde\
+\xb6\x19\xb8\xf8\x72\x62\x2c\xb7\x21\xc5\xc5\x0e\x59\xb0\xd2\xab\
+\xb2\x15\x23\x51\x71\x57\xd2\x39\x3c\x7f\x1a\x56\x4b\x80\x42\x2a\
+\xeb\x6a\x31\x7b\x65\x36\x20\xee\x0e\xd5\x9c\x3a\xcb\xc5\xe2\x13\
+\xc4\x0e\xf1\x39\x32\x0b\xf9\x0d\xea\x22\x78\xe5\x04\xc6\x4e\x61\
+\xba\xb0\xd4\x53\xf8\xb8\x5c\x2c\xb0\xcf\x1a\xdd\x42\x90\xca\x0e\
+\xab\x7a\xcd\x77\x93\x11\x8e\x0f\x87\x52\xad\x6e\x7f\xa9\xac\x5b\
+\x94\xc5\xfc\x1b\x14\xc4\xa9\x02\xe0\x9b\x69\x57\xa3\xf1\x33\x9b\
+\xdc\x0e\xf5\x47\x0e\x59\x5d\x5a\x50\x8d\x62\x09\x68\xf9\x7c\xab\
+\x51\xc7\x98\x90\x41\x5b\xe8\x45\x6f\x88\xa1\x19\xba\x8f\xa5\x12\
+\xb6\xe0\x8a\x8a\xe5\xf5\x8f\x7a\xd0\x06\x28\x2c\xa5\x70\xcb\xa1\
+\xbd\xd8\x81\xb5\x33\x0f\x14\x31\xae\x58\xc3\x2b\x1d\xc9\x35\x53\
+\x0d\x37\x87\x8d\x71\x29\x23\x35\xc1\x35\x70\xd8\xe8\x75\xf6\x34\
+\x4f\xea\x10\x72\x0d\x8e\xff\x00\xad\x0e\x89\xa0\x07\xc3\xfa\xe4\
+\xfe\xd4\x19\x6e\xc7\x33\x1d\x0e\x95\x20\x10\x74\x66\xa5\x08\xf9\
+\x40\x20\xdd\x08\xd0\x8d\xa8\x58\xd0\xc8\x59\x15\x98\x05\x2a\x7d\
+\x63\xf7\x15\xce\x6c\x05\x8d\xc1\xd8\xf5\xa9\x21\xbd\x54\x27\x7f\
+\x7a\xe6\x3a\x7b\xd0\xb1\x36\xd3\x71\x59\x4e\x34\x2d\x44\x35\x17\
+\x1b\x50\xbd\x15\x16\xc7\x7a\x07\xda\x88\xef\x40\xf4\x20\x9a\x17\
+\xa2\xa1\x6a\x9a\x03\x0a\x13\x47\x42\x45\x15\x06\xd5\xc4\x03\xa5\
+\x49\xd0\x57\x0c\xdd\x85\x08\x20\x11\xa0\xd4\x54\x10\x49\xd6\xd6\
+\xa9\x62\x46\xeb\xf4\xa3\x58\x99\x97\x35\xac\xb6\xf5\x1d\x05\x48\
+\xa5\x60\xd5\x18\x86\x58\xb0\x92\xbb\x91\xe6\x52\xaa\x0f\x33\x4a\
+\xc4\x62\x20\xc3\x7c\x42\x57\xe4\x14\xe9\xf5\xaa\x38\xa9\xe7\xc5\
+\x38\x0e\x6f\xaf\x95\x40\xd2\xb3\x79\x61\xc1\xf0\x78\xd9\xf1\x7a\
+\x72\x46\xb9\xe9\xa5\x68\xc2\x99\x21\x64\xb5\x8a\xc9\xaf\x7b\xed\
+\x43\x81\x80\xe1\x70\xc5\x5a\xde\x24\x9e\xa1\xd0\x53\x88\x62\x33\
+\xa2\xe6\x60\x2c\xcb\xf8\x87\xf2\x29\xe3\x32\x2b\x43\xe5\x65\xc8\
+\xe2\xeb\x7f\x98\xf6\xa9\x80\x3b\x19\x22\x63\x9a\x48\x9a\xda\x6e\
+\x45\x28\xca\x89\xe6\x6c\xe0\x77\x4b\x52\x10\xc9\x89\xc7\xb1\x52\
+\x63\xce\x6e\x48\x3b\x0a\xb5\x62\xdf\x12\x2a\x20\x45\x76\xca\xea\
+\x49\x23\xaa\xda\xc6\xff\x00\x2d\x7e\x55\x5f\x81\x4e\x23\x99\xb0\
+\xf2\x1b\x24\x9a\x7b\x1e\x55\x6e\x18\xa0\x89\x83\x14\xce\x79\xb3\
+\x9d\x4d\x63\x71\xbc\x46\x27\x09\xc5\xa5\x82\x19\x59\x62\x43\x74\
+\x17\xe5\xca\x8e\x5d\x76\xa7\xf1\xbc\x64\xcb\x70\x07\x9a\xfc\xc6\
+\xd4\x67\x58\xd5\x5c\x96\x56\x7b\x9b\x74\x03\x5f\xda\xab\xae\x35\
+\x25\x8e\x27\x92\x36\x66\x96\x30\xc0\x82\x2f\xd3\x5f\xa5\x58\x52\
+\xe0\x16\x75\xc8\x58\x65\x55\xe6\xa3\xbd\x74\x96\x56\x52\xba\x0a\
+\xeb\xdb\x6d\xb9\x8a\x59\x6b\x30\x1c\x88\xa9\x27\x43\x52\xc3\x97\
+\xda\x8a\xe1\x53\x33\x9b\x2f\x7a\xab\x2c\xa2\x30\x19\xda\xec\x46\
+\x8b\xfc\xd5\x77\x9a\x49\x48\x32\x1d\x46\x80\x0d\x80\xa3\x62\xc3\
+\xa6\x99\xa5\x92\xe3\x45\x1b\x0e\x94\x24\x86\x3e\x75\x56\x3d\xc5\
+\x2c\x1a\x2b\xd1\xa4\x45\xae\x75\xa0\xc6\x10\x30\x4f\x7e\xa2\xde\
+\xf4\x57\x19\x80\xe6\x6a\x9f\x13\xc4\x23\x48\xb0\xa9\x39\x57\x9f\
+\x22\x6a\xb7\xa5\x17\x60\x72\xf8\x68\xdd\x8d\xc9\x1a\x9a\xbb\xc2\
+\x5b\xef\x99\x09\xf5\x2e\xdd\x4d\x64\xf0\xb7\xf2\x3c\x6c\x74\x1a\
+\x8b\x9a\xb9\x0c\x85\x5c\x3a\x5e\xe3\x9e\xd5\xae\x35\x56\xbe\xbc\
+\xaa\x6c\x29\x65\x54\xd9\x94\xe8\xc2\xe0\xde\x89\x43\x03\x7c\xd5\
+\xd1\x91\x8a\x9a\x81\xa8\xb8\xa9\xa9\x22\xbb\xbd\x71\xae\xa9\x28\
+\xf1\x24\xcb\x89\x2d\xc9\xf5\x15\x5d\xd1\x64\x88\xc6\xe6\xc0\xea\
+\x0f\x43\x5a\x18\xf4\xcf\x86\xcc\x37\x8f\x5f\x95\x67\xd6\x39\x4e\
+\xcc\x20\x26\x36\x26\xf2\xdd\xd5\x76\xd6\xe0\xd3\xc3\x23\xb9\x0a\
+\x0a\xb8\xdd\x1b\x7a\xe3\xa8\xf9\xd0\x63\x43\x18\x44\xab\xeb\x8d\
+\xb7\xea\x2b\x3e\x11\xda\xf4\xd8\x21\x69\x65\x65\x03\x45\xb2\xdf\
+\xa7\x33\xfb\x7d\x2a\x93\x62\xe7\xd1\x44\x4a\x19\xb4\x0d\x6a\xd9\
+\xe1\xd1\x78\x58\x04\x51\xab\x90\x4b\x9d\xf5\xa7\x8f\x74\x51\x80\
+\xaa\xa1\x14\x59\x57\x6a\xed\x06\x20\x72\x2f\x1f\xd6\xc6\xa4\x82\
+\x37\x04\x50\x49\xa6\x2b\x0c\x7b\x91\x5d\x00\x8e\xd4\x35\x26\xd6\
+\x24\x9b\x00\x2e\x4f\x4a\xa3\x89\xe2\x45\x5e\xd0\x22\x65\x1f\x13\
+\x0b\x93\x45\xb2\x25\xda\xe1\xa9\xb5\x56\xe1\xf8\xdf\xb4\x4a\x21\
+\x95\x50\x33\x7a\x59\x45\xb5\xe9\x6a\xb2\x18\x28\x2e\x4d\x82\x82\
+\x6f\x54\xb2\xa5\x0e\x34\x7c\x44\x9d\x41\x16\x4b\x58\xf5\x02\x93\
+\x1c\x6b\x04\x62\x34\xdc\x80\x59\xb9\x9a\x94\x39\x99\xcb\x5a\xc5\
+\x49\x6b\xed\x40\xaf\xe2\x43\x1c\x82\xc7\x32\xeb\x6e\xda\x56\x3e\
+\xeb\x46\x43\xa4\xab\xee\x2b\x46\x42\xb0\xe2\x80\xd5\x63\x92\xe0\
+\xf4\x06\xa8\x60\x54\x3e\x32\x35\x61\x70\x5a\xaf\xe2\x54\xc9\x87\
+\x71\xf1\x0f\x30\xd2\xb5\x3c\x14\x6c\x08\x36\x3c\xab\x85\xb5\x63\
+\xb2\x8b\x9a\xa7\x1e\x2e\x61\x95\x06\x56\x3b\x00\x56\xe6\x9b\x8a\
+\x13\xb4\x2a\xc5\x95\x90\x1b\xba\xa0\xb5\xbd\xe9\xd0\x08\xf0\xc6\
+\x60\x66\x95\xca\x97\x24\x81\x6a\xb6\x00\x3e\x5b\x82\xca\x35\xbe\
+\xf5\xce\x41\x20\x8f\x49\x1e\x5f\x6a\x16\x8d\x1e\x65\x94\xb3\x06\
+\x51\x6f\x2f\x3a\xb1\x05\x1a\xc4\x8b\x12\x29\x9b\xeb\x41\x89\xb7\
+\xa8\x69\x73\xad\x44\x4c\x72\xdb\x29\x20\x73\x15\x21\x5e\xc6\x84\
+\x00\xb9\xd1\x76\x04\x38\x16\xd8\x1a\x92\x45\xed\x7d\x68\x26\x57\
+\x62\xad\x1b\x5a\x44\xd0\x03\xb3\x0e\x95\x54\x82\x68\x49\xa5\x7d\
+\xad\x09\x2a\xf0\xb0\x6b\xec\xa6\x8f\xc4\x87\xf1\x38\xee\xc8\x40\
+\x15\x9d\x43\x24\x8b\xb5\xc1\x52\x06\x9d\x08\xff\x00\xcd\x09\x52\
+\x76\xd6\x85\xf1\x18\x74\xff\x00\x98\x58\x8e\x40\x68\x7e\x75\x4a\
+\x58\xf1\x0e\xc6\x61\xa6\x6d\x40\x07\x51\x55\xa7\x16\xa4\xb2\x30\
+\x56\x04\xb3\x6c\xa3\x7a\x16\x23\x36\x42\xa5\x09\xf4\xdc\xdc\x37\
+\xce\xab\x0c\x54\x58\x58\x8e\x70\x5e\x56\xe5\x7f\xd6\xb9\x38\x84\
+\x33\x44\xe9\x24\x45\x34\x26\xe0\xdc\x0a\xce\xac\x3c\x8b\x1b\x1a\
+\x83\x41\x0c\xa1\x80\x49\x18\x6b\xe8\x93\x93\x0a\x36\x04\x0b\xee\
+\x3b\x6b\x49\x06\x80\x16\x3b\x28\xb9\xaa\xd8\x7c\x53\xc9\x89\xc9\
+\x27\xa1\xcd\x80\xfc\x35\x65\xf2\xb4\x4e\xa4\xd8\x32\x91\x7e\x95\
+\x99\x2e\x1e\x78\x4e\x7f\x84\x1f\x50\x3a\x56\x79\x69\x8d\x09\x06\
+\x51\xdc\x1a\xe1\x72\x2e\x45\xa9\x31\xe3\x22\x68\xc3\x4a\xcd\x9c\
+\x0b\x1b\x0d\xe9\xb0\x49\x2c\xaa\x1d\x63\x8e\x38\xfa\xb6\xa5\xa9\
+\xd0\x0c\x7c\xc7\x0d\x84\x56\x50\x0b\xbb\x58\x5f\x5b\x0a\xc9\x96\
+\x59\x24\xbe\x77\x2d\x7d\xee\x6b\x5b\x89\x2b\xbe\x04\x93\x87\x8d\
+\xb2\x38\xb5\xa4\xeb\xde\xb2\x64\x31\x89\x04\x72\x2b\x42\xcd\xe9\
+\xb9\xba\x9f\x9d\x73\xe7\xe9\x85\xac\x2d\x2c\x81\x62\x42\x49\xe5\
+\x5b\x38\x2c\x32\x61\x63\x1b\x3c\xbc\xd8\x8d\xbd\xa9\x7c\x16\x33\
+\x16\x1e\x49\x34\xcc\x5b\x28\xed\x4f\x7b\x8d\x47\x3a\x78\xcc\xed\
+\x54\x9d\xf5\x3a\x9a\x9f\x6a\xe5\x51\x6d\x45\xfb\xd7\x59\xbb\x56\
+\xc0\x96\x47\x3e\x5d\x5a\xdc\x9b\x51\x55\xe7\x88\x41\x8f\x8d\x97\
+\x28\x0f\x6b\xad\xce\x9d\x45\x3e\x30\x55\xee\x0d\xef\xbf\xf3\x54\
+\x4a\x48\xb8\xc0\xa4\x33\x30\x6d\xba\xd1\x4c\x5f\x58\x4a\xcd\x96\
+\xf7\x0a\x4d\xcf\x40\x2b\x17\x8d\x83\x8f\xe3\xea\xb1\x82\x04\x81\
+\x7e\x55\xa3\xc5\x78\xb6\x0e\x0c\xf0\xa5\xe4\x91\xbf\xcc\x03\x61\
+\xda\xaa\xe1\x63\x68\x10\xe2\x26\x00\x62\x27\xd4\x0b\xea\x8a\x6b\
+\x3c\xb2\xf4\xa2\xfe\x04\xab\x63\xce\x50\x32\xa4\x64\x2e\x9d\x06\
+\xf5\x64\x58\xef\x54\x78\x41\xff\x00\x89\x6f\xfe\x36\xfd\x2a\xe0\
+\x35\xae\x3e\x0a\x00\x33\x35\xce\xc3\x6e\xf4\x5e\x55\x46\x76\x1e\
+\x55\x17\xb7\x53\x45\x90\xa9\x0a\x75\x3f\xad\x56\xe2\x32\x02\xc2\
+\x25\x20\x85\xde\xdc\xcd\x37\xa4\x44\xae\xd2\x39\x66\x37\x26\xb8\
+\x54\x0a\x90\x2b\x0d\x0d\x4d\xa9\x80\xd2\x41\xb5\x4e\x6a\x74\x60\
+\xb1\x12\x98\x85\x94\x5d\xdc\x59\x47\xef\x54\x1b\x09\x89\x92\x75\
+\x41\x13\x0d\x37\x23\x41\x57\xdc\xf9\xe6\x6b\xf9\xae\x32\xf5\x0b\
+\x6d\x28\x92\x46\x0b\x94\xb1\xef\xad\x16\x6a\xd0\x88\xca\x20\x45\
+\x4d\xb7\x6e\xb4\xf0\x75\xa0\x0d\x44\x0d\x6e\x05\xac\x1e\x27\xc3\
+\x19\x1c\x5d\x39\x5b\x71\x5a\x09\x62\xb9\x94\xdd\x7a\xd6\x3a\xd3\
+\x60\x95\xe2\x37\x46\x23\xb5\x6a\x51\x8d\x45\xd3\xdb\xf4\xa2\x1b\
+\x8a\x46\x1f\x15\x1c\x9a\x3f\x91\xbf\x23\x4e\x22\xde\xd5\xb8\x04\
+\x45\xe8\x48\xa2\x5d\xaa\x6d\x7a\x40\x2d\x7d\x0e\xaa\x74\x22\xb3\
+\x71\x31\x18\xa5\x2b\xcb\x91\xeb\x5a\x85\x74\xa0\x91\x12\x44\xcb\
+\x20\xb8\xe5\xd4\x56\x6c\xd3\x2b\x2f\x99\xed\x52\x85\xaf\x65\xd4\
+\x9a\xb8\xd8\x38\x80\xb8\x77\xbd\xf4\xd2\x9d\x1c\x51\x45\xe8\x5d\
+\x7f\x11\xde\x8f\xcd\x3a\xa7\x88\x85\xd2\x14\x91\xf5\x60\x79\xfc\
+\x34\xcc\x2c\x4e\x22\x25\xdd\x95\x5b\x65\x06\xd7\xa7\xcc\x03\x64\
+\x8d\xbe\x23\x98\x8e\xc2\x86\x47\x24\xf7\xab\x02\x02\x5b\x44\x96\
+\x45\xf9\xde\x97\x1c\x32\x7d\xa5\x64\x92\x5c\xc1\x75\xbf\x3a\x2c\
+\xda\x5c\x9a\x25\x34\xa2\xf8\xab\x95\xc0\x1b\x7f\xcc\x6b\x56\x39\
+\x17\xda\xb6\xb1\xe9\xe2\xe0\x1d\x46\xe9\xe7\x15\x8c\x6b\x1c\xfd\
+\x31\x38\x42\xcb\x8a\x8d\x94\x90\x43\x8d\x6b\x6b\x88\x9c\xb0\xcd\
+\x61\xb9\xcb\xf9\xd6\x18\x62\x08\x23\x71\x5b\x78\xe1\x9f\x08\xc4\
+\x10\x6e\xaa\xd7\xbe\xfa\x6b\xf9\xd5\xc7\xca\xaf\xac\xb2\x85\xe0\
+\x96\x30\x45\xd9\x0d\xbf\x5f\xda\x87\x0e\x99\x70\x71\x03\xcc\x16\
+\x16\xe8\x69\xd1\x30\x52\x58\xe8\xa1\x4d\xc9\xe5\xa5\x09\x37\xca\
+\xb6\xb1\x08\x05\xbe\x55\x13\x78\x71\xb6\x36\x22\xd6\xdf\x7a\xd2\
+\xbe\x53\x73\xcb\x7a\xc9\x43\x96\x45\x27\x91\xb9\xad\x49\x08\x63\
+\x9b\x93\x6b\x5a\xe2\x2a\xa3\xdb\x0d\x8f\x59\x00\x39\x0b\x66\x1e\
+\xd5\x61\xb1\x10\xa4\x6c\x43\x86\x26\xf6\x51\xce\xf4\x18\xb4\xcd\
+\x11\x1b\x91\xaa\xf5\x15\x45\x2d\x9d\x73\x6d\x7e\x74\x78\x9a\x58\
+\x5c\xdf\x64\x8f\x36\xfa\xdb\xda\x8a\xe6\xf6\x16\xbf\x7e\x54\x33\
+\x92\x24\xb2\xb5\x94\xed\xd8\x57\x0b\x28\xb0\xf9\xd6\x82\x58\x66\
+\xf5\x12\x7d\xb4\xa9\x16\x0b\x61\x43\x9a\xa4\x1b\xd4\x9c\xe7\x63\
+\xd0\xd0\xb0\x37\xbd\x49\x60\x7c\xa3\x73\xa5\x11\xb0\x1a\x9b\x7b\
+\xd4\x80\x59\xaf\x7d\x01\xeb\x6d\x7e\xb5\x05\xd8\x0f\x33\x5c\x73\
+\x07\x51\x52\x59\x3a\x8e\xe7\x61\x49\x9f\x11\x85\x45\x39\xde\x4d\
+\xb4\xfb\xb2\x2f\xf3\xa1\x2a\x71\x18\xd5\x66\x53\x10\xb8\x93\x60\
+\x39\x1a\x64\xb8\x94\x8a\x20\xcb\xe6\x90\x2d\x89\xbf\x95\x2c\x39\
+\x9a\xab\x89\xc6\x99\x2f\x1a\xa6\x44\xe5\x66\xd4\xfc\xeb\x37\x1d\
+\x02\x2a\xc7\xe1\x33\x2a\xc8\xd6\x2a\x5a\xff\x00\x3a\xe7\x79\x67\
+\x8d\x48\x63\xa9\x99\xcb\xa4\x89\x2b\x1d\xf2\x9b\xd0\xba\xb4\x78\
+\x69\x8b\xa9\x19\x93\x28\xb8\xb5\xc9\xa3\xc9\x0c\x0f\x91\x20\x43\
+\x94\xd8\xb1\xbd\xcd\x41\x2a\xba\xac\x44\x13\xb1\x72\x5b\xe9\x7a\
+\xcb\x48\xe1\xe2\x4c\x3c\x19\x27\x70\x50\x9b\x15\xdc\xa5\xf6\x35\
+\x77\xc3\xc4\x61\xe3\xf1\x95\xac\x2f\x6b\x75\xaa\x31\x0f\x10\xbc\
+\x6d\x7f\x3a\x9b\x9b\xfc\xe9\xff\x00\xe1\xe9\xc6\x30\x0c\x3c\xcd\
+\xe6\x88\x5d\x6e\x7d\x42\xa9\xfc\x15\x78\xd9\x91\x58\x8b\x07\x50\
+\x48\xe9\x42\x9e\x