mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2025-07-04 17:15:29 +08:00
26 lines
619 B
C++
26 lines
619 B
C++
#pragma once
|
|
|
|
#include <QtQuick/QQuickItem>
|
|
#include <QOpenGLFunctions>
|
|
#include <QQuickFramebufferObject>
|
|
|
|
class FBORenderer;
|
|
|
|
class OpenGLItem : public QQuickFramebufferObject, protected QOpenGLFunctions {
|
|
Q_OBJECT
|
|
Q_PROPERTY(qreal t READ t WRITE setT NOTIFY tChanged)
|
|
public:
|
|
explicit OpenGLItem(QQuickItem *parent = nullptr);
|
|
[[nodiscard]] QQuickFramebufferObject::Renderer *createRenderer() const override;
|
|
void timerEvent(QTimerEvent *) override;
|
|
[[nodiscard]] qreal t() const {
|
|
return m_t;
|
|
}
|
|
void setT(qreal t);
|
|
signals:
|
|
void tChanged();
|
|
|
|
private:
|
|
qreal m_t{};
|
|
};
|