QPlaceContent ClassThe QPlaceContent class serves as the base class for rich content types. More... #include <QPlaceContent> Inherited by: QPlaceEditorial, QPlaceImage, and QPlaceReview. This class was introduced in Qt Location 5.0. Public Types
Public Functions
Detailed DescriptionThe QPlaceContent class serves as the base class for rich content types. Rich content such as images, reviews and editorials inherit from the QPlaceContent class which contains common properties such as an attribution string and content contributor, which may take the form of a user and/or supplier. It is possible that a user from a supplier is contributing content, hence both fields could be filled in simultaneously. Note: Some providers may require that the attribution string be displayed to the user whenever a piece of content is viewed. Conversion between QPlaceContent and it's subclasses can be easily performed without casting. Due to the way it has been implemented, object slicing is not an issue, the following code is valid: QPlaceImage image; image.setUrl(QUrl("www.example.com")); QPlaceContent content = image; QPlaceImage image2; image2 = content; qDebug() << image2.url(); //image2.url() == "www.example.com" The rich content of a place is typically made available as paginated items. The ability to convert between QPlaceContent and it's subclasses means that code which handles the mechanics of paging can be easily shared for each of the sub types. 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. See also QPlaceImage, QPlaceReview, and QPlaceEditorial. Member Type Documentation
|
Constant | Value | Description |
---|---|---|
QPlaceContent::NoType | 0 | The content object is default constructed, any other content type may be assigned to this content object. |
QPlaceContent::ImageType | 1 | The content object is an image. |
QPlaceContent::ReviewType | 2 | The content object is a review. |
QPlaceContent::EditorialType | 3 | The content object is an editorial |
Constructs an default content object which has no type.
Constructs a new copy of other.
Destroys the content object.
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.
See also setAttribution().
Sets a rich text attribution string for this content item.
See also attribution().
Sets the supplier of the content.
See also supplier().
Sets the user who contributed this content.
See also user().
Returns the supplier who contributed this content.
See also setSupplier().
Returns the content type.
Returns the user who contributed this content.
See also setUser().
Returns true if this content object is not equivalent to other, otherwise returns false.
Assigns the other content object to this and returns a reference to this content object.
Returns true if this content object is equivalent to other, otherwise returns false.