Qt Jambi Home

com.trolltech.qt.gui
Class QAccessibleWidget

java.lang.Object
  extended by com.trolltech.qt.QSignalEmitter
      extended by com.trolltech.qt.QtJambiObject
          extended by com.trolltech.qt.gui.QAccessible
              extended by com.trolltech.qt.gui.QAccessibleInterface
                  extended by com.trolltech.qt.gui.QAccessibleObject
                      extended by com.trolltech.qt.gui.QAccessibleWidget
All Implemented Interfaces:
QtJambiInterface

public class QAccessibleWidget
extends QAccessibleObject

The QAccessibleWidget class implements the QAccessibleInterface for QWidgets.

This class is convenient to use as a base class for custom implementations of QAccessibleInterfaces that provide information about widget objects.

The class provides functions to retrieve the parentObject (the widget's parent widget), and the associated widget. Controlling signals can be added with addControllingSignal, and setters are provided for various aspects of the interface implementation, for example setValue, setDescription, setAccelerator, and setHelp.

See Also:
QAccessible, QAccessibleObject

Nested Class Summary
 
Nested classes/interfaces inherited from class com.trolltech.qt.gui.QAccessibleInterface
QAccessibleInterface.Target
 
Nested classes/interfaces inherited from class com.trolltech.qt.gui.QAccessible
QAccessible.Action, QAccessible.Event, QAccessible.Method, QAccessible.Relation, QAccessible.RelationFlag, QAccessible.Role, QAccessible.State, QAccessible.StateFlag, QAccessible.Text
 
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
QAccessibleWidget(QWidget o)
          Equivalent to QAccessibleWidget(o, Client, QString()).
QAccessibleWidget(QWidget o, QAccessible.Role r)
          Equivalent to QAccessibleWidget(o, r, QString()).
QAccessibleWidget(QWidget o, QAccessible.Role r, java.lang.String name)
          Creates a QAccessibleWidget object for widget o.
 
Method Summary
 java.lang.String actionText(int action, QAccessible.Text t, int child)
          Returns the text property t of the action action supported by the object, or of the object's child if child is not 0.
protected  void addControllingSignal(java.lang.String signal)
          Registers signal as a controlling signal.
 int childAt(int x, int y)
          This function is reimplemented for internal reasons.
 int childCount()
          This function is reimplemented for internal reasons.
 boolean doAction(int action, int child, java.util.List<java.lang.Object> params)
          Asks the object, or the object's child if child is not 0, to execute action using the parameters, params.
static QAccessibleWidget fromNativePointer(QNativePointer nativePointer)
          This function returns the QAccessibleWidget instance pointed to by nativePointer
 int indexOfChild(QAccessibleInterface child)
          This function is reimplemented for internal reasons.
 QAccessibleInterface.Target navigate(QAccessible.RelationFlag rel, int entry)
          Equivalent to navigate(rel, entry, ).
protected  QObject parentObject()
          Returns the associated widget's parent object, which is either the parent widget, or qApp for top-level widgets.
 QRect rect(int child)
          This function is reimplemented for internal reasons.
 QAccessible.Relation relationTo(int child, QAccessibleInterface other, int otherChild)
          This function is reimplemented for internal reasons.
 QAccessible.Role role(int child)
          This function is reimplemented for internal reasons.
protected  void setAccelerator(java.lang.String accel)
          Sets the accelerator of this interface implementation to accel.
protected  void setDescription(java.lang.String desc)
          Sets the description of this interface implementation to desc.
protected  void setHelp(java.lang.String help)
          Sets the help of this interface implementation to help.
protected  void setValue(java.lang.String value)
          Sets the value of this interface implementation to value.
 QAccessible.State state(int child)
          This function is reimplemented for internal reasons.
 java.lang.String text(QAccessible.Text t, int child)
          Returns the value of the text property t of the object, or of the object's child if child is not 0.
 int userActionCount(int child)
          This function is reimplemented for internal reasons.
protected  QWidget widget()
          Returns the associated widget.
 
Methods inherited from class com.trolltech.qt.gui.QAccessibleObject
isValid, object, setText
 
Methods inherited from class com.trolltech.qt.gui.QAccessibleInterface
invokeMethod, supportedMethods
 
Methods inherited from class com.trolltech.qt.gui.QAccessible
isActive, queryAccessibleInterface, setRootObject, updateAccessibility
 
Methods inherited from class com.trolltech.qt.QtJambiObject
dispose, disposed, finalize, reassignNativeResources, tr, tr, tr
 
Methods inherited from class com.trolltech.qt.QSignalEmitter
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.trolltech.qt.QtJambiInterface
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership
 

Constructor Detail

QAccessibleWidget

public QAccessibleWidget(QWidget o,
                         QAccessible.Role r)

Equivalent to QAccessibleWidget(o, r, QString()).


QAccessibleWidget

public QAccessibleWidget(QWidget o)

Equivalent to QAccessibleWidget(o, Client, QString()).


QAccessibleWidget

public QAccessibleWidget(QWidget o,
                         QAccessible.Role r,
                         java.lang.String name)

Creates a QAccessibleWidget object for widget o. r and name are optional parameters that set the object's role and name properties.

Method Detail

addControllingSignal

protected final void addControllingSignal(java.lang.String signal)

Registers signal as a controlling signal.

An object is a Controller to any other object connected to a controlling signal.


parentObject

protected final QObject parentObject()

Returns the associated widget's parent object, which is either the parent widget, or qApp for top-level widgets.


setAccelerator

protected final void setAccelerator(java.lang.String accel)

Sets the accelerator of this interface implementation to accel.

The default implementation of text returns the set value for the Accelerator text.

Note that the object wrapped by this interface is not modified.


setDescription

protected final void setDescription(java.lang.String desc)

Sets the description of this interface implementation to desc.

The default implementation of text returns the set value for the Description text.

Note that the object wrapped by this interface is not modified.


setHelp

protected final void setHelp(java.lang.String help)

Sets the help of this interface implementation to help.

The default implementation of text returns the set value for the Help text.

Note that the object wrapped by this interface is not modified.


setValue

protected final void setValue(java.lang.String value)

Sets the value of this interface implementation to value.

The default implementation of text returns the set value for the Value text.

Note that the object wrapped by this interface is not modified.


widget

protected final QWidget widget()

Returns the associated widget.


actionText

public java.lang.String actionText(int action,
                                   QAccessible.Text t,
                                   int child)

Returns the text property t of the action action supported by the object, or of the object's child if child is not 0.

Overrides:
actionText in class QAccessibleObject
See Also:
text, userActionCount

childAt

public int childAt(int x,
                   int y)

This function is reimplemented for internal reasons.

Specified by:
childAt in class QAccessibleInterface
See Also:
rect

childCount

public int childCount()

This function is reimplemented for internal reasons.

Specified by:
childCount in class QAccessibleInterface
See Also:
indexOfChild

doAction

public boolean doAction(int action,
                        int child,
                        java.util.List<java.lang.Object> params)

Asks the object, or the object's child if child is not 0, to execute action using the parameters, params. Returns true if the action could be executed; otherwise returns false.

action can be a predefined or a custom action.

Overrides:
doAction in class QAccessibleObject
See Also:
userActionCount, actionText

indexOfChild

public int indexOfChild(QAccessibleInterface child)

This function is reimplemented for internal reasons.

Specified by:
indexOfChild in class QAccessibleInterface
See Also:
childCount

navigate

public QAccessibleInterface.Target navigate(QAccessible.RelationFlag rel,
                                            int entry)

Equivalent to navigate(rel, entry, ).

Specified by:
navigate in class QAccessibleInterface

rect

public QRect rect(int child)

This function is reimplemented for internal reasons.

Overrides:
rect in class QAccessibleObject
See Also:
childAt

relationTo

public QAccessible.Relation relationTo(int child,
                                       QAccessibleInterface other,
                                       int otherChild)

This function is reimplemented for internal reasons.

Specified by:
relationTo in class QAccessibleInterface
See Also:
indexOfChild, navigate

role

public QAccessible.Role role(int child)

This function is reimplemented for internal reasons.

Specified by:
role in class QAccessibleInterface
See Also:
text, state

state

public QAccessible.State state(int child)

This function is reimplemented for internal reasons.

Specified by:
state in class QAccessibleInterface
See Also:
text, role

text

public java.lang.String text(QAccessible.Text t,
                             int child)

Returns the value of the text property t of the object, or of the object's child if child is not 0.

The Name is a string used by clients to identify, find, or announce an accessible object for the user. All objects must have a name that is unique within their container. The name can be used differently by clients, so the name should both give a short description of the object and be unique.

An accessible object's Description provides textual information about an object's visual appearance. The description is primarily used to provide greater context for vision-impaired users, but is also used for context searching or other applications. Not all objects have a description. An "OK" button would not need a description, but a tool button that shows a picture of a smiley would.

The Value of an accessible object represents visual information contained by the object, e.g. the text in a line edit. Usually, the value can be modified by the user. Not all objects have a value, e.g. static text labels don't, and some objects have a state that already is the value, e.g. toggle buttons.

The Help text provides information about the function and usage of an accessible object. Not all objects provide this information.

The Accelerator is a keyboard shortcut that activates the object's default action. A keyboard shortcut is the underlined character in the text of a menu, menu item or widget, and is either the character itself, or a combination of this character and a modifier key like Alt, Ctrl or Shift. Command controls like tool buttons also have shortcut keys and usually display them in their tooltip.

All objects provide a string for Name.

Specified by:
text in class QAccessibleInterface
See Also:
role, state

userActionCount

public int userActionCount(int child)

This function is reimplemented for internal reasons.

Overrides:
userActionCount in class QAccessibleObject
See Also:
actionText, doAction

fromNativePointer

public static QAccessibleWidget fromNativePointer(QNativePointer nativePointer)
This function returns the QAccessibleWidget instance pointed to by nativePointer

Parameters:
nativePointer - the QNativePointer of which object should be returned.

Qt Jambi Home