44 #ifndef QT_NO_ACCESSIBILITY 55 #include <QRubberBand> 56 #include <QtGui/QFocusFrame> 57 #include <QtGui/QMenu> 65 for (
int i = 0; i < list.
size(); ++i) {
85 #ifndef QT_NO_SHORTCUT 87 for (
int i = 0; i < ol.
size(); ++i) {
94 #ifndef QT_NO_GROUPBOX 97 return groupbox->
title();
108 #ifndef QT_NO_SHORTCUT 140 newText.
remove(ampIndex, 1);
251 if (list.
size() < ccount) {
252 for (
int i = 1; i <= ccount; ++i) {
260 for (
int i = 0; i<list.
size(); ++i) {
273 qWarning(
"QAccessibleWidget::rect: This implementation does not support subelements! " 286 #include <private/qobject_p.h> 294 {
return d_func()->isSender(receiver, signal); }
296 {
return d_func()->receiverList(signal); }
298 {
return d_func()->senderList(); }
310 if (
object()->metaObject()->indexOfSignal(s) < 0)
391 if (
object() == focus &&
isAncestor(o, focus))
404 int inverse = other->
relationTo(otherChild,
this, child);
413 if (child && !otherChild)
414 return relation |
Child;
415 if (!child && otherChild)
417 if (!child && !otherChild)
418 return relation |
Self;
423 return relation |
Child;
425 if (o->
parent() == parent) {
449 else if(wc.
x() > sc.
x())
453 else if (wc.
y() > sc.
y())
493 if (entry > 0 && childList.
size() >= entry)
494 targetObject = childList.
at(entry - 1);
503 for (i = entry; i > 1 && targetObject; --i)
504 targetObject = targetObject->
parent();
505 if (!targetObject && i == 1)
524 if (complexWidget && entry) {
525 if (entry < 2 ||
widget()->height() >
widget()->width() + 20)
531 if (complexWidget && entry) {
538 if (complexWidget && entry) {
539 if (entry < 2 ||
widget()->width() >
widget()->height() + 20)
545 if (complexWidget && entry) {
557 int mindist = 100000;
559 for (
int i = 0; i < sibCount; ++i) {
578 if (
QPoint(sibc - startc).
x() >= 0) {
582 distp = sibp - startp;
587 if (
QPoint(sibc - startc).
x() <= 0) {
591 distp = sibp - startp;
596 if (
QPoint(sibc - startc).
y() >= 0) {
600 distp = sibp - startp;
605 if (
QPoint(sibc - startc).
y() <= 0) {
609 distp = sibp - startp;
615 int dist = (int)
qSqrt((
qreal)distp.
x() * distp.
x() + distp.
y() * distp.
y());
616 if (dist < mindist) {
639 for (
int i = pIface->
indexOfChild(
this) + 1; i <= sibCount && entry; ++i) {
668 for (
int i = 1; i < index && entry; ++i) {
725 for (
int i = 0; i < sibCount && entry; ++i) {
726 const int childId = pIface->
navigate(
Child, i+1, &candidate);
734 if (candidate != pIface)
744 if (pIface != candidate)
761 for (
int s = 0; s < allSenders.
size(); ++s) {
770 if (entry <= senders.
size())
771 targetObject = senders.
at(entry-1);
780 allReceivers += receivers;
782 if (entry <= allReceivers.
size())
783 targetObject = allReceivers.
at(entry-1);
791 return *target ? 0 : -1;
825 }
else if (!child &&
widget()->isWindow()) {
826 if (
widget()->isMinimized())
839 #ifndef QT_NO_TOOLTIP 883 if (action > 0 && !child) {
891 #ifndef QT_NO_SHORTCUT 908 if (child || !
widget()->isEnabled())
914 if (!
widget()->isWindow())
920 }
else if (action > 0) {
929 #endif // QT_NO_ACTION 938 if (childList.
count() > 0 && child <= childList.
count()) {
939 QWidget *targetWidget = childList.
at(child - 1);
1056 #endif //QT_NO_ACCESSIBILITY
The QVariant class acts like a union for the most common Qt data types.
T qobject_cast(QObject *object)
virtual int indexOfChild(const QAccessibleInterface *) const =0
Returns the 1-based index of the object child in this object's children list, or -1 if child is not a...
#define QT_END_NAMESPACE
This macro expands to.
QPointer< QWidget > widget
const QChar at(int i) const
Returns the character at the given index position in the string.
QKeySequence shortcut
the action's primary shortcut key
virtual State state(int child) const =0
Returns the current state of the object, or of the object's child if child is not 0...
QString & replace(int i, int len, QChar after)
The QByteArray class provides an array of bytes.
Role
This enum defines the role of an accessible object.
int length() const
Returns the number of characters in this string.
QString text
the action's descriptive text
virtual int childCount() const =0
Returns the number of children that belong to this object.
int left() const
Returns the x-coordinate of the rectangle's left edge.
int width() const
Returns the width of the rectangle.
#define QT_END_INCLUDE_NAMESPACE
This macro is equivalent to QT_BEGIN_NAMESPACE.
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
int count(const T &t) const
Returns the number of occurrences of value in the list.
int height() const
Returns the height of the rectangle.
int bottom() const
Returns the y-coordinate of the rectangle's bottom edge.
The QString class provides a Unicode character string.
virtual QObject * object() const =0
Returns a pointer to the QObject this interface implementation provides information for...
T * qobject_cast(QObject *object)
The QObject class is the base class of all Qt objects.
const QColor & color(ColorGroup cg, ColorRole cr) const
Returns the color in the specified color group, used for the given color role.
bool doAction(int action, int child, const QVariantList ¶ms)
Reimplemented Function
The QChar class provides a 16-bit Unicode character.
void append(const T &t)
Inserts value at the end of the list.
QWidget * buddy() const
Returns this label's buddy, or 0 if no buddy is currently set.
#define QT_BEGIN_NAMESPACE
This macro expands to.
virtual int navigate(RelationFlag relation, int index, QAccessibleInterface **iface) const =0
Navigates from this object to an object that has a relationship relation to this object, and returns the respective object in target.
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
RelationFlag
This enum type defines bit flags that can be combined to indicate the relationship between two access...
Method
This enum describes the possible types of methods that can be invoked on an accessible object...
const T & at(int i) const
Returns the item at index position i in the list.
The QStringList class provides a list of strings.
Q_CORE_EXPORT void qWarning(const char *,...)
int indexOf(QChar c, int from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
The QGroupBox widget provides a group box frame with a title.
QString toString(SequenceFormat format=PortableText) const
Return a string representation of the key sequence, based on format.
T value(int i) const
Returns the value at index position i in the list.
QString toolTip
the action's tooltip
static QVariant fromValue(const T &value)
Returns a QVariant containing a copy of value.
bool contains(const QPoint &p, bool proper=false) const
Returns true if the given point is inside or on the edge of the rectangle, otherwise returns false...
static QAccessibleInterface * queryAccessibleInterface(QObject *)
If a QAccessibleInterface implementation exists for the given object, this function returns a pointer...
QString actionText(int action, Text t, int child) const
Reimplemented Function
const char * constData() const
Returns a pointer to the data stored in the byte array.
QPoint center() const
Returns the center point of the rectangle.
virtual Role role(int child) const =0
Returns the role of the object, or of the object's child if child is not 0.
int top() const
Returns the y-coordinate of the rectangle's top edge.
The QKeySequence class encapsulates a key sequence as used by shortcuts.
int right() const
Returns the x-coordinate of the rectangle's right edge.
int indexOf(const T &t, int from=0) const
Returns the index position of the first occurrence of value in the list, searching forward from index...
virtual Relation relationTo(int child, const QAccessibleInterface *other, int otherChild) const =0
Returns the relationship between this object's \a child and the \a other object's \a otherChild...
The QAccessibleInterface class defines an interface that exposes information about accessible objects...
QObjectList receiverList(const char *signal) const
QObject * parent() const
Returns a pointer to the parent object.
The QPoint class defines a point in the plane using integer precision.
int size() const
Returns the number of items in the list.
QByteArray toAscii() const Q_REQUIRED_RESULT
Returns an 8-bit representation of the string as a QByteArray.
QString objectName() const
if(void) toggleToolbarShown
The QRect class defines a rectangle in the plane using integer precision.
The QLabel widget provides a text or image display.
const QObjectList & children() const
Returns a list of child objects.
The QAccessibleObject class implements parts of the QAccessibleInterface for QObjects.
QObject * object() const
Reimplemented Function
int y() const
Returns the y coordinate of this point.
QString title
the group box title text
#define QT_BEGIN_INCLUDE_NAMESPACE
This macro is equivalent to QT_END_NAMESPACE.
The QFocusFrame widget provides a focus frame which can be outside of a widget's normal paintable are...
virtual QRect rect(int child) const =0
Returns the geometry of the object, or of the object's child if child is not 0.
#define Q_DECLARE_PRIVATE(Class)
bool intersects(const QRect &r) const
Returns true if this rectangle intersects with the given rectangle (i.
int x() const
Returns the x coordinate of this point.
QObjectList senderList() const
QString text
the label's text
QString & remove(int i, int len)
Removes n characters from the string, starting at the given position index, and returns a reference t...
bool isSender(const QObject *receiver, const char *signal) const
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.
The QAction class provides an abstract user interface action that can be inserted into widgets...
virtual const QMetaObject * metaObject() const
Returns a pointer to the meta-object of this object.
The QAccessible class provides enums and static functions relating to accessibility.
The Text item allows you to add formatted text to a scene.