CopperSpice API  1.9.1
QWebHitTestResult Class Reference

The QWebHitTestResult class provides information about the web page content after a hit test. More...

Public Methods

 QWebHitTestResult ()
 
 QWebHitTestResult (const QWebHitTestResult &other)
 
 ~QWebHitTestResult ()
 
QString alternateText () const
 
QRect boundingRect () const
 
QWebElement element () const
 
QWebElement enclosingBlockElement () const
 
QWebFrameframe () const
 
QUrl imageUrl () const
 
bool isContentEditable () const
 
bool isContentSelected () const
 
bool isNull () const
 
QWebElement linkElement () const
 
QWebFramelinkTargetFrame () const
 
QString linkText () const
 
QUrl linkTitle () const
 
QUrl linkUrl () const
 
QWebHitTestResult & operator= (const QWebHitTestResult &other)
 
QPixmap pixmap () const
 
QPoint pos () const
 
QString title () const
 

Friends

class QWebFrame
 
class QWebPage
 

Detailed Description

The QWebHitTestResult class provides information about the web page content after a hit test.

QWebHitTestResult is returned by QWebFrame::hitTestContent() to provide information about the content of the web page at the specified position.

See also
linkTargetFrame()

Constructor & Destructor Documentation

QWebHitTestResult::QWebHitTestResult ( )

Constructs a null hit test result.

QWebHitTestResult::QWebHitTestResult ( const QWebHitTestResult &  other)

Constructs a hit test result from other.

QWebHitTestResult::~QWebHitTestResult ( )

Destructor.

Method Documentation

QString QWebHitTestResult::alternateText ( ) const

Returns the alternate text of the element. This corresponds to the HTML alt attribute.

QRect QWebHitTestResult::boundingRect ( ) const

Returns the bounding rect of the element.

QWebElement QWebHitTestResult::element ( ) const

Returns the underlying DOM element as QWebElement.

QWebElement QWebHitTestResult::enclosingBlockElement ( ) const

Returns the block element that encloses the element hit.

A block element is an element that is rendered using the CSS "block" style. This includes for example text paragraphs.

QWebFrame * QWebHitTestResult::frame ( ) const

Returns the frame the hit test was executed in.

QUrl QWebHitTestResult::imageUrl ( ) const

Returns the url of the image.

bool QWebHitTestResult::isContentEditable ( ) const

Returns true if the content is editable by the user, otherwise returns false.

bool QWebHitTestResult::isContentSelected ( ) const

Returns true if the content tested is part of the selection, otherwise returns false.

bool QWebHitTestResult::isNull ( ) const

Returns true if the hit test result is null, otherwise returns false.

QWebElement QWebHitTestResult::linkElement ( ) const

Returns the element that represents the link.

See also
linkTargetFrame()
QWebFrame * QWebHitTestResult::linkTargetFrame ( ) const

Returns the frame that will load the link if it is activated.

See also
linkElement()
QString QWebHitTestResult::linkText ( ) const

Returns the text of the link.

QUrl QWebHitTestResult::linkTitle ( ) const

Returns the title of the link.

QUrl QWebHitTestResult::linkUrl ( ) const

Returns the url to which the link points to.

QWebHitTestResult & QWebHitTestResult::operator= ( const QWebHitTestResult &  other)

Copy assigns from other and returns a reference to this object.

QPixmap QWebHitTestResult::pixmap ( ) const

Returns a QPixmap containing the image. A null pixmap is returned if the element being tested is not an image.

QPoint QWebHitTestResult::pos ( ) const

Returns the position where the hit test occurred.

QString QWebHitTestResult::title ( ) const

Returns the title of the nearest enclosing HTML element.