summaryrefslogtreecommitdiffstats
path: root/src/gui/accessible
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/accessible')
-rw-r--r--src/gui/accessible/qaccessible.h7
-rw-r--r--src/gui/accessible/qaccessible2.cpp12
-rw-r--r--src/gui/accessible/qaccessible2.h16
3 files changed, 34 insertions, 1 deletions
diff --git a/src/gui/accessible/qaccessible.h b/src/gui/accessible/qaccessible.h
index 96fe91c..8f6d9d9 100644
--- a/src/gui/accessible/qaccessible.h
+++ b/src/gui/accessible/qaccessible.h
@@ -310,7 +310,8 @@ namespace QAccessible2
TextInterface,
EditableTextInterface,
ValueInterface,
- TableInterface
+ TableInterface,
+ ActionInterface
};
}
@@ -319,6 +320,7 @@ class QAccessibleTextInterface;
class QAccessibleEditableTextInterface;
class QAccessibleValueInterface;
class QAccessibleTableInterface;
+class QAccessibleActionInterface;
class Q_GUI_EXPORT QAccessibleInterface : public QAccessible
{
@@ -376,6 +378,9 @@ public:
inline QAccessibleTableInterface *tableInterface()
{ return reinterpret_cast<QAccessibleTableInterface *>(cast_helper(QAccessible2::TableInterface)); }
+ inline QAccessibleActionInterface *actionInterface()
+ { return reinterpret_cast<QAccessibleActionInterface *>(cast_helper(QAccessible2::ActionInterface)); }
+
private:
QAccessible2Interface *cast_helper(QAccessible2::InterfaceType);
};
diff --git a/src/gui/accessible/qaccessible2.cpp b/src/gui/accessible/qaccessible2.cpp
index f731962..0867368 100644
--- a/src/gui/accessible/qaccessible2.cpp
+++ b/src/gui/accessible/qaccessible2.cpp
@@ -108,6 +108,18 @@ QT_BEGIN_NAMESPACE
\link http://www.linux-foundation.org/en/Accessibility/IAccessible2 IAccessible2 Specification \endlink
*/
+/*!
+ \class QAccessibleActionInterface
+ \ingroup accessibility
+ \internal
+ \preliminary
+
+ \brief The QAccessibleActionInterface class implements support for
+ the IAccessibleAction interface.
+
+ \link http://www.linux-foundation.org/en/Accessibility/IAccessible2 IAccessible2 Specification \endlink
+*/
+
QAccessibleSimpleEditableTextInterface::QAccessibleSimpleEditableTextInterface(
QAccessibleInterface *accessibleInterface)
: iface(accessibleInterface)
diff --git a/src/gui/accessible/qaccessible2.h b/src/gui/accessible/qaccessible2.h
index 3281509..435c640 100644
--- a/src/gui/accessible/qaccessible2.h
+++ b/src/gui/accessible/qaccessible2.h
@@ -81,6 +81,7 @@ inline QAccessible2Interface *qAccessibleValueCastHelper() { return 0; }
inline QAccessible2Interface *qAccessibleTextCastHelper() { return 0; }
inline QAccessible2Interface *qAccessibleEditableTextCastHelper() { return 0; }
inline QAccessible2Interface *qAccessibleTableCastHelper() { return 0; }
+inline QAccessible2Interface *qAccessibleActionCastHelper() { return 0; }
#define Q_ACCESSIBLE_OBJECT \
public: \
@@ -95,6 +96,8 @@ inline QAccessible2Interface *qAccessibleTableCastHelper() { return 0; }
return qAccessibleValueCastHelper(); \
case QAccessible2::TableInterface: \
return qAccessibleTableCastHelper(); \
+ case QAccessible2::ActionInterface: \
+ return qAccessibleActionCastHelper(); \
} \
return 0; \
} \
@@ -208,6 +211,19 @@ public:
int *columnSpan, bool *isSelected) = 0;
};
+class Q_GUI_EXPORT QAccessibleActionInterface : public QAccessible2Interface
+{
+public:
+ inline QAccessible2Interface *qAccessibleActionCastHelper() { return this; }
+
+ virtual int actionCount() = 0;
+ virtual void doAction(int actionIndex) = 0;
+ virtual QString description(int actionIndex) = 0;
+ virtual QString name(int actionIndex) = 0;
+ virtual QString localizedName(int actionIndex) = 0;
+ virtual QStringList keyBindings(int actionIndex) = 0;
+};
+
#endif // QT_NO_ACCESSIBILITY
QT_END_NAMESPACE