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
qohosdrageventutils.cpp
Go to the documentation of this file.
1
// Copyright (C) 2025 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4
#
include
<
qarkui
/
qarkuiutils
.
h
>
5
#
include
<
render
/
qohosdrageventutils
.
h
>
6
7
QT_BEGIN_NAMESPACE
8
9
Qt::DropAction mapQOhosArkUiDropOperationToQt(::ArkUI_DropOperation dropOperation)
10
{
11
switch
(dropOperation) {
12
case
::ARKUI_DROP_OPERATION_COPY:
13
return
Qt::CopyAction;
14
case
::ARKUI_DROP_OPERATION_MOVE:
15
return
Qt::MoveAction;
16
}
17
return
Qt::CopyAction;
18
}
19
20
QOhosOptional
<::
ArkUI_DropOperation
>
tryMapQOhosArkUiDropOperationFromQt
(Qt::DropAction dropAction)
21
{
22
switch
(dropAction) {
23
case
Qt::CopyAction:
24
return
makeQOhosOptional(::ARKUI_DROP_OPERATION_COPY);
25
case
Qt::MoveAction:
26
return
makeQOhosOptional(::ARKUI_DROP_OPERATION_MOVE);
27
default
:
28
return
{};
29
}
30
}
31
32
::
ArkUI_DropOperation
getQOhosDragEventDropOperation
(::ArkUI_DragEvent *dragEvent)
33
{
34
::ArkUI_DropOperation dropOperation = ::ARKUI_DROP_OPERATION_COPY;
35
QArkUi
::callArkUiOrFailOnErrorResult(
36
Q_OHOS_NAMED_FUNC(::OH_ArkUI_DragEvent_GetDropOperation),
37
dragEvent, &dropOperation);
38
return
dropOperation;
39
}
40
41
QT_END_NAMESPACE
QArkUi
Definition
input.cpp:8
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
tryMapQOhosArkUiDropOperationFromQt
QOhosOptional<::ArkUI_DropOperation > tryMapQOhosArkUiDropOperationFromQt(Qt::DropAction dropAction)
Definition
qohosdrageventutils.cpp:20
getQOhosDragEventDropOperation
::ArkUI_DropOperation getQOhosDragEventDropOperation(::ArkUI_DragEvent *dragEvent)
Definition
qohosdrageventutils.cpp:32
qtbase
src
plugins
platforms
ohos
render
qohosdrageventutils.cpp
Generated on
for Qt by
1.16.1