com.trolltech.qt.gui
Class QPictureFormatPlugin

java.lang.Object
  extended by com.trolltech.qt.QSignalEmitter
      extended by com.trolltech.qt.QtJambiObject
          extended by com.trolltech.qt.core.QObject
              extended by com.trolltech.qt.gui.QPictureFormatPlugin
All Implemented Interfaces:
QAbstractFactoryInterface, QAbstractPictureFormatInterface, QtJambiInterface

public abstract class QPictureFormatPlugin
extends QObject
implements QAbstractPictureFormatInterface, QAbstractFactoryInterface

The QPictureFormatPlugin class provides an abstract base for custom picture format plugins. The picture format plugin is a simple plugin interface that makes it easy to create custom picture formats that can be used transparently by applications.

Writing an picture format plugin is achieved by subclassing this base class, reimplementing the pure virtual functions keys(), loadPicture(), savePicture(), and installIOHandler(), and exporting the class with the Q_EXPORT_PLUGIN2() macro.

See also:
How to Create Qt Plugins.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.trolltech.qt.QtJambiObject
QtJambiObject.QPrivateConstructor
 
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter
QSignalEmitter.AbstractSignal, QSignalEmitter.Signal0, QSignalEmitter.Signal1<A>, QSignalEmitter.Signal2<A,B>, QSignalEmitter.Signal3<A,B,C>, QSignalEmitter.Signal4<A,B,C,D>, QSignalEmitter.Signal5<A,B,C,D,E>, QSignalEmitter.Signal6<A,B,C,D,E,F>, QSignalEmitter.Signal7<A,B,C,D,E,F,G>, QSignalEmitter.Signal8<A,B,C,D,E,F,G,H>, QSignalEmitter.Signal9<A,B,C,D,E,F,G,H,I>
 
Constructor Summary
  QPictureFormatPlugin()
          Constructs an picture format plugin with the given parent.
  QPictureFormatPlugin(QObject parent)
          Constructs an picture format plugin with the given parent.
protected QPictureFormatPlugin(QtJambiObject.QPrivateConstructor p)
          This method is internal to Qt Jambi.
 
Method Summary
 long __qt_cast_to_QAbstractFactory(long ptr)
          This method is internal to Qt Jambi.
 long __qt_cast_to_QAbstractPictureFormat(long ptr)
          This method is internal to Qt Jambi.
static QPictureFormatPlugin fromNativePointer(QNativePointer nativePointer)
          This method returns the QPictureFormatPlugin instance pointed to by nativePointer.
abstract  boolean installIOHandler(java.lang.String format)
          Installs a QPictureIO picture I/O handler for the picture format format.
abstract  java.util.List<java.lang.String> keys()
          Returns the list of picture formats this plugin supports.
 boolean loadPicture(java.lang.String format, java.lang.String filename, QPicture pic)
          Loads the picture stored in the file called fileName, with the given format, into *picture.
 boolean savePicture(java.lang.String format, java.lang.String filename, QPicture pic)
          Saves the given picture into the file called fileName, using the specified format.
 
Methods inherited from class com.trolltech.qt.core.QObject
blockSignals, childEvent, children, connectSlotsByName, customEvent, disposeLater, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, event, eventFilter, findChild, findChild, findChild, findChildren, findChildren, findChildren, findChildren, indexOfProperty, installEventFilter, isWidgetType, killTimer, moveToThread, objectName, parent, properties, property, removeEventFilter, setObjectName, setParent, setProperty, signalsBlocked, startTimer, thread, timerEvent, toString, userProperty
 
Methods inherited from class com.trolltech.qt.QtJambiObject
disableGarbageCollection, dispose, disposed, equals, finalize, nativeId, nativePointer, reassignNativeResources, reenableGarbageCollection, setJavaOwnership, tr, tr, tr
 
Methods inherited from class com.trolltech.qt.QSignalEmitter
__qt_signalInitialization, disconnect, disconnect, signalSender
 
Methods inherited from class java.lang.Object
clone, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.trolltech.qt.QtJambiInterface
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership
 

Constructor Detail

QPictureFormatPlugin

public QPictureFormatPlugin()
Constructs an picture format plugin with the given parent. This is invoked automatically by the Q_EXPORT_PLUGIN2() macro.


QPictureFormatPlugin

public QPictureFormatPlugin(QObject parent)
Constructs an picture format plugin with the given parent. This is invoked automatically by the Q_EXPORT_PLUGIN2() macro.


QPictureFormatPlugin

protected QPictureFormatPlugin(QtJambiObject.QPrivateConstructor p)
This method is internal to Qt Jambi.

Method Detail

installIOHandler

public abstract boolean installIOHandler(java.lang.String format)
Installs a QPictureIO picture I/O handler for the picture format format.

See also:
keys().

Specified by:
installIOHandler in interface QAbstractPictureFormatInterface

keys

public abstract java.util.List<java.lang.String> keys()
Returns the list of picture formats this plugin supports.

See also:
installIOHandler().

Specified by:
keys in interface QAbstractFactoryInterface
Specified by:
keys in interface QAbstractPictureFormatInterface

loadPicture

public boolean loadPicture(java.lang.String format,
                           java.lang.String filename,
                           QPicture pic)
Loads the picture stored in the file called fileName, with the given format, into *picture. Returns true on success; otherwise returns false.

See also:
savePicture().

Specified by:
loadPicture in interface QAbstractPictureFormatInterface

savePicture

public boolean savePicture(java.lang.String format,
                           java.lang.String filename,
                           QPicture pic)
Saves the given picture into the file called fileName, using the specified format. Returns true on success; otherwise returns false.

See also:
loadPicture().

Specified by:
savePicture in interface QAbstractPictureFormatInterface

fromNativePointer

public static QPictureFormatPlugin fromNativePointer(QNativePointer nativePointer)
This method returns the QPictureFormatPlugin instance pointed to by nativePointer.


__qt_cast_to_QAbstractPictureFormat

public long __qt_cast_to_QAbstractPictureFormat(long ptr)
This method is internal to Qt Jambi.

Specified by:
__qt_cast_to_QAbstractPictureFormat in interface QAbstractPictureFormatInterface

__qt_cast_to_QAbstractFactory

public long __qt_cast_to_QAbstractFactory(long ptr)
This method is internal to Qt Jambi.

Specified by:
__qt_cast_to_QAbstractFactory in interface QAbstractFactoryInterface


y:
__qt_cast_to_QAbstractPictureFormat in interface QAbstractPictureFormatInterface

__qt_cast_to_QAbstractFactory

public long __qt_cast_to_QAbstractFactory(long ptr)
This method is internal to Qt Jambi.

Specified by:
__qt_cast_to_QAbstractFactory in interface QAbstractFactoryInterface