First upload, 18 controller version
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,26 @@
|
||||
// Copyright (C) 2021 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
#ifndef QPYTEXTOBJECT
|
||||
#define QPYTEXTOBJECT
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtGui/QTextObjectInterface>
|
||||
|
||||
// Qt5: no idea why this definition is not found automatically! It should come
|
||||
// from <QTextObjectInterface> which resolves to qabstracttextdocumentlayout.h
|
||||
#ifdef Q_MOC_RUN
|
||||
Q_DECLARE_INTERFACE(QTextObjectInterface, "org.qt-project.Qt.QTextObjectInterface")
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QPyTextObject : public QObject, public QTextObjectInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(QTextObjectInterface)
|
||||
public:
|
||||
QPyTextObject(QObject *parent = nullptr) : QObject(parent) {}
|
||||
};
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,35 @@
|
||||
// Copyright (C) 2022 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
#ifndef QTGUIHELPER_H
|
||||
#define QTGUIHELPER_H
|
||||
|
||||
#include <QtGui/QGuiApplication>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
namespace QtGuiHelper {
|
||||
|
||||
class QOverrideCursorGuard
|
||||
{
|
||||
public:
|
||||
Q_DISABLE_COPY_MOVE(QOverrideCursorGuard)
|
||||
|
||||
QOverrideCursorGuard() = default;
|
||||
~QOverrideCursorGuard() = default;
|
||||
|
||||
void restoreOverrideCursor()
|
||||
{
|
||||
if (m_guard) {
|
||||
QGuiApplication::restoreOverrideCursor();
|
||||
m_guard = false;
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
bool m_guard = true;
|
||||
};
|
||||
|
||||
} // namespace QtGuiHelper
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QTGUIHELPER_H
|
||||
Reference in New Issue
Block a user