|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.trolltech.qt.QSignalEmitter
com.trolltech.qt.QtJambiObject
com.trolltech.qt.core.QObject
com.trolltech.qt.gui.QTextCodecPlugin
public abstract class QTextCodecPlugin
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)
|
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 |
|---|
public QTextCodecPlugin()
public QTextCodecPlugin(QObject parent)
protected QTextCodecPlugin(QtJambiObject.QPrivateConstructor p)
| Method Detail |
|---|
@Deprecated public final QTextCodec create(java.lang.String name)
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;
}
names().
create in interface QAbstractTextCodecFactoryInterface@Deprecated public final java.util.List<java.lang.String> keys()
keys in interface QAbstractFactoryInterfacekeys in interface QAbstractTextCodecFactoryInterfacepublic abstract java.util.List<QByteArray> aliases()
public abstract QTextCodec createForMib(int mib)
QTextCodec object for the mib enum mib. See the IANA character-sets encoding file for more information.
mibEnums().
public abstract QTextCodec createForName(QByteArray name)
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;
}
names().
public abstract java.util.List<java.lang.Integer> mibEnums()
createForMib().
public abstract java.util.List<QByteArray> names()
If a codec has several names, the extra names are returned by aliases().
createForName(), and aliases().
public static QTextCodecPlugin fromNativePointer(QNativePointer nativePointer)
public long __qt_cast_to_QAbstractTextCodecFactory(long ptr)
__qt_cast_to_QAbstractTextCodecFactory in interface QAbstractTextCodecFactoryInterfacepublic long __qt_cast_to_QAbstractFactory(long ptr)
__qt_cast_to_QAbstractFactory in interface QAbstractFactoryInterface
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||