Qt 4.8
Public Functions | Properties | List of all members
QAElement Class Reference

#include <qaccessible_mac_p.h>

Public Functions

AXUIElementRef element () const
 
int id () const
 
bool isValid () const
 
HIObjectRef object () const
 
void operator= (const QAElement &other)
 
bool operator== (const QAElement &other) const
 
 QAElement ()
 
 QAElement (AXUIElementRef elementRef)
 
 QAElement (const QAElement &element)
 
 QAElement (HIObjectRef, int child)
 
 ~QAElement ()
 

Properties

AXUIElementRef elementRef
 

Detailed Description

Definition at line 373 of file qaccessible_mac_p.h.

Constructors and Destructors

◆ QAElement() [1/4]

QAElement::QAElement ( )

◆ QAElement() [2/4]

QAElement::QAElement ( AXUIElementRef  elementRef)
explicit

Definition at line 488 of file qaccessible_mac.mm.

490 {
491  if (elementRef != 0) {
492  CFRetain(elementRef);
493  CFRetain(object());
494  }
495 }
AXUIElementRef elementRef

◆ QAElement() [3/4]

QAElement::QAElement ( const QAElement element)

Definition at line 497 of file qaccessible_mac.mm.

498 :elementRef(element.elementRef)
499 {
500  if (elementRef != 0) {
501  CFRetain(elementRef);
502  CFRetain(object());
503  }
504 }
AXUIElementRef elementRef

◆ QAElement() [4/4]

QAElement::QAElement ( HIObjectRef  object,
int  child 
)

Definition at line 506 of file qaccessible_mac.mm.

507 {
508 #ifndef QT_MAC_USE_COCOA
509  if (object == 0) {
510  elementRef = 0; // Create invalid QAElement.
511  } else {
512  elementRef = AXUIElementCreateWithHIObjectAndIdentifier(object, child);
513  CFRetain(object);
514  }
515 #else
516  Q_UNUSED(object);
517  Q_UNUSED(child);
518 #endif
519 }
AXUIElementRef elementRef
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ ~QAElement()

QAElement::~QAElement ( )

Definition at line 521 of file qaccessible_mac.mm.

522 {
523  if (elementRef != 0) {
524  CFRelease(object());
525  CFRelease(elementRef);
526  }
527 }
AXUIElementRef elementRef

Functions

◆ element()

AXUIElementRef QAElement::element ( ) const
inline

◆ id()

int QAElement::id ( ) const
inline

Definition at line 391 of file qaccessible_mac_p.h.

Referenced by QAccessibleHierarchyManager::lookup(), and qHash().

392  {
393  UInt64 theId;
394 #ifndef QT_MAC_USE_COCOA
395  AXUIElementGetIdentifier(elementRef, &theId);
396 #else
397  theId = 0;
398 #endif
399  return theId;
400  }
AXUIElementRef elementRef

◆ isValid()

bool QAElement::isValid ( ) const
inline

◆ object()

HIObjectRef QAElement::object ( ) const
inline

Definition at line 382 of file qaccessible_mac_p.h.

Referenced by isEmbeddedTabBar(), isItInteresting(), isStandaloneTabBar(), isTabWidget(), macRole(), qHash(), QAccessible::setRootObject(), and QAccessible::updateAccessibility().

383  {
384 #ifndef Q_WS_MAC64
385  return AXUIElementGetHIObject(elementRef);
386 #else
387  return 0;
388 #endif
389  }
AXUIElementRef elementRef

◆ operator=()

void QAElement::operator= ( const QAElement other)

Definition at line 529 of file qaccessible_mac.mm.

530 {
531  if (*this == other)
532  return;
533 
534  if (elementRef != 0) {
535  CFRelease(object());
536  CFRelease(elementRef);
537  }
538 
539  elementRef = other.elementRef;
540 
541  if (elementRef != 0) {
542  CFRetain(elementRef);
543  CFRetain(object());
544  }
545 }
AXUIElementRef elementRef

◆ operator==()

bool QAElement::operator== ( const QAElement other) const

Definition at line 547 of file qaccessible_mac.mm.

548 {
549  if (elementRef == 0 || other.elementRef == 0)
550  return (elementRef == other.elementRef);
551 
552  return CFEqual(elementRef, other.elementRef);
553 }
AXUIElementRef elementRef

Properties

◆ elementRef

AXUIElementRef QAElement::elementRef
private

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