diff options
author | Harald Fernengel <harald.fernengel@nokia.com> | 2009-11-06 14:15:05 (GMT) |
---|---|---|
committer | Harald Fernengel <harald.fernengel@nokia.com> | 2009-11-06 14:16:11 (GMT) |
commit | 4ad6343be52b757fd354cd92874bca944d2ede49 (patch) | |
tree | 68d9fa38a04de8959310b977f295184e2b4a8bdd /tests | |
parent | f8883337699d59e3b5eb9393067a24fb43fb2604 (diff) | |
download | Qt-4ad6343be52b757fd354cd92874bca944d2ede49.zip Qt-4ad6343be52b757fd354cd92874bca944d2ede49.tar.gz Qt-4ad6343be52b757fd354cd92874bca944d2ede49.tar.bz2 |
Add preliminary QAccessibleImage interface
As requested by the Maemo team.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qaccessibility/tst_qaccessibility.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/auto/qaccessibility/tst_qaccessibility.cpp b/tests/auto/qaccessibility/tst_qaccessibility.cpp index 9f2e4e7..25c2649 100644 --- a/tests/auto/qaccessibility/tst_qaccessibility.cpp +++ b/tests/auto/qaccessibility/tst_qaccessibility.cpp @@ -4034,6 +4034,27 @@ void tst_QAccessibility::labelTest() delete acc_label; delete label; QTestAccessibility::clearEvents(); + + QPixmap testPixmap(50, 50); + testPixmap.fill(); + + QLabel imageLabel; + imageLabel.setPixmap(testPixmap); + imageLabel.setToolTip("Test Description"); + + acc_label = QAccessible::queryAccessibleInterface(&imageLabel); + QVERIFY(acc_label); + + QAccessibleImageInterface *imageInterface = acc_label->imageInterface(); + QVERIFY(imageInterface); + + QCOMPARE(imageInterface->imageSize(), testPixmap.size()); + QCOMPARE(imageInterface->imageDescription(), QString::fromLatin1("Test Description")); + QCOMPARE(imageInterface->imagePosition(QAccessible2::RelativeToParent), imageLabel.geometry()); + + delete acc_label; + + QTestAccessibility::clearEvents(); #else QSKIP("Test needs accessibility support.", SkipAll); #endif |