com.trolltech.qt.gui
Class QInputContextPlugin

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.QInputContextPlugin
All Implemented Interfaces:
QAbstractFactoryInterface, QAbstractInputContextFactoryInterface, QtJambiInterface

public abstract class QInputContextPlugin
extends QObject
implements QAbstractInputContextFactoryInterface, QAbstractFactoryInterface

The QInputContextPlugin class provides an abstract base for custom QInputContext plugins. The input context plugin is a simple plugin interface that makes it easy to create custom input contexts that can be loaded dynamically into applications.

To create an input context plugin you subclass this base class, reimplement the pure virtual functions keys(), create(), languages(), displayName(), and description(), and export the class with the Q_EXPORT_PLUGIN2() macro.Copyright (C) 2003-2004 immodule for Qt Project. All rights reserved.This file is written to contribute to $TROLLTECH$ under their own license. You may use this file under your Qt license. Following description is copied from their original file headers. Contact immodule-qt@freedesktop.org if any conditions of this licensing are not clear to you.

See also:
QInputContext, and 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
  QInputContextPlugin()
          Constructs a input context plugin with the given parent.
  QInputContextPlugin(QObject parent)
          Constructs a input context plugin with the given parent.
protected QInputContextPlugin(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_QAbstractInputContextFactory(long ptr)
          This method is internal to Qt Jambi.
abstract  QInputContext create(java.lang.String key)
          Creates and returns a QInputContext object for the input context key key.
abstract  java.lang.String description(java.lang.String key)
          Returns an internationalized brief description of the QInputContext object specified by key.
abstract  java.lang.String displayName(java.lang.String key)
          Returns a user friendly internationalized name of the QInputContext object specified by key.
static QInputContextPlugin fromNativePointer(QNativePointer nativePointer)
          This method returns the QInputContextPlugin instance pointed to by nativePointer.
abstract  java.util.List<java.lang.String> keys()
          Returns the list of QInputContext keys this plugin provides.
abstract  java.util.List<java.lang.String> languages(java.lang.String key)
          Returns the languages supported by the QInputContext object specified by key.
 
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

QInputContextPlugin

public QInputContextPlugin()
Constructs a input context plugin with the given parent. This is invoked automatically by the Q_EXPORT_PLUGIN2() macro.


QInputContextPlugin

public QInputContextPlugin(QObject parent)
Constructs a input context plugin with the given parent. This is invoked automatically by the Q_EXPORT_PLUGIN2() macro.


QInputContextPlugin

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

Method Detail

create

public abstract QInputContext create(java.lang.String key)
Creates and returns a QInputContext object for the input context key key. The input context key is usually the class name of the required input method.

See also:
keys().

Specified by:
create in interface QAbstractInputContextFactoryInterface

description

public abstract java.lang.String description(java.lang.String key)
Returns an internationalized brief description of the QInputContext object specified by key. You can, for example, use this description in a user interface.

See also:
keys(), and displayName().

Specified by:
description in interface QAbstractInputContextFactoryInterface

displayName

public abstract java.lang.String displayName(java.lang.String key)
Returns a user friendly internationalized name of the QInputContext object specified by key. You can, for example, use this name in a menu.

See also:
keys(), and QInputContext::identifierName().

Specified by:
displayName in interface QAbstractInputContextFactoryInterface

keys

public abstract java.util.List<java.lang.String> keys()
Returns the list of QInputContext keys this plugin provides.

These keys are usually the class names of the custom input context that are implemented in the plugin. The names are used, for example, to identify and specify input methods for the input method switching mechanism. They have to be consistent with QInputContext::identifierName(), and may only contain ASCII characters.

See also:
create(), displayName(), and QInputContext::identifierName().

Specified by:
keys in interface QAbstractFactoryInterface
Specified by:
keys in interface QAbstractInputContextFactoryInterface

languages

public abstract java.util.List<java.lang.String> languages(java.lang.String key)
Returns the languages supported by the QInputContext object specified by key.

The languages are expressed as language code (e.g. "zh_CN", "zh_TW", "zh_HK", "ja", "ko", ...). An input context that supports multiple languages can return all supported languages as QStringList. The name has to be consistent with QInputContext::language().

This information may be used to optimize user interface.

See also:
keys(), QInputContext::language(), and QLocale.

Specified by:
languages in interface QAbstractInputContextFactoryInterface

fromNativePointer

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


__qt_cast_to_QAbstractInputContextFactory

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

Specified by:
__qt_cast_to_QAbstractInputContextFactory in interface QAbstractInputContextFactoryInterface

__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


rolltech/qt/gui/QAbstractInputContextFactoryInterface.html#__qt_cast_to_QAbstractInputContextFactory(long)">__qt_cast_to_QAbstractInputContextFactory in interface QAbstractInputContextFactoryInterface

__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