Qt 4.8
Static Public Functions | Private Functions | Static Private Functions | List of all members
QTestAccessibility Class Reference

#include <qtestaccessible.h>

Static Public Functions

static void cleanup ()
 
static void clearEvents ()
 
static EventList events ()
 
static void initialize ()
 
static bool verifyEvent (const QTestAccessibilityEvent &ev)
 
static bool verifyEvent (QObject *o, int c, int e)
 

Private Functions

 QTestAccessibility ()
 
 ~QTestAccessibility ()
 

Static Private Functions

static EventListeventList ()
 
static QTestAccessibility *& instance ()
 
static void rootObjectHandler (QObject *object)
 
static void updateHandler (QObject *o, int c, QAccessible::Event e)
 

Detailed Description

Definition at line 86 of file qtestaccessible.h.

Constructors and Destructors

◆ QTestAccessibility()

QTestAccessibility::QTestAccessibility ( )
inlineprivate

Definition at line 116 of file qtestaccessible.h.

117  {
120  }
static RootObjectHandler installRootObjectHandler(RootObjectHandler)
Installs the given handler as the function to be used by setRootObject(), and returns the previously ...
static void rootObjectHandler(QObject *object)
static void updateHandler(QObject *o, int c, QAccessible::Event e)
static UpdateHandler installUpdateHandler(UpdateHandler)
Installs the given handler as the function to be used by updateAccessibility(), and returns the previ...

◆ ~QTestAccessibility()

QTestAccessibility::~QTestAccessibility ( )
inlineprivate

Definition at line 122 of file qtestaccessible.h.

123  {
126  }
static RootObjectHandler installRootObjectHandler(RootObjectHandler)
Installs the given handler as the function to be used by setRootObject(), and returns the previously ...
static UpdateHandler installUpdateHandler(UpdateHandler)
Installs the given handler as the function to be used by updateAccessibility(), and returns the previ...

Functions

◆ cleanup()

static void QTestAccessibility::cleanup ( )
inlinestatic

Definition at line 96 of file qtestaccessible.h.

97  {
98  delete instance();
99  instance() = 0;
100  }
static QTestAccessibility *& instance()

◆ clearEvents()

static void QTestAccessibility::clearEvents ( )
inlinestatic

Definition at line 101 of file qtestaccessible.h.

101 { eventList().clear(); }
static EventList & eventList()
void clear()
Removes all items from the list.
Definition: qlist.h:764

◆ eventList()

static EventList& QTestAccessibility::eventList ( )
inlinestaticprivate

Definition at line 146 of file qtestaccessible.h.

147  {
148  static EventList list;
149  return list;
150  }
The QList class is a template class that provides lists.
Definition: qdatastream.h:62

◆ events()

static EventList QTestAccessibility::events ( )
inlinestatic

Definition at line 102 of file qtestaccessible.h.

102 { return eventList(); }
static EventList & eventList()

◆ initialize()

static void QTestAccessibility::initialize ( )
inlinestatic

Definition at line 89 of file qtestaccessible.h.

90  {
91  if (!instance()) {
94  }
95  }
static QTestAccessibility *& instance()
void qAddPostRoutine(QtCleanUpFunction p)
static void cleanup()

◆ instance()

static QTestAccessibility*& QTestAccessibility::instance ( )
inlinestaticprivate

Definition at line 152 of file qtestaccessible.h.

153  {
154  static QTestAccessibility *ta = 0;
155  return ta;
156  }

◆ rootObjectHandler()

static void QTestAccessibility::rootObjectHandler ( QObject object)
inlinestaticprivate

Definition at line 128 of file qtestaccessible.h.

129  {
130  // qDebug("rootObjectHandler called %p", object);
131  if (object) {
132  QApplication* app = qobject_cast<QApplication*>(object);
133  if ( !app )
134  qWarning("QTEST_ACCESSIBILITY: root Object is not a QApplication!");
135  } else {
136  qWarning("QTEST_ACCESSIBILITY: root Object called with 0 pointer");
137  }
138  }
T qobject_cast(QObject *object)
Definition: qobject.h:375
The QApplication class manages the GUI application&#39;s control flow and main settings.
Definition: qapplication.h:99
Q_CORE_EXPORT void qWarning(const char *,...)

◆ updateHandler()

static void QTestAccessibility::updateHandler ( QObject o,
int  c,
QAccessible::Event  e 
)
inlinestaticprivate

Definition at line 140 of file qtestaccessible.h.

141  {
142  // qDebug("updateHandler called: %p %d %d", o, c, (int)e);
143  eventList().append(QTestAccessibilityEvent(o, c, (int)e));
144  }
static EventList & eventList()
unsigned char c[8]
Definition: qnumeric_p.h:62
void append(const T &t)
Inserts value at the end of the list.
Definition: qlist.h:507

◆ verifyEvent() [1/2]

static bool QTestAccessibility::verifyEvent ( const QTestAccessibilityEvent ev)
inlinestatic

Definition at line 103 of file qtestaccessible.h.

104  {
105  if (eventList().isEmpty())
106  return FALSE;
107  return eventList().takeFirst() == ev;
108  }
static EventList & eventList()
static bool isEmpty(const char *str)
T takeFirst()
Removes the first item in the list and returns it.
Definition: qlist.h:489
#define FALSE
Synonym for false.
Definition: qglobal.h:1019

◆ verifyEvent() [2/2]

static bool QTestAccessibility::verifyEvent ( QObject o,
int  c,
int  e 
)
inlinestatic

Definition at line 110 of file qtestaccessible.h.

111  {
112  return verifyEvent(QTestAccessibilityEvent(o, c, e));
113  }
unsigned char c[8]
Definition: qnumeric_p.h:62
static bool verifyEvent(const QTestAccessibilityEvent &ev)

The documentation for this class was generated from the following file: