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
qohosudsobject.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 <qohosudsobject.h>
5
6#include <QtGui/qimage.h>
7#include <qohospixelmapconversions.h>
8
10
11template<>
12QOhosUdsObject<::OH_UdsPixelMap>::QOhosUdsObject(typename QOhosUdsMeta<::OH_UdsPixelMap>::Content content)
13 : m_data(details_qohosudsobject_h::createUds<::OH_UdsPixelMap>())
14{
15 QArkUi::callArkUiOrFailOnErrorResult(
16 details_qohosudsobject_h::UdsMeta<::OH_UdsPixelMap>::contentSetterFunc(),
17 m_data.get(), content.get());
18}
19
20template<>
21QOhosUdsObject<::OH_UdsFileUri>::QOhosUdsObject(
22 typename QOhosUdsMeta<::OH_UdsFileUri>::Content content)
23 : m_data(details_qohosudsobject_h::createUds<::OH_UdsFileUri>())
24{
25 QArkUi::callArkUiOrFailOnErrorResult(
26 details_qohosudsobject_h::UdsMeta<::OH_UdsFileUri>::contentSetterFunc(),
27 m_data.get(), content);
28
29 QArkUi::callArkUiOrFailOnErrorResult(
30 Q_OHOS_NAMED_FUNC(::OH_UdsFileUri_SetFileType),
31 m_data.get(), QArkUi::CZString(UDMF_META_GENERAL_FILE));
32}
33
34template<>
35typename QOhosUdsMeta<::OH_UdsPixelMap>::Content QOhosUdsObject<::OH_UdsPixelMap>::getContent()
36{
37 auto pixelMap = makeEmptyNativePixelMap();
38 QArkUi::callArkUi(
39 Q_OHOS_NAMED_FUNC(::OH_UdsPixelMap_GetPixelMap),
40 m_data.get(), pixelMap.get());
41
42 return pixelMap;
43}
44
45QT_END_NAMESPACE
Combined button and popup list for selecting options.