From ae83398d82173e7d416e72952760180414ea3fb6 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 23 Jul 2019 13:26:54 +0200 Subject: Kill all QPictureIO Has been deprecated for a long time. Change-Id: I4579e3c2997c649f0fa66b9cdbcf8e7fc6d661a5 Reviewed-by: Lars Knoll --- src/gui/doc/snippets/picture/picture.cpp | 79 -------------------------------- 1 file changed, 79 deletions(-) (limited to 'src/gui/doc/snippets') diff --git a/src/gui/doc/snippets/picture/picture.cpp b/src/gui/doc/snippets/picture/picture.cpp index 863476fdbf..807c263b19 100644 --- a/src/gui/doc/snippets/picture/picture.cpp +++ b/src/gui/doc/snippets/picture/picture.cpp @@ -80,82 +80,3 @@ int main() painter.end(); // painting done //! [1] } - - QPicture myPicture; - { - // FORMATS -//! [2] - const QStringList list = QPicture::inputFormatList(); - for (const QString &string : list) - myProcessing(string); -//! [2] - } - - { - // OUTPUT -//! [3] - const QStringList list = QPicture::outputFormatList(); - for (const QString &string : list) - myProcessing(string); -//! [3] - } - - { - // PIC READ -//! [4] - QPictureIO iio; - QPixmap pixmap; - iio.setFileName("vegeburger.pic"); - if (iio.read()) { // OK - QPicture picture = iio.picture(); - QPainter painter(&pixmap); - painter.drawPicture(0, 0, picture); - } -//! [4] - } - - { - QPixmap pixmap; - // PIC WRITE -//! [5] - QPictureIO iio; - QPicture picture; - QPainter painter(&picture); - painter.drawPixmap(0, 0, pixmap); - iio.setPicture(picture); - iio.setFileName("vegeburger.pic"); - iio.setFormat("PIC"); - if (iio.write()) - return true; // returned true if written successfully -//! [5] - } - -} - -// SVG READ -//! [6] -void readSVG(QPictureIO *picture) -{ - // read the picture using the picture->ioDevice() -} -//! [6] - -// SVG WRITE -//! [7] -void writeSVG(QPictureIO *picture) -{ - // write the picture using the picture->ioDevice() -} -//! [7] - -// USE SVG -void foo() { - -//! [8] - // add the SVG picture handler - // ... -//! [8] - QPictureIO::defineIOHandler("SVG", 0, 0, readSVG, writeSVG); - // ... - -} -- cgit v1.2.3