diff options
Diffstat (limited to 'src/gui/doc/snippets/picture/picture.cpp')
-rw-r--r-- | src/gui/doc/snippets/picture/picture.cpp | 79 |
1 files changed, 0 insertions, 79 deletions
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); - // ... - -} |