diff options
Diffstat (limited to 'sources/pyside2/doc/codesnippets/examples')
14 files changed, 94 insertions, 33 deletions
diff --git a/sources/pyside2/doc/codesnippets/examples/dialogs/extension/finddialog.cpp b/sources/pyside2/doc/codesnippets/examples/dialogs/extension/finddialog.cpp index de99bb3ec..18612e4ba 100644 --- a/sources/pyside2/doc/codesnippets/examples/dialogs/extension/finddialog.cpp +++ b/sources/pyside2/doc/codesnippets/examples/dialogs/extension/finddialog.cpp @@ -21,13 +21,13 @@ ## "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 +## * 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 +## * 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 +## * 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. ## diff --git a/sources/pyside2/doc/codesnippets/examples/declarative/cppextensions/imageprovider/imageprovider-example.qml b/sources/pyside2/doc/codesnippets/examples/imageprovider/imageprovider-example.qml index ad51f2e7a..fc6063e40 100644 --- a/sources/pyside2/doc/codesnippets/examples/declarative/cppextensions/imageprovider/imageprovider-example.qml +++ b/sources/pyside2/doc/codesnippets/examples/imageprovider/imageprovider-example.qml @@ -48,7 +48,7 @@ ** ****************************************************************************/ -import QtQuick 1.0 +import QtQuick 2.0 import "ImageProviderCore" // import the plugin that registers the color image provider //![0] diff --git a/sources/pyside2/doc/codesnippets/examples/declarative/cppextensions/imageprovider/imageprovider.cpp b/sources/pyside2/doc/codesnippets/examples/imageprovider/imageprovider.cpp index ffbe8f564..4d1aeb74f 100644 --- a/sources/pyside2/doc/codesnippets/examples/declarative/cppextensions/imageprovider/imageprovider.cpp +++ b/sources/pyside2/doc/codesnippets/examples/imageprovider/imageprovider.cpp @@ -49,9 +49,9 @@ ****************************************************************************/ //![0] -class ColorImageProvider (QDeclarativeImageProvider): +class ColorImageProvider (QQuickImageProvider): def __init__(self): - QDeclarativeImageProvider.__init__(self, QDeclarativeImageProvider.Pixmap) + QQuickImageProvider.__init__(self, QDeclarativeImageProvider.Pixmap) def requestPixmap(id, size, requestedSize): width = 100 diff --git a/sources/pyside2/doc/codesnippets/examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp b/sources/pyside2/doc/codesnippets/examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp index 0ec3b071f..4732b7773 100644 --- a/sources/pyside2/doc/codesnippets/examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp +++ b/sources/pyside2/doc/codesnippets/examples/itemviews/customsortfiltermodel/mysortfilterproxymodel.cpp @@ -21,13 +21,13 @@ ## "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 +## * 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 +## * 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 +## * 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. ## diff --git a/sources/pyside2/doc/codesnippets/examples/mainwindows/application/mainwindow.cpp b/sources/pyside2/doc/codesnippets/examples/mainwindows/application/mainwindow.cpp index 82c5f891b..d22a39151 100644 --- a/sources/pyside2/doc/codesnippets/examples/mainwindows/application/mainwindow.cpp +++ b/sources/pyside2/doc/codesnippets/examples/mainwindows/application/mainwindow.cpp @@ -21,13 +21,13 @@ ## "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 +## * 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 +## * 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 +## * 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. ## diff --git a/sources/pyside2/doc/codesnippets/examples/mainwindows/dockwidgets/mainwindow.cpp b/sources/pyside2/doc/codesnippets/examples/mainwindows/dockwidgets/mainwindow.cpp index fa125e01f..c6fd2894b 100644 --- a/sources/pyside2/doc/codesnippets/examples/mainwindows/dockwidgets/mainwindow.cpp +++ b/sources/pyside2/doc/codesnippets/examples/mainwindows/dockwidgets/mainwindow.cpp @@ -21,13 +21,13 @@ ## "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 +## * 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 +## * 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 +## * 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. ## diff --git a/sources/pyside2/doc/codesnippets/examples/mainwindows/mainwindow.cpp b/sources/pyside2/doc/codesnippets/examples/mainwindows/mainwindow.cpp index 8dc283ebf..33cb540b4 100644 --- a/sources/pyside2/doc/codesnippets/examples/mainwindows/mainwindow.cpp +++ b/sources/pyside2/doc/codesnippets/examples/mainwindows/mainwindow.cpp @@ -21,13 +21,13 @@ ## "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 +## * 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 +## * 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 +## * 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. ## diff --git a/sources/pyside2/doc/codesnippets/examples/mainwindows/mdi/mainwindow.cpp b/sources/pyside2/doc/codesnippets/examples/mainwindows/mdi/mainwindow.cpp index 7032ba7da..ed23e83eb 100644 --- a/sources/pyside2/doc/codesnippets/examples/mainwindows/mdi/mainwindow.cpp +++ b/sources/pyside2/doc/codesnippets/examples/mainwindows/mdi/mainwindow.cpp @@ -21,13 +21,13 @@ ## "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 +## * 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 +## * 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 +## * 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. ## diff --git a/sources/pyside2/doc/codesnippets/examples/mainwindows/menus/mainwindow.cpp b/sources/pyside2/doc/codesnippets/examples/mainwindows/menus/mainwindow.cpp index 8dc283ebf..33cb540b4 100644 --- a/sources/pyside2/doc/codesnippets/examples/mainwindows/menus/mainwindow.cpp +++ b/sources/pyside2/doc/codesnippets/examples/mainwindows/menus/mainwindow.cpp @@ -21,13 +21,13 @@ ## "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 +## * 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 +## * 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 +## * 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. ## diff --git a/sources/pyside2/doc/codesnippets/examples/quick/plugins/plugins.qml b/sources/pyside2/doc/codesnippets/examples/quick/plugins/plugins.qml new file mode 100644 index 000000000..df2dcbd94 --- /dev/null +++ b/sources/pyside2/doc/codesnippets/examples/quick/plugins/plugins.qml @@ -0,0 +1,61 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the documentation of PySide2. +** +** $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$ +** +****************************************************************************/ + +//! [0] +renderer = QSvgRenderer(QLatin1String("SvgCardDeck.svg")) +black = QGraphicsSvgItem() +red = QGraphicsSvgItem() + +black.setSharedRenderer(renderer) +black.setElementId(QLatin1String("black_joker")) + +red.setSharedRenderer(renderer) +red.setElementId(QLatin1String("red_joker")) +//! [0] diff --git a/sources/pyside2/doc/codesnippets/examples/sql/relationaltablemodel/relationaltablemodel.cpp b/sources/pyside2/doc/codesnippets/examples/relationaltablemodel/relationaltablemodel.cpp index b34c652d0..8df1d73b2 100644 --- a/sources/pyside2/doc/codesnippets/examples/sql/relationaltablemodel/relationaltablemodel.cpp +++ b/sources/pyside2/doc/codesnippets/examples/relationaltablemodel/relationaltablemodel.cpp @@ -21,13 +21,13 @@ ## "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 +## * 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 +## * 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 +## * 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. ## diff --git a/sources/pyside2/doc/codesnippets/examples/painting/svggenerator/window.cpp b/sources/pyside2/doc/codesnippets/examples/svggenerator/window.cpp index 60c415949..60c415949 100644 --- a/sources/pyside2/doc/codesnippets/examples/painting/svggenerator/window.cpp +++ b/sources/pyside2/doc/codesnippets/examples/svggenerator/window.cpp diff --git a/sources/pyside2/doc/codesnippets/examples/widgets/icons/iconsizespinbox.cpp b/sources/pyside2/doc/codesnippets/examples/widgets/icons/iconsizespinbox.cpp index 22e5fbc37..f0d1f2ac6 100644 --- a/sources/pyside2/doc/codesnippets/examples/widgets/icons/iconsizespinbox.cpp +++ b/sources/pyside2/doc/codesnippets/examples/widgets/icons/iconsizespinbox.cpp @@ -21,13 +21,13 @@ ## "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 +## * 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 +## * 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 +## * 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. ## diff --git a/sources/pyside2/doc/codesnippets/examples/widgets/spinboxes/window.cpp b/sources/pyside2/doc/codesnippets/examples/widgets/spinboxes/window.cpp index 54a9523ee..bf07fb73c 100644 --- a/sources/pyside2/doc/codesnippets/examples/widgets/spinboxes/window.cpp +++ b/sources/pyside2/doc/codesnippets/examples/widgets/spinboxes/window.cpp @@ -21,13 +21,13 @@ ## "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 +## * 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 +## * 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 +## * 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. ## |