QAccessibleClient::AccessibleObject
#include <accessibleobject.h>
Public Types | |
enum | Interface { NoInterface = 0x0 , AccessibleInterface = 0x1 , CacheInterface = 0x2 , ActionInterface = 0x4 , ApplicationInterface = 0x8 , CollectionInterface = 0x10 , ComponentInterface = 0x20 , DocumentInterface = 0x40 , EditableTextInterface = 0x80 , EventKeyboardInterface = 0x100 , EventMouseInterface = 0x200 , EventObjectInterface = 0x400 , HyperlinkInterface = 0x800 , HypertextInterface = 0x1000 , ImageInterface = 0x2000 , SelectionInterface = 0x4000 , TableInterface = 0x8000 , TextInterface = 0x10000 , ValueInterface = 0x20000 , SocketInterface = 0x40000 , EventWindowInterface = 0x80000 , EventFocusInterface = 0x100000 , InvalidInterface = 0x80000000 } |
typedef QFlags< Interface > | Interfaces |
enum | LocaleType { LocaleTypeMessages , LocaleTypeCollate , LocaleTypeCType , LocaleTypeMonetary , LocaleTypeNumeric , LocaleTypeTime } |
enum | Role { NoRole , CheckBox , CheckableMenuItem , ColumnHeader , ComboBox , DesktopFrame , Dial , Dialog , Filler , Frame , Icon , Label , ListView , ListItem , Menu , MenuBar , MenuItem , Tab , TabContainer , PasswordText , PopupMenu , ProgressBar , Button , RadioButton , RadioMenuItem , RowHeader , ScrollBar , ScrollArea , Separator , Slider , SpinButton , StatusBar , TableView , TableCell , TableColumnHeader , TableColumn , TableRowHeader , TableRow , Terminal , Text , ToggleButton , ToolBar , ToolTip , TreeView , Window , TreeItem } |
enum | TextBoundary { CharBoundary , WordStartBoundary , WordEndBoundary , SentenceStartBoundary , SentenceEndBoundary , LineStartBoundary , LineEndBoundary } |
Public Member Functions | |
AccessibleObject () | |
AccessibleObject (const AccessibleObject &other) | |
~AccessibleObject () | |
QString | accessibleId () const |
QVector< QSharedPointer< QAction > > | actions () const |
double | alpha () const |
QString | appBusAddress () const |
int | appId () const |
AccessibleObject | application () const |
QString | appLocale (LocaleType lctype=LocaleTypeMessages) const |
QString | appToolkitName () const |
QString | appVersion () const |
QRect | boundingRect () const |
int | caretOffset () const |
int | characterCount () const |
QRect | characterRect (int offset) const |
AccessibleObject | child (int index) const |
int | childCount () const |
QList< AccessibleObject > | children () const |
QVector< QList< AccessibleObject > > | children (const QList< Role > &roles) const |
bool | copyText (int startPos, int endPos) |
double | currentValue () const |
bool | cutText (int startPos, int endPos) |
bool | deleteText (int startPos, int endPos) |
QString | description () const |
QPoint | focusPoint () const |
bool | hasSelectableText () const |
bool | hasToolTip () const |
QString | id () const |
QString | imageDescription () const |
QString | imageLocale () const |
QRect | imageRect () const |
int | indexInParent () const |
bool | insertText (const QString &text, int position=0, int length=-1) |
bool | isActive () const |
bool | isCheckable () const |
bool | isChecked () const |
bool | isDefault () const |
bool | isDefunct () const |
bool | isEditable () const |
bool | isEnabled () const |
bool | isExpandable () const |
bool | isExpanded () const |
bool | isFocusable () const |
bool | isFocused () const |
bool | isMultiLine () const |
bool | isSelectable () const |
bool | isSelected () const |
bool | isSensitive () const |
bool | isSingleLine () const |
bool | isValid () const |
bool | isVisible () const |
int | layer () const |
QString | localizedRoleName () const |
double | maximumValue () const |
int | mdiZOrder () const |
double | minimumValue () const |
double | minimumValueIncrement () const |
QString | name () const |
bool | operator!= (const AccessibleObject &other) const |
AccessibleObject & | operator= (const AccessibleObject &other) |
bool | operator== (const AccessibleObject &other) const |
AccessibleObject | parent () const |
bool | pasteText (int position) |
Role | role () const |
QString | roleName () const |
QList< AccessibleObject > | selection () const |
bool | setCurrentValue (const double value) |
bool | setText (const QString &text) |
void | setTextSelections (const QList< QPair< int, int > > &selections) |
QString | stateString () const |
Interfaces | supportedInterfaces () const |
bool | supportsAutocompletion () const |
QString | text (int startOffset=0, int endOffset=-1) const |
QList< QPair< int, int > > | textSelections () const |
QString | textWithBoundary (int offset, TextBoundary boundary, int *startOffset=nullptr, int *endOffset=nullptr) const |
QUrl | url () const |
Detailed Description
This class represents an accessible object.
An accessible object equals usually a visible widget or some kind of other element the user can interact with but can also present a not visible object that offers certain functionality like for example actions which can be triggered.
It is implicitly shared and only created by the library.
Definition at line 41 of file accessibleobject.h.
Member Typedef Documentation
◆ Interfaces
Definition at line 81 of file accessibleobject.h.
Member Enumeration Documentation
◆ Interface
This enum describes the different interfaces that an AccessibleObject can implement.
Each AccessibleObject must implement the AccessibleInterface, otherwise it is invalid. All other interfaces are optional.
If the ActionInterface is implement the object will have a list of actions that can be invoked.
Definition at line 55 of file accessibleobject.h.
◆ LocaleType
The type of locale.
Definition at line 559 of file accessibleobject.h.
◆ Role
The role indicates the type of UI element that an AccessibleObject represents.
Enumerator | |
---|---|
NoRole | The object is invalid and has no role set. This is generally a bug. |
Definition at line 87 of file accessibleobject.h.
◆ TextBoundary
The TextBoundaries enum represents the different boundaries when asking for text at a certain offset.
Definition at line 177 of file accessibleobject.h.
Constructor & Destructor Documentation
◆ AccessibleObject() [1/2]
AccessibleObject::AccessibleObject | ( | ) |
Construct an invalid AccessibleObject.
Definition at line 20 of file accessibleobject.cpp.
◆ AccessibleObject() [2/2]
AccessibleObject::AccessibleObject | ( | const AccessibleObject & | other | ) |
Copy constructor.
Definition at line 48 of file accessibleobject.cpp.
◆ ~AccessibleObject()
AccessibleObject::~AccessibleObject | ( | ) |
Destroys the AccessibleObject.
Definition at line 53 of file accessibleobject.cpp.
Member Function Documentation
◆ accessibleId()
QString AccessibleObject::accessibleId | ( | ) | const |
Returns the accessible id of this accessible.
This is an id which is stable over application development. It may be empty.
Definition at line 132 of file accessibleobject.cpp.
◆ actions()
QVector< QSharedPointer< QAction > > AccessibleObject::actions | ( | ) | const |
Returns a list of actions supported by this accessible.
Just trigger() the action to execute the underlying method at the accessible.
Definition at line 396 of file accessibleobject.cpp.
◆ alpha()
double AccessibleObject::alpha | ( | ) | const |
Obtain the alpha value of the component.
An alpha value of 1.0 or greater indicates that the object is fully opaque, and an alpha value of 0.0 indicates that the object is fully transparent. Negative alpha values have no defined meaning at this time.
Alpha values are used in conjunction with Z-order calculations to determine whether an object wholly or partially obscures another object's visual intersection, in the event that their bounds intersect.
Definition at line 172 of file accessibleobject.cpp.
◆ appBusAddress()
QString AccessibleObject::appBusAddress | ( | ) | const |
The application dbus address.
Definition at line 346 of file accessibleobject.cpp.
◆ appId()
int AccessibleObject::appId | ( | ) | const |
Returns the unique application identifier.
- Returns
- The app id. The identifier will not last over session and everytime the app quits and restarts it gets another identifier that persists as long as the application is running.
Definition at line 336 of file accessibleobject.cpp.
◆ application()
AccessibleObject AccessibleObject::application | ( | ) | const |
Returns the application object.
- Returns
- The top-level application object that expose an org.a11y.atspi.Application accessibility interface.
Definition at line 321 of file accessibleobject.cpp.
◆ appLocale()
QString AccessibleObject::appLocale | ( | LocaleType | lctype = LocaleTypeMessages | ) | const |
The application locale.
- Parameters
-
lctype The LocaleType for which the locale is queried.
- Returns
- A string compliant with the POSIX standard for locale description.
Definition at line 341 of file accessibleobject.cpp.
◆ appToolkitName()
QString AccessibleObject::appToolkitName | ( | ) | const |
Returns the toolkit name.
- Returns
- The tookit name. This can be for example "Qt" or "gtk".
Definition at line 326 of file accessibleobject.cpp.
◆ appVersion()
QString AccessibleObject::appVersion | ( | ) | const |
Returns the toolkit version.
- Returns
- The tookit version. This can be for example "4.8.3" for Qt 4.8.3.
Definition at line 331 of file accessibleobject.cpp.
◆ boundingRect()
QRect AccessibleObject::boundingRect | ( | ) | const |
Returns a bounding rectangle for the accessible.
It returns a QRect that bounds the accessible. This can be used to get the focus coordinates.
- Returns
- QRect that bounds the accessible.
Definition at line 177 of file accessibleobject.cpp.
◆ caretOffset()
int AccessibleObject::caretOffset | ( | ) | const |
Returns the offset of the caret from the beginning of the text.
This function provides the current offset of the caret from the beginning of the text in an accessible that implements org.a11y.atspi.Text.
- Returns
- Caret Offset as an integer
Definition at line 202 of file accessibleobject.cpp.
◆ characterCount()
int AccessibleObject::characterCount | ( | ) | const |
Returns the number of characters.
- Returns
- Number of characters.
Definition at line 212 of file accessibleobject.cpp.
◆ characterRect()
QRect AccessibleObject::characterRect | ( | int | offset | ) | const |
Returns a bounding rectangle for the character at position offset.
This function is only supported for accessibles that implement the text interface. It will return an empty rectangle for invalid offsets or accessibles.
- Returns
- QRect that bounds the character.
Definition at line 187 of file accessibleobject.cpp.
◆ child()
AccessibleObject AccessibleObject::child | ( | int | index | ) | const |
Returns a specific child at position index.
The list of children is 0-based.
- Returns
- number of children
Definition at line 122 of file accessibleobject.cpp.
◆ childCount()
int AccessibleObject::childCount | ( | ) | const |
Returns the number of children for this accessible.
- Returns
- number of children
Definition at line 117 of file accessibleobject.cpp.
◆ children() [1/2]
QList< AccessibleObject > AccessibleObject::children | ( | ) | const |
Returns this accessible's children in a list.
- Returns
- children
Definition at line 99 of file accessibleobject.cpp.
◆ children() [2/2]
QVector< QList< AccessibleObject > > AccessibleObject::children | ( | const QList< Role > & | roles | ) | const |
Returns this accessible's children according to there roles.
- Parameters
-
roles The list of roles to query.
- Returns
- A vector that contains the children of this object according to there roles. The number of vector-items equals to the number and sorting of the roles items. Example code demonstrating usage: QList<Role> roles;roles << Label << CheckBox;QVector< QList<AccessibleObject> > c = children(roles);Q_ASSERT(c[0].isEmpty() || c[0].first().role() == Label);Q_ASSERT(c[1].isEmpty() || c[1].first().role() == CheckBox);Role role() constReturns the role as integer value of this accessible.Definition accessibleobject.cpp:147QList< AccessibleObject > children() constReturns this accessible's children in a list.Definition accessibleobject.cpp:99qsizetype count() const const
Definition at line 104 of file accessibleobject.cpp.
◆ copyText()
bool AccessibleObject::copyText | ( | int | startPos, |
int | endPos ) |
Copy the text from the EditableTextInterface into the clipboard.
- Parameters
-
startPos The caret position from which to start to copy the text from. endPos The caret position from which to end to copy the text from.
- Returns
- true on success and false on error.
Definition at line 254 of file accessibleobject.cpp.
◆ currentValue()
double AccessibleObject::currentValue | ( | ) | const |
The current value of the valuator.
This is the value the org.a11y.atspi.Value accessibility interface has.
Definition at line 366 of file accessibleobject.cpp.
◆ cutText()
bool AccessibleObject::cutText | ( | int | startPos, |
int | endPos ) |
Cut the text from the EditableTextInterface into the clipboard.
- Parameters
-
startPos The caret position from which to start to cut the text from. endPos The caret position from which to end to cut the text from.
- Returns
- true on success and false on error.
Definition at line 262 of file accessibleobject.cpp.
◆ deleteText()
bool AccessibleObject::deleteText | ( | int | startPos, |
int | endPos ) |
Delete the text from the EditableTextInterface.
- Parameters
-
startPos The caret position from which to start to delete the text. endPos The caret position from which to end to delete the text.
- Returns
- true on success and false on error.
Definition at line 270 of file accessibleobject.cpp.
◆ description()
QString AccessibleObject::description | ( | ) | const |
Returns the description for this accessible.
The description is more of an explanation than the name. This can be a sentence. The string is localized.
Definition at line 142 of file accessibleobject.cpp.
◆ focusPoint()
QPoint AccessibleObject::focusPoint | ( | ) | const |
Returns focus-point of the object.
- Returns
- The Focus Point of the object
Definition at line 301 of file accessibleobject.cpp.
◆ hasSelectableText()
bool AccessibleObject::hasSelectableText | ( | ) | const |
Returns if the AccessibleObject allows text selections.
Definition at line 408 of file accessibleobject.cpp.
◆ hasToolTip()
bool AccessibleObject::hasToolTip | ( | ) | const |
Returns if the AccessibleObject has a tool tip.
Definition at line 413 of file accessibleobject.cpp.
◆ id()
QString AccessibleObject::id | ( | ) | const |
Returns a unique identifier for the object.
Definition at line 57 of file accessibleobject.cpp.
◆ imageDescription()
QString AccessibleObject::imageDescription | ( | ) | const |
A description text of the image.
It is recommended that imageDescription be the shorter of the available image descriptions, for instance "alt text" in HTML images, and a longer description be provided in Accessible::accessible-description, if available. A short, one or two word label for the image should be provided in Accessible::accessible-name.
- Returns
- A UTF-8 string providing a textual description of what is visually depicted in the image.
Definition at line 381 of file accessibleobject.cpp.
◆ imageLocale()
QString AccessibleObject::imageLocale | ( | ) | const |
The locale of the image.
- Returns
- A string corresponding to the POSIX LC_MESSAGES locale used by the imageDescription.
Definition at line 386 of file accessibleobject.cpp.
◆ imageRect()
QRect AccessibleObject::imageRect | ( | ) | const |
The image boundaries.
Obtain a bounding box which entirely contains the image contents, as displayed on screen.
The bounds returned do not account for any viewport clipping or the fact that the image may be partially or wholly obscured by other onscreen content.
This method returns the bounds of the current onscreen view, and not the nominal size of the source data in the event that the original image has been rescaled.\
- Returns
- A BoundingBox enclosing the image's onscreen representation.
Definition at line 391 of file accessibleobject.cpp.
◆ indexInParent()
int AccessibleObject::indexInParent | ( | ) | const |
Returns this accessible's index in it's parent's list of children.
- Returns
- index
Definition at line 127 of file accessibleobject.cpp.
◆ insertText()
bool AccessibleObject::insertText | ( | const QString & | text, |
int | position = 0, | ||
int | length = -1 ) |
Insert the text into the EditableTextInterface.
- Parameters
-
text The text to insert. position The caret position at which to insert the text. length The length of the text to insert.
- Returns
- true on success and false on error.
Definition at line 246 of file accessibleobject.cpp.
◆ isActive()
bool AccessibleObject::isActive | ( | ) | const |
Returns if the AccessibleObject is currently active.
Definition at line 418 of file accessibleobject.cpp.
◆ isCheckable()
bool AccessibleObject::isCheckable | ( | ) | const |
Returns if the AccessibleObject is checkable (often indicates a check action)
Definition at line 423 of file accessibleobject.cpp.
◆ isChecked()
bool AccessibleObject::isChecked | ( | ) | const |
Returns if the AccessibleObject is currently checked.
Definition at line 438 of file accessibleobject.cpp.
◆ isDefault()
bool AccessibleObject::isDefault | ( | ) | const |
Returns if the AccessibleObject is the default widget (e.g. a button in a dialog)
Definition at line 448 of file accessibleobject.cpp.
◆ isDefunct()
bool AccessibleObject::isDefunct | ( | ) | const |
Returns if the AccessibleObject is defunct - that means it does not properly respont to requests and should be ignored for accessibility purposes.
Definition at line 443 of file accessibleobject.cpp.
◆ isEditable()
bool AccessibleObject::isEditable | ( | ) | const |
Returns if the AccessibleObject is an editable text.
Definition at line 453 of file accessibleobject.cpp.
◆ isEnabled()
bool AccessibleObject::isEnabled | ( | ) | const |
Returns if the AccessibleObject is currently enabled.
Definition at line 458 of file accessibleobject.cpp.
◆ isExpandable()
bool AccessibleObject::isExpandable | ( | ) | const |
Returns if the AccessibleObject can be expanded to show more information.
Definition at line 463 of file accessibleobject.cpp.
◆ isExpanded()
bool AccessibleObject::isExpanded | ( | ) | const |
Returns if the AccessibleObject is currently expanded.
Definition at line 468 of file accessibleobject.cpp.
◆ isFocusable()
bool AccessibleObject::isFocusable | ( | ) | const |
Returns if the AccessibleObject is focusable.
Definition at line 473 of file accessibleobject.cpp.
◆ isFocused()
bool AccessibleObject::isFocused | ( | ) | const |
Returns if the AccessibleObject is currently focused.
Definition at line 478 of file accessibleobject.cpp.
◆ isMultiLine()
bool AccessibleObject::isMultiLine | ( | ) | const |
Returns if the AccessibleObject is a multi line text edit.
Definition at line 483 of file accessibleobject.cpp.
◆ isSelectable()
bool AccessibleObject::isSelectable | ( | ) | const |
Returns if the AccessibleObject is selectable.
Definition at line 488 of file accessibleobject.cpp.
◆ isSelected()
bool AccessibleObject::isSelected | ( | ) | const |
Returns if the AccessibleObject is currently selected.
Definition at line 493 of file accessibleobject.cpp.
◆ isSensitive()
bool AccessibleObject::isSensitive | ( | ) | const |
Returns if the AccessibleObject reacts to input events.
Definition at line 498 of file accessibleobject.cpp.
◆ isSingleLine()
bool AccessibleObject::isSingleLine | ( | ) | const |
Returns if the AccessibleObject is a single line text edit.
Definition at line 503 of file accessibleobject.cpp.
◆ isValid()
bool AccessibleObject::isValid | ( | ) | const |
Returns true if this object is valid.
Invalid objects are for example returned when asking for the parent of the top most item, or for a child that is out of range.
Definition at line 75 of file accessibleobject.cpp.
◆ isVisible()
bool AccessibleObject::isVisible | ( | ) | const |
Returns if the AccessibleObject is currently visible (it can still be off the screen, but there is nothing preventing the user from seeing it in general)
Definition at line 528 of file accessibleobject.cpp.
◆ layer()
int AccessibleObject::layer | ( | ) | const |
The ComponentLayer in which this object resides.
Definition at line 162 of file accessibleobject.cpp.
◆ localizedRoleName()
QString AccessibleObject::localizedRoleName | ( | ) | const |
Returns the name of the role of this accessible.
This name is localized and can be presented to the user.
Definition at line 157 of file accessibleobject.cpp.
◆ maximumValue()
double AccessibleObject::maximumValue | ( | ) | const |
The maximum value allowed by this valuator.
If both, the minimumValue and maximumValue, are zero then there is no minimum or maximum values. The currentValue has no range restrictions.
Definition at line 356 of file accessibleobject.cpp.
◆ mdiZOrder()
int AccessibleObject::mdiZOrder | ( | ) | const |
Obtain the relative stacking order (i.e.
'Z' order) of an object.
Larger values indicate that an object is on "top" of the stack, therefore objects with smaller MDIZOrder may be obscured by objects with a larger MDIZOrder, but not vice-versa.
Definition at line 167 of file accessibleobject.cpp.
◆ minimumValue()
double AccessibleObject::minimumValue | ( | ) | const |
The minimum value allowed by this valuator.
If both, the minimumValue and maximumValue, are zero then there is no minimum or maximum values. The currentValue has no range restrictions.
Definition at line 351 of file accessibleobject.cpp.
◆ minimumValueIncrement()
double AccessibleObject::minimumValueIncrement | ( | ) | const |
The smallest incremental change which this valuator allows.
This is a helper value to know in what steps the currentValue is incremented or decremented.
If 0, the incremental changes to the valuator are limited only by the precision of a double precision value on the platform.
Definition at line 361 of file accessibleobject.cpp.
◆ name()
QString AccessibleObject::name | ( | ) | const |
Returns the name of this accessible.
The name is a short descriptive one or two words. It is localized.
Definition at line 137 of file accessibleobject.cpp.
◆ operator!=()
|
inline |
Inequality operator.
Definition at line 213 of file accessibleobject.h.
◆ operator=()
AccessibleObject & AccessibleObject::operator= | ( | const AccessibleObject & | other | ) |
Assignment operator.
Definition at line 83 of file accessibleobject.cpp.
◆ operator==()
bool AccessibleObject::operator== | ( | const AccessibleObject & | other | ) | const |
Comparison operator.
Definition at line 89 of file accessibleobject.cpp.
◆ parent()
AccessibleObject AccessibleObject::parent | ( | ) | const |
Returns this object's parent.
- Returns
- The parent AccessibleObject
Definition at line 94 of file accessibleobject.cpp.
◆ pasteText()
bool AccessibleObject::pasteText | ( | int | position | ) |
Paste the text from the clipboard into the EditableTextInterface.
- Parameters
-
position The caret position at which to insert the text into.
- Returns
- true on success and false on error.
Definition at line 278 of file accessibleobject.cpp.
◆ role()
AccessibleObject::Role AccessibleObject::role | ( | ) | const |
Returns the role as integer value of this accessible.
Definition at line 147 of file accessibleobject.cpp.
◆ roleName()
QString AccessibleObject::roleName | ( | ) | const |
Returns the name of the role of this accessible.
This name is not localized to allow tools to work with the english string.
Definition at line 152 of file accessibleobject.cpp.
◆ selection()
QList< AccessibleObject > AccessibleObject::selection | ( | ) | const |
Returns the selection of accessible objects.
Definition at line 376 of file accessibleobject.cpp.
◆ setCurrentValue()
bool AccessibleObject::setCurrentValue | ( | const double | value | ) |
Set the value of the valuator.
- Parameters
-
value the value to set.
- Returns
- true on success and false on error.
Definition at line 371 of file accessibleobject.cpp.
◆ setText()
bool AccessibleObject::setText | ( | const QString & | text | ) |
Set the text of the EditableTextInterface.
- Parameters
-
text The text to set.
- Returns
- true on success and false on error.
Definition at line 238 of file accessibleobject.cpp.
◆ setTextSelections()
void AccessibleObject::setTextSelections | ( | const QList< QPair< int, int > > & | selections | ) |
Set text selections, usually only one selection will be set, use a list containing one QPair with the start and end offsets for that.
Definition at line 294 of file accessibleobject.cpp.
◆ stateString()
QString AccessibleObject::stateString | ( | ) | const |
Return a string representing states of this object.
This is useful for debugging applications.
Definition at line 508 of file accessibleobject.cpp.
◆ supportedInterfaces()
AccessibleObject::Interfaces AccessibleObject::supportedInterfaces | ( | ) | const |
Returns List of interfaces supported by the accessible.
This function provides a list of accessibile interfaces that are implemented by an accessible object. This can be used to avoid calling functions that are not supported by the accessible.
- Returns
- QStringList that contains list of supported interfaces
Definition at line 197 of file accessibleobject.cpp.
◆ supportsAutocompletion()
bool AccessibleObject::supportsAutocompletion | ( | ) | const |
Returns if the AccessibleObject supports automatic text completion.
Definition at line 533 of file accessibleobject.cpp.
◆ text()
QString AccessibleObject::text | ( | int | startOffset = 0, |
int | endOffset = -1 ) const |
Returns the text of the TextInterface.
This function provides the current text as displayed by the org.a11y.atspi.Text TextInterface component.
- Parameters
-
startOffset The start caret offset to return the text from. endOffset The end caret offset to return the text from. If -1 then the endOffset is the end of the string what means all characters are included.
- Returns
- The text as displayed by the TextInterface.
Definition at line 222 of file accessibleobject.cpp.
◆ textSelections()
QList< QPair< int, int > > AccessibleObject::textSelections | ( | ) | const |
Returns a list of selections the text has.
Code to demonstrate usage:
- Returns
- The list of selections where every item in that list is a pair of integers representing startOffset and endOffset of the selection.
Definition at line 286 of file accessibleobject.cpp.
◆ textWithBoundary()
QString AccessibleObject::textWithBoundary | ( | int | offset, |
TextBoundary | boundary, | ||
int * | startOffset = nullptr, | ||
int * | endOffset = nullptr ) const |
Returns the text of the TextInterface by boundary.
Especially for larger text fields it may be more performant and easier to query the text at a certain position instead of the full text.
For example the line where the cursor is currently can be retrieved with this function in a convenient way.
- Parameters
-
offset is the position of the requested text. startOffset returns the beginning of the offset, for example the start of the line when asking for line boundaries. endOffset returns the end of the text section
- Returns
- the text at the offset.
Definition at line 230 of file accessibleobject.cpp.
◆ url()
QUrl AccessibleObject::url | ( | ) | const |
Returns a QUrl that references the AccessibleObject.
This can be used to serialize/unserialize an AccessibleObject to pass it around as string and restore the AccessibleObject by using Registry::accessibleFromUrl later on.
The returned QUrl returns a scheme of "accessibleobject", the dbus path as url path and the dbus service as url fragment.
Definition at line 64 of file accessibleobject.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 27 2024 11:48:51 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.