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
QtHarmonyExtras::ShareKit::SharedRecord Class Referenceabstract

\inmodule QtHarmonyExtras More...

#include <qohossharekit_p.h>

Collaboration diagram for QtHarmonyExtras::ShareKit::SharedRecord:

Public Member Functions

virtual ~SharedRecord ()
virtual QMimeType mimeType () const =0
 Gets the shared record associated mime type.
virtual QString content () const =0
 Gets the shared record optional content.
virtual QString filePath () const =0
 Gets the shared record optional file path.
virtual bool isUrlContent () const =0
 Provides information if content() contains URL string.
virtual void setTitle (const QString &title)=0
 Sets the title of shared content with a given title.
virtual QString title () const =0
 Gets the optional title of the shared record.
virtual void setLabel (const QString &label)=0
 Sets the label indicating the current data record type with a given label.
virtual QString label () const =0
 Gets the optional label of the shared record.
virtual void setDescription (const QString &description)=0
 Sets data record description with a given description.
virtual QString description () const =0
 Gets the optional description of the shared record.
virtual void setThumbnail (const QByteArray &thumbnail)=0
 Sets data record thumbnail with a given thumbnail.
virtual QByteArray thumbnail () const =0
 Gets the optional thumbnail content of the shared record.
virtual void setThumbnailFilePath (const QString &thumbnailFilePath)=0
 Sets data record thumbnail uri with a given thumbnailFilePath.
virtual QString thumbnailFilePath () const =0
 Gets the optional thumbnail file path of the shared record.
virtual void setExtraData (const QVariantMap &extraData)=0
 Sets exatra data for sharing with a given extraData.
virtual QVariantMap extraData () const =0
 Gets the optional extra data of the shared record.

Protected Member Functions

 SharedRecord ()

Detailed Description

\inmodule QtHarmonyExtras

Since
5.12.12

The SharedRecord class encapsulates the content and metadata to be shared with another application.

A SharedRecord holds the data to be shared (text content, a file, or a URL) along with optional metadata such as a title, label, description, and thumbnail. Instances are created using QtHarmonyExtras::ShareKit::createContentRecord(), QtHarmonyExtras::ShareKit::createFileRecord(), or QtHarmonyExtras::ShareKit::createUrlRecord(), and are then passed to the share controller to be shared with other applications.

