Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.trolltech.qt.gui
Class QTextCodecPlugin

    java.lang.Object
      com.trolltech.qt.QSignalEmitter
          com.trolltech.qt.QtJambiObject
              com.trolltech.qt.core.QObject
                  com.trolltech.qt.gui.QTextCodecPlugin

All Implemented Interfaces:
  QAbstractFactoryInterface, QAbstractTextCodecFactoryInterface, QtJambiInterface

    public abstract class QTextCodecPlugin

extends QObject
implements QAbstractTextCodecFactoryInterface, QAbstractFactoryInterface

The `QTextCodecPlugin` class provides an abstract base for custom `QTextCodec` plugins. The text codec plugin is a simple plugin interface that makes it easy to create custom text codecs that can be loaded dynamically into applications.

Writing a text codec plugin is achieved by subclassing this base class, reimplementing the pure virtual functions `names()`, `aliases()`, `createForName()`, `mibEnums()` and `createForMib()`, and exporting the class with the Q_EXPORT_PLUGIN2() macro. See How to Create Qt Plugins for details.

See the IANA character-sets encoding file for more information on mime names and mib enums.

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
`` | `QTextCodecPlugin()` Constructs a text codec plugin with the given `parent`.
`` | `QTextCodecPlugin(QObject parent)` Constructs a text codec plugin with the given `parent`.
`protected` | `QTextCodecPlugin(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_QAbstractTextCodecFactory(long ptr)` This method is internal to Qt Jambi.
`abstract java.util.List<QByteArray>` | `aliases()` Returns the list of aliases supported by this plugin.
`QTextCodec` | `create(java.lang.String name)` Deprecated.
`abstract QTextCodec` | `createForMib(int mib)` Creates a `QTextCodec` object for the mib enum `mib`.
`abstract QTextCodec` | `createForName(QByteArray name)` Creates a `QTextCodec` object for the codec called `name`.
`static QTextCodecPlugin` | `fromNativePointer(QNativePointer nativePointer)` This method returns the QTextCodecPlugin instance pointed to by `nativePointer`.
`java.util.List<java.lang.String>` | `keys()` Deprecated.
`abstract java.util.List<java.lang.Integer>` | `mibEnums()` Returns the list of mib enums supported by this plugin.
`abstract java.util.List<QByteArray>` | `names()` Returns the list of MIME names supported by this plugin.

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

### QTextCodecPlugin

    public QTextCodecPlugin()

  Constructs a text codec plugin with the given `parent`. This is invoked automatically by the Q_EXPORT_PLUGIN2() macro.

### QTextCodecPlugin

    public QTextCodecPlugin(QObject parent)

  Constructs a text codec plugin with the given `parent`. This is invoked automatically by the Q_EXPORT_PLUGIN2() macro.

### QTextCodecPlugin

    protected QTextCodecPlugin(QtJambiObject.QPrivateConstructor p)

  This method is internal to Qt Jambi.

Method Detail

### create

    @Deprecated
    public final QTextCodec create(java.lang.String name)

  Deprecated.

  Creates a `QTextCodec` object for the codec called `name`. The `name` must come from the list of encodings returned by `names()`. Encoding names are case sensitive.

  Example:
  The following code example is written in c++.

              QList<QByteArray> MyCodecPlugin::names() const
              {
                  return QList<QByteArray> << "IBM01140" << "hp15-tw";
              }

              QTextCodec *MyCodecPlugin::createForName(const QByteArray &name)
              {
                  if (name == "IBM01140") {
                      return new Ibm01140Codec;
                  } else if (name == "hp15-tw") {
                      return new Hp15TwCodec;
                  }
                  return 0;
              }

See also:
  `names()`.

  Specified by:
    `create` in interface `QAbstractTextCodecFactoryInterface`

### keys

    @Deprecated
    public final java.util.List<java.lang.String> keys()

  Deprecated.

  Returns the list of keys this abstract factory supports. Each key represents an object the factory can produce.

  Specified by:
    `keys` in interface `QAbstractFactoryInterface`
  Specified by:
    `keys` in interface `QAbstractTextCodecFactoryInterface`

### aliases

    public abstract java.util.List<QByteArray> aliases()

  Returns the list of aliases supported by this plugin.

### createForMib

    public abstract QTextCodec createForMib(int mib)

  Creates a `QTextCodec` object for the mib enum `mib`.

  See the IANA character-sets encoding file for more information.

See also:
  `mibEnums()`.

### createForName

    public abstract QTextCodec createForName(QByteArray name)

  Creates a `QTextCodec` object for the codec called `name`. The `name` must come from the list of encodings returned by `names()`. Encoding names are case sensitive.

  Example:
  The following code example is written in c++.

              QList<QByteArray> MyCodecPlugin::names() const
              {
                  return QList<QByteArray> << "IBM01140" << "hp15-tw";
              }

              QTextCodec *MyCodecPlugin::createForName(const QByteArray &name)
              {
                  if (name == "IBM01140") {
                      return new Ibm01140Codec;
                  } else if (name == "hp15-tw") {
                      return new Hp15TwCodec;
                  }
                  return 0;
              }

See also:
  `names()`.

### mibEnums

    public abstract java.util.List<java.lang.Integer> mibEnums()

  Returns the list of mib enums supported by this plugin.

See also:
  `createForMib()`.

### names

    public abstract java.util.List<QByteArray> names()

  Returns the list of MIME names supported by this plugin.

  If a codec has several names, the extra names are returned by `aliases()`.

See also:
  `createForName()`, and `aliases()`.

### fromNativePointer

    public static QTextCodecPlugin fromNativePointer(QNativePointer nativePointer)

  This method returns the QTextCodecPlugin instance pointed to by `nativePointer`.

### __qt_cast_to_QAbstractTextCodecFactory

    public long __qt_cast_to_QAbstractTextCodecFactory(long ptr)

  This method is internal to Qt Jambi.

  Specified by:
    `__qt_cast_to_QAbstractTextCodecFactory` in interface `QAbstractTextCodecFactoryInterface`

### __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`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

./../com/trolltech/qt/gui/QAbstractTextCodecFactoryInterface.html#__qt_cast_to_QAbstractTextCodecFactory(long)">__qt_cast_to_QAbstractTextCodecFactory in interface ``