summaryrefslogtreecommitdiffstats
path: root/src/gui/accessible
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@nokia.com>2012-03-07 13:51:31 +0100
committerQt by Nokia <qt-info@nokia.com>2012-03-12 13:14:05 +0100
commiteb57da5b3ff9915d2254fdbf57992fa0320d9041 (patch)
tree47c862ddba23eaa4790eb2f7e8d10e1c5299da11 /src/gui/accessible
parent0ecec0e903f80c8657f323a51973b81cdeebcac1 (diff)
Update accessibility StateChange by custom event.
Subclass QAccessibleEvent to give details what changed in the state change. Change-Id: I9005d311e85a3c8bfa6e062833fa6a8a7dc6a4a4 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
Diffstat (limited to 'src/gui/accessible')
-rw-r--r--src/gui/accessible/qaccessible.cpp3
-rw-r--r--src/gui/accessible/qaccessible.h15
2 files changed, 17 insertions, 1 deletions
diff --git a/src/gui/accessible/qaccessible.cpp b/src/gui/accessible/qaccessible.cpp
index a7843ba227..91b0b5fbe6 100644
--- a/src/gui/accessible/qaccessible.cpp
+++ b/src/gui/accessible/qaccessible.cpp
@@ -257,7 +257,8 @@ QT_BEGIN_NAMESPACE
\value SelectionWithin Several changes to a selection has occurred in an item
view.
\value SoundPlayed A sound has been played by an object
- \value StateChanged The QAccessible::State of an object has changed.
+ \omitvalue StateChanged The QAccessible::State of an object has changed.
+ This value is used internally for the QAccessibleStateChangeEvent.
\value TableCaptionChanged A table caption has been changed.
\value TableColumnDescriptionChanged The description of a table column, typically found in
the column's header, has been changed.
diff --git a/src/gui/accessible/qaccessible.h b/src/gui/accessible/qaccessible.h
index 8c962ffb53..e8a5cf8bad 100644
--- a/src/gui/accessible/qaccessible.h
+++ b/src/gui/accessible/qaccessible.h
@@ -452,6 +452,21 @@ private:
int m_child;
};
+class Q_GUI_EXPORT QAccessibleStateChangeEvent :public QAccessibleEvent
+{
+public:
+ inline QAccessibleStateChangeEvent(QAccessible::State state, QObject *obj, int chld = -1)
+ : QAccessibleEvent(QAccessible::StateChanged, obj, chld), m_changedStates(state)
+ {}
+
+ QAccessible::State changedStates() const {
+ return m_changedStates;
+ }
+
+private:
+ QAccessible::State m_changedStates;
+};
+
#define QAccessibleInterface_iid "org.qt-project.Qt.QAccessibleInterface"
Q_DECLARE_INTERFACE(QAccessibleInterface, QAccessibleInterface_iid)