-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadmobbridge.h
47 lines (37 loc) · 1.05 KB
/
admobbridge.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
42
43
44
45
46
47
#ifndef ADMOBBRIDGE_H
#define ADMOBBRIDGE_H
#include <QWidget>
#include <QPushButton>
#include <QVBoxLayout>
#include <QJniObject>
#include <QTimer>
class AdMobBridge: public QWidget
{
Q_OBJECT
public:
explicit AdMobBridge(QWidget *parent = nullptr);
static void onInterstitialAdDismissed();
private slots:
void onShowBannerAdClicked();
void onShowInterstitialAdClicked();
void onHideBannerAdClicked();
void checkInterstitialAdDismissed();
signals:
void interstitialAdDismissed();
private:
void setupBannerAd(const QString &bannerAdId);
void loadBannerAd();
void showBannerAd();
void hideBannerAd();
void loadInterstitialAd(const QString &interstitialAdId);
void showInterstitialAd();
void cacheActivity();
QPushButton *bannerAdButton;
QPushButton *interstitialAdButton;
QPushButton *bannerAdSetup;
QPushButton *hideBannerAdButton;
QVBoxLayout *layout;
QJniObject activity;
QTimer *checkAdDismissedTimer;
};
#endif // ADMOBBRIDGE_H