/*! \reimp */ QString QAccessibleWidget::text(Text t, int child) const { QString str; switch (t) { case Name: if (!d->name.isEmpty()) { str = d->name; } else if (!widget()->accessibleName().isEmpty()) { str = widget()->accessibleName(); } else if (!child && widget()->isWindow()) { if (widget()->isMinimized()) str = qt_setWindowTitle_helperHelper(widget()->windowIconText(), widget()); else str = qt_setWindowTitle_helperHelper(widget()->windowTitle(), widget()); } else { str = qt_accStripAmp(buddyString(widget())); } break; case Description: if (!d->description.isEmpty()) str = d->description; else if (!widget()->accessibleDescription().isEmpty()) str = widget()->accessibleDescription(); #ifndef QT_NO_TOOLTIP else str = widget()->toolTip(); #endif break; case Help: if (!d->help.isEmpty()) str = d->help; #ifndef QT_NO_WHATSTHIS else str = widget()->whatsThis(); #endif break; case Accelerator: if (!d->accelerator.isEmpty()) str = d->accelerator; else str = qt_accHotKey(buddyString(widget())); break; case Value: str = d->value; break; default: break; } return str; }
/*! \reimp */ QString QAccessibleWidget::text(QAccessible::Text t) const { QString str; switch (t) { case QAccessible::Name: if (!d->name.isEmpty()) { str = d->name; } else if (!widget()->accessibleName().isEmpty()) { str = widget()->accessibleName(); } else if (widget()->isWindow()) { if (widget()->isMinimized()) str = qt_setWindowTitle_helperHelper(widget()->windowIconText(), widget()); else str = qt_setWindowTitle_helperHelper(widget()->windowTitle(), widget()); } else { str = qt_accStripAmp(buddyString(widget())); } break; case QAccessible::Description: str = widget()->accessibleDescription(); #ifndef QT_NO_TOOLTIP if (str.isEmpty()) str = widget()->toolTip(); #endif break; case QAccessible::Help: #ifndef QT_NO_WHATSTHIS str = widget()->whatsThis(); #endif break; case QAccessible::Accelerator: str = qt_accHotKey(buddyString(widget())); break; case QAccessible::Value: break; default: break; } return str; }