aboutsummaryrefslogtreecommitdiffstats
path: root/examples/widgets/graphicsview/diagramscene
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/graphicsview/diagramscene')
-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
18 files changed, 1289 insertions, 0 deletions
diff --git a/examples/widgets/graphicsview/diagramscene/diagramscene.py b/examples/widgets/graphicsview/diagramscene/diagramscene.py
new file mode 100755
index 000000000..ea0af84f9
--- /dev/null
+++ b/examples/widgets/graphicsview/diagramscene/diagramscene.py
@@ -0,0 +1,825 @@
+#!/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$
+##
+#############################################################################
+
+import math
+
+from PySide2 import QtCore, QtGui, QtWidgets
+
+import diagramscene_rc
+
+
+class Arrow(QtWidgets.QGraphicsLineItem):
+ def __init__(self, startItem, endItem, parent=None, scene=None):
+ super(Arrow, self).__init__(parent, scene)
+
+ self.arrowHead = QtGui.QPolygonF()
+
+ self.myStartItem = startItem
+ self.myEndItem = endItem
+ self.setFlag(QtWidgets.QGraphicsItem.ItemIsSelectable, True)
+ self.myColor = QtCore.Qt.black
+ self.setPen(QtGui.QPen(self.myColor, 2, QtCore.Qt.SolidLine,
+ QtCore.Qt.RoundCap, QtCore.Qt.RoundJoin))
+
+ def setColor(self, color):
+ self.myColor = color
+
+ def startItem(self):
+ return self.myStartItem
+
+ def endItem(self):
+ return self.myEndItem
+
+ def boundingRect(self):
+ extra = (self.pen().width() + 20) / 2.0
+ p1 = self.line().p1()
+ p2 = self.line().p2()
+ return QtCore.QRectF(p1, QtCore.QSizeF(p2.x() - p1.x(), p2.y() - p1.y())).normalized().adjusted(-extra, -extra, extra, extra)
+
+ def shape(self):
+ path = super(Arrow, self).shape()
+ path.addPolygon(self.arrowHead)
+ return path
+
+ def updatePosition(self):
+ line = QtCore.QLineF(self.mapFromItem(self.myStartItem, 0, 0), self.mapFromItem(self.myEndItem, 0, 0))
+ self.setLine(line)
+
+ def paint(self, painter, option, widget=None):
+ if (self.myStartItem.collidesWithItem(self.myEndItem)):
+ return
+
+ myStartItem = self.myStartItem
+ myEndItem = self.myEndItem
+ myColor = self.myColor
+ myPen = self.pen()
+ myPen.setColor(self.myColor)
+ arrowSize = 20.0
+ painter.setPen(myPen)
+ painter.setBrush(self.myColor)
+
+ centerLine = QtCore.QLineF(myStartItem.pos(), myEndItem.pos())
+ endPolygon = myEndItem.polygon()
+ p1 = endPolygon.at(0) + myEndItem.pos()
+
+ intersectPoint = QtCore.QPointF()
+ for i in endPolygon:
+ p2 = i + myEndItem.pos()
+ polyLine = QtCore.QLineF(p1, p2)
+ intersectType, intersectPoint = polyLine.intersect(centerLine)
+ if intersectType == QtCore.QLineF.BoundedIntersection:
+ break
+ p1 = p2
+
+ self.setLine(QtCore.QLineF(intersectPoint, myStartItem.pos()))
+ line = self.line()
+
+ angle = math.acos(line.dx() / line.length())
+ if line.dy() >= 0:
+ angle = (math.pi * 2.0) - angle
+
+ arrowP1 = line.p1() + QtCore.QPointF(math.sin(angle + math.pi / 3.0) * arrowSize,
+ math.cos(angle + math.pi / 3) * arrowSize)
+ arrowP2 = line.p1() + QtCore.QPointF(math.sin(angle + math.pi - math.pi / 3.0) * arrowSize,
+ math.cos(angle + math.pi - math.pi / 3.0) * arrowSize)
+
+ self.arrowHead.clear()
+ for point in [line.p1(), arrowP1, arrowP2]:
+ self.arrowHead.append(point)
+
+ painter.drawLine(line)
+ painter.drawPolygon(self.arrowHead)
+ if self.isSelected():
+ painter.setPen(QtGui.QPen(myColor, 1, QtCore.Qt.DashLine))
+ myLine = QtCore.QLineF(line)
+ myLine.translate(0, 4.0)
+ painter.drawLine(myLine)
+ myLine.translate(0,-8.0)
+ painter.drawLine(myLine)
+
+
+class DiagramTextItem(QtWidgets.QGraphicsTextItem):
+ lostFocus = QtCore.Signal(QtWidgets.QGraphicsTextItem)
+
+ selectedChange = QtCore.Signal(QtWidgets.QGraphicsItem)
+
+ def __init__(self, parent=None, scene=None):
+ super(DiagramTextItem, self).__init__(parent, scene)
+
+ self.setFlag(QtWidgets.QGraphicsItem.ItemIsMovable)
+ self.setFlag(QtWidgets.QGraphicsItem.ItemIsSelectable)
+
+ def itemChange(self, change, value):
+ if change == QtWidgets.QGraphicsItem.ItemSelectedChange:
+ self.selectedChange.emit(self)
+ return value
+
+ def focusOutEvent(self, event):
+ self.setTextInteractionFlags(QtCore.Qt.NoTextInteraction)
+ self.lostFocus.emit(self)
+ super(DiagramTextItem, self).focusOutEvent(event)
+
+ def mouseDoubleClickEvent(self, event):
+ if self.textInteractionFlags() == QtCore.Qt.NoTextInteraction:
+ self.setTextInteractionFlags(QtCore.Qt.TextEditorInteraction)
+ super(DiagramTextItem, self).mouseDoubleClickEvent(event)
+
+
+class DiagramItem(QtWidgets.QGraphicsPolygonItem):
+ Step, Conditional, StartEnd, Io = range(4)
+
+ def __init__(self, diagramType, contextMenu, parent=None, scene=None):
+ super(DiagramItem, self).__init__(parent, scene)
+
+ self.arrows = []
+
+ self.diagramType = diagramType
+ self.myContextMenu = contextMenu
+
+ path = QtGui.QPainterPath()
+ if self.diagramType == self.StartEnd:
+ path.moveTo(200, 50)
+ path.arcTo(150, 0, 50, 50, 0, 90)
+ path.arcTo(50, 0, 50, 50, 90, 90)
+ path.arcTo(50, 50, 50, 50, 180, 90)
+ path.arcTo(150, 50, 50, 50, 270, 90)
+ path.lineTo(200, 25)
+ self.myPolygon = path.toFillPolygon()
+ elif self.diagramType == self.Conditional:
+ self.myPolygon = QtGui.QPolygonF([
+ QtCore.QPointF(-100, 0), QtCore.QPointF(0, 100),
+ QtCore.QPointF(100, 0), QtCore.QPointF(0, -100),
+ QtCore.QPointF(-100, 0)])
+ elif self.diagramType == self.Step:
+ self.myPolygon = QtGui.QPolygonF([
+ QtCore.QPointF(-100, -100), QtCore.QPointF(100, -100),
+ QtCore.QPointF(100, 100), QtCore.QPointF(-100, 100),
+ QtCore.QPointF(-100, -100)])
+ else:
+ self.myPolygon = QtGui.QPolygonF([
+ QtCore.QPointF(-120, -80), QtCore.QPointF(-70, 80),
+ QtCore.QPointF(120, 80), QtCore.QPointF(70, -80),
+ QtCore.QPointF(-120, -80)])
+
+ self.setPolygon(self.myPolygon)
+ self.setFlag(QtWidgets.QGraphicsItem.ItemIsMovable, True)
+ self.setFlag(QtWidgets.QGraphicsItem.ItemIsSelectable, True)
+
+ def removeArrow(self, arrow):
+ try:
+ self.arrows.remove(arrow)
+ except ValueError:
+ pass
+
+ def removeArrows(self):
+ for arrow in self.arrows[:]:
+ arrow.startItem().removeArrow(arrow)
+ arrow.endItem().removeArrow(arrow)
+ self.scene().removeItem(arrow)
+
+ def addArrow(self, arrow):
+ self.arrows.append(arrow)
+
+ def image(self):
+ pixmap = QtGui.QPixmap(250, 250)
+ pixmap.fill(QtCore.Qt.transparent)
+ painter = QtGui.QPainter(pixmap)
+ painter.setPen(QtGui.QPen(QtCore.Qt.black, 8))
+ painter.translate(125, 125)
+ painter.drawPolyline(self.myPolygon)
+ return pixmap
+
+ def contextMenuEvent(self, event):
+ self.scene().clearSelection()
+ self.setSelected(True)
+ self.myContextMenu.exec_(event.screenPos())
+
+ def itemChange(self, change, value):
+ if change == QtWidgets.QGraphicsItem.ItemPositionChange:
+ for arrow in self.arrows:
+ arrow.updatePosition()
+
+ return value
+
+
+class DiagramScene(QtWidgets.QGraphicsScene):
+ InsertItem, InsertLine, InsertText, MoveItem = range(4)
+
+ itemInserted = QtCore.Signal(DiagramItem)
+
+ textInserted = QtCore.Signal(QtWidgets.QGraphicsTextItem)
+
+ itemSelected = QtCore.Signal(QtWidgets.QGraphicsItem)
+
+ def __init__(self, itemMenu, parent=None):
+ super(DiagramScene, self).__init__(parent)
+
+ self.myItemMenu = itemMenu
+ self.myMode = self.MoveItem
+ self.myItemType = DiagramItem.Step
+ self.line = None
+ self.textItem = None
+ self.myItemColor = QtCore.Qt.white
+ self.myTextColor = QtCore.Qt.black
+ self.myLineColor = QtCore.Qt.black
+ self.myFont = QtGui.QFont()
+
+ def setLineColor(self, color):
+ self.myLineColor = color
+ if self.isItemChange(Arrow):
+ item = self.selectedItems()[0]
+ item.setColor(self.myLineColor)
+ self.update()
+
+ def setTextColor(self, color):
+ self.myTextColor = color
+ if self.isItemChange(DiagramTextItem):
+ item = self.selectedItems()[0]
+ item.setDefaultTextColor(self.myTextColor)
+
+ def setItemColor(self, color):
+ self.myItemColor = color
+ if self.isItemChange(DiagramItem):
+ item = self.selectedItems()[0]
+ item.setBrush(self.myItemColor)
+
+ def setFont(self, font):
+ self.myFont = font
+ if self.isItemChange(DiagramTextItem):
+ item = self.selectedItems()[0]
+ item.setFont(self.myFont)
+
+ def setMode(self, mode):
+ self.myMode = mode
+
+ def setItemType(self, type):
+ self.myItemType = type
+
+ def editorLostFocus(self, item):
+ cursor = item.textCursor()
+ cursor.clearSelection()
+ item.setTextCursor(cursor)
+
+ if not item.toPlainText():
+ self.removeItem(item)
+ item.deleteLater()
+
+ def mousePressEvent(self, mouseEvent):
+ if (mouseEvent.button() != QtCore.Qt.LeftButton):
+ return
+
+ if self.myMode == self.InsertItem:
+ item = DiagramItem(self.myItemType, self.myItemMenu)
+ item.setBrush(self.myItemColor)
+ self.addItem(item)
+ item.setPos(mouseEvent.scenePos())
+ self.itemInserted.emit(item)
+ elif self.myMode == self.InsertLine:
+ self.line = QtWidgets.QGraphicsLineItem(QtCore.QLineF(mouseEvent.scenePos(),
+ mouseEvent.scenePos()))
+ self.line.setPen(QtGui.QPen(self.myLineColor, 2))
+ self.addItem(self.line)
+ elif self.myMode == self.InsertText:
+ textItem = DiagramTextItem()
+ textItem.setFont(self.myFont)
+ textItem.setTextInteractionFlags(QtCore.Qt.TextEditorInteraction)
+ textItem.setZValue(1000.0)
+ textItem.lostFocus.connect(self.editorLostFocus)
+ textItem.selectedChange.connect(self.itemSelected)
+ self.addItem(textItem)
+ textItem.setDefaultTextColor(self.myTextColor)
+ textItem.setPos(mouseEvent.scenePos())
+ self.textInserted.emit(textItem)
+
+ super(DiagramScene, self).mousePressEvent(mouseEvent)
+
+ def mouseMoveEvent(self, mouseEvent):
+ if self.myMode == self.InsertLine and self.line:
+ newLine = QtCore.QLineF(self.line.line().p1(), mouseEvent.scenePos())
+ self.line.setLine(newLine)
+ elif self.myMode == self.MoveItem:
+ super(DiagramScene, self).mouseMoveEvent(mouseEvent)
+
+ def mouseReleaseEvent(self, mouseEvent):
+ if self.line and self.myMode == self.InsertLine:
+ startItems = self.items(self.line.line().p1())
+ if len(startItems) and startItems[0] == self.line:
+ startItems.pop(0)
+ endItems = self.items(self.line.line().p2())
+ if len(endItems) and endItems[0] == self.line:
+ endItems.pop(0)
+
+ self.removeItem(self.line)
+ self.line = None
+
+ if len(startItems) and len(endItems) and \
+ isinstance(startItems[0], DiagramItem) and \
+ isinstance(endItems[0], DiagramItem) and \
+ startItems[0] != endItems[0]:
+ startItem = startItems[0]
+ endItem = endItems[0]
+ arrow = Arrow(startItem, endItem)
+ arrow.setColor(self.myLineColor)
+ startItem.addArrow(arrow)
+ endItem.addArrow(arrow)
+ arrow.setZValue(-1000.0)
+ self.addItem(arrow)
+ arrow.updatePosition()
+
+ self.line = None
+ super(DiagramScene, self).mouseReleaseEvent(mouseEvent)
+
+ def isItemChange(self, type):
+ for item in self.selectedItems():
+ if isinstance(item, type):
+ return True
+ return False
+
+
+class MainWindow(QtWidgets.QMainWindow):
+ InsertTextButton = 10
+
+ def __init__(self):
+ super(MainWindow, self).__init__()
+
+ self.createActions()
+ self.createMenus()
+ self.createToolBox()
+
+ self.scene = DiagramScene(self.itemMenu)
+ self.scene.setSceneRect(QtCore.QRectF(0, 0, 5000, 5000))
+ self.scene.itemInserted.connect(self.itemInserted)
+ self.scene.textInserted.connect(self.textInserted)
+ self.scene.itemSelected.connect(self.itemSelected)
+
+ self.createToolbars()
+
+ layout = QtWidgets.QHBoxLayout()
+ layout.addWidget(self.toolBox)
+ self.view = QtWidgets.QGraphicsView(self.scene)
+ layout.addWidget(self.view)
+
+ self.widget = QtWidgets.QWidget()
+ self.widget.setLayout(layout)
+
+ self.setCentralWidget(self.widget)
+ self.setWindowTitle("Diagramscene")
+
+ def backgroundButtonGroupClicked(self, button):
+ buttons = self.backgroundButtonGroup.buttons()
+ for myButton in buttons:
+ if myButton != button:
+ button.setChecked(False)
+
+ text = button.text()
+ if text == "Blue Grid":
+ self.scene.setBackgroundBrush(QtGui.QBrush(QtGui.QPixmap(':/images/background1.png')))
+ elif text == "White Grid":
+ self.scene.setBackgroundBrush(QtGui.QBrush(QtGui.QPixmap(':/images/background2.png')))
+ elif text == "Gray Grid":
+ self.scene.setBackgroundBrush(QtGui.QBrush(QtGui.QPixmap(':/images/background3.png')))
+ else:
+ self.scene.setBackgroundBrush(QtGui.QBrush(QtGui.QPixmap(':/images/background4.png')))
+
+ self.scene.update()
+ self.view.update()
+
+ def buttonGroupClicked(self, id):
+ buttons = self.buttonGroup.buttons()
+ for button in buttons:
+ if self.buttonGroup.button(id) != button:
+ button.setChecked(False)
+
+ if id == self.InsertTextButton:
+ self.scene.setMode(DiagramScene.InsertText)
+ else:
+ self.scene.setItemType(id)
+ self.scene.setMode(DiagramScene.InsertItem)
+
+ def deleteItem(self):
+ for item in self.scene.selectedItems():
+ if isinstance(item, DiagramItem):
+ item.removeArrows()
+ self.scene.removeItem(item)
+
+ def pointerGroupClicked(self, i):
+ self.scene.setMode(self.pointerTypeGroup.checkedId())
+
+ def bringToFront(self):
+ if not self.scene.selectedItems():
+ return
+
+ selectedItem = self.scene.selectedItems()[0]
+ overlapItems = selectedItem.collidingItems()
+
+ zValue = 0
+ for item in overlapItems:
+ if (item.zValue() >= zValue and isinstance(item, DiagramItem)):
+ zValue = item.zValue() + 0.1
+ selectedItem.setZValue(zValue)
+
+ def sendToBack(self):
+ if not self.scene.selectedItems():
+ return
+
+ selectedItem = self.scene.selectedItems()[0]
+ overlapItems = selectedItem.collidingItems()
+
+ zValue = 0
+ for item in overlapItems:
+ if (item.zValue() <= zValue and isinstance(item, DiagramItem)):
+ zValue = item.zValue() - 0.1
+ selectedItem.setZValue(zValue)
+
+ def itemInserted(self, item):
+ self.pointerTypeGroup.button(DiagramScene.MoveItem).setChecked(True)
+ self.scene.setMode(self.pointerTypeGroup.checkedId())
+ self.buttonGroup.button(item.diagramType).setChecked(False)
+
+ def textInserted(self, item):
+ self.buttonGroup.button(self.InsertTextButton).setChecked(False)
+ self.scene.setMode(self.pointerTypeGroup.checkedId())
+
+ def currentFontChanged(self, font):
+ self.handleFontChange()
+
+ def fontSizeChanged(self, font):
+ self.handleFontChange()
+
+ def sceneScaleChanged(self, scale):
+ newScale = int(scale[:-1]) / 100.0
+ oldMatrix = self.view.matrix()
+ self.view.resetMatrix()
+ self.view.translate(oldMatrix.dx(), oldMatrix.dy())
+ self.view.scale(newScale, newScale)
+
+ def textColorChanged(self):
+ self.textAction = self.sender()
+ self.fontColorToolButton.setIcon(self.createColorToolButtonIcon(
+ ':/images/textpointer.png',
+ QtGui.QColor(self.textAction.data())))
+ self.textButtonTriggered()
+
+ def itemColorChanged(self):
+ self.fillAction = self.sender()
+ self.fillColorToolButton.setIcon(self.createColorToolButtonIcon(
+ ':/images/floodfill.png',
+ QtGui.QColor(self.fillAction.data())))
+ self.fillButtonTriggered()
+
+ def lineColorChanged(self):
+ self.lineAction = self.sender()
+ self.lineColorToolButton.setIcon(self.createColorToolButtonIcon(
+ ':/images/linecolor.png',
+ QtGui.QColor(self.lineAction.data())))
+ self.lineButtonTriggered()
+
+ def textButtonTriggered(self):
+ self.scene.setTextColor(QtGui.QColor(self.textAction.data()))
+
+ def fillButtonTriggered(self):
+ self.scene.setItemColor(QtGui.QColor(self.fillAction.data()))
+
+ def lineButtonTriggered(self):
+ self.scene.setLineColor(QtGui.QColor(self.lineAction.data()))
+
+ def handleFontChange(self):
+ font = self.fontCombo.currentFont()
+ font.setPointSize(int(self.fontSizeCombo.currentText()))
+ if self.boldAction.isChecked():
+ font.setWeight(QtGui.QFont.Bold)
+ else:
+ font.setWeight(QtGui.QFont.Normal)
+ font.setItalic(self.italicAction.isChecked())
+ font.setUnderline(self.underlineAction.isChecked())
+
+ self.scene.setFont(font)
+
+ def itemSelected(self, item):
+ font = item.font()
+ color = item.defaultTextColor()
+ self.fontCombo.setCurrentFont(font)
+ self.fontSizeCombo.setEditText(str(font.pointSize()))
+ self.boldAction.setChecked(font.weight() == QtGui.QFont.Bold)
+ self.italicAction.setChecked(font.italic())
+ self.underlineAction.setChecked(font.underline())
+
+ def about(self):
+ QtWidgets.QMessageBox.about(self, "About Diagram Scene",
+ "The <b>Diagram Scene</b> example shows use of the graphics framework.")
+
+ def createToolBox(self):
+ self.buttonGroup = QtWidgets.QButtonGroup()
+ self.buttonGroup.setExclusive(False)
+ self.buttonGroup.buttonClicked[int].connect(self.buttonGroupClicked)
+
+ layout = QtWidgets.QGridLayout()
+ layout.addWidget(self.createCellWidget("Conditional", DiagramItem.Conditional),
+ 0, 0)
+ layout.addWidget(self.createCellWidget("Process", DiagramItem.Step), 0,
+ 1)
+ layout.addWidget(self.createCellWidget("Input/Output", DiagramItem.Io),
+ 1, 0)
+
+ textButton = QtWidgets.QToolButton()
+ textButton.setCheckable(True)
+ self.buttonGroup.addButton(textButton, self.InsertTextButton)
+ textButton.setIcon(QtGui.QIcon(QtGui.QPixmap(':/images/textpointer.png')
+ .scaled(30, 30)))
+ textButton.setIconSize(QtCore.QSize(50, 50))
+
+ textLayout = QtWidgets.QGridLayout()
+ textLayout.addWidget(textButton, 0, 0, QtCore.Qt.AlignHCenter)
+ textLayout.addWidget(QtWidgets.QLabel("Text"), 1, 0,
+ QtCore.Qt.AlignCenter)
+ textWidget = QtWidgets.QWidget()
+ textWidget.setLayout(textLayout)
+ layout.addWidget(textWidget, 1, 1)
+
+ layout.setRowStretch(3, 10)
+ layout.setColumnStretch(2, 10)
+
+ itemWidget = QtWidgets.QWidget()
+ itemWidget.setLayout(layout)
+
+ self.backgroundButtonGroup = QtWidgets.QButtonGroup()
+ self.backgroundButtonGroup.buttonClicked.connect(self.backgroundButtonGroupClicked)
+
+ backgroundLayout = QtWidgets.QGridLayout()
+ backgroundLayout.addWidget(self.createBackgroundCellWidget("Blue Grid",
+ ':/images/background1.png'), 0, 0)
+ backgroundLayout.addWidget(self.createBackgroundCellWidget("White Grid",
+ ':/images/background2.png'), 0, 1)
+ backgroundLayout.addWidget(self.createBackgroundCellWidget("Gray Grid",
+ ':/images/background3.png'), 1, 0)
+ backgroundLayout.addWidget(self.createBackgroundCellWidget("No Grid",
+ ':/images/background4.png'), 1, 1)
+
+ backgroundLayout.setRowStretch(2, 10)
+ backgroundLayout.setColumnStretch(2, 10)
+
+ backgroundWidget = QtWidgets.QWidget()
+ backgroundWidget.setLayout(backgroundLayout)
+
+ self.toolBox = QtWidgets.QToolBox()
+ self.toolBox.setSizePolicy(QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Ignored))
+ self.toolBox.setMinimumWidth(itemWidget.sizeHint().width())
+ self.toolBox.addItem(itemWidget, "Basic Flowchart Shapes")
+ self.toolBox.addItem(backgroundWidget, "Backgrounds")
+
+ def createActions(self):
+ self.toFrontAction = QtWidgets.QAction(
+ QtGui.QIcon(':/images/bringtofront.png'), "Bring to &Front",
+ self, shortcut="Ctrl+F", statusTip="Bring item to front",
+ triggered=self.bringToFront)
+
+ self.sendBackAction = QtWidgets.QAction(
+ QtGui.QIcon(':/images/sendtoback.png'), "Send to &Back", self,
+ shortcut="Ctrl+B", statusTip="Send item to back",
+ triggered=self.sendToBack)
+
+ self.deleteAction = QtWidgets.QAction(QtGui.QIcon(':/images/delete.png'),
+ "&Delete", self, shortcut="Delete",
+ statusTip="Delete item from diagram",
+ triggered=self.deleteItem)
+
+ self.exitAction = QtWidgets.QAction("E&xit", self, shortcut="Ctrl+X",
+ statusTip="Quit Scenediagram example", triggered=self.close)
+
+ self.boldAction = QtWidgets.QAction(QtGui.QIcon(':/images/bold.png'),
+ "Bold", self, checkable=True, shortcut="Ctrl+B",
+ triggered=self.handleFontChange)
+
+ self.italicAction = QtWidgets.QAction(QtGui.QIcon(':/images/italic.png'),
+ "Italic", self, checkable=True, shortcut="Ctrl+I",
+ triggered=self.handleFontChange)
+
+ self.underlineAction = QtWidgets.QAction(
+ QtGui.QIcon(':/images/underline.png'), "Underline", self,
+ checkable=True, shortcut="Ctrl+U",
+ triggered=self.handleFontChange)
+
+ self.aboutAction = QtWidgets.QAction("A&bout", self, shortcut="Ctrl+B",
+ triggered=self.about)
+
+ def createMenus(self):
+ self.fileMenu = self.menuBar().addMenu("&File")
+ self.fileMenu.addAction(self.exitAction)
+
+ self.itemMenu = self.menuBar().addMenu("&Item")
+ self.itemMenu.addAction(self.deleteAction)
+ self.itemMenu.addSeparator()
+ self.itemMenu.addAction(self.toFrontAction)
+ self.itemMenu.addAction(self.sendBackAction)
+
+ self.aboutMenu = self.menuBar().addMenu("&Help")
+ self.aboutMenu.addAction(self.aboutAction)
+
+ def createToolbars(self):
+ self.editToolBar = self.addToolBar("Edit")
+ self.editToolBar.addAction(self.deleteAction)
+ self.editToolBar.addAction(self.toFrontAction)
+ self.editToolBar.addAction(self.sendBackAction)
+
+ self.fontCombo = QtWidgets.QFontComboBox()
+ self.fontCombo.currentFontChanged.connect(self.currentFontChanged)
+
+ self.fontSizeCombo = QtWidgets.QComboBox()
+ self.fontSizeCombo.setEditable(True)
+ for i in range(8, 30, 2):
+ self.fontSizeCombo.addItem(str(i))
+ validator = QtGui.QIntValidator(2, 64, self)
+ self.fontSizeCombo.setValidator(validator)
+ self.fontSizeCombo.currentIndexChanged.connect(self.fontSizeChanged)
+
+ self.fontColorToolButton = QtWidgets.QToolButton()
+ self.fontColorToolButton.setPopupMode(QtWidgets.QToolButton.MenuButtonPopup)
+ self.fontColorToolButton.setMenu(
+ self.createColorMenu(self.textColorChanged, QtCore.Qt.black))
+ self.textAction = self.fontColorToolButton.menu().defaultAction()
+ self.fontColorToolButton.setIcon(
+ self.createColorToolButtonIcon(':/images/textpointer.png',
+ QtCore.Qt.black))
+ self.fontColorToolButton.setAutoFillBackground(True)
+ self.fontColorToolButton.clicked.connect(self.textButtonTriggered)
+
+ self.fillColorToolButton = QtWidgets.QToolButton()
+ self.fillColorToolButton.setPopupMode(QtWidgets.QToolButton.MenuButtonPopup)
+ self.fillColorToolButton.setMenu(
+ self.createColorMenu(self.itemColorChanged, QtCore.Qt.white))
+ self.fillAction = self.fillColorToolButton.menu().defaultAction()
+ self.fillColorToolButton.setIcon(
+ self.createColorToolButtonIcon(':/images/floodfill.png',
+ QtCore.Qt.white))
+ self.fillColorToolButton.clicked.connect(self.fillButtonTriggered)
+
+ self.lineColorToolButton = QtWidgets.QToolButton()
+ self.lineColorToolButton.setPopupMode(QtWidgets.QToolButton.MenuButtonPopup)
+ self.lineColorToolButton.setMenu(
+ self.createColorMenu(self.lineColorChanged, QtCore.Qt.black))
+ self.lineAction = self.lineColorToolButton.menu().defaultAction()
+ self.lineColorToolButton.setIcon(
+ self.createColorToolButtonIcon(':/images/linecolor.png',
+ QtCore.Qt.black))
+ self.lineColorToolButton.clicked.connect(self.lineButtonTriggered)
+
+ self.textToolBar = self.addToolBar("Font")
+ self.textToolBar.addWidget(self.fontCombo)
+ self.textToolBar.addWidget(self.fontSizeCombo)
+ self.textToolBar.addAction(self.boldAction)
+ self.textToolBar.addAction(self.italicAction)
+ self.textToolBar.addAction(self.underlineAction)
+
+ self.colorToolBar = self.addToolBar("Color")
+ self.colorToolBar.addWidget(self.fontColorToolButton)
+ self.colorToolBar.addWidget(self.fillColorToolButton)
+ self.colorToolBar.addWidget(self.lineColorToolButton)
+
+ pointerButton = QtWidgets.QToolButton()
+ pointerButton.setCheckable(True)
+ pointerButton.setChecked(True)
+ pointerButton.setIcon(QtGui.QIcon(':/images/pointer.png'))
+ linePointerButton = QtWidgets.QToolButton()
+ linePointerButton.setCheckable(True)
+ linePointerButton.setIcon(QtGui.QIcon(':/images/linepointer.png'))
+
+ self.pointerTypeGroup = QtWidgets.QButtonGroup()
+ self.pointerTypeGroup.addButton(pointerButton, DiagramScene.MoveItem)
+ self.pointerTypeGroup.addButton(linePointerButton,
+ DiagramScene.InsertLine)
+ self.pointerTypeGroup.buttonClicked[int].connect(self.pointerGroupClicked)
+
+ self.sceneScaleCombo = QtWidgets.QComboBox()
+ self.sceneScaleCombo.addItems(["50%", "75%", "100%", "125%", "150%"])
+ self.sceneScaleCombo.setCurrentIndex(2)
+ self.sceneScaleCombo.currentIndexChanged[str].connect(self.sceneScaleChanged)
+
+ self.pointerToolbar = self.addToolBar("Pointer type")
+ self.pointerToolbar.addWidget(pointerButton)
+ self.pointerToolbar.addWidget(linePointerButton)
+ self.pointerToolbar.addWidget(self.sceneScaleCombo)
+
+ def createBackgroundCellWidget(self, text, image):
+ button = QtWidgets.QToolButton()
+ button.setText(text)
+ button.setIcon(QtGui.QIcon(image))
+ button.setIconSize(QtCore.QSize(50, 50))
+ button.setCheckable(True)
+ self.backgroundButtonGroup.addButton(button)
+
+ layout = QtWidgets.QGridLayout()
+ layout.addWidget(button, 0, 0, QtCore.Qt.AlignHCenter)
+ layout.addWidget(QtWidgets.QLabel(text), 1, 0, QtCore.Qt.AlignCenter)
+
+ widget = QtWidgets.QWidget()
+ widget.setLayout(layout)
+
+ return widget
+
+ def createCellWidget(self, text, diagramType):
+ item = DiagramItem(diagramType, self.itemMenu)
+ icon = QtGui.QIcon(item.image())
+
+ button = QtWidgets.QToolButton()
+ button.setIcon(icon)
+ button.setIconSize(QtCore.QSize(50, 50))
+ button.setCheckable(True)
+ self.buttonGroup.addButton(button, diagramType)
+
+ layout = QtWidgets.QGridLayout()
+ layout.addWidget(button, 0, 0, QtCore.Qt.AlignHCenter)
+ layout.addWidget(QtWidgets.QLabel(text), 1, 0, QtCore.Qt.AlignCenter)
+
+ widget = QtWidgets.QWidget()
+ widget.setLayout(layout)
+
+ return widget
+
+ def createColorMenu(self, slot, defaultColor):
+ colors = [QtCore.Qt.black, QtCore.Qt.white, QtCore.Qt.red, QtCore.Qt.blue, QtCore.Qt.yellow]
+ names = ["black", "white", "red", "blue", "yellow"]
+
+ colorMenu = QtWidgets.QMenu(self)
+ for color, name in zip(colors, names):
+ action = QtWidgets.QAction(self.createColorIcon(color), name, self,
+ triggered=slot)
+ action.setData(QtGui.QColor(color))
+ colorMenu.addAction(action)
+ if color == defaultColor:
+ colorMenu.setDefaultAction(action)
+ return colorMenu
+
+ def createColorToolButtonIcon(self, imageFile, color):
+ pixmap = QtGui.QPixmap(50, 80)
+ pixmap.fill(QtCore.Qt.transparent)
+ painter = QtGui.QPainter(pixmap)
+ image = QtGui.QPixmap(imageFile)
+ target = QtCore.QRect(0, 0, 50, 60)
+ source = QtCore.QRect(0, 0, 42, 42)
+ painter.fillRect(QtCore.QRect(0, 60, 50, 80), color)
+ painter.drawPixmap(target, image, source)
+ painter.end()
+
+ return QtGui.QIcon(pixmap)
+
+ def createColorIcon(self, color):
+ pixmap = QtGui.QPixmap(20, 20)
+ painter = QtGui.QPainter(pixmap)
+ painter.setPen(QtCore.Qt.NoPen)
+ painter.fillRect(QtCore.QRect(0, 0, 20, 20), color)
+ painter.end()
+
+ return QtGui.QIcon(pixmap)
+
+
+if __name__ == '__main__':
+
+ import sys
+
+ app = QtWidgets.QApplication(sys.argv)
+
+ mainWindow = MainWindow()
+ mainWindow.setGeometry(100, 100, 800, 500)
+ mainWindow.show()
+
+ sys.exit(app.exec_())
diff --git a/examples/widgets/graphicsview/diagramscene/diagramscene.qrc b/examples/widgets/graphicsview/diagramscene/diagramscene.qrc
new file mode 100644
index 000000000..c4d845e75
--- /dev/null
+++ b/examples/widgets/graphicsview/diagramscene/diagramscene.qrc
@@ -0,0 +1,19 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>images/pointer.png</file>
+ <file>images/linepointer.png</file>
+ <file>images/textpointer.png</file>
+ <file>images/bold.png</file>
+ <file>images/italic.png</file>
+ <file>images/underline.png</file>
+ <file>images/floodfill.png</file>
+ <file>images/bringtofront.png</file>
+ <file>images/delete.png</file>
+ <file>images/sendtoback.png</file>
+ <file>images/linecolor.png</file>
+ <file>images/background1.png</file>
+ <file>images/background2.png</file>
+ <file>images/background3.png</file>
+ <file>images/background4.png</file>
+</qresource>
+</RCC>
diff --git a/examples/widgets/graphicsview/diagramscene/diagramscene_rc.py b/examples/widgets/graphicsview/diagramscene/diagramscene_rc.py
new file mode 100644
index 000000000..aab76d9d6
--- /dev/null
+++ b/examples/widgets/graphicsview/diagramscene/diagramscene_rc.py
@@ -0,0 +1,445 @@
+# -*- 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: Fri Jul 30 17:58:19 2010
+# by: The Resource Compiler for PySide (Qt v4.6.2)
+#
+# WARNING! All changes made in this file will be lost!
+
+from PySide2 import QtCore
+
+qt_resource_data = b"\
+\x00\x00\x01\x12\
+\x89\
+\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
+\x00\x00\x0b\x00\x00\x00\x0d\x08\x06\x00\x00\x00\x7f\xf5\x94\x3b\
+\x00\x00\x00\xd9\x49\x44\x41\x54\x28\x53\x7d\x90\x31\x0e\x45\x40\
+\x10\x86\x47\x24\x24\x1a\x0d\x0d\xd1\x22\x51\x70\x80\x6d\x5c\x40\
+\xe7\x3c\x0e\x21\x0a\x47\x71\x19\xb5\x4e\xa9\xc1\x78\x33\xb2\x8b\
+\xf7\xec\xdb\xe4\xcb\x66\x76\xfe\xf9\x67\x76\xc0\x30\x0c\x04\x80\
+\x07\xf4\x66\x59\x16\x26\x49\x82\x9f\x03\xc4\xbe\xef\x94\x3b\x05\
+\x69\x9a\x32\x24\x08\xc3\xf0\x51\x58\xd7\x35\x17\x01\x05\x04\x55\
+\xde\x5d\xe8\x76\x1c\x87\x73\xb6\x6d\xe3\xc3\x59\x0a\xef\x44\x51\
+\xc4\xe2\x20\x08\xf4\xce\xeb\xba\x62\xdb\xb6\x6a\x94\xbe\xef\x4f\
+\xb1\x7c\x28\x8a\x82\xc9\xf3\x1c\x7d\xdf\x67\x03\x21\x04\x0e\xc3\
+\xa0\x4c\x40\xb7\x0d\xd3\x34\x59\xdc\x75\xdd\x25\xfe\x9e\x79\xdb\
+\x36\x9c\xa6\x89\x63\xd9\x21\x8e\x63\x1c\xc7\x11\xd5\xcc\x6f\x1f\
+\x24\x64\xbe\xaa\xaa\xff\xdb\x58\x96\x45\x8d\x46\x5d\x5e\xb7\x41\
+\xcc\xf3\x8c\x4d\xd3\xa0\xcc\x67\x59\x76\x39\x7b\x9e\xa7\x70\x5d\
+\xf7\xe7\xd3\xda\x6d\x48\xa8\xa8\x2c\x4b\xd5\xf1\x00\xd0\xc0\x13\
+\xc8\x06\xaf\x16\x28\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\
+\x82\
+\x00\x00\x00\xf7\
+\x89\
+\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
+\x00\x00\x0b\x00\x00\x00\x0c\x08\x06\x00\x00\x00\xb4\xa9\x47\x9e\
+\x00\x00\x00\xbe\x49\x44\x41\x54\x28\x53\x85\x91\x31\x0e\x40\x40\
+\x10\x45\x57\x4d\x24\x4a\x37\xa1\xa4\x91\x38\x85\x5e\x74\xaa\x3d\
+\x8a\x4e\x54\x7b\x80\xad\x75\x6e\xa0\xd1\x6c\xe7\x12\xc4\x97\x19\
+\xb1\x21\x59\x51\xfc\x62\xfe\xbc\xfc\x99\xcc\x08\x00\x82\x74\x1c\
+\x07\xa6\x69\x82\x10\xc2\x29\xcf\xf3\x2e\xf0\xd6\x38\x8e\xa8\xaa\
+\x8a\x55\x14\x05\x03\x49\x92\x58\xef\x05\x3f\xd5\x75\x1d\xc3\x5a\
+\x6b\xd0\x54\xf2\x9c\x20\x35\xeb\xba\x66\x78\x5d\x57\xdc\xfe\x67\
+\x72\x9a\xa6\x88\xe3\x18\x4f\xcf\x09\x6e\xdb\x06\xdf\xf7\x51\x96\
+\xa5\x5d\xc1\x09\x53\x73\x9e\x67\x5e\x41\x4a\xf9\x9f\x3c\x0c\x03\
+\xc3\x4a\xa9\xff\xe4\xb6\x6d\x19\x5e\x96\xe5\x3f\x39\xcf\x73\x84\
+\x61\x88\x7d\xdf\xdf\xc9\x54\x18\x63\xec\xe1\x49\x41\x10\x20\x8a\
+\x22\x5b\x37\x4d\x03\x9b\xdc\xf7\xfd\xf5\xce\x8f\x57\x67\x59\xc6\
+\x13\x4e\xfa\x57\x56\x58\xe8\x40\xda\xc6\x00\x00\x00\x00\x49\x45\
+\x4e\x44\xae\x42\x60\x82\
+\x00\x00\x00\x72\
+\x89\
+\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
+\x00\x00\x7f\x00\x00\x00\x7f\x01\x03\x00\x00\x00\xfc\x73\x8f\x50\
+\x00\x00\x00\x06\x50\x4c\x54\x45\xff\xff\xff\x00\x00\x00\x55\xc2\
+\xd3\x7e\x00\x00\x00\x27\x49\x44\x41\x54\x48\xc7\x63\x60\x80\x82\
+\x06\x06\x34\x30\x2a\x30\x2a\x30\x2a\x30\x2a\x80\x2a\xf0\x1f\x15\
+\xfc\x1b\x0d\xa0\x51\x81\x51\x81\x51\x01\x22\x05\x00\xd5\x3b\x4e\
+\xf0\x73\xe3\x6f\xe9\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\
+\x82\
+\x00\x00\x01\x25\
+\x89\
+\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
+\x00\x00\x16\x00\x00\x00\x16\x08\x06\x00\x00\x00\xc4\xb4\x6c\x3b\
+\x00\x00\x00\x06\x62\x4b\x47\x44\x00\xff\x00\xff\x00\xff\xa0\xbd\
+\xa7\x93\x00\x00\x00\xda\x49\x44\x41\x54\x48\xc7\xed\x94\x41\x0e\
+\x82\x30\x10\x45\x1f\x46\x38\x83\x77\xf0\xfe\x87\xf0\x1a\x5e\x40\
+\xb1\xa5\x74\xa6\x1a\x5c\xb4\x04\x8c\xa2\x11\xca\xc2\xc4\x49\xd8\
+\xd0\xe4\xe5\xf5\xf7\x67\x8a\xb2\x2c\x3b\x16\x4c\x08\xa1\x78\xf5\
+\x7f\x0b\xa0\xaa\xb3\xa0\x55\x55\x4d\x9e\x6d\x58\x69\xfe\xe0\x1f\
+\x06\x6f\x33\x30\xba\x55\xc0\xdd\xed\x0a\x37\x0f\xa1\x05\x75\x20\
+\x96\x62\xb7\xcf\x60\x1c\x5c\x82\x36\xa0\x16\xc4\x66\x8a\x42\xed\
+\x00\xf5\x16\xe4\x92\x09\x2c\x97\x68\x29\x26\x7e\x9a\xcb\xd8\xd7\
+\xe0\xcd\x08\xdc\x64\x02\xbb\xf3\x60\xaa\x39\xc1\xed\x39\x41\xfb\
+\xac\xcd\x00\x7e\xb7\xfe\x3e\x67\x5c\xc7\x8c\x43\x93\xe2\x48\x19\
+\x4f\x2d\xea\x57\x95\xed\x8e\x87\x21\x4b\x49\x96\xbe\x8e\xa6\x92\
+\x1a\x31\xeb\xf1\xfc\x29\x56\xaa\xef\x6b\xb0\x20\xc9\x54\x47\x0f\
+\xf8\x35\xb8\x4d\xd7\x56\x03\xe2\x20\x98\xc7\xaa\xf5\xb7\x98\x05\
+\xd6\xde\xd4\x3e\xf7\x57\x1a\xb8\x3a\x00\x8a\xa5\xcb\x66\x6a\xee\
+\x91\x61\xa9\x66\xc0\x0f\xb5\x5d\x00\x00\x00\x00\x49\x45\x4e\x44\
+\xae\x42\x60\x82\
+\x00\x00\x00\x74\
+\x89\
+\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
+\x00\x00\x7f\x00\x00\x00\x7f\x01\x03\x00\x00\x00\xfc\x73\x8f\x50\
+\x00\x00\x00\x06\x50\x4c\x54\x45\xc0\xc0\xc0\xff\xff\xff\x2b\x69\
+\x87\xb4\x00\x00\x00\x29\x49\x44\x41\x54\x48\x4b\x63\xf8\x0f\x05\
+\x0d\x0c\x50\x30\x2a\x30\x2a\x30\x2a\x30\x2a\x40\xa4\x00\x0c\xd8\
+\x43\xc4\xff\x8d\x0a\x8c\x0a\x8c\x0a\x8c\x0a\x60\x17\x00\x00\x3f\
+\x78\xe4\xb7\xe3\x90\x30\x5f\x00\x00\x00\x00\x49\x45\x4e\x44\xae\
+\x42\x60\x82\
+\x00\x00\x00\xfa\
+\x89\
+\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
+\x00\x00\x0b\x00\x00\x00\x0c\x08\x06\x00\x00\x00\xb4\xa9\x47\x9e\
+\x00\x00\x00\xc1\x49\x44\x41\x54\x28\x53\xcd\x90\x31\x0a\x84\x30\
+\x10\x45\xc7\xce\x56\xb0\xd3\x46\x10\x6f\x60\xe5\x01\xbc\x42\x40\
+\x0b\x9b\x74\x22\x11\xbc\x94\x9d\x27\xd2\x03\x78\x03\x03\x19\xf7\
+\x0f\xb8\xd9\x2c\x6c\xbf\x81\x4f\x66\xde\xfc\x7c\xc8\x50\x1c\xc7\
+\x4c\x44\xa2\x28\x8a\x38\xcf\x73\x7e\x1d\xc2\xfd\xc9\xd3\x34\x65\
+\xd2\x5a\x73\x51\x14\x02\x86\x61\xe0\x79\x9e\xc5\x8c\x1b\x3d\x38\
+\xe6\xe3\x38\x32\x61\xa0\x94\x12\x88\xfa\x5b\xe0\x98\x3b\xe7\x42\
+\x33\xc0\x2f\x33\xea\x7f\x4a\xee\xba\x4e\xcc\xd7\x75\x05\x0f\xd0\
+\x83\xf7\x7d\xef\x93\xb1\x26\xc0\x7d\xdf\x03\xf3\x71\x1c\xc2\x97\
+\x65\xf1\xc9\xeb\xba\x0a\x9c\xa6\x29\x30\x3f\x21\xdb\xb6\xf9\x64\
+\xa8\xae\x6b\x19\x94\x65\xc9\x6d\xdb\x72\x55\x55\xd2\x37\x4d\xc3\
+\xd6\x5a\x9f\xfc\xc8\x18\xc3\x59\x96\x89\x29\x49\x12\xc6\x5f\xce\
+\xf3\x7c\x6f\xe9\x06\x33\x20\x38\xcd\x08\x1e\x78\x76\x00\x00\x00\
+\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
+\x00\x00\x00\x60\
+\x89\
+\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
+\x00\x00\x7f\x00\x00\x00\x7f\x01\x03\x00\x00\x00\xfc\x73\x8f\x50\
+\x00\x00\x00\x03\x50\x4c\x54\x45\xff\xff\xff\xa7\xc4\x1b\xc8\x00\
+\x00\x00\x18\x49\x44\x41\x54\x78\x5e\xed\xc0\x31\x01\x00\x00\x00\
+\xc2\x20\xfb\xa7\x36\xc5\x3e\x58\x0b\x00\xe0\x08\x6f\x00\x01\x01\
+\x3e\xc3\x31\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
+\x00\x00\x00\x8d\
+\x89\
+\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
+\x00\x00\x1b\x00\x00\x00\x1b\x01\x03\x00\x00\x00\xb7\x1a\x66\x16\
+\x00\x00\x00\x06\x50\x4c\x54\x45\xff\xff\xff\x00\x00\x00\x55\xc2\
+\xd3\x7e\x00\x00\x00\x01\x74\x52\x4e\x53\x00\x40\xe6\xd8\x66\x00\
+\x00\x00\x35\x49\x44\x41\x54\x08\x99\x63\x60\xc0\x02\xd8\x1b\x80\
+\x04\xff\x01\x4c\x82\xfd\x01\x48\xba\x00\x44\x58\x80\x08\x19\x10\
+\xc1\x07\xd6\x02\x22\x98\x41\xfa\x18\x41\x0a\x19\xc0\x0a\xeb\x40\
+\x84\x3d\x16\x42\x0e\xdd\x46\x00\xb5\x00\x09\x40\xa3\x31\xbf\x5e\
+\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
+\x00\x00\x03\x3f\
+\x89\
+\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
+\x00\x00\x16\x00\x00\x00\x16\x08\x06\x00\x00\x00\xc4\xb4\x6c\x3b\
+\x00\x00\x00\x04\x67\x41\x4d\x41\x00\x00\xd6\xd8\xd4\x4f\x58\x32\
+\x00\x00\x00\x19\x74\x45\x58\x74\x53\x6f\x66\x74\x77\x61\x72\x65\
+\x00\x41\x64\x6f\x62\x65\x20\x49\x6d\x61\x67\x65\x52\x65\x61\x64\
+\x79\x71\xc9\x65\x3c\x00\x00\x02\xd1\x49\x44\x41\x54\x38\xcb\x7d\
+\x95\x4b\x68\x53\x41\x14\x86\x93\xe6\xd1\x08\x49\x28\x04\x5b\x17\
+\x05\x35\xee\x5a\xbb\x50\xb2\xb1\xda\x85\x8f\x5d\xb5\xbe\x16\x76\
+\x29\x2d\x42\x49\x57\xed\xce\x8d\x0a\xa2\xe0\xba\xab\x14\x84\x8a\
+\x2b\x51\x44\x45\x17\x0a\x8a\x55\xf1\x01\x1a\xb0\x56\x23\xad\xa2\
+\xc5\xb6\x92\x6a\x95\xbe\x34\xcd\xc3\xe3\x7f\x6e\xce\x64\xe6\x4e\
+\xd2\x16\x3e\xe6\xde\xce\x3f\x7f\x66\xce\x63\xae\x87\x88\x3c\x26\
+\xf8\xf3\x01\x7e\xa8\x07\x01\x50\x67\x6b\x0c\x6d\x9d\xa1\x0d\xf2\
+\xda\xca\x9c\x21\xf2\x8a\x11\x51\x7f\x7f\x5e\x16\x6c\x04\x61\xe0\
+\xaf\x61\xea\x77\xb4\x03\x03\x4a\xdb\x08\x22\xe2\xe1\x35\x85\x8e\
+\xe9\xbf\xa1\x21\x2a\x75\x77\x53\xa1\x2c\x66\x36\x83\x28\xcf\x57\
+\x69\x53\x29\x2a\xf5\xf4\x50\x29\x18\x54\xda\x38\x68\x70\xe6\xcd\
+\xe3\x97\x60\x5a\xec\xed\xa5\x42\x4b\x0b\xe5\xf0\xfe\x5d\x9b\x6f\
+\x55\xe6\xca\xb4\x34\x3c\x4c\xc5\x64\x92\x0a\x6d\x6d\xb4\x8c\xf7\
+\x71\xad\x8d\x3b\x5a\x31\xa6\xd5\x64\x32\xbf\x8a\x9d\xe6\x5a\x5b\
+\xe9\x2f\xde\xff\x80\x05\x30\xed\x5e\x10\xe3\xe7\x02\x4c\xa1\xaf\
+\x68\x27\xc1\x65\x70\xd6\xe3\x29\x8a\xb6\x49\x19\x87\xf8\x1f\x4b\
+\x60\x51\x46\xc5\x2f\xb7\x39\xe5\x61\x9a\x83\xe9\x0a\x4c\x97\xc4\
+\x74\x04\x1c\xd7\x9a\x76\xd0\xac\x8c\x83\x12\x7c\xfa\x0c\xe6\xc4\
+\xf0\xb7\x8c\xcc\x62\x22\x41\x2b\x83\x83\xb4\xdc\xd7\x47\x0b\x30\
+\xe5\xb9\x8c\xec\xf4\x98\x36\xed\x02\x3b\x1c\x2f\x23\xc6\x61\x49\
+\x14\x7d\x04\x33\x20\x2b\x3f\xc2\xfc\x88\xc5\x68\x1e\xf1\xfc\x19\
+\x8f\x3b\xef\xef\x40\x0a\x1c\xd1\xa6\xd8\xb4\x67\x97\x78\x84\xed\
+\xf2\x89\x4a\xa2\x1c\x73\x0e\xc1\x6c\x0d\xde\x8b\xe9\x61\xb7\x69\
+\xbb\x91\x64\xbf\x5d\x9b\x01\x99\xe0\x44\xd1\x0c\x8e\xff\x0d\x3b\
+\x9d\xc2\xb3\xc9\x4b\x70\x41\x9b\x9e\x00\x1d\x95\x6a\x90\xb2\xac\
+\xd5\x4d\x01\x95\xfd\x2c\x62\xfa\x15\xc7\xff\x84\x67\x13\x0e\xc3\
+\x4d\x6d\xdc\x09\xb6\xcb\x9a\x40\x55\xe7\xd9\xc5\x3f\x8f\xec\x4f\
+\x23\x51\x13\x88\x69\x46\x12\xa5\xf8\x00\xd2\xe0\x89\x36\x5f\xdf\
+\x58\x99\xce\xc1\x74\x0a\x25\x95\x41\xf6\xc7\xc4\xe0\x01\x78\x05\
+\xde\x82\x31\x19\xdf\x80\x51\xbb\x31\xec\x50\xa8\xde\xcf\xc2\xf4\
+\x0b\x4c\xc7\x61\xca\xbb\xba\x0f\x2e\x81\xd3\xe0\x2a\x78\x2e\x86\
+\x69\x19\xf9\xc7\x1e\x55\x77\xa8\xdf\xd5\xd2\xb3\xe8\xfd\x49\x98\
+\xa6\x61\xca\x09\xba\x0b\xce\x83\x03\x46\x83\xdc\x03\xcf\xc0\x0b\
+\x49\x22\x8f\x8f\xc1\x35\xf7\xdd\x12\xae\xb4\xf4\x04\x6e\xa9\x0c\
+\x2e\x94\xd7\x48\x16\x2f\xbc\x0d\xce\x81\xfd\xee\xec\x77\x2a\x73\
+\x36\x7b\x2a\x3f\x72\x4b\x36\x90\xd4\x2d\xdd\xe8\x6a\xe9\xd1\x50\
+\x88\x1e\x62\xbc\x0e\xce\x80\x7d\xee\x3a\xed\x90\x24\x31\x74\x47\
+\xc2\x74\x03\x5c\x04\x87\xb4\x76\xb7\xdd\xd2\x4d\x3c\x71\x45\xe2\
+\xb9\xb7\xba\xf8\xd5\x25\x14\x53\x75\x3e\x52\xbe\x78\xe8\xa0\xd6\
+\x1e\x05\x09\xf3\x12\xf2\x49\xd0\xb7\xb1\xe0\xa4\x3e\x52\x97\xb4\
+\xa9\x7d\x6d\x56\x3a\xf4\x94\xd6\xb2\xe9\x1e\xf1\x88\xda\xa5\xd6\
+\xa0\xcc\xe5\x48\x3b\xc1\x96\x35\x2e\xfa\xa8\xcc\x29\x6d\x42\xd6\
+\xea\x8b\xde\xfa\x34\xf1\x82\x4d\x4e\x9c\xca\xe1\x89\xac\xf3\x69\
+\x8a\x88\xa6\x59\xd6\xa8\x53\x79\x6b\x75\x9e\x4f\x3e\x8e\x1b\xec\
+\x0f\xe4\x1a\xda\xa0\x68\xeb\x4d\xed\x7f\x3d\xa9\x97\x96\x02\xf1\
+\x2b\x1c\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
+\x00\x00\x00\x91\
+\x89\
+\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
+\x00\x00\x2a\x00\x00\x00\x2b\x01\x03\x00\x00\x00\x34\x51\x88\xbd\
+\x00\x00\x00\x06\x50\x4c\x54\x45\xff\xff\xff\x00\x00\x00\x55\xc2\
+\xd3\x7e\x00\x00\x00\x01\x74\x52\x4e\x53\x00\x40\xe6\xd8\x66\x00\
+\x00\x00\x39\x49\x44\x41\x54\x18\x57\x63\x60\xc0\x05\x14\x20\x54\
+\x01\x84\xfa\x01\x26\x19\xff\x80\x29\x66\x08\x8f\xfd\x03\x98\xe2\
+\x7f\x00\xa6\xe4\x0f\x80\x29\xfb\x06\x30\x55\x0f\xd1\xf6\x6f\x50\
+\x6b\xe3\x87\x68\x63\x83\x50\x2c\x0c\x84\x00\x00\x91\xca\x1c\x09\
+\xf6\x23\x2a\xfe\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
+\
+\x00\x00\x00\x70\
+\x89\
+\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
+\x00\x00\x7f\x00\x00\x00\x7f\x01\x03\x00\x00\x00\xfc\x73\x8f\x50\
+\x00\x00\x00\x06\x50\x4c\x54\x45\x00\xff\xff\xff\xff\xff\xb1\xb8\
+\x5e\xa0\x00\x00\x00\x25\x49\x44\x41\x54\x78\x5e\xed\xcc\x21\x12\
+\x00\x00\x04\x00\x41\xff\x7f\x34\x82\x11\x64\x75\x2f\x6e\xb8\xd8\
+\x6a\xca\x0b\x00\x00\xf0\x9d\x01\x00\x40\x03\x94\x98\xeb\xc0\x19\
+\x38\xa1\x84\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
+\x00\x00\x00\xad\
+\x89\
+\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
+\x00\x00\x0f\x00\x00\x00\x18\x02\x03\x00\x00\x00\x58\x6b\x4f\xfa\
+\x00\x00\x00\x09\x50\x4c\x54\x45\xff\xff\xff\xff\xff\xff\x00\x00\
+\x00\x8e\xf4\xc3\xec\x00\x00\x00\x01\x74\x52\x4e\x53\x00\x40\xe6\
+\xd8\x66\x00\x00\x00\x52\x49\x44\x41\x54\x08\x1d\x05\xc1\xb1\x0d\
+\xc2\x30\x14\x05\xc0\x8b\x04\x1b\xd0\x3c\x4f\xe3\x8a\x9a\xe6\x47\
+\x72\x1f\x17\x61\x1a\x57\x9e\x80\x41\xb9\xf3\x82\x40\xeb\xc8\x42\
+\x2e\x64\x20\x67\x27\xb5\x48\x5d\xa4\x06\xa9\xb3\x4b\xd5\x92\xfa\
+\xfe\x64\xcc\x8f\xdc\x17\xd9\x83\xf6\x1e\xe4\xd8\xdd\xe3\xd8\x1d\
+\x73\x61\x2e\xb4\x8e\x27\xf0\x07\xd5\x18\x11\x1b\xed\x4d\x23\xf4\
+\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
+\x00\x00\x02\xf1\
+\x89\
+\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
+\x00\x00\x2a\x00\x00\x00\x2c\x08\x03\x00\x00\x00\x24\x44\xda\x74\
+\x00\x00\x01\x32\x50\x4c\x54\x45\xff\xff\xff\xfe\xfe\xfe\x01\x01\
+\x01\xbe\xbe\xbe\xfd\xfd\xfd\x00\x00\x00\x64\x64\x64\xd2\xd2\xd2\
+\x7c\x7c\x7c\xfb\xfb\xfb\xe7\xe7\xe7\x84\x84\x84\xd7\xd7\xd7\xe0\
+\xe0\xe0\xe1\xe1\xe1\x0c\x0c\x0c\x28\x28\x28\xf5\xf5\xf5\xb3\xb3\
+\xb3\x02\x02\x02\x95\x95\x95\x2e\x2e\x2e\x11\x11\x11\x6b\x6b\x6b\
+\x03\x03\x03\x72\x72\x72\x49\x49\x49\xfc\xfc\xfc\x13\x13\x13\x04\
+\x04\x04\x9f\x9f\x9f\xc4\xc4\xc4\xa9\xa9\xa9\x05\x05\x05\x57\x57\
+\x57\x17\x17\x17\xf6\xf6\xf6\x16\x16\x16\xa6\xa6\xa6\xa0\xa0\xa0\
+\x60\x60\x60\x24\x24\x24\x3e\x3e\x3e\x23\x23\x23\xb7\xb7\xb7\x4d\
+\x4d\x4d\xf8\xf8\xf8\xc0\xc0\xc0\x30\x30\x30\x09\x09\x09\xec\xec\
+\xec\x20\x20\x20\x8a\x8a\x8a\xda\xda\xda\xf1\xf1\xf1\x0d\x0d\x0d\
+\x99\x99\x99\x19\x19\x19\xf9\xf9\xf9\xcd\xcd\xcd\xf4\xf4\xf4\x39\
+\x39\x39\x2d\x2d\x2d\x3b\x3b\x3b\x12\x12\x12\x43\x43\x43\xc2\xc2\
+\xc2\xa4\xa4\xa4\xdc\xdc\xdc\x55\x55\x55\x68\x68\x68\x5a\x5a\x5a\
+\x50\x50\x50\xf0\xf0\xf0\x06\x06\x06\x1f\x1f\x1f\x74\x74\x74\xb1\
+\xb1\xb1\x5d\x5d\x5d\x21\x21\x21\x36\x36\x36\x08\x08\x08\xea\xea\
+\xea\xdb\xdb\xdb\x81\x81\x81\x9c\x9c\x9c\x8b\x8b\x8b\x75\x75\x75\
+\xf2\xf2\xf2\x25\x25\x25\xce\xce\xce\x48\x48\x48\x63\x63\x63\xba\
+\xba\xba\x53\x53\x53\x38\x38\x38\xf7\xf7\xf7\xe4\xe4\xe4\xa2\xa2\
+\xa2\x4a\x4a\x4a\xf3\xf3\xf3\x5f\x5f\x5f\xf1\x69\x00\xec\x00\x00\
+\x00\x01\x74\x52\x4e\x53\x00\x40\xe6\xd8\x66\x00\x00\x01\x6d\x49\
+\x44\x41\x54\x78\x5e\xd5\x92\xc5\x76\xc3\x30\x10\x45\x3d\x92\x1d\
+\x66\xe6\x94\x99\x99\x99\x99\x99\xe1\xff\x7f\xa1\x9e\x89\x93\x53\
+\xa9\xb2\x4e\x76\x6d\xdf\xf2\xea\xfa\xbd\x59\xd8\xf8\x2b\xf1\x30\
+\xeb\x5b\x58\xcc\x04\x37\x13\x3c\x96\x10\xc6\xb5\xad\x42\xda\x9a\
+\x6f\x6d\x0d\x40\xb3\xad\x2c\xe8\xda\x1a\xe2\xb5\xf4\xd4\xdd\x71\
+\xbf\xa1\x0d\x14\x7b\x1b\xed\x09\xd0\xbb\x03\x0d\x93\x0d\xea\x4d\
+\xd8\x41\x2b\x33\x82\x6e\x2e\xac\x35\xc3\x39\xbb\x95\xe5\xbb\xa9\
+\xdb\xa7\xbd\xc0\x47\xce\x64\x47\x27\x7e\x31\x3b\xa7\x71\x87\xda\
+\xd1\x2c\x00\xf8\xe8\xda\x16\xcd\x7e\x17\x19\x09\xc3\x88\x94\xd1\
+\x5d\xd5\xb4\xf6\xe1\x6e\xbf\xdf\x36\x36\xe9\x92\x90\xab\xeb\xa5\
+\xf7\x09\xdb\x84\x61\xea\xcf\xbb\xee\x67\xd1\x1c\x1d\x43\x60\xa6\
+\xd1\x5d\x89\xbb\x98\x53\xd3\xb8\xef\xa9\x81\x19\x5a\xa8\x80\xda\
+\x4d\xd1\xeb\x3c\xbd\xc2\x42\x06\xbf\x5b\x54\x9b\xe6\x12\x9a\xcb\
+\x4e\x0f\x1c\xd0\xb5\x77\xca\xfd\x35\x7a\x5b\xaf\x83\x8d\x24\xba\
+\x5b\xca\x0b\xb6\x71\x5f\x0a\x8b\xee\x2a\xdc\xc0\x9e\xa5\x08\x4b\
+\x29\xf6\x83\x96\x32\x69\xf3\x87\xe9\xdf\x67\x6a\xb7\x0a\xb2\x7b\
+\xe8\x62\xb2\x23\xd9\x84\x02\xf2\x63\x2e\xe4\x04\xd9\xe9\x99\x64\
+\x9e\x53\xc3\x85\x48\x2f\x69\xe9\x0a\x44\x7a\x6d\x53\x96\x8c\x08\
+\x14\x6e\xa2\x48\x6f\x8b\x02\x8d\x97\xb0\xf5\x1e\xa4\xad\x07\xda\
+\x7a\x14\x58\x45\xfd\xd7\x57\xe9\x82\x27\xa1\xe1\x19\x97\x4a\x2f\
+\x72\xab\x19\x43\x5e\x7e\xad\x73\xce\xf9\x1b\x7d\xfd\xce\x31\x1f\
+\xe0\x60\xcc\x27\xad\x65\x6d\x4c\xcc\x12\xc2\xbc\x4e\x23\x13\x39\
+\x41\x89\x79\xc1\x50\x35\xfc\x7e\xeb\xff\xca\x17\x55\x71\x20\xbb\
+\xd7\xbb\x2e\xca\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
+\
+\x00\x00\x01\x1a\
+\x89\
+\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
+\x00\x00\x2a\x00\x00\x00\x2b\x02\x03\x00\x00\x00\x73\xf1\xf2\x6d\
+\x00\x00\x00\x0c\x50\x4c\x54\x45\xff\xff\xff\x80\x80\x80\x00\x00\
+\x00\xff\xff\xff\x45\x4a\x4b\x38\x00\x00\x00\x01\x74\x52\x4e\x53\
+\x00\x40\xe6\xd8\x66\x00\x00\x00\xbc\x49\x44\x41\x54\x78\x5e\x4d\
+\xcb\xbd\x89\x04\x31\x0c\x86\x61\xa1\xd0\x55\x38\x1c\xdc\x8f\x26\
+\xd8\x12\xa6\x0a\xb3\xe1\xe6\x4e\x2e\x32\x07\x02\xdb\x07\x5b\xc0\
+\x96\xb4\x55\x9c\x47\x3f\x33\x56\xf4\x21\xde\x07\x42\xcd\xe0\x17\
+\x46\xbd\xf6\xb6\xec\x1a\xef\xa6\x41\x02\x34\xb2\x41\x80\x60\x24\
+\xcf\x9d\x9a\xee\x38\x8b\x7e\x78\x83\x4f\x7e\x64\xb3\x30\x68\x57\
+\x10\x32\x74\x22\x05\x98\x91\x89\x0c\xe4\x50\x88\x0c\xd4\x44\xe4\
+\x20\xce\xdc\xc1\x98\x89\x83\x33\x71\x20\x89\x02\xe4\x9d\x1d\x60\
+\xa1\x2e\x40\xff\xe9\x02\xfd\xf1\x2a\x0e\xd2\xfe\x7b\x81\x50\xda\
+\x02\x8e\xef\x02\x3e\x0b\x78\xb3\x6c\x01\x7f\x5d\x1a\x03\x66\x1d\
+\x34\x00\x03\x42\x15\xb0\xe4\x0a\x24\x37\x50\x24\x57\xc0\x92\x2b\
+\xe8\x92\x1b\x90\xdc\x80\xe4\x0a\x24\x37\xf0\x73\x6f\x1c\x70\x5f\
+\x5b\x76\x3c\xc7\x3f\xd6\x51\x68\x20\x52\x85\xdb\x5f\x00\x00\x00\
+\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
+\x00\x00\x01\x3e\
+\x89\
+\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
+\x00\x00\x16\x00\x00\x00\x16\x08\x06\x00\x00\x00\xc4\xb4\x6c\x3b\
+\x00\x00\x00\x06\x62\x4b\x47\x44\x00\xff\x00\xff\x00\xff\xa0\xbd\
+\xa7\x93\x00\x00\x00\xf3\x49\x44\x41\x54\x38\xcb\xed\x94\x41\x6e\
+\x83\x30\x10\x45\x9f\x25\xe0\x0c\xbd\x43\x2f\xd0\x13\xe5\xfa\x55\
+\x62\x9b\xd8\x33\x01\x77\x81\x0d\x24\x85\xaa\x31\xca\xaa\x1d\x89\
+\x8d\x0d\x4f\xef\x7b\x06\x37\x6d\xdb\x26\x0e\x94\xaa\x9a\xad\xf5\
+\x06\x40\x44\xaa\xa0\x5d\xd7\xed\xee\x35\xbc\xa8\xfe\xc1\x7f\x01\
+\x6c\x8c\xd9\xdb\x4a\x87\x8d\x53\xda\x60\x8c\x03\x0c\x01\xf4\x0a\
+\xd2\x43\x74\x98\xb7\xf7\x83\x47\x31\x2a\x68\x81\x7a\x10\x07\xd1\
+\x1d\x3c\xe3\x41\x26\xa0\xf6\x0b\x34\x38\x88\x97\x4a\x70\x1a\x61\
+\x88\x4b\x74\xf5\x93\x65\xb4\xd3\x23\x35\xc6\x69\x80\x5b\x00\x29\
+\xd1\x3d\xa8\x83\x60\x57\x60\x5f\x01\x96\x1c\x7d\xb6\x7c\x30\x95\
+\x6a\x70\xfe\x70\x06\xba\x15\xd4\xe5\x14\x76\x01\xff\x74\xfd\xdd\
+\x55\xb8\xe4\xce\xdb\x05\x5c\x26\x41\xfd\xb2\x06\x34\x7b\x17\xf5\
+\xe6\x8f\x10\xce\xdf\xa1\xc5\x34\xe6\x89\xa8\x6a\x5e\xf8\x9c\x46\
+\x6a\xb6\x74\x10\xb3\xa9\xac\x1a\xf8\x34\xf8\x7a\xce\xa6\x16\x62\
+\x0f\x6a\xef\x1b\x58\x52\x54\x81\xa5\x98\x6e\x4c\x45\xf4\x70\xeb\
+\x9f\x07\x9b\x8f\xd3\xaf\xdf\xfd\x02\xd6\xbd\xde\xdf\x70\xdb\x04\
+\x83\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\x08\
+\x06\x27\x5a\x67\
+\x00\x62\
+\x00\x6f\x00\x6c\x00\x64\x00\x2e\x00\x70\x00\x6e\x00\x67\
+\x00\x0a\
+\x02\xfc\x42\x47\
+\x00\x69\
+\x00\x74\x00\x61\x00\x6c\x00\x69\x00\x63\x00\x2e\x00\x70\x00\x6e\x00\x67\
+\x00\x0f\
+\x00\x49\xdb\xa7\
+\x00\x62\
+\x00\x61\x00\x63\x00\x6b\x00\x67\x00\x72\x00\x6f\x00\x75\x00\x6e\x00\x64\x00\x32\x00\x2e\x00\x70\x00\x6e\x00\x67\
+\x00\x10\
+\x0f\x9b\x88\x67\
+\x00\x62\
+\x00\x72\x00\x69\x00\x6e\x00\x67\x00\x74\x00\x6f\x00\x66\x00\x72\x00\x6f\x00\x6e\x00\x74\x00\x2e\x00\x70\x00\x6e\x00\x67\
+\x00\x0f\
+\x00\x4a\xdb\xa7\
+\x00\x62\
+\x00\x61\x00\x63\x00\x6b\x00\x67\x00\x72\x00\x6f\x00\x75\x00\x6e\x00\x64\x00\x33\x00\x2e\x00\x70\x00\x6e\x00\x67\
+\x00\x0d\
+\x08\xd5\xc4\xe7\
+\x00\x75\
+\x00\x6e\x00\x64\x00\x65\x00\x72\x00\x6c\x00\x69\x00\x6e\x00\x65\x00\x2e\x00\x70\x00\x6e\x00\x67\
+\x00\x0f\
+\x00\x4b\xdb\xa7\
+\x00\x62\
+\x00\x61\x00\x63\x00\x6b\x00\x67\x00\x72\x00\x6f\x00\x75\x00\x6e\x00\x64\x00\x34\x00\x2e\x00\x70\x00\x6e\x00\x67\
+\x00\x0f\
+\x03\x4a\x23\xe7\
+\x00\x6c\
+\x00\x69\x00\x6e\x00\x65\x00\x70\x00\x6f\x00\x69\x00\x6e\x00\x74\x00\x65\x00\x72\x00\x2e\x00\x70\x00\x6e\x00\x67\
+\x00\x0a\
+\x0c\xad\x0f\x07\
+\x00\x64\
+\x00\x65\x00\x6c\x00\x65\x00\x74\x00\x65\x00\x2e\x00\x70\x00\x6e\x00\x67\
+\x00\x0d\
+\x05\x6c\x22\xc7\
+\x00\x6c\
+\x00\x69\x00\x6e\x00\x65\x00\x63\x00\x6f\x00\x6c\x00\x6f\x00\x72\x00\x2e\x00\x70\x00\x6e\x00\x67\
+\x00\x0f\
+\x00\x50\xdb\xa7\
+\x00\x62\
+\x00\x61\x00\x63\x00\x6b\x00\x67\x00\x72\x00\x6f\x00\x75\x00\x6e\x00\x64\x00\x31\x00\x2e\x00\x70\x00\x6e\x00\x67\
+\x00\x0b\
+\x0a\x2b\x97\xe7\
+\x00\x70\
+\x00\x6f\x00\x69\x00\x6e\x00\x74\x00\x65\x00\x72\x00\x2e\x00\x70\x00\x6e\x00\x67\
+\x00\x0f\
+\x05\xaa\x0c\xc7\
+\x00\x74\
+\x00\x65\x00\x78\x00\x74\x00\x70\x00\x6f\x00\x69\x00\x6e\x00\x74\x00\x65\x00\x72\x00\x2e\x00\x70\x00\x6e\x00\x67\
+\x00\x0d\
+\x06\x43\xe3\x67\
+\x00\x66\
+\x00\x6c\x00\x6f\x00\x6f\x00\x64\x00\x66\x00\x69\x00\x6c\x00\x6c\x00\x2e\x00\x70\x00\x6e\x00\x67\
+\x00\x0e\
+\x0f\x0d\x22\x27\
+\x00\x73\
+\x00\x65\x00\x6e\x00\x64\x00\x74\x00\x6f\x00\x62\x00\x61\x00\x63\x00\x6b\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\x0f\x00\x00\x00\x02\
+\x00\x00\x00\x42\x00\x00\x00\x00\x00\x01\x00\x00\x02\x11\
+\x00\x00\x00\x8c\x00\x00\x00\x00\x00\x01\x00\x00\x03\xb0\
+\x00\x00\x00\xd0\x00\x00\x00\x00\x00\x01\x00\x00\x05\x26\
+\x00\x00\x01\x52\x00\x00\x00\x00\x00\x01\x00\x00\x09\xf3\
+\x00\x00\x00\x28\x00\x00\x00\x00\x00\x01\x00\x00\x01\x16\
+\x00\x00\x00\xf4\x00\x00\x00\x00\x00\x01\x00\x00\x05\x8a\
+\x00\x00\x01\x32\x00\x00\x00\x00\x00\x01\x00\x00\x09\x5e\
+\x00\x00\x01\x92\x00\x00\x00\x00\x00\x01\x00\x00\x0b\x18\
+\x00\x00\x00\x12\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
+\x00\x00\x01\xb6\x00\x00\x00\x00\x00\x01\x00\x00\x0e\x0d\
+\x00\x00\x00\xb0\x00\x00\x00\x00\x00\x01\x00\x00\x04\x28\
+\x00\x00\x01\x76\x00\x00\x00\x00\x00\x01\x00\x00\x0a\x67\
+\x00\x00\x01\x18\x00\x00\x00\x00\x00\x01\x00\x00\x06\x1b\
+\x00\x00\x01\xd6\x00\x00\x00\x00\x00\x01\x00\x00\x0f\x2b\
+\x00\x00\x00\x66\x00\x00\x00\x00\x00\x01\x00\x00\x02\x87\
+"
+
+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/widgets/graphicsview/diagramscene/images/background1.png b/examples/widgets/graphicsview/diagramscene/images/background1.png
new file mode 100644
index 000000000..0f93c6bf4
--- /dev/null
+++ b/examples/widgets/graphicsview/diagramscene/images/background1.png
Binary files differ
diff --git a/examples/widgets/graphicsview/diagramscene/images/background2.png b/examples/widgets/graphicsview/diagramscene/images/background2.png
new file mode 100644
index 000000000..1e293db67
--- /dev/null
+++ b/examples/widgets/graphicsview/diagramscene/images/background2.png
Binary files differ
diff --git a/examples/widgets/graphicsview/diagramscene/images/background3.png b/examples/widgets/graphicsview/diagramscene/images/background3.png
new file mode 100644
index 000000000..3db4f8ea5
--- /dev/null
+++ b/examples/widgets/graphicsview/diagramscene/images/background3.png
Binary files differ
diff --git a/examples/widgets/graphicsview/diagramscene/images/background4.png b/examples/widgets/graphicsview/diagramscene/images/background4.png
new file mode 100644
index 000000000..9c1f3bfd7
--- /dev/null
+++ b/examples/widgets/graphicsview/diagramscene/images/background4.png
Binary files differ
diff --git a/examples/widgets/graphicsview/diagramscene/images/bold.png b/examples/widgets/graphicsview/diagramscene/images/bold.png
new file mode 100644
index 000000000..986e65e25
--- /dev/null
+++ b/examples/widgets/graphicsview/diagramscene/images/bold.png
Binary files differ
diff --git a/examples/widgets/graphicsview/diagramscene/images/bringtofront.png b/examples/widgets/graphicsview/diagramscene/images/bringtofront.png
new file mode 100644
index 000000000..bda27578a
--- /dev/null
+++ b/examples/widgets/graphicsview/diagramscene/images/bringtofront.png
Binary files differ
diff --git a/examples/widgets/graphicsview/diagramscene/images/delete.png b/examples/widgets/graphicsview/diagramscene/images/delete.png
new file mode 100644
index 000000000..df2a147d2
--- /dev/null
+++ b/examples/widgets/graphicsview/diagramscene/images/delete.png
Binary files differ
diff --git a/examples/widgets/graphicsview/diagramscene/images/floodfill.png b/examples/widgets/graphicsview/diagramscene/images/floodfill.png
new file mode 100644
index 000000000..54c0dae23
--- /dev/null
+++ b/examples/widgets/graphicsview/diagramscene/images/floodfill.png
Binary files differ
diff --git a/examples/widgets/graphicsview/diagramscene/images/italic.png b/examples/widgets/graphicsview/diagramscene/images/italic.png
new file mode 100644
index 000000000..9a438b57a
--- /dev/null
+++ b/examples/widgets/graphicsview/diagramscene/images/italic.png
Binary files differ
diff --git a/examples/widgets/graphicsview/diagramscene/images/linecolor.png b/examples/widgets/graphicsview/diagramscene/images/linecolor.png
new file mode 100644
index 000000000..98a821f27
--- /dev/null
+++ b/examples/widgets/graphicsview/diagramscene/images/linecolor.png
Binary files differ
diff --git a/examples/widgets/graphicsview/diagramscene/images/linepointer.png b/examples/widgets/graphicsview/diagramscene/images/linepointer.png
new file mode 100644
index 000000000..66933d43b
--- /dev/null
+++ b/examples/widgets/graphicsview/diagramscene/images/linepointer.png
Binary files differ
diff --git a/examples/widgets/graphicsview/diagramscene/images/pointer.png b/examples/widgets/graphicsview/diagramscene/images/pointer.png
new file mode 100644
index 000000000..0b0b0aa69
--- /dev/null
+++ b/examples/widgets/graphicsview/diagramscene/images/pointer.png
Binary files differ
diff --git a/examples/widgets/graphicsview/diagramscene/images/sendtoback.png b/examples/widgets/graphicsview/diagramscene/images/sendtoback.png
new file mode 100644
index 000000000..5aa3b0a24
--- /dev/null
+++ b/examples/widgets/graphicsview/diagramscene/images/sendtoback.png
Binary files differ
diff --git a/examples/widgets/graphicsview/diagramscene/images/textpointer.png b/examples/widgets/graphicsview/diagramscene/images/textpointer.png
new file mode 100644
index 000000000..b25832cad
--- /dev/null
+++ b/examples/widgets/graphicsview/diagramscene/images/textpointer.png
Binary files differ
diff --git a/examples/widgets/graphicsview/diagramscene/images/underline.png b/examples/widgets/graphicsview/diagramscene/images/underline.png
new file mode 100644
index 000000000..9b8209f52
--- /dev/null
+++ b/examples/widgets/graphicsview/diagramscene/images/underline.png
Binary files differ