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
qohosjswindowregistry.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 QOHOSJSWINDOWREGISTRY_H
5#define QOHOSJSWINDOWREGISTRY_H
6
7#include <QtCore/qglobal.h>
8#include <functional>
9#include <map>
10#include <memory>
11#include <qarkui/window.h>
12#include <qohosplugincore.h>
13#include <vector>
14
16
18{
19public:
21
26
27 std::shared_ptr<void> registerJsWindow(std::shared_ptr<QArkUi::JsWindowRef> jsWindowRef);
29 QtOhos::JsState &jsState,
30 const std::function<bool(QtOhos::JsState &, const QArkUi::JsWindowRef &)> &predicate);
31
32 std::shared_ptr<QArkUi::JsWindowRef> tryFindJsWindowById(QArkUi::JsWindowId jsWinId) const;
33
34private:
35 std::map<QArkUi::JsWindowId, std::shared_ptr<QArkUi::JsWindowRef>> m_windowRefs;
36};
37
38QT_END_NAMESPACE
39
40#endif
QOhosJsWindowRegistry & operator=(const QOhosJsWindowRegistry &)=delete
std::shared_ptr< QArkUi::JsWindowRef > tryFindJsWindowById(QArkUi::JsWindowId jsWinId) const
std::vector< QArkUi::JsWindowId > queryByPredicate(QtOhos::JsState &jsState, const std::function< bool(QtOhos::JsState &, const QArkUi::JsWindowRef &)> &predicate)
QOhosJsWindowRegistry & operator=(QOhosJsWindowRegistry &&)=delete
std::shared_ptr< void > registerJsWindow(std::shared_ptr< QArkUi::JsWindowRef > jsWindowRef)
QOhosJsWindowRegistry(QOhosJsWindowRegistry &&)=delete
QOhosJsWindowRegistry(const QOhosJsWindowRegistry &)=delete
std::enable_if_t< qohosplugincore_h_detail::isQOhosOptional< QOhosInvokeResult< Func, T > >, QOhosInvokeResult< Func, T > > andThen(Func &&func) const
virtual std::shared_ptr< QAbilityPeer > tryGetQAbilityPeerByInstanceId(const std::string &instanceId)=0
virtual std::shared_ptr< QAbilityPeer > defaultQAbilityPeer()=0
void showFileDialogAuthorization(QtOhos::InternalWindowId contextWinId, QString filePath, QOhosConsumer< bool > resultCallback)
void showFileDialogOpen(QtOhos::InternalWindowId contextWinId, QStringList filters, QString defaultPath, DocumentSelectMode documentSelectMode, ResultMultiplicity resultMultiplicity, QOhosConsumer< QOhosOptional< OpenResult > > resultCallback)
void showFileDialogSave(QtOhos::InternalWindowId contextWinId, QStringList newFileNames, QString defaultFilePath, QStringList fileSuffixChoices, QOhosConsumer< QOhosOptional< SaveResult > > resultCallback)
Combined button and popup list for selecting options.
void startOhosFilePicker(QtOhos::JsState &jsState, std::shared_ptr< QtOhos::QAbilityPeer > qAbilityPeer, QOhosOptional< QArkUi::JsWindowId > optContextJsWinId, const std::string &pickerActionName, QNapi::Object pickerActionOptions, QOhosConsumer< QOhosOptional< FilePickerResult > > resultConsumer)
QNapi::Object makeDocumentViewPicker(QtOhos::JsState &jsState, std::shared_ptr< QtOhos::QAbilityPeer > qAbilityPeer, QOhosOptional< QArkUi::JsWindowId > optContextJsWinId)
QNapi::Array mapToNapiArray(napi_env env, QStringList qstrings)
std::shared_ptr< QtOhos::QAbilityPeer > getQAbilityPeerForOptInstanceId(QtOhos::JsState &jsState, QOhosOptional< std::string > optQAbilityInstanceId)
QStringList mapFilePathsToQtUrls(const std::vector< std::string > &filePaths)