-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathQtAdmobInterstitial.cpp
More file actions
66 lines (53 loc) · 1.41 KB
/
QtAdmobInterstitial.cpp
File metadata and controls
66 lines (53 loc) · 1.41 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#include "QtAdMobInterstitial.h"
#ifdef QTADMOB_QML
#include <QtQml>
#endif
QmlAdMobInterstitial::QmlAdMobInterstitial()
{
m_Instance = CreateQtAdMobInterstitial();
connect(m_Instance, SIGNAL(loaded()), this, SIGNAL(loaded()));
connect(m_Instance, SIGNAL(loading()), this, SIGNAL(loading()));
connect(m_Instance, SIGNAL(willPresent()), this, SIGNAL(willPresent()));
connect(m_Instance, SIGNAL(closed()), this, SIGNAL(closed()));
connect(m_Instance, SIGNAL(clicked()), this, SIGNAL(clicked()));
}
QmlAdMobInterstitial::~QmlAdMobInterstitial()
{
delete m_Instance;
}
void QmlAdMobInterstitial::DeclareQML()
{
#ifdef QTADMOB_QML
qmlRegisterType<QmlAdMobInterstitial>("com.dreamdev.QtAdMobInterstitial", 1, 0, "AdMobInterstitial");
#endif
}
void QmlAdMobInterstitial::setUnitId(const QString& unitId)
{
QML()->setUnitId(unitId);
emit unitIdChanged();
}
const QString& QmlAdMobInterstitial::unitId() const
{
return QML()->unitId();
}
void QmlAdMobInterstitial::setVisible(bool isVisible)
{
QML()->setVisible(isVisible);
emit visibleChanged();
}
bool QmlAdMobInterstitial::visible()
{
return QML()->visible();
}
bool QmlAdMobInterstitial::isLoaded()
{
return QML()->isLoaded();
}
void QmlAdMobInterstitial::addTestDevice(const QString& hashedDeviceId)
{
QML()->addTestDevice(hashedDeviceId);
}
IQtAdMobInterstitial* QmlAdMobInterstitial::QML() const
{
return m_Instance;
}