Q3AccessibleDisplay Class Reference

#include <q3simplewidgets.h>

Inheritance diagram for Q3AccessibleDisplay:

Inheritance graph
[legend]
Collaboration diagram for Q3AccessibleDisplay:

Collaboration graph
[legend]
List of all members.

Detailed Description

Definition at line 29 of file q3simplewidgets.h.

Public Member Functions

 Q3AccessibleDisplay (QWidget *w, Role role=StaticText)
QString text (Text t, int child) const
Role role (int child) const
Relation relationTo (int child, const QAccessibleInterface *other, int otherChild) const
int navigate (RelationFlag, int entry, QAccessibleInterface **target) const


Constructor & Destructor Documentation

Q3AccessibleDisplay::Q3AccessibleDisplay ( QWidget w,
Role  role = StaticText 
) [explicit]

Definition at line 31 of file q3simplewidgets.cpp.

00032 : QAccessibleWidget(w, role)
00033 {
00034 }


Member Function Documentation

QString Q3AccessibleDisplay::text ( Text  t,
int  child 
) const [virtual]

Reimplemented from QAccessibleWidget.

Definition at line 52 of file q3simplewidgets.cpp.

References QString::isEmpty(), QAccessible::Name, QAccessibleObject::object(), qt_accStripAmp(), and QAccessibleWidget::text().

00053 {
00054     QString str;
00055     switch (t) {
00056     case Name:
00057         if (qobject_cast<QLabel*>(object())) {
00058             str = qobject_cast<QLabel*>(object())->text();
00059         } else if (qobject_cast<Q3GroupBox*>(object())) {
00060             str = qobject_cast<Q3GroupBox*>(object())->title();
00061         }
00062         break;
00063     default:
00064         break;
00065     }
00066     if (str.isEmpty())
00067         str = QAccessibleWidget::text(t, child);;
00068     return qt_accStripAmp(str);
00069 }

Here is the call graph for this function:

QAccessible::Role Q3AccessibleDisplay::role ( int  child  )  const [virtual]

Reimplemented from QAccessibleWidget.

Definition at line 37 of file q3simplewidgets.cpp.

References QAccessible::Animation, QAccessible::Graphic, l, QAccessibleObject::object(), and QAccessibleWidget::role().

00038 {
00039     QLabel *l = qobject_cast<QLabel*>(object());
00040     if (l) {
00041         if (l->pixmap() || l->picture())
00042             return Graphic;
00043         if (l->picture())
00044             return Graphic;
00045         if (l->movie())
00046             return Animation;
00047     }
00048     return QAccessibleWidget::role(child);
00049 }

Here is the call graph for this function:

QAccessible::Relation Q3AccessibleDisplay::relationTo ( int  child,
const QAccessibleInterface other,
int  otherChild 
) const [virtual]

Reimplemented from QAccessibleWidget.

Definition at line 72 of file q3simplewidgets.cpp.

References QLabel::buddy(), QAccessible::Label, o, QAccessibleInterface::object(), QAccessibleObject::object(), and QAccessibleWidget::relationTo().

00074 {
00075     Relation relation = QAccessibleWidget::relationTo(child, other, otherChild);
00076     if (child || otherChild)
00077         return relation;
00078 
00079     QObject *o = other->object();
00080     QLabel *label = qobject_cast<QLabel*>(object());
00081     Q3GroupBox *groupbox = qobject_cast<Q3GroupBox*>(object());
00082     if (label) {
00083         if (o == label->buddy())
00084             relation |= Label;
00085     } else if (groupbox && !groupbox->title().isEmpty()) {
00086         if (groupbox->children().contains(o))
00087             relation |= Label;
00088     }
00089     return relation;
00090 }

Here is the call graph for this function:

int Q3AccessibleDisplay::navigate ( RelationFlag  rel,
int  entry,
QAccessibleInterface **  target 
) const [virtual]

Reimplemented from QAccessibleWidget.

Definition at line 93 of file q3simplewidgets.cpp.

References QLabel::buddy(), QAccessible::Child, QAccessible::Labelled, QAccessibleWidget::navigate(), QAccessibleObject::object(), and QAccessible::queryAccessibleInterface().

00094 {
00095     *target = 0;
00096     if (rel == Labelled) {
00097         QObject *targetObject = 0;
00098         QLabel *label = qobject_cast<QLabel*>(object());
00099         Q3GroupBox *groupbox = qobject_cast<Q3GroupBox*>(object());
00100         if (label) {
00101             if (entry == 1)
00102                 targetObject = label->buddy();
00103         } else if (groupbox && !groupbox->title().isEmpty()) {
00104             rel = Child;
00105         }
00106         *target = QAccessible::queryAccessibleInterface(targetObject);
00107         if (*target)
00108             return 0;
00109     }
00110     return QAccessibleWidget::navigate(rel, entry, target);
00111 }

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Thu Mar 15 15:39:35 2007 for Qt 4.2 User's Guide by  doxygen 1.5.1