Jump to content

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

From Qt Wiki
Created page with "(QtOhosExtras::ShareKit::QOhosShareControllerOptions) The QOhosShareControllerOptions class is to configure items, such as the preview mode of the shared content, selection mode, and other information, and pop-up window anchor. It determines the display style of the sharing panel. See ShareControllerOptions. More... {| class="wikitable" |Header: |#include <QOhosShareControllerOptions> |- |qmake: |QT += ohosextras |- |Since: |Qt 5.12.12 |} * List of all members, includi..."
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
(QtOhosExtras::ShareKit::QOhosShareControllerOptions)
< [[Qt_for_HarmonyOS/qtohosextras_doc|Qt for HarmonyOS / qtohosextras doc]]
 
= QOhosShareControllerOptions Class =
 
The QOhosShareControllerOptions class is to configure items, such as the preview mode of the shared content, selection mode, and other information, and pop-up window anchor. It determines the display style of the sharing panel. See [https://developer.huawei.com/consumer/en/doc/harmonyos-references/share-system-share#section107934816010 ShareControllerOptions]. [[#details|More...]]


The QOhosShareControllerOptions class is to configure items, such as the preview mode of the shared content, selection mode, and other information, and pop-up window anchor. It determines the display style of the sharing panel. See ShareControllerOptions. More...
{| class="wikitable"
{| class="wikitable"
|Header:
|#include <QOhosShareControllerOptions>
|-
|-
|qmake:
! Header:
|QT += ohosextras
| #include <QOhosShareControllerOptions>
|-
|-
|Since:
! qmake:
|Qt 5.12.12
| QT += ohosextras
|-
! Since:
| Qt 5.12.12
|}
|}


* List of all members, including inherited members
* [[List_of_All_Members_for_QOhosShareControllerOptions|List of all members, including inherited members]]


== Public Functions ==
== Public Functions ==
{| class="wikitable"
 
|virtual
{| class="wikitable" style="width:100%"
|'''~QOhosShareControllerOptions'''()
|-
| virtual || '''[[#dtor.QOhosShareControllerOptions|~QOhosShareControllerOptions]]'''()
|-
|-
|virtual void
| virtual void || '''[[#setAnchor|setAnchor]]'''(const QPoint &''anchorOffset'') = 0
|'''setAnchor'''(const QPoint &''anchorOffset'') = 0
|-
|-
|virtual void
| virtual void || '''[[#setAnchor-1|setAnchor]]'''(const QRect &''anchor'') = 0
|'''setAnchor'''(const QRect &''anchor'') = 0
|-
|-
|virtual void
| virtual void || '''[[#setDefaultPreviewMode|setDefaultPreviewMode]]'''(bool ''defaultPreviewMode'') = 0
|'''setDefaultPreviewMode'''(bool ''defaultPreviewMode'') = 0
|-
|-
|virtual void
| virtual void || '''[[#setExcludedAbilities|setExcludedAbilities]]'''(const QList<QtOhosExtras::ShareKit::ShareAbilityType> &''excludedAbilities'') = 0
|'''setExcludedAbilities'''(const QList<QtOhosExtras::ShareKit::ShareAbilityType> &''excludedAbilities'') = 0
|-
|-
|virtual void
| virtual void || '''[[#setSingleSelectionMode|setSingleSelectionMode]]'''(bool ''singleSelectionMode'') = 0
|'''setSingleSelectionMode'''(bool ''singleSelectionMode'') = 0
|}
|}


== Protected Functions ==
== Protected Functions ==
{| class="wikitable"
 
|
{| class="wikitable" style="width:100%"
|'''QOhosShareControllerOptions'''()
|-
| || '''[[#QOhosShareControllerOptions|QOhosShareControllerOptions]]'''()
|}
|}


== Detailed Description ==
== Detailed Description ==
The QOhosShareControllerOptions class is to configure items, such as the preview mode of the shared content, selection mode, and other information, and pop-up window anchor. It determines the display style of the sharing panel. See ShareControllerOptions
 
<span id="details"></span>
The QOhosShareControllerOptions class is to configure items, such as the preview mode of the shared content, selection mode, and other information, and pop-up window anchor. It determines the display style of the sharing panel. See [https://developer.huawei.com/consumer/en/doc/harmonyos-references/share-system-share#section107934816010 ShareControllerOptions]


== Member Function Documentation ==
== Member Function Documentation ==


=== &lt;code&gt;[protected]&lt;/code&gt;QOhosShareControllerOptions::QOhosShareControllerOptions() ===
=== <span id="QOhosShareControllerOptions"></span>[protected] QOhosShareControllerOptions::QOhosShareControllerOptions() ===
 
Default constructs an instance of QOhosShareControllerOptions.
Default constructs an instance of QOhosShareControllerOptions.


=== &lt;code&gt;[virtual]&lt;/code&gt;QOhosShareControllerOptions::~QOhosShareControllerOptions() ===
=== <span id="dtor.QOhosShareControllerOptions"></span>[virtual] QOhosShareControllerOptions::~QOhosShareControllerOptions() ===
 
Destroys the instance of QOhosShareControllerOptions. The destructor is virtual.
Destroys the instance of QOhosShareControllerOptions. The destructor is virtual.


=== &lt;code&gt;[pure virtual]&lt;/code&gt;void QOhosShareControllerOptions::setAnchor(const QPoint &''anchorOffset'') ===
=== <span id="setAnchor"></span>[pure virtual] void QOhosShareControllerOptions::setAnchor(const QPoint &''anchorOffset'') ===
Sets sharing pop-up window anchor window offset with a given ''anchorOffset''. See ShareControllerOptions.anchor
 
Sets sharing pop-up window anchor window offset with a given ''anchorOffset''. See [https://developer.huawei.com/consumer/en/doc/harmonyos-references/share-system-share#section107934816010 ShareControllerOptions.anchor]
 
=== <span id="setAnchor-1"></span>[pure virtual] void QOhosShareControllerOptions::setAnchor(const QRect &''anchor'') ===
 
Sets anchor offset and size with a given ''anchor''. See [https://developer.huawei.com/consumer/en/doc/harmonyos-references/share-system-share#section19505934714 ShareControllerAnchor]
 
=== <span id="setDefaultPreviewMode"></span>[pure virtual] void QOhosShareControllerOptions::setDefaultPreviewMode(bool ''defaultPreviewMode'') ===
 
Set sharing panel preview mode with a given ''defaultPreviewMode''. If defaultPreviewMode is true, default preview mode (thumbnail card) is set, detail mode otherwise. Detail mode is recommended for images and videos. See [https://developer.huawei.com/consumer/en/doc/harmonyos-references/share-system-share#section107934816010 ShareControllerOptions.previewMode]
 
=== <span id="setExcludedAbilities"></span>[pure virtual] void QOhosShareControllerOptions::setExcludedAbilities(const QList<[[ShareKit_Namespace#ShareAbilityType-enum|QtOhosExtras::ShareKit::ShareAbilityType]]> &''excludedAbilities'') ===


=== &lt;code&gt;[pure virtual]&lt;/code&gt;void QOhosShareControllerOptions::setAnchor(const QRect &''anchor'') ===
Set a list of capabilities that do not need to be displayed in the operation area. See [https://developer.huawei.com/consumer/en/doc/harmonyos-references/share-system-share#section107934816010 ShareControllerOptions.excludedAbilities]
Sets anchor offset and size with a given ''anchor''. See ShareControllerAnchor


=== &lt;code&gt;[pure virtual]&lt;/code&gt;void QOhosShareControllerOptions::setDefaultPreviewMode(bool ''defaultPreviewMode'') ===
=== <span id="setSingleSelectionMode"></span>[pure virtual] void QOhosShareControllerOptions::setSingleSelectionMode(bool ''singleSelectionMode'') ===
Set sharing panel preview mode with a given ''defaultPreviewMode''. If defaultPreviewMode is true, default preview mode (thumbnail card) is set, detail mode otherwise. Detail mode is recommended for images and videos. See ShareControllerOptions.previewMode


=== &lt;code&gt;[pure virtual]&lt;/code&gt;void QOhosShareControllerOptions::setExcludedAbilities(const QList<QtOhosExtras::ShareKit::ShareAbilityType> &''excludedAbilities'') ===
Sets sharing selection mode with a given ''singleSelectionMode''. If singleSelectionMode is true, single selection is set, batch mode otherwise. See [https://developer.huawei.com/consumer/en/doc/harmonyos-references/share-system-share#section107934816010 ShareControllerOptions.selectionMode]
Set a list of capabilities that do not need to be displayed in the operation area. See ShareControllerOptions.excludedAbilities


=== &lt;code&gt;[pure virtual]&lt;/code&gt;void QOhosShareControllerOptions::setSingleSelectionMode(bool ''singleSelectionMode'') ===
[[Category:Qt for HarmonyOS]]
Sets sharing selection mode with a given ''singleSelectionMode''. If singleSelectionMode is true, single selection is set, batch mode otherwise. See ShareControllerOptions.selectionMode

Latest revision as of 06:26, 29 January 2026

< Qt for HarmonyOS / qtohosextras doc

QOhosShareControllerOptions Class

The QOhosShareControllerOptions class is to configure items, such as the preview mode of the shared content, selection mode, and other information, and pop-up window anchor. It determines the display style of the sharing panel. See ShareControllerOptions. More...

Header: #include <QOhosShareControllerOptions>
qmake: QT += ohosextras
Since: Qt 5.12.12

Public Functions

virtual ~QOhosShareControllerOptions()
virtual void setAnchor(const QPoint &anchorOffset) = 0
virtual void setAnchor(const QRect &anchor) = 0
virtual void setDefaultPreviewMode(bool defaultPreviewMode) = 0
virtual void setExcludedAbilities(const QList<QtOhosExtras::ShareKit::ShareAbilityType> &excludedAbilities) = 0
virtual void setSingleSelectionMode(bool singleSelectionMode) = 0

Protected Functions

QOhosShareControllerOptions()

Detailed Description

The QOhosShareControllerOptions class is to configure items, such as the preview mode of the shared content, selection mode, and other information, and pop-up window anchor. It determines the display style of the sharing panel. See ShareControllerOptions

Member Function Documentation

[protected] QOhosShareControllerOptions::QOhosShareControllerOptions()

Default constructs an instance of QOhosShareControllerOptions.

[virtual] QOhosShareControllerOptions::~QOhosShareControllerOptions()

Destroys the instance of QOhosShareControllerOptions. The destructor is virtual.

[pure virtual] void QOhosShareControllerOptions::setAnchor(const QPoint &anchorOffset)

Sets sharing pop-up window anchor window offset with a given anchorOffset. See ShareControllerOptions.anchor

[pure virtual] void QOhosShareControllerOptions::setAnchor(const QRect &anchor)

Sets anchor offset and size with a given anchor. See ShareControllerAnchor

[pure virtual] void QOhosShareControllerOptions::setDefaultPreviewMode(bool defaultPreviewMode)

Set sharing panel preview mode with a given defaultPreviewMode. If defaultPreviewMode is true, default preview mode (thumbnail card) is set, detail mode otherwise. Detail mode is recommended for images and videos. See ShareControllerOptions.previewMode

[pure virtual] void QOhosShareControllerOptions::setExcludedAbilities(const QList<QtOhosExtras::ShareKit::ShareAbilityType> &excludedAbilities)

Set a list of capabilities that do not need to be displayed in the operation area. See ShareControllerOptions.excludedAbilities

[pure virtual] void QOhosShareControllerOptions::setSingleSelectionMode(bool singleSelectionMode)

Sets sharing selection mode with a given singleSelectionMode. If singleSelectionMode is true, single selection is set, batch mode otherwise. See ShareControllerOptions.selectionMode