diff -r 56cd8111b7f7 -r 41300fa6a67c src/plugins/accessible/widgets/simplewidgets.cpp --- a/src/plugins/accessible/widgets/simplewidgets.cpp Tue Jan 26 12:42:25 2010 +0200 +++ b/src/plugins/accessible/widgets/simplewidgets.cpp Tue Feb 02 00:43:10 2010 +0200 @@ -256,9 +256,9 @@ QStringList QAccessibleButton::keyBindings(int actionIndex) { switch (actionIndex) { -#ifdef QT_NO_SHORTCUT +#ifndef QT_NO_SHORTCUT case 0: - return button()->shortcut().toString(); + return QStringList() << button()->shortcut().toString(); #endif default: return QStringList(); @@ -528,7 +528,7 @@ #ifndef QT_NO_LCDNUMBER } else if (qobject_cast(object())) { QLCDNumber *l = qobject_cast(object()); - if (l->numDigits()) + if (l->digitCount()) str = QString::number(l->value()); else str = QString::number(l->intValue()); @@ -602,6 +602,44 @@ return QAccessibleWidgetEx::navigate(rel, entry, target); } +/*! \reimp */ +QString QAccessibleDisplay::imageDescription() +{ + return widget()->toolTip(); +} + +/*! \reimp */ +QSize QAccessibleDisplay::imageSize() +{ + QLabel *label = qobject_cast(widget()); + if (!label) + return QSize(); + const QPixmap *pixmap = label->pixmap(); + if (!pixmap) + return QSize(); + return pixmap->size(); +} + +/*! \reimp */ +QRect QAccessibleDisplay::imagePosition(QAccessible2::CoordinateType coordType) +{ + QLabel *label = qobject_cast(widget()); + if (!label) + return QRect(); + const QPixmap *pixmap = label->pixmap(); + if (!pixmap) + return QRect(); + + switch (coordType) { + case QAccessible2::RelativeToScreen: + return QRect(label->mapToGlobal(label->pos()), label->size()); + case QAccessible2::RelativeToParent: + return label->geometry(); + } + + return QRect(); +} + #ifndef QT_NO_LINEEDIT /*! \class QAccessibleLineEdit