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

KImgIO

  • sources
  • kde-4.14
  • kdelibs
  • kimgio
pic_io_plugin.cpp
Go to the documentation of this file.
1 
21 #include "pic_io_plugin.h"
22 #include "pic_io_handler.h"
23 
24 QImageIOPlugin::Capabilities SoftimagePICPlugin::capabilities(QIODevice *device, const QByteArray &format) const {
25  if (format == "pic") {
26  return Capabilities(CanRead | CanWrite);
27  }
28  if (!(format.isEmpty() && device->isOpen())) {
29  return 0;
30  }
31 
32  Capabilities cap;
33  if (device->isReadable() && SoftimagePICHandler::canRead(device)) {
34  cap |= CanRead;
35  }
36  if (device->isWritable()) {
37  cap |= CanWrite;
38  }
39  return cap;
40 }
41 
42 QStringList SoftimagePICPlugin::keys() const {
43  return QStringList() << "pic";
44 }
45 
46 QImageIOHandler * SoftimagePICPlugin::create(QIODevice *device, const QByteArray &format) const {
47  QImageIOHandler * handler = new SoftimagePICHandler();
48  handler->setDevice(device);
49  handler->setFormat(format);
50  return handler;
51 }
52 
53 Q_EXPORT_STATIC_PLUGIN(SoftimagePICPlugin)
54 Q_EXPORT_PLUGIN2(softimagePICPlugin, SoftimagePICPlugin)
55 
QIODevice
SoftimagePICPlugin
PIC_RW - Qt PIC Support Copyright (C) 2007 Ruben Lopez r.lopez@bren.es
Definition: pic_io_plugin.h:26
SoftimagePICHandler::canRead
virtual bool canRead() const
PIC_RW - Qt PIC Support Copyright (C) 2007 Ruben Lopez r.lopez@bren.es
Definition: pic_io_handler.cpp:24
QImageIOPlugin::Capabilities
typedef Capabilities
QIODevice::isWritable
bool isWritable() const
SoftimagePICPlugin::capabilities
virtual Capabilities capabilities(QIODevice *device, const QByteArray &format) const
PIC_RW - Qt PIC Support Copyright (C) 2007 Ruben Lopez r.lopez@bren.es
Definition: pic_io_plugin.cpp:24
QByteArray
QByteArray::isEmpty
bool isEmpty() const
QIODevice::isReadable
bool isReadable() const
pic_io_handler.h
QImageIOHandler::setDevice
void setDevice(QIODevice *device)
QIODevice::isOpen
bool isOpen() const
SoftimagePICPlugin::keys
virtual QStringList keys() const
Definition: pic_io_plugin.cpp:42
QStringList
QImageIOHandler
pic_io_plugin.h
SoftimagePICPlugin::create
virtual QImageIOHandler * create(QIODevice *device, const QByteArray &format=QByteArray()) const
Definition: pic_io_plugin.cpp:46
QImageIOHandler::setFormat
void setFormat(const QByteArray &format)
SoftimagePICHandler
PIC_RW - Qt PIC Support Copyright (C) 2007 Ruben Lopez r.lopez@bren.es
Definition: pic_io_handler.h:30
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:49 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KImgIO

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • 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

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal