PySide6.QtLocation.QPlaceContent

class QPlaceContent

The QPlaceContent class holds content about places. More

Synopsis

Methods

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

Detailed Description

A QPlaceContent holds rich content such as images, reviews, or editorials, as well as attributes about the content such as the user or supplier of the content. Content objects might hold multiple data, e.g. an item holding a review typically includes the user that wrote the review. Use type() to inspect the type of content a QPlaceContent object represents, and dataTags() to see which data is held. Use value() to get the individual data as a QVariant.

Note

Some providers may require that the attribution string be displayed to the user whenever a piece of content is viewed.

The rich content of a place is typically made available as paginated items.

At present the QPlaceContent class is not extensible by 3rd parties.

Note: The Places API considers content objects to be ‘retrieve-only’ objects. Submission of content to a provider is not a supported use case.

class Type

Defines the type of content.

Constant

Description

QPlaceContent.NoType

The content object is default constructed, any other content type may be assigned to this content object

QPlaceContent.ImageType

The content object is an image

QPlaceContent.ReviewType

The content object is a review

QPlaceContent.EditorialType

The content object is an editorial

QPlaceContent.CustomType

The content object is of a custom type

class DataTag

Defines the value entry of the content object

Constant

Description

QPlaceContent.ContentSupplier

The supplier who contributed this content

QPlaceContent.ContentUser

The user who contributed this content

QPlaceContent.ContentAttribution

Returns a rich text attribution string

Note

Some providers may require that the attribution of a particular content item always be displayed when the content item is shown.

Constant

Description

QPlaceContent.ImageId

The image’s identifier

QPlaceContent.ImageUrl

The image’s url

QPlaceContent.ImageMimeType

The image’s MIME type

QPlaceContent.EditorialTitle

The title of the editorial

QPlaceContent.EditorialText

A textual description of the place. Depending upon the provider, the text could be either rich (HTML based) text or plain text.

QPlaceContent.EditorialLanguage

The language of the editorial. Typically this would be a language code in the 2 letter ISO 639-1 format.

QPlaceContent.ReviewId

The identifier of the review

QPlaceContent.ReviewDateTime

The date and time that the review was submitted

QPlaceContent.ReviewTitle

The title of the review

QPlaceContent.ReviewText

The text of the review. Depending on the provider, the text could be rich (HTML based) or plain text.

QPlaceContent.ReviewLanguage

The language of the review. Typically this would be a language code in the 2 letter ISO 639-1 format.

QPlaceContent.ReviewRating

This review’s rating of the place

QPlaceContent.CustomDataTag

Added in version 6.5.

__init__([type=QPlaceContent.Type.NoType])
Parameters:

typeType

Constructs an content object for type.

__init__(other)
Parameters:

otherQPlaceContent

Constructs a new copy of other.

attribution()
Return type:

str

Note

This function is deprecated.

dataTags()
Return type:

.list of QPlaceContent.DataTag

Returns the list of data tags for which values are stored in this content objects.

__ne__(other)
Parameters:

otherQPlaceContent

Return type:

bool

Returns true if this content object is not equivalent to other, otherwise returns false.

__eq__(other)
Parameters:

otherQPlaceContent

Return type:

bool

Returns true if this content object is equivalent to other, otherwise returns false.

setAttribution(attribution)
Parameters:

attribution – str

Note

This function is deprecated.

setSupplier(supplier)
Parameters:

supplierQPlaceSupplier

Note

This function is deprecated.

setUser(user)
Parameters:

userQPlaceUser

Note

This function is deprecated.

setValue(tag, arg__2)
Parameters:
  • tagDataTag

  • arg__2 – object

Sets the value stored for the data tag to value.

See also

value()

supplier()
Return type:

QPlaceSupplier

Note

This function is deprecated.

swap(other)
Parameters:

otherQPlaceContent

type()
Return type:

Type

Returns the content type.

user()
Return type:

QPlaceUser

Note

This function is deprecated.

value(tag)
Parameters:

tagDataTag

Return type:

object

Returns the value stored for the data tag, or an invalid QVariant if there is no data for that tag.

See also

setValue()