22 delete m_bakingControl;
35 m_bakingRequested =
true;
36 m_bakingControl->
reset();
37 m_callback = callback;
47 m_bakingRequested =
true;
48 m_bakingControl->
reset();
50 m_windowCancelRequested =
false;
65 QObject::connect(m_lmWindow, &QQuickWindow::closing,
this, &QQuick3DLightmapBaker::onLmWindowClosing);
67 m_callback = [
this, rootObject] (
69 std::optional<QString> msg,
83 if (msg.has_value()) {
95 if (m_windowCancelRequested && !bakingControl->isCancelled())
96 bakingControl->requestCancel();
103void QQuick3DLightmapBaker::updateView()
108void QQuick3DLightmapBaker::onLmCancelButtonClicked()
110 if (m_windowCancelRequested)
113 m_windowCancelRequested =
true;
120 onLmCancelButtonClicked();
125 cancelFlag.store(0, std::memory_order_release);
130 cancelFlag.store(1, std::memory_order_release);
134 return cancelFlag.load(std::memory_order_acquire) == 1;
T findChild(const QString &aName=QString(), Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
Returns the child of this object that can be cast into type T and that is called name,...
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
bool setProperty(const char *name, const QVariant &value)
Sets the value of the object's name property to value.
std::function< void(BakingStatus, std::optional< QString >, BakingControl *)> Callback
QQuick3DLightmapBaker(QQuick3DViewport *view)
\qmlsignal QtQuick::Window::sceneGraphError(SceneGraphError error, QString message)
QQuickWindow * window() const
Returns the window in which this item is rendered.
The QQuickView class provides a window for displaying a Qt Quick user interface.
void setSource(const QUrl &)
Sets the source to the url, loads the QML component and instantiates it.
QQuickItem * rootObject() const
Returns the view's root \l {QQuickItem} {item}.
static QQuickWindowPrivate * get(QQuickWindow *c)
\qmltype Window \instantiates QQuickWindow \inqmlmodule QtQuick
\macro QT_RESTRICTED_CAST_FROM_ASCII
QString & prepend(QChar c)
static QUrl fromLocalFile(const QString &localfile)
Returns a QUrl representation of localFile, interpreted as a local file.
void show()
Shows the window.
bool close()
Close the window.
Combined button and popup list for selecting options.
#define Q_ARG(Type, data)
#define QStringLiteral(str)