QAccessibleTextInterface Class
The QAccessibleTextInterface class implements support for text handling. More...
Header: | #include <QAccessibleTextInterface> |
qmake: | QT += gui |
Public Functions
virtual | ~QAccessibleTextInterface() |
virtual void | addSelection(int startOffset, int endOffset) = 0 |
virtual QString | attributes(int offset, int *startOffset, int *endOffset) const = 0 |
virtual int | characterCount() const = 0 |
virtual QRect | characterRect(int offset) const = 0 |
virtual int | cursorPosition() const = 0 |
virtual int | offsetAtPoint(const QPoint &point) const = 0 |
virtual void | removeSelection(int selectionIndex) = 0 |
virtual void | scrollToSubstring(int startIndex, int endIndex) = 0 |
virtual void | selection(int selectionIndex, int *startOffset, int *endOffset) const = 0 |
virtual int | selectionCount() const = 0 |
virtual void | setCursorPosition(int position) = 0 |
virtual void | setSelection(int selectionIndex, int startOffset, int endOffset) = 0 |
virtual QString | text(int startOffset, int endOffset) const = 0 |
virtual QString | textAfterOffset(int offset, QAccessible::TextBoundaryType boundaryType, int *startOffset, int *endOffset) const |
virtual QString | textAtOffset(int offset, QAccessible::TextBoundaryType boundaryType, int *startOffset, int *endOffset) const |
virtual QString | textBeforeOffset(int offset, QAccessible::TextBoundaryType boundaryType, int *startOffset, int *endOffset) const |
Detailed Description
The QAccessibleTextInterface class implements support for text handling.
This interface corresponds to the IAccessibleText interface. It should be implemented for widgets that display more text than a plain label. Labels should be represented by only QAccessibleInterface and return their text as name (QAccessibleInterface::text() with QAccessible::Name as type). The QAccessibleTextInterface is typically for text that a screen reader might want to read line by line, and for widgets that support text selection and input. This interface is, for example, implemented for QLineEdit.
Member Type Documentation
Property Documentation
Member Function Documentation
[virtual]
QAccessibleTextInterface::~QAccessibleTextInterface()
Destroys the QAccessibleTextInterface.
[pure virtual]
void QAccessibleTextInterface::addSelection(int startOffset, int endOffset)
[pure virtual]
QString QAccessibleTextInterface::attributes(int offset, int *startOffset, int *endOffset) const
[pure virtual]
int QAccessibleTextInterface::characterCount() const
[pure virtual]
QRect QAccessibleTextInterface::characterRect(int offset) const
[pure virtual]
int QAccessibleTextInterface::cursorPosition() const
See also setCursorPosition().
[pure virtual]
int QAccessibleTextInterface::offsetAtPoint(const QPoint &point) const
[pure virtual]
void QAccessibleTextInterface::removeSelection(int selectionIndex)
[pure virtual]
void QAccessibleTextInterface::scrollToSubstring(int startIndex, int endIndex)
[pure virtual]
void QAccessibleTextInterface::selection(int selectionIndex, int *startOffset, int *endOffset) const
See also setSelection().
[pure virtual]
int QAccessibleTextInterface::selectionCount() const
[pure virtual]
void QAccessibleTextInterface::setCursorPosition(int position)
See also cursorPosition().
[pure virtual]
void QAccessibleTextInterface::setSelection(int selectionIndex, int startOffset, int endOffset)
See also selection().
[pure virtual]
QString QAccessibleTextInterface::text(int startOffset, int endOffset) const
[virtual]
QString QAccessibleTextInterface::textAfterOffset(int offset, QAccessible::TextBoundaryType boundaryType, int *startOffset, int *endOffset) const
Returns the text item of type boundaryType that is right after offset offset and sets startOffset and endOffset values to the start and end positions of that item; returns an empty string if there is no such an item. Sets startOffset and endOffset values to -1 on error.
This default implementation is provided for small text edits. A word processor or text editor should provide their own efficient implementations. This function makes no distinction between paragraphs and lines.
Note: this function can not take the cursor position into account. By convention an offset of -2 means that this function should use the cursor position as offset. Thus an offset of -2 must be converted to the cursor position before calling this function. An offset of -1 is used for the text length and custom implementations of this function have to return the result as if the length was passed in as offset.
[virtual]
QString QAccessibleTextInterface::textAtOffset(int offset, QAccessible::TextBoundaryType boundaryType, int *startOffset, int *endOffset) const
Returns the text item of type boundaryType at offset offset and sets startOffset and endOffset values to the start and end positions of that item; returns an empty string if there is no such an item. Sets startOffset and endOffset values to -1 on error.
This default implementation is provided for small text edits. A word processor or text editor should provide their own efficient implementations. This function makes no distinction between paragraphs and lines.
Note: this function can not take the cursor position into account. By convention an offset of -2 means that this function should use the cursor position as offset. Thus an offset of -2 must be converted to the cursor position before calling this function. An offset of -1 is used for the text length and custom implementations of this function have to return the result as if the length was passed in as offset.
[virtual]
QString QAccessibleTextInterface::textBeforeOffset(int offset, QAccessible::TextBoundaryType boundaryType, int *startOffset, int *endOffset) const
Returns the text item of type boundaryType that is close to offset offset and sets startOffset and endOffset values to the start and end positions of that item; returns an empty string if there is no such an item. Sets startOffset and endOffset values to -1 on error.
This default implementation is provided for small text edits. A word processor or text editor should provide their own efficient implementations. This function makes no distinction between paragraphs and lines.
Note: this function can not take the cursor position into account. By convention an offset of -2 means that this function should use the cursor position as offset. Thus an offset of -2 must be converted to the cursor position before calling this function. An offset of -1 is used for the text length and custom implementations of this function have to return the result as if the length was passed in as offset.