forked from RSATom/QuickLayer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFboQuickView.h
41 lines (29 loc) · 809 Bytes
/
FboQuickView.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#pragma once
#include <QQmlEngine>
#include <QQmlComponent>
#include "FboQuickWindow.h"
class FboQuickView : public FboQuickWindow
{
Q_OBJECT
public:
//takes ownership over passed QOpenGLContext
FboQuickView( QOpenGLContext* = 0 );
~FboQuickView();
QQmlContext* rootContext() const;
QList<QQmlError> errors() const;
typedef QQmlComponent::Status Status;
Status status() const;
Q_SIGNALS:
void statusChanged( Status );
public Q_SLOTS:
void setSource( const QUrl& );
void setQml( const QString& qml, const QUrl& qmlUrl );
private Q_SLOTS:
void componentStatusChanged( QQmlComponent::Status );
protected:
void resizeEvent( QResizeEvent* event );
private:
QQmlEngine m_qmlEngine;
QQmlComponent* m_qmlComponent;
QQuickItem* m_rootItem;
};