See \l {https://developer.huawei.com/consumer/en/doc/harmonyos-references/share-system-share#section20696483813} {SharedRecord}.

See also
QtHarmonyExtras::ShareKit::createContentRecord(), QtHarmonyExtras::ShareKit::createFileRecord(), QtHarmonyExtras::ShareKit::createUrlRecord()

Definition at line 52 of file qohossharekit_p.h.

Constructor & Destructor Documentation

◆ ~SharedRecord()

QtHarmonyExtras::ShareKit::SharedRecord::~SharedRecord ( )
virtualdefault

◆ SharedRecord()

QtHarmonyExtras::ShareKit::SharedRecord::SharedRecord ( )
protecteddefault

Member Function Documentation

◆ content()

virtual QString QtHarmonyExtras::ShareKit::SharedRecord::content ( ) const
pure virtual

Gets the shared record optional content.

Either content or file path must be set. If there is no content null string is provided. See \l {https://developer.huawei.com/consumer/en/doc/harmonyos-references/share-system-share#section20696483813} {SharedRecord.content}

◆ description()

virtual QString QtHarmonyExtras::ShareKit::SharedRecord::description ( ) const
pure virtual

Gets the optional description of the shared record.

If there is no description null string is provided. See \l {https://developer.huawei.com/consumer/en/doc/harmonyos-references/share-system-share#section20696483813} {SharedRecord.description}

◆ extraData()

virtual QVariantMap QtHarmonyExtras::ShareKit::SharedRecord::extraData ( ) const
pure virtual

Gets the optional extra data of the shared record.

If there is no extra data empty variant map is provided. See \l {https://developer.huawei.com/consumer/en/doc/harmonyos-references/share-system-share#section20696483813} {SharedRecord.extraData}

◆ filePath()

virtual QString QtHarmonyExtras::ShareKit::SharedRecord::filePath ( ) const
pure virtual

Gets the shared record optional file path.

Either content or file path must be set. If there is no file path null string is provided. See \l {https://developer.huawei.com/consumer/en/doc/harmonyos-references/share-system-share#section20696483813} {SharedRecord.content}

◆ isUrlContent()

virtual bool QtHarmonyExtras::ShareKit::SharedRecord::isUrlContent ( ) const
pure virtual

Provides information if content() contains URL string.

For URL content the mimeType() should not be used. See \l {https://developer.huawei.com/consumer/en/doc/harmonyos-references/share-system-share#section20696483813} {SharedRecord.content}

◆ label()

virtual QString QtHarmonyExtras::ShareKit::SharedRecord::label ( ) const
pure virtual

Gets the optional label of the shared record.

If there is no label null string is provided. See \l {https://developer.huawei.com/consumer/en/doc/harmonyos-references/share-system-share#section20696483813} {SharedRecord.label}

◆ mimeType()

virtual QMimeType QtHarmonyExtras::ShareKit::SharedRecord::mimeType ( ) const
pure virtual

Gets the shared record associated mime type.

See \l {https://developer.huawei.com/consumer/en/doc/harmonyos-references/share-system-share#section20696483813} {SharedRecord.utd}

◆ setDescription()

virtual void QtHarmonyExtras::ShareKit::SharedRecord::setDescription ( const QString & description)
pure virtual

◆ setExtraData()

virtual void QtHarmonyExtras::ShareKit::SharedRecord::setExtraData ( const QVariantMap & extraData)
pure virtual

◆ setLabel()

virtual void QtHarmonyExtras::ShareKit::SharedRecord::setLabel ( const QString & label)
pure virtual

Sets the label indicating the current data record type with a given label.

See \l {https://developer.huawei.com/consumer/en/doc/harmonyos-references/share-system-share#section20696483813} {SharedRecord.label}

◆ setThumbnail()

virtual void QtHarmonyExtras::ShareKit::SharedRecord::setThumbnail ( const QByteArray & thumbnail)
pure virtual

Sets data record thumbnail with a given thumbnail.

The thumbnail is an image file content. See \l {https://developer.huawei.com/consumer/en/doc/harmonyos-references/share-system-share#section20696483813} {SharedRecord.thumbnail}

◆ setThumbnailFilePath()

virtual void QtHarmonyExtras::ShareKit::SharedRecord::setThumbnailFilePath ( const QString & thumbnailFilePath)
pure virtual

Sets data record thumbnail uri with a given thumbnailFilePath.

See \l {https://developer.huawei.com/consumer/en/doc/harmonyos-references/share-system-share#section20696483813} {SharedRecord.thumbnailUri}

◆ setTitle()

virtual void QtHarmonyExtras::ShareKit::SharedRecord::setTitle ( const QString & title)
pure virtual

◆ thumbnail()

virtual QByteArray QtHarmonyExtras::ShareKit::SharedRecord::thumbnail ( ) const
pure virtual

Gets the optional thumbnail content of the shared record.

If there is no thumbnail empty byte array is provided. See \l {https://developer.huawei.com/consumer/en/doc/harmonyos-references/share-system-share#section20696483813} {SharedRecord.thumbnail}

◆ thumbnailFilePath()

virtual QString QtHarmonyExtras::ShareKit::SharedRecord::thumbnailFilePath ( ) const
pure virtual

Gets the optional thumbnail file path of the shared record.

If there is no thumbnail file path null string is provided. See \l {https://developer.huawei.com/consumer/en/doc/harmonyos-references/share-system-share#section20696483813} {SharedRecord.thumbnailFilePath}

◆ title()

virtual QString QtHarmonyExtras::ShareKit::SharedRecord::title ( ) const
pure virtual

Gets the optional title of the shared record.

If there is no title null string is provided. See \l {https://developer.huawei.com/consumer/en/doc/harmonyos-references/share-system-share#section20696483813} {SharedRecord.title}


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