summaryrefslogtreecommitdiffstats
path: root/src/plugins/accessible/widgets/simplewidgets.cpp
diff options
context:
space:
mode:
authorHarald Fernengel <harald.fernengel@nokia.com>2009-10-20 15:40:40 (GMT)
committerHarald Fernengel <harald.fernengel@nokia.com>2009-10-20 15:48:25 (GMT)
commit77f2319ab80be40268da689d5bc4726257ddd7ab (patch)
tree19a312a804c1c1275589106fc45430fe1c923e0f /src/plugins/accessible/widgets/simplewidgets.cpp
parent0bdb8aa64deef437b94f4998f4c2f6ed93a38489 (diff)
downloadQt-77f2319ab80be40268da689d5bc4726257ddd7ab.zip
Qt-77f2319ab80be40268da689d5bc4726257ddd7ab.tar.gz
Qt-77f2319ab80be40268da689d5bc4726257ddd7ab.tar.bz2
Implement QAccesibleValueInterface for QProgressBar
Patch has been tested thorougly in the accessibility-fixes branch of the qt-maemo repository, thus no review
Diffstat (limited to 'src/plugins/accessible/widgets/simplewidgets.cpp')
-rw-r--r--src/plugins/accessible/widgets/simplewidgets.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/plugins/accessible/widgets/simplewidgets.cpp b/src/plugins/accessible/widgets/simplewidgets.cpp
index 1aadd6c..89482bb 100644
--- a/src/plugins/accessible/widgets/simplewidgets.cpp
+++ b/src/plugins/accessible/widgets/simplewidgets.cpp
@@ -756,6 +756,34 @@ void QAccessibleLineEdit::scrollToSubstring(int startIndex, int endIndex)
#endif // QT_NO_LINEEDIT
+#ifndef QT_NO_PROGRESSBAR
+QAccessibleProgressBar::QAccessibleProgressBar(QWidget *o)
+ : QAccessibleDisplay(o)
+{
+ Q_ASSERT(progressBar());
+}
+
+QVariant QAccessibleProgressBar::currentValue()
+{
+ return progressBar()->value();
+}
+
+QVariant QAccessibleProgressBar::maximumValue()
+{
+ return progressBar()->maximum();
+}
+
+QVariant QAccessibleProgressBar::minimumValue()
+{
+ return progressBar()->minimum();
+}
+
+QProgressBar *QAccessibleProgressBar::progressBar() const
+{
+ return qobject_cast<QProgressBar *>(object());
+}
+#endif
+
#endif // QT_NO_ACCESSIBILITY
QT_END_NAMESPACE