2022-05-13 13:12:05 +00:00
|
|
|
// Copyright (C) 2019 The Qt Company Ltd.
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
2019-08-26 09:45:54 +00:00
|
|
|
|
|
|
|
#ifndef VULKANSQUIRCLE_H
|
|
|
|
#define VULKANSQUIRCLE_H
|
|
|
|
|
|
|
|
#include <QtQuick/QQuickItem>
|
2020-09-11 09:16:07 +00:00
|
|
|
#include <QtQuick/QQuickWindow>
|
2019-08-26 09:45:54 +00:00
|
|
|
|
|
|
|
class SquircleRenderer;
|
|
|
|
|
|
|
|
class VulkanSquircle : public QQuickItem
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
Q_PROPERTY(qreal t READ t WRITE setT NOTIFY tChanged)
|
2020-02-11 15:00:11 +00:00
|
|
|
QML_ELEMENT
|
2019-08-26 09:45:54 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
VulkanSquircle();
|
|
|
|
|
|
|
|
qreal t() const { return m_t; }
|
|
|
|
void setT(qreal t);
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void tChanged();
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
void sync();
|
|
|
|
void cleanup();
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void handleWindowChanged(QQuickWindow *win);
|
|
|
|
|
|
|
|
private:
|
|
|
|
void releaseResources() override;
|
|
|
|
|
|
|
|
qreal m_t = 0;
|
|
|
|
SquircleRenderer *m_renderer = nullptr;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|