• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

禁断の広告法だったことが判明。開発中止。


Commit MetaInfo

Révisionf327dd7950d63c2785270faf368b580dcf1c960a (tree)
l'heure2011-08-16 22:01:44
Auteur池田 大樹 <h_ikeda@iked...>
Commiter池田 大樹

Message de Log

広告表示が可能となった。あとは位置の調整。

Change Summary

Modification

--- a/Ads.html
+++ /dev/null
@@ -1,15 +0,0 @@
1-<html>
2-<body>
3-<script type="text/javascript"><!--
4-google_ad_client = "ca-pub-3600741293730423";
5-/* スプラッシュ広告 */
6-google_ad_slot = "8694222147";
7-google_ad_width = 336;
8-google_ad_height = 280;
9-//-->
10-</script>
11-<script type="text/javascript"
12-src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
13-</script>
14-</body>
15-</html>
--- a/HTML.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
1-<RCC>
2- <qresource prefix="/">
3- <file>Ads.html</file>
4- </qresource>
5-</RCC>
--- a/Splash_AdSense.pro
+++ b/Splash_AdSense.pro
@@ -15,8 +15,6 @@ SOURCES += main.cpp
1515
1616 HEADERS +=
1717
18-RESOURCES += \
19- HTML.qrc
18+RESOURCES +=
2019
21-OTHER_FILES += \
22- Ads.html
20+OTHER_FILES +=
--- a/main.cpp
+++ b/main.cpp
@@ -1,26 +1,18 @@
11 #include <QApplication>
2-#include <QStyle>
32 #include <QtWebKit/QWebView>
43 #include <QTimer>
5-#include <QMessageBox>
64
75 int main(int argc, char *argv[])
86 {
97 QApplication a(argc, argv);
108
11- QWebSettings* webSettings = QWebSettings::globalSettings();
12- webSettings->setAttribute( QWebSettings::JavascriptEnabled, true );
13- webSettings->setAttribute(QWebSettings::PluginsEnabled,true);
14-
159 QWebView *window= new QWebView;
1610 window->setWindowFlags(Qt::FramelessWindowHint);
1711 window->setFixedSize(336,280);
18- window->move(150,150);
19- window->setHtml(QObject::tr("<html><body><a href=\"http://\">test</a><script type=\"text/javascript\"><!--\ngoogle_ad_client = \"ca-pub-3600741293730423\";\n/* スプラッシュ広告 */\ngoogle_ad_slot = \"8694222147\";\ngoogle_ad_width = 336;\ngoogle_ad_height = 280;\n//-->\n</script><script type=\"text/javascript\" src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\"></script></body></html>"));
20-QMessageBox::information(window,QObject::tr("test"),QObject::tr("<html><body><a href=\"http://\">test</a><script type=\"text/javascript\"><!--\ngoogle_ad_client = \"ca-pub-3600741293730423\";\n/* スプラッシュ広告 */\ngoogle_ad_slot = \"8694222147\";\ngoogle_ad_width = 336;\ngoogle_ad_height = 280;\n//-->\n</script><script type=\"text/javascript\" src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\"></script></body></html>"));
12+ window->setHtml(QObject::tr("<html><body style=\"background-color:black;margin:0px;padding:0px;\"><script type=\"text/javascript\"><!--\ngoogle_ad_client = \"ca-pub-3600741293730423\";\n/* スプラッシュ広告 */\ngoogle_ad_slot = \"8694222147\";\ngoogle_ad_width = 336;\ngoogle_ad_height = 280;\n//-->\n</script><script type=\"text/javascript\" src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\"></script></body></html>"),QUrl("http://www.1-stop.co.cc/"));
2113 window->show();
2214
23- QTimer::singleShot(10000,window,SLOT(close()));
15+ QTimer::singleShot(30000,window,SLOT(close()));
2416
2517 return a.exec();
2618 }