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
qohosdisplayinfo.h
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#ifndef QOHOSDISPLAYINFO_H
5#define QOHOSDISPLAYINFO_H
6
7#include <QtCore/qsize.h>
8#include <QtCore/private/qcore_ohos_p.h>
9#include <QtCore/private/qnapi_p.h>
10#include <QtCore/private/qohoscommon_p.h>
11#include <QtCore/qstring.h>
12#include <optional>
13#include <qohosqpaenums.h>
14#include <qohosutils.h>
15#include <qpa/qplatformscreen.h>
16
18
20{
22
24
25 using JsDisplayId = QtOhos::TypedId<double, struct JsDisplayIdTag>;
26
27 static QOhosDisplayInfo makeFromOhosDisplayObject(QOhosJsState &jsState, QNapi::Object displayObject);
28 static std::optional<QNapi::Object> tryGetDisplayById(QOhosJsState &jsState, QOhosDisplayInfo::JsDisplayId displayId);
29
30 JsDisplayId id;
33 double densityDPI;
41
43 QSizeF physicalSize() const;
44 bool shouldIgnoreDisplay() const;
45 bool isDisplayMainOrExtended() const;
46};
47
49
50Q_DECLARE_METATYPE(QT_PREPEND_NAMESPACE(QOhosDisplayInfo))
51Q_DECLARE_METATYPE(QT_PREPEND_NAMESPACE(QOhosDisplayInfo::JsDisplayId));
52
53#endif
QNapi::Object jsObject()
Definition window.cpp:91
JsWindowRef(JsWindowRef &&)=delete
JsWindowRef(std::string owningQAbilityInstanceId, JsWindowId windowId, QNapi::Object jsWindow, QtOhos::QObjectThreadSafeRef owningQWindowRef)
Definition window.cpp:46
bool isFocused() const
Definition window.cpp:69
JsWindowRef(const JsWindowRef &)=delete
QtOhos::QObjectThreadSafeRef owningQWindowRef() const
Definition window.cpp:86
JsWindowRef & operator=(JsWindowRef &&)=delete
Result eval(const std::string &expr, const std::vector< QNapi::ValueWrapper > &exprArgs={}) const
Definition window.h:69
bool isWindowShown() const
Definition window.cpp:56
JsWindowId id() const
Definition window.cpp:81
JsWindowRef & operator=(const JsWindowRef &)=delete
const std::string & owningQAbilityInstanceId() const
Definition window.cpp:76
QNapi::Promise evalToPromiseOrRejectOnThrow(const std::string &expr, const std::vector< QNapi::ValueWrapper > &exprArgs={}) const
Definition window.h:74
std::optional< WindowProperties > tryGetWindowProperties(JsWindowId jsWindowId)
Definition window.cpp:28
Combined button and popup list for selecting options.
QT_END_NAMESPACE Q_DECLARE_METATYPE(QT_PREPEND_NAMESPACE(QtOhosQpa::enums::kit::ShareKit::systemShare::SelectionMode))
std::optional< QOhosDisplayInfo::JsDisplayId > displayId
Definition window.h:29
bool isDisplayMainOrExtended() const
QtOhosQpa::enums::ohos::display::Orientation JsDisplayOrientation
QtOhosQpa::enums::ohos::display::DisplaySourceMode DisplaySourceMode
std::optional< DisplaySourceMode > sourceMode
QSizeF physicalSize() const
QRect displayGeometryPixels() const
static std::optional< QNapi::Object > tryGetDisplayById(QOhosJsState &jsState, QOhosDisplayInfo::JsDisplayId displayId)
std::optional< QPoint > topLeftOffsetPixels
static QOhosDisplayInfo makeFromOhosDisplayObject(QOhosJsState &jsState, QNapi::Object displayObject)
std::optional< JsDisplayOrientation > orientation
bool shouldIgnoreDisplay() const