Jump to content

Qt for HarmonyOS/qtohosextras doc/QOhosSharedRecord Class: Difference between revisions

From Qt Wiki
Created page with "(QtOhosExtras::ShareKit::QOhosSharedRecord) The QOhosSharedRecord class represents a record to be shared with other application. A record can be created using. More... {| class="wikitable" |Header: |#include <QOhosSharedRecord> |- |qmake: |QT += ohosextras |- |Since: |Qt 5.12.12 |} * List of all members, including inherited members == Public Functions == {| class="wikitable" |virtual |'''~QOhosSharedRecord'''() |- |virtual QString |'''content'''() const = 0 |- |virtua..."
 
No edit summary
Line 84: Line 84:
== Member Function Documentation ==
== Member Function Documentation ==


=== &lt;code&gt;[protected]&lt;/code&gt;QOhosSharedRecord::QOhosSharedRecord() ===
=== [protected] QOhosSharedRecord::QOhosSharedRecord() ===
Default constructs an instance of QOhosSharedRecord.
Default constructs an instance of QOhosSharedRecord.


=== &lt;code&gt;[virtual]&lt;/code&gt;QOhosSharedRecord::~QOhosSharedRecord() ===
=== [virtual] QOhosSharedRecord::~QOhosSharedRecord() ===
Destroys the instance of QOhosSharedRecord. The destructor is virtual.
Destroys the instance of QOhosSharedRecord. The destructor is virtual.


=== &lt;code&gt;[pure virtual]&lt;/code&gt;QString QOhosSharedRecord::content() const ===
=== [pure virtual] QString QOhosSharedRecord::content() const ===
Gets the shared record optional content. Either content or file path must be set. If there is no content null string is provided. See SharedRecord.content
Gets the shared record optional content. Either content or file path must be set. If there is no content null string is provided. See SharedRecord.content


=== &lt;code&gt;[pure virtual]&lt;/code&gt;QString QOhosSharedRecord::description() const ===
=== [pure virtual] QString QOhosSharedRecord::description() const ===
Gets the optional description of the shared record. If there is no description null string is provided. See SharedRecord.description
Gets the optional description of the shared record. If there is no description null string is provided. See SharedRecord.description


'''See also''' setDescription().
'''See also''' setDescription().


=== &lt;code&gt;[pure virtual]&lt;/code&gt;QVariantMap QOhosSharedRecord::extraData() const ===
=== [pure virtual] QVariantMap QOhosSharedRecord::extraData() const ===
Gets the optional extra data of the shared record. If there is no extra data empty variant map is provided. See SharedRecord.extraData
Gets the optional extra data of the shared record. If there is no extra data empty variant map is provided. See SharedRecord.extraData


'''See also''' setExtraData().
'''See also''' setExtraData().


=== &lt;code&gt;[pure virtual]&lt;/code&gt;QString QOhosSharedRecord::filePath() const ===
=== [pure virtual] QString QOhosSharedRecord::filePath() const ===
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 SharedRecord.content
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 SharedRecord.content


=== &lt;code&gt;[pure virtual]&lt;/code&gt;bool QOhosSharedRecord::isUrlContent() const ===
=== [pure virtual] bool QOhosSharedRecord::isUrlContent() const ===
Provides information if content() contains URL string. For URL content the mimeType() should not be used. See SharedRecord.content
Provides information if content() contains URL string. For URL content the mimeType() should not be used. See SharedRecord.content


=== &lt;code&gt;[pure virtual]&lt;/code&gt;QString QOhosSharedRecord::label() const ===
=== [pure virtual] QString QOhosSharedRecord::label() const ===
Gets the optional label of the shared record. If there is no label null string is provided. See SharedRecord.label
Gets the optional label of the shared record. If there is no label null string is provided. See SharedRecord.label


'''See also''' setLabel().
'''See also''' setLabel().


=== &lt;code&gt;[pure virtual]&lt;/code&gt;QMimeType QOhosSharedRecord::mimeType() const ===
=== [pure virtual] QMimeType QOhosSharedRecord::mimeType() const ===
Gets the shared record associated mime type. See SharedRecord.utd
Gets the shared record associated mime type. See SharedRecord.utd


=== &lt;code&gt;[pure virtual]&lt;/code&gt;void QOhosSharedRecord::setDescription(const QString &''description'') ===
=== [pure virtual] void QOhosSharedRecord::setDescription(const QString &''description'') ===
Sets data record description with a given ''description''. See SharedRecord.description
Sets data record description with a given ''description''. See SharedRecord.description


