• Skip to content
  • Skip to link menu
KDE 4.6 API Reference
  • KDE API Reference
  • kdelibs
  • KDE Home
  • Contact Us
 

KImgIO

pic_io_handler.cpp

Go to the documentation of this file.
00001 
00021 #include "pic_io_handler.h"
00022 #include "pic_rw.h"
00023 
00024 bool SoftimagePICHandler::canRead() const {
00025     if (!SoftimagePICHandler::canRead(device())) {
00026         return false;
00027     }
00028     setFormat("pic");
00029     return true;
00030 }
00031 
00032 bool SoftimagePICHandler::read(QImage *image) {
00033     pic_read(device(), image);
00034     return true;
00035 }
00036 
00037 bool SoftimagePICHandler::write(const QImage &image) {
00038     pic_write(device(), &image);
00039     return true;
00040 }
00041 
00042 bool SoftimagePICHandler::canRead(QIODevice *device) {
00043     PICHeader hdr;
00044     if (picReadHeader(device, &hdr, true)) {
00045         if (strncmp(hdr.id, "PICT", 4) == 0) {
00046             return true;
00047         }
00048     }
00049     return false;
00050 }
00051 
00052 QVariant SoftimagePICHandler::option(ImageOption option) const {
00053     if (option == Size) {
00054         PICHeader hdr;
00055         if (picReadHeader(device(), &hdr, true)) {
00056             return QSize(hdr.width, hdr.height);
00057         } else {
00058             return QSize(-1, -1);
00059         }
00060     }
00061     return QVariant();
00062 }
00063 
00064 bool SoftimagePICHandler::supportsOption(ImageOption option) const {
00065     return ( option == Size);
00066 }
00067 
00068 QByteArray SoftimagePICHandler::name() const {
00069     return "pic";
00070 }
00071 

KImgIO

Skip menu "KImgIO"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.3
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal