equal
deleted
inserted
replaced
254 } |
254 } |
255 |
255 |
256 QStringList QAccessibleButton::keyBindings(int actionIndex) |
256 QStringList QAccessibleButton::keyBindings(int actionIndex) |
257 { |
257 { |
258 switch (actionIndex) { |
258 switch (actionIndex) { |
259 #ifdef QT_NO_SHORTCUT |
259 #ifndef QT_NO_SHORTCUT |
260 case 0: |
260 case 0: |
261 return button()->shortcut().toString(); |
261 return QStringList() << button()->shortcut().toString(); |
262 #endif |
262 #endif |
263 default: |
263 default: |
264 return QStringList(); |
264 return QStringList(); |
265 } |
265 } |
266 } |
266 } |
526 str = qobject_cast<QGroupBox*>(object())->title(); |
526 str = qobject_cast<QGroupBox*>(object())->title(); |
527 #endif |
527 #endif |
528 #ifndef QT_NO_LCDNUMBER |
528 #ifndef QT_NO_LCDNUMBER |
529 } else if (qobject_cast<QLCDNumber*>(object())) { |
529 } else if (qobject_cast<QLCDNumber*>(object())) { |
530 QLCDNumber *l = qobject_cast<QLCDNumber*>(object()); |
530 QLCDNumber *l = qobject_cast<QLCDNumber*>(object()); |
531 if (l->numDigits()) |
531 if (l->digitCount()) |
532 str = QString::number(l->value()); |
532 str = QString::number(l->value()); |
533 else |
533 else |
534 str = QString::number(l->intValue()); |
534 str = QString::number(l->intValue()); |
535 #endif |
535 #endif |
536 } |
536 } |
600 return 0; |
600 return 0; |
601 } |
601 } |
602 return QAccessibleWidgetEx::navigate(rel, entry, target); |
602 return QAccessibleWidgetEx::navigate(rel, entry, target); |
603 } |
603 } |
604 |
604 |
|
605 /*! \reimp */ |
|
606 QString QAccessibleDisplay::imageDescription() |
|
607 { |
|
608 return widget()->toolTip(); |
|
609 } |
|
610 |
|
611 /*! \reimp */ |
|
612 QSize QAccessibleDisplay::imageSize() |
|
613 { |
|
614 QLabel *label = qobject_cast<QLabel *>(widget()); |
|
615 if (!label) |
|
616 return QSize(); |
|
617 const QPixmap *pixmap = label->pixmap(); |
|
618 if (!pixmap) |
|
619 return QSize(); |
|
620 return pixmap->size(); |
|
621 } |
|
622 |
|
623 /*! \reimp */ |
|
624 QRect QAccessibleDisplay::imagePosition(QAccessible2::CoordinateType coordType) |
|
625 { |
|
626 QLabel *label = qobject_cast<QLabel *>(widget()); |
|
627 if (!label) |
|
628 return QRect(); |
|
629 const QPixmap *pixmap = label->pixmap(); |
|
630 if (!pixmap) |
|
631 return QRect(); |
|
632 |
|
633 switch (coordType) { |
|
634 case QAccessible2::RelativeToScreen: |
|
635 return QRect(label->mapToGlobal(label->pos()), label->size()); |
|
636 case QAccessible2::RelativeToParent: |
|
637 return label->geometry(); |
|
638 } |
|
639 |
|
640 return QRect(); |
|
641 } |
|
642 |
605 #ifndef QT_NO_LINEEDIT |
643 #ifndef QT_NO_LINEEDIT |
606 /*! |
644 /*! |
607 \class QAccessibleLineEdit |
645 \class QAccessibleLineEdit |
608 \brief The QAccessibleLineEdit class implements the QAccessibleInterface for widgets with editable text |
646 \brief The QAccessibleLineEdit class implements the QAccessibleInterface for widgets with editable text |
609 \internal |
647 \internal |