'''See also''' description().
'''See also''' description().


=== &lt;code&gt;[pure virtual]&lt;/code&gt;void QOhosSharedRecord::setExtraData(const QVariantMap &''extraData'') ===
=== [pure virtual] void QOhosSharedRecord::setExtraData(const QVariantMap &''extraData'') ===
Sets exatra data for sharing with a given ''extraData''. See SharedRecord.extraData
Sets exatra data for sharing with a given ''extraData''. See SharedRecord.extraData


'''See also''' extraData().
'''See also''' extraData().


=== &lt;code&gt;[pure virtual]&lt;/code&gt;void QOhosSharedRecord::setLabel(const QString &''label'') ===
=== [pure virtual] void QOhosSharedRecord::setLabel(const QString &''label'') ===
Sets the label indicating the current data record type with a given ''label''. See SharedRecord.label
Sets the label indicating the current data record type with a given ''label''. See SharedRecord.label


'''See also''' label().
'''See also''' label().


=== &lt;code&gt;[pure virtual]&lt;/code&gt;void QOhosSharedRecord::setThumbnail(const QByteArray &''thumbnail'') ===
=== [pure virtual] void QOhosSharedRecord::setThumbnail(const QByteArray &''thumbnail'') ===
Sets data record thumbnail with a given ''thumbnail''. The thumbnail is an image file content. See SharedRecord.thumbnail
Sets data record thumbnail with a given ''thumbnail''. The thumbnail is an image file content. See SharedRecord.thumbnail


'''See also''' thumbnail().
'''See also''' thumbnail().


=== &lt;code&gt;[pure virtual]&lt;/code&gt;void QOhosSharedRecord::setThumbnailFilePath(const QString &''thumbnailFilePath'') ===
=== [pure virtual] void QOhosSharedRecord::setThumbnailFilePath(const QString &''thumbnailFilePath'') ===
Sets data record thumbnail uri with a given ''thumbnailFilePath''. See SharedRecord.thumbnailUri
Sets data record thumbnail uri with a given ''thumbnailFilePath''. See SharedRecord.thumbnailUri


'''See also''' thumbnailFilePath().
'''See also''' thumbnailFilePath().


=== &lt;code&gt;[pure virtual]&lt;/code&gt;void QOhosSharedRecord::setTitle(const QString &''title'') ===
=== [pure virtual] void QOhosSharedRecord::setTitle(const QString &''title'') ===
Sets the title of shared content with a given ''title''. See SharedRecord.title
Sets the title of shared content with a given ''title''. See SharedRecord.title


'''See also''' title().
'''See also''' title().


=== &lt;code&gt;[pure virtual]&lt;/code&gt;QByteArray QOhosSharedRecord::thumbnail() const ===
=== [pure virtual] QByteArray QOhosSharedRecord::thumbnail() const ===
Gets the optional thumbnail content of the shared record. If there is no thumbnail empty byte array is provided. See SharedRecord.thumbnail
Gets the optional thumbnail content of the shared record. If there is no thumbnail empty byte array is provided. See SharedRecord.thumbnail


'''See also''' setThumbnail().
'''See also''' setThumbnail().


=== &lt;code&gt;[pure virtual]&lt;/code&gt;QString QOhosSharedRecord::thumbnailFilePath() const ===
=== [pure virtual] QString QOhosSharedRecord::thumbnailFilePath() const ===
Gets the optional thumbnail file path of the shared record. If there is no thumbnail file path null string is provided. See SharedRecord.thumbnailFilePath
Gets the optional thumbnail file path of the shared record. If there is no thumbnail file path null string is provided. See SharedRecord.thumbnailFilePath


'''See also''' setThumbnailFilePath().
'''See also''' setThumbnailFilePath().


=== &lt;code&gt;[pure virtual]&lt;/code&gt;QString QOhosSharedRecord::title() const ===
=== [pure virtual] QString QOhosSharedRecord::title() const ===
Gets the optional title of the shared record. If there is no title null string is provided. See SharedRecord.title
Gets the optional title of the shared record. If there is no title null string is provided. See SharedRecord.title


'''See also''' setTitle().
'''See also''' setTitle().

Revision as of 02:49, 29 January 2026

(QtOhosExtras::ShareKit::QOhosSharedRecord)

The QOhosSharedRecord class represents a record to be shared with other application. A record can be created using. More...

