⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qaccessible.cpp

📁 奇趣公司比较新的qt/emd版本
💻 CPP
📖 第 1 页 / 共 3 页
字号:
*//*!    \fn int QAccessibleInterface::childCount() const    Returns the number of children that belong to this object. A child    can provide accessibility information on its own (e.g. a child    widget), or be a sub-element of this accessible object.    All objects provide this information.    \sa indexOfChild()*//*!    \fn int QAccessibleInterface::indexOfChild(const QAccessibleInterface *child) const    Returns the 1-based index of the object \a child in this object's    children list, or -1 if \a child is not a child of this object. 0    is not a possible return value.    All objects provide this information about their children.    \sa childCount()*//*!    \fn QAccessible::Relation QAccessibleInterface::relationTo(int child,const QAccessibleInterface *other, int otherChild) const    Returns the relationship between this object's \a child and the \a    other object's \a otherChild. If \a child is 0 the object's own relation    is returned.    The returned value indicates the relation of the called object to    the \a other object, e.g. if this object is a child of \a other    the return value will be \c Child.    The return value is a combination of the bit flags in the    QAccessible::Relation enumeration.    All objects provide this information.    \sa indexOfChild(), navigate()*//*!    \fn int QAccessibleInterface::childAt(int x, int y) const    Returns the 1-based index of the child that contains the screen    coordinates (\a x, \a y). This function returns 0 if the point is    positioned on the object itself. If the tested point is outside    the boundaries of the object this function returns -1.    This function is only relyable for visible objects (invisible    object might not be laid out correctly).    All visual objects provide this information.    \sa rect()*//*!    \fn int QAccessibleInterface::navigate(RelationFlag relation, int entry, QAccessibleInterface**target) const    Navigates from this object to an object that has a relationship    \a relation to this object, and returns the respective object in    \a target. It is the caller's responsibility to delete *\a target    after use.    If an object is found, \a target is set to point to the object, and    the index of the child of \a target is returned. The return value    is 0 if \a target itself is the requested object. \a target is set    to null if this object is the target object (i.e. the requested    object is a handled by this object).    If no object is found \a target is set to null, and the return    value is -1.    The \a entry parameter has two different meanings:    \list    \i \e{Hierarchical and Logical relationships} -- if multiple objects with    the requested relationship exist \a entry specifies which one to    return. \a entry is 1-based, e.g. use 1 to get the first (and    possibly only) object with the requested relationship.    The following code demonstrates how to use this function to    navigate to the first child of an object:    \code        QAccessibleInterface *child = 0;        int targetChild = object->navigate(Accessible::Child, 1, &child);        if (child) {            // ...            delete child;        }    \endcode    \i \e{Geometric relationships} -- the index of the child from    which to start navigating in the specified direction. \a entry    can be 0 to navigate to a sibling of this object, or non-null to    navigate within contained children that don't provide their own    accessible information.    \endlist    Note that the \c Descendent value for \a relation is not supported.    All objects support navigation.    \sa relationTo(), childCount()*//*!    \fn QString QAccessibleInterface::text(Text t, int child) const    Returns the value of the text property \a t of the object, or of    the object's child if \a child is not 0.    The \l 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 \l 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 \l 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 \l Help text provides information about the function and    usage of an accessible object. Not all objects provide this    information.    The \l 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 \l Name.    \sa role(), state()*//*!    \fn void QAccessibleInterface::setText(Text t, int child, const QString &text)    Sets the text property \a t of the object, or of the object's    child if \a child is not 0, to \a text.    Note that the text properties of most objects are read-only.    \sa text()*//*!    \fn QRect QAccessibleInterface::rect(int child) const    Returns the geometry of the object, or of the object's child if \a child    is not 0. The geometry is in screen coordinates.    This function is only reliable for visible objects (invisible    objects might not be laid out correctly).    All visual objects provide this information.    \sa childAt()*//*!    \fn QAccessible::Role QAccessibleInterface::role(int child) const    Returns the role of the object, or of the object's child if \a child    is not 0. The role of an object is usually static.    All accessible objects have a role.    \sa text(), state()*//*!    \fn QAccessible::State QAccessibleInterface::state(int child) const    Returns the current state of the object, or of the object's child if    \a child is not 0. The returned value is a combination of the flags in    the QAccessible::StateFlag enumeration.    All accessible objects have a state.    \sa text(), role()*//*!    \fn int QAccessibleInterface::userActionCount(int child) const    Returns the number of custom actions of the object, or of the    object's child if \a child is not 0.    The \c Action type enumerates predefined actions: these    are not included in the returned value.    \sa actionText(), doAction()*//*!    \fn QString QAccessibleInterface::actionText(int action, Text t, int child) const    Returns the text property \a t of the action \a action supported by    the object, or of the object's child if \a child is not 0.    \sa text(), userActionCount()*//*!    \fn bool QAccessibleInterface::doAction(int action, int child, const QVariantList &params)    Asks the object, or the object's \a child if \a child is not 0, to    execute \a action using the parameters, \a params. Returns true if    the action could be executed; otherwise returns false.    \a action can be a predefined or a custom action.    \sa userActionCount(), actionText()*//*!    \fn QColor QAccessibleInterface::backgroundColor()    \internal*//*!    \fn QAccessibleEditableTextInterface *QAccessibleInterface::editableTextInterface()    \internal*//*!    \fn QColor QAccessibleInterface::foregroundColor()    \internal*//*!    \fn QAccessibleTextInterface *QAccessibleInterface::textInterface()    \internal*//*!    \fn QAccessibleValueInterface *QAccessibleInterface::valueInterface()    \internal*//*!    \fn QAccessibleTableInterface *QAccessibleInterface::tableInterface()    \internal*//*!    \class QAccessibleEvent    \brief The QAccessibleEvent class is used to query addition    accessibility information about complex widgets.    The event can be of type QEvent::AccessibilityDescription or    QEvent::AccessibilityHelp.    Some QAccessibleInterface implementations send QAccessibleEvents    to the widget they wrap to obtain the description or help text of    a widget or of its children. The widget can answer by calling    setValue() with the requested information.    The default QWidget::event() implementation simply sets the text    to be the widget's \l{QWidget::toolTip}{tooltip} (for \l    AccessibilityDescription event) or its    \l{QWidget::whatsThis}{"What's This?" text} (for \l    AccessibilityHelp event).    \ingroup accessibility    \ingroup events*//*!    \fn QAccessibleEvent::QAccessibleEvent(Type type, int child)    Constructs an accessibility event of the given \a type, which    must be QEvent::AccessibilityDescription or    QEvent::AccessibilityHelp.    \a child is the (1-based) index of the child to which the request    applies. If \a child is 0, the request is for the widget itself.    \sa child()*//*!    \fn int QAccessibleEvent::child() const    Returns the (1-based) index of the child to which the request    applies. If the child is 0, the request is for the widget itself.*//*!    \fn QString QAccessibleEvent::value() const    Returns the text set using setValue().    \sa setValue()*//*!    \fn void QAccessibleEvent::setValue(const QString &text)    Set the description or help text for the given child() to \a    text, thereby answering the request.    \sa value()*//*!    \since 4.2    Invokes a \a method on \a child with the given parameters \a params    and returns the result of the operation as QVariant.    Note that the type of the returned QVariant depends on the action.    Returns an invalid QVariant if the object doesn't support the action.*/QVariant QAccessibleInterface::invokeMethod(Method method, int child, const QVariantList &params){    if (!(state(0) & HasInvokeExtension))        return QVariant();    return static_cast<QAccessibleInterfaceEx *>(this)->invokeMethodEx(method, child, params);}QVariant QAccessibleInterfaceEx::virtual_hook(const QVariant &){    return QVariant();}/*! \internal */QAccessible2Interface *QAccessibleInterface::cast_helper(QAccessible2::InterfaceType t){    if (state(0) & HasInvokeExtension)        return static_cast<QAccessibleInterfaceEx *>(this)->interface_cast(t);    return 0;}#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -