Qt 4.8
Public Functions | Public Variables | List of all members
QAccessibleObjectPrivate Class Reference

Public Functions

QList< QByteArrayactionList () const
 

Public Variables

QPointer< QObjectobject
 

Detailed Description

Definition at line 54 of file qaccessibleobject.cpp.

Functions

◆ actionList()

QList< QByteArray > QAccessibleObjectPrivate::actionList ( ) const

Definition at line 62 of file qaccessibleobject.cpp.

63 {
65 
66  if (!object)
67  return actionList;
68 
69  const QMetaObject *mo = object->metaObject();
70  Q_ASSERT(mo);
71 
73  mo->classInfo(mo->indexOfClassInfo("DefaultSlot")).value());
74 
75  for (int i = 0; i < mo->methodCount(); ++i) {
76  const QMetaMethod member = mo->method(i);
77  if (member.methodType() != QMetaMethod::Slot && member.access() != QMetaMethod::Public)
78  continue;
79 
80  if (!qstrcmp(member.tag(), "QACCESSIBLE_SLOT")) {
81  if (member.signature() == defaultAction)
82  actionList.prepend(defaultAction);
83  else
84  actionList << member.signature();
85  }
86  }
87 
88  return actionList;
89 }
The QMetaObject class contains meta-information about Qt objects.
Definition: qobjectdefs.h:304
static QByteArray normalizedSignature(const char *method)
Normalizes the signature of the given method.
QMetaClassInfo classInfo(int index) const
Returns the meta-data for the item of class information with the given index.
The QByteArray class provides an array of bytes.
Definition: qbytearray.h:135
QList< QByteArray > actionList() const
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
void prepend(const T &t)
Inserts value at the beginning of the list.
Definition: qlist.h:541
MethodType methodType() const
Returns the type of this method (signal, slot, or method).
const char * tag() const
Returns the tag associated with this method.
QMetaMethod method(int index) const
Returns the meta-data for the method with the given index.
int qstrcmp(const QByteArray &str1, const char *str2)
Definition: qbytearray.cpp:336
const char * signature() const
Returns the signature of this method (e.g., setValue(double)).
Access access() const
Returns the access specification of this method (private, protected, or public).
int indexOfClassInfo(const char *name) const
Finds class information item name and returns its index; otherwise returns -1.
int methodCount() const
Returns the number of methods known to the meta-object system in this class, including the number of ...
The QMetaMethod class provides meta-data about a member function.
Definition: qmetaobject.h:56

Properties

◆ object

QPointer<QObject> QAccessibleObjectPrivate::object

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