Header: #include <QOhosSharedRecord>
qmake: QT += ohosextras
Since: Qt 5.12.12
  • List of all members, including inherited members

Public Functions

virtual ~QOhosSharedRecord()
virtual QString content() const = 0
virtual QString description() const = 0
virtual QVariantMap extraData() const = 0
virtual QString filePath() const = 0
virtual bool isUrlContent() const = 0
virtual QString label() const = 0
virtual QMimeType mimeType() const = 0
virtual void setDescription(const QString &description) = 0
virtual void setExtraData(const QVariantMap &extraData) = 0
virtual void setLabel(const QString &label) = 0
virtual void setThumbnail(const QByteArray &thumbnail) = 0
virtual void setThumbnailFilePath(const QString &thumbnailFilePath) = 0
virtual void setTitle(const QString &title) = 0
virtual QByteArray thumbnail() const = 0
virtual QString thumbnailFilePath() const = 0
virtual QString title() const = 0

Protected Functions

QOhosSharedRecord()

Detailed Description

The QOhosSharedRecord class represents a record to be shared with other application. A record can be created using

See SharedRecord.

See also QtOhosExtras::ShareKit::createContentRecord(), QtOhosExtras::ShareKit::createFileRecord(), or, QtOhosExtras::ShareKit::createUrlRecord(), and ..

Member Function Documentation

[protected] QOhosSharedRecord::QOhosSharedRecord()

Default constructs an instance of QOhosSharedRecord.

[virtual] QOhosSharedRecord::~QOhosSharedRecord()

Destroys the instance of QOhosSharedRecord. The destructor is virtual.

[pure virtual] QString QOhosSharedRecord::content() const

Gets the shared record optional content. Either content or file path must be set. If there is no content null string is provided. See SharedRecord.content

[pure virtual] QString QOhosSharedRecord::description() const

Gets the optional description of the shared record. If there is no description null string is provided. See SharedRecord.description

See also setDescription().

[pure virtual] QVariantMap QOhosSharedRecord::extraData() const

Gets the optional extra data of the shared record. If there is no extra data empty variant map is provided. See SharedRecord.extraData

See also setExtraData().

[pure virtual] QString QOhosSharedRecord::filePath() const

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 SharedRecord.content

[pure virtual] bool QOhosSharedRecord::isUrlContent() const

Provides information if content() contains URL string. For URL content the mimeType() should not be used. See SharedRecord.content

[pure virtual] QString QOhosSharedRecord::label() const

Gets the optional label of the shared record. If there is no label null string is provided. See SharedRecord.label

See also setLabel().

[pure virtual] QMimeType QOhosSharedRecord::mimeType() const

Gets the shared record associated mime type. See SharedRecord.utd

[pure virtual] void QOhosSharedRecord::setDescription(const QString &description)

Sets data record description with a given description. See SharedRecord.description

See also description().

[pure virtual] void QOhosSharedRecord::setExtraData(const QVariantMap &extraData)

Sets exatra data for sharing with a given extraData. See SharedRecord.extraData

See also extraData().

[pure virtual] void QOhosSharedRecord::setLabel(const QString &label)

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

See also label().

[pure virtual] void QOhosSharedRecord::setThumbnail(const QByteArray &thumbnail)

Sets data record thumbnail with a given thumbnail. The thumbnail is an image file content. See SharedRecord.thumbnail

See also thumbnail().

[pure virtual] void QOhosSharedRecord::setThumbnailFilePath(const QString &thumbnailFilePath)

Sets data record thumbnail uri with a given thumbnailFilePath. See SharedRecord.thumbnailUri

See also thumbnailFilePath().

[pure virtual] void QOhosSharedRecord::setTitle(const QString &title)

Sets the title of shared content with a given title. See SharedRecord.title

See also title().

[pure virtual] QByteArray QOhosSharedRecord::thumbnail() const

Gets the optional thumbnail content of the shared record. If there is no thumbnail empty byte array is provided. See SharedRecord.thumbnail

See also setThumbnail().

[pure virtual] QString QOhosSharedRecord::thumbnailFilePath() const

Gets the optional thumbnail file path of the shared record. If there is no thumbnail file path null string is provided. See SharedRecord.thumbnailFilePath

See also setThumbnailFilePath().

[pure virtual] QString QOhosSharedRecord::title() const

Gets the optional title of the shared record. If there is no title null string is provided. See SharedRecord.title

See also setTitle().