Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QHelpSearchResult Class Reference

The QHelpSearchResult class provides the data associated with the search result. More...

#include <qhelpsearchresult.h>

+ Collaboration diagram for QHelpSearchResult:

Public Member Functions

 QHelpSearchResult ()
 Constructs a new empty QHelpSearchResult.
 
 QHelpSearchResult (const QHelpSearchResult &other)
 Constructs a copy of other.
 
 QHelpSearchResult (const QUrl &url, const QString &title, const QString &snippet)
 Constructs the search result containing url, title and snippet as the description of the result.
 
 ~QHelpSearchResult ()
 Destroys the search result.
 
QHelpSearchResultoperator= (const QHelpSearchResult &other)
 Assigns other to this search result and returns a reference to this search result.
 
QString title () const
 Returns the document title of the search result.
 
QUrl url () const
 Returns the document URL of the search result.
 
QString snippet () const
 Returns the document snippet containing the search phrase of the search result.
 

Detailed Description

The QHelpSearchResult class provides the data associated with the search result.

Since
5.9 \inmodule QtHelp

The QHelpSearchResult object is a data object that describes a single search result. The vector of search result objects is returned by QHelpSearchEngine::searchResults(). The description of the search result contains the document title and URL that the search input matched. It also contains the snippet from the document content containing the best match of the search input.

See also
QHelpSearchEngine

Definition at line 17 of file qhelpsearchresult.h.

Constructor & Destructor Documentation

◆ QHelpSearchResult() [1/3]

QHelpSearchResult::QHelpSearchResult ( )

Constructs a new empty QHelpSearchResult.

Definition at line 37 of file qhelpsearchresult.cpp.

◆ QHelpSearchResult() [2/3]

QHelpSearchResult::QHelpSearchResult ( const QHelpSearchResult & other)
default

Constructs a copy of other.

◆ QHelpSearchResult() [3/3]

QHelpSearchResult::QHelpSearchResult ( const QUrl & url,
const QString & title,
const QString & snippet )

Constructs the search result containing url, title and snippet as the description of the result.

Definition at line 48 of file qhelpsearchresult.cpp.

◆ ~QHelpSearchResult()

QHelpSearchResult::~QHelpSearchResult ( )
default

Destroys the search result.

Member Function Documentation

◆ operator=()

QHelpSearchResult & QHelpSearchResult::operator= ( const QHelpSearchResult & other)
default

Assigns other to this search result and returns a reference to this search result.

◆ snippet()

QString QHelpSearchResult::snippet ( ) const

Returns the document snippet containing the search phrase of the search result.

Definition at line 85 of file qhelpsearchresult.cpp.

◆ title()

QString QHelpSearchResult::title ( ) const

Returns the document title of the search result.

Definition at line 69 of file qhelpsearchresult.cpp.

◆ url()

QUrl QHelpSearchResult::url ( ) const

Returns the document URL of the search result.

Definition at line 77 of file qhelpsearchresult.cpp.


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