tag:blogger.com,1999:blog-41616655741048642472024-03-07T19:05:05.238-08:00Code With TranceGary.WzlGary.Wzlhttp://www.blogger.com/profile/03036274913898890925noreply@blogger.comBlogger32125tag:blogger.com,1999:blog-4161665574104864247.post-11525900033335940942012-03-02T20:16:00.000-08:002012-03-02T20:16:04.502-08:00Port GoalTime to QNX(Simulator)<div style="font-size: small;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;">Time to relax. I am looking for sth interesting stuff around me or ........qt.</span></div><div style="font-size: small;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;">You may be interested about <a href="http://openbbnews.wordpress.com/2012/02/10/qt-comes-to-qnx/" target="_blank">Qt Comes to QNX </a>.Besides IOS,Android,WebOS,QNX,which one will be the next? Bada?!@$#@#$ no matter what happened yestoday or last-year,or what may or may not happen tomorrow.In a word, welcome to Qt family.</span></div><div><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; font-size: x-small;">Follow the Instructions(check it out,<a href="http://wiki.qt-project.org/QNX" target="_blank">http://wiki.qt-project.<wbr></wbr>org/QNX</a>), basically,no pain for you to port your qt app on the BlackBerry device(I should say at least PlayBook2 Simulator,</span><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; font-size: x-small;">cause</span><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; font-size: x-small;"> no available </span><wbr style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"></wbr><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; font-size: x-small;">playbook2 device for me by far :( ). </span><br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://farm8.staticflickr.com/7055/6801854880_1a22201ba9.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://farm8.staticflickr.com/7055/6801854880_1a22201ba9.jpg" width="348" /></a></div><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; font-size: x-small;"><br />
</span></div><div style="font-size: small;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;">Here,I think there are still sth useful tips for people in need.</span></div><div style="font-family: arial; font-size: small;"><br />
</div><div><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; font-size: x-small;">1. Remember to set corresponding qt for qnx(arm or x86) environment variable before compiling your qt app against qnx.</span></div><div><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; font-size: x-small;">2. app resolution on the BlackBerry PlayBook2 is: </span><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; font-size: x-small;">1024×600</span></div><div style="font-size: small;"><span style="color: #222222; font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;"><span style="line-height: 11px;"><br />
</span></span></div><div style="font-size: small;"><span style="color: #222222; line-height: 11px;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;">3. <b>./configure-qsk x86</b> for <b>simulator</b> based app building ,</span></span></div><div style="font-size: small;"><span style="color: #222222; font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; line-height: 11px;"> <b>./</b></span><span style="color: #222222; font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; line-height: 11px;"><b>configure-qsk arm a9</b> for <b>device</b> based app building</span></div><div style="font-family: arial; font-size: small;"><span style="color: #222222; font-family: arial, sans-serif;"><span style="line-height: 11px;"><br />
</span></span></div><div><span style="color: #222222; font-family: arial, sans-serif; font-size: x-small;"><span style="line-height: 11px;">4. libraries (only are declared in pro file)and bin will be packaged together and deployed in</span></span></div><div> <span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; font-size: x-small;"><b>/accounts/1000/appdata/</b>.<br />
5. </span><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; font-size: x-small;">For Qml application,importing all the qml files and necessary data (images) </span><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; font-size: x-small;">in app's resource file,</span><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; font-size: x-small;">storing</span><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; font-size: x-small;"> them </span><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; font-size: x-small;">in the app's executable so that you won't get into trouble with relative path any more if do it so.Otherwise <a href="http://doc.qt.nokia.com/4.7-snapshot/qdeclarativeview.html#source-prop">setSource()</a> or setMainQmlFile() for QtDeclarative can't load and parse qml file correctly if the given </span><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; font-size: x-small;">relative path was wrong</span><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; font-size: x-small;">.If your invoke this method by using default qmlapplicationviewer framework(load qml file in relative path ),little code change will be needed,As some post regarding tip <a href="http://qt-project.org/forums/viewthread/14311">here</a>:</span><br />
<span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; font-size: x-small;"> </span><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; font-size: x-small;">Just add<br />
<b>-e qml qml \</b></span><br />
<span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; font-size: x-small;"> to the bar package section of the pro file and adjust the path to main.qml in main.cpp<br />
<b>viewer->setMainQmlFile(<a href="http://qt-project.org/doc/QLatin1String.html">QLatin1String</a>("app/native/qml/<app name="">/main.qml"));</app></b></span><br />
<span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; font-size: x-small;"><br />
</span></div><div><span style="color: #222222; font-family: arial, sans-serif; font-size: x-small;"><span style="line-height: 11px;">6. </span></span><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; font-size: x-small;">remember to explicit declare <b>all</b> the libraries app at runtime depends on in .pro like this. for GoalTime</span></div><span style="font-family: arial; font-size: x-small;"><div><span style="font-family: Simsun; font-size: small;">...</span> </div>-e $$[QT_INSTALL_LIBS]/libQtCore.</span><wbr style="font-family: arial; font-size: small;"></wbr><span style="font-family: arial; font-size: x-small;">so.4 lib/libQtCore.so.4 \</span><br />
<div><div style="font-family: arial; font-size: small;">-e $$[QT_INSTALL_LIBS]/libQtGui.<wbr></wbr>so.4 lib/libQtGui.so.4 \</div><div style="font-family: arial; font-size: small;">-e $$[QT_INSTALL_LIBS]/<wbr></wbr>libQtOpenGL.so.4 lib/libQtOpenGL.so.4 \</div><div style="font-family: arial; font-size: small;">-e $$[QT_INSTALL_LIBS]/<wbr></wbr>libQtNetwork.so.4 lib/libQtNetwork.so.4 \</div><div style="font-family: arial; font-size: small;">-e $$[QT_INSTALL_LIBS]/<wbr></wbr>libQtDeclarative.so.4 lib/libQtDeclarative.so.4 \</div><div style="font-family: arial; font-size: small;">-e $$[QT_INSTALL_LIBS]/libQtSql.<wbr></wbr>so.4 lib/libQtSql.so.4 \</div><div style="font-family: arial; font-size: small;">-e $$[QT_INSTALL_LIBS]/libQtSvg.<wbr></wbr>so.4 lib/libQtSvg.so.4 \</div><div style="font-family: arial; font-size: small;">-e $$[QT_INSTALL_LIBS]/<wbr></wbr>libQtScript.so.4 lib/libQtScript.so.4 \</div><div style="font-family: arial; font-size: small;">-e $$[QT_INSTALL_LIBS]/<wbr></wbr>libQtXmlPatterns.so.4 lib/libQtXmlPatterns.so.4 \</div><div style="font-family: arial; font-size: small;">-e $$[QT_INSTALL_LIBS]/libQtXml.<wbr></wbr>so.4 lib/libQtXml.so.4 \</div>...<br />
<div><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; font-size: x-small;">More details Pls check it here</span><span style="color: #222222; font-family: arial, sans-serif; font-size: x-small;"><span style="line-height: 11px;"> </span></span><a href="http://openbbnews.wordpress.com/2012/02/10/qt-comes-to-qnx/" style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; font-size: small;" target="_blank">Qt Comes to QNX</a></div><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; font-size: x-small;">Even though nothing wrong on building, it will crash at startup sometimes when launching app on QNX(or at least on the simulator).The reason for this lies in one or more libraries are missing.As I metioned before,libraries which are only declared in pro file can be packaged with bin and deployed on simulator,I am not for sure if it's the same case happened on device(playbook2).<br />
7.In case sth unexpected happened,there is still a way to figure it out.As document mentioned,</span><br />
<div style="font-size: 15px; line-height: 22px; margin-bottom: 0.5em; margin-top: 0.4em;"><b><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;">get stdout and stderr on the PlayBook:</span></b></div><b><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif; font-size: x-small;">$ cat /accounts/1000/appdata/<your application="">/logs/log </your></span></b><br />
<div style="font-family: arial; font-size: small;"><span style="color: #222222; font-family: arial, sans-serif; line-height: 11px;"><br />
</span></div><div style="font-family: arial; font-size: small;"><span style="color: #222222; font-family: arial, sans-serif; line-height: 11px;"><b>The same to simulator.</b></span><br />
<span style="color: #222222; font-family: arial, sans-serif; line-height: 11px;"><b><br />
</b></span></div><div style="font-family: arial; font-size: small;"><span style="font-family: 'Helvetica Neue', Arial, Helvetica, sans-serif;">PS:It seems like the libQtWebkit.so.4 library is missing........</span></div><div style="font-family: arial; font-size: small;"><span style="color: #222222; font-family: arial, sans-serif;"><span style="line-height: 11px;"><br />
</span></span></div><div style="font-size: small;"><span style="color: #222222; font-family: arial, sans-serif;"><span style="line-height: 11px;"><br />
</span></span></div></div>Gary.Wzlhttp://www.blogger.com/profile/03036274913898890925noreply@blogger.com0tag:blogger.com,1999:blog-4161665574104864247.post-9925673393402587992011-11-23T21:23:00.000-08:002011-11-23T21:23:49.660-08:00GoalTime For Soccer fanAfter submitting in OVI store for QA for 4 weeks.<a href="http://goaltime.free.bg/">GoalTime</a> is finally on the market. (mobile device based on symbian^3 and symbian v5 are still not available due to the sharing functionality failed,but for N950 and N900 work fine anyway).So if you are sports fan,check it out at OVI store link for this app <a href="http://store.ovi.com/content/213368">http://store.ovi.com/content/213368</a> enjoy...........<br />
<br />
<div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="http://farm8.staticflickr.com/7019/6393033845_9762de8a91_z.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://farm8.staticflickr.com/7019/6393033845_9762de8a91_z.jpg" /></a></div><br />
About GoalTime<br />
<br />
<i>"GoalTime is Qt based App that help user to view latest match score( Football, Italian Serie A, Barclays Premiership, Spanish Primera Division, Italian Serie A, German undesliga, French Series 1 League, basketball, Tennis...) in real-time. Besides scoring tips,user can check ongoing match score, goals, red and yellow card. And also choose matches you are interested in and strip the leagues out which you don't wanna pay attention to as well as sharing match info with your friends on social<br />
network like facebook, twitter, weibo.... of course it will consumes a small amount of network traffic."</i><div><i><br />
</i></div>Gary.Wzlhttp://www.blogger.com/profile/03036274913898890925noreply@blogger.com0tag:blogger.com,1999:blog-4161665574104864247.post-37878645341244645442011-10-11T05:14:00.000-07:002011-10-11T05:14:26.869-07:00Different people with different lifeBest wish to you <a href="http://ezse.com/">Shawn</a>.<br />
I will miss you.Gary.Wzlhttp://www.blogger.com/profile/03036274913898890925noreply@blogger.com0tag:blogger.com,1999:blog-4161665574104864247.post-47323184541745843282011-09-13T03:29:00.000-07:002011-09-13T03:29:47.901-07:003DHappyFrog is coming It takes me some time to record a video and upload it to Youtube(What a bloody <a href="http://en.wikipedia.org/wiki/Golden_Shield_Project">GFW</a>).hum..............<br />
<div class="separator" style="clear: both; text-align: center;"> <iframe allowfullscreen="" frameborder="0" height="345" src="http://www.youtube.com/embed/uHbjVonH2YU" width="560"></iframe></div><div class="separator" style="clear: both; text-align: -webkit-auto;"></div><br />
As the description I post on Youtube channel.<br />
<span class="Apple-style-span" style="background-color: white; font-family: arial, sans-serif; font-size: 13px; line-height: 18px;"><i>This app is developed by using Qt3D/QML integrated with Bullet 3D physics engine.Due to this game is 3D-game,There are 2 types of play,one is controlled by user(you can regard N950/N9 as game controller) ,another is based on sensor.More details,pls watch recorded video.The explosion effect looks like not bad.As you see,I deploy this game on N950,Basically,The performance and some details are not as good as expected.Still Some bugs are needed to be fixed and lots of room to improve,such as better 3D model, effect,audio,optimization on painting to boost FPS.On the other hand,This app is being built on Qt3D-1.0-tp1.which is not blown release(Qt3D is still in-progress).That's why I've not released the debian package and source code yet.So stay tuned.</i></span><br />
<br />
<div class="separator" style="clear: both; text-align: -webkit-auto;">In one word,It's far from being stable,playable and complete from my perspective. </div><div>Keep going.Hopefully you'll like it when released. :)</div>Gary.Wzlhttp://www.blogger.com/profile/03036274913898890925noreply@blogger.com0tag:blogger.com,1999:blog-4161665574104864247.post-20771237645468527902011-09-03T03:12:00.000-07:002011-09-03T03:12:33.602-07:00Call your ideas:level design For 3D-HappyFrog<br />
<div style="font-family: arial; font-size: small;">3D-HappyFrog is on the way,90 percent has been done.I suppose that it will be going to be released next week or the week after next.Be patient and it will take a while.I am working hard on the rest of it.One problem encounters besides coding,I've been racking my brain to design brand-new levels and no good idea about this though by far.Evidently I find that level design is much more difficult than programming.</div><div><div style="font-family: arial; font-size: small;">So if you were me,how do you to design there levels?</div><div style="font-family: arial; font-size: small;">One snapshot as following.</div><div style="font-family: arial; font-size: small;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><a href="http://farm7.static.flickr.com/6188/6108616612_50e9aa9512_z.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://farm7.static.flickr.com/6188/6108616612_50e9aa9512_z.jpg" /></a></div><div style="font-family: arial; font-size: small;"><br />
</div><div style="font-family: arial; font-size: small;"><br />
</div><div style="font-family: arial; font-size: small;">This is my humble design.If there is no any other level easier than this one,I decide to mark it as level one.If you lost more than 1 life here...(*(JHIY*T&T*&*^(H</div><div style="font-family: arial; font-size: small;"> </div><div style="font-family: arial; font-size: small;">What you have still now? fixtures?</div><div class="separator" style="clear: both; text-align: center;"><a href="http://farm7.static.flickr.com/6066/6108602034_e4da39c80d_z.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://farm7.static.flickr.com/6066/6108602034_e4da39c80d_z.jpg" /></a></div><div style="font-family: arial; font-size: small;"><br />
</div><div style="font-family: arial; font-size: small;"><b>Of course, All fixture support local transformation.</b></div><div style="font-family: arial; font-size: small;"><br />
</div><div style="font-family: arial; font-size: small;">That's it,If you have good ideas,pls contact me via e-mails,expecting your wonderful work.</div></div><div style="font-family: arial; font-size: small;">Br</div>Gary.Wzlhttp://www.blogger.com/profile/03036274913898890925noreply@blogger.com0tag:blogger.com,1999:blog-4161665574104864247.post-64957277250933507582011-08-27T18:53:00.000-07:002011-08-27T18:53:50.541-07:00Keep calm and Hack on<br />
<div style="font-family: arial; font-size: small;">Clearly I remember that this is my <a href="http://garywang77.blogspot.com/2011/03/sth-from-norway.html">secound time</a> recerving a gift bag from Oslo,which is as a award of <a href="http://qt-apps.org/news/?id=340">Qtest Mobile App Port Contest </a></div><div style="font-family: arial; font-size: small;">It is on hand now.</div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="http://farm7.static.flickr.com/6188/6085320344_1fc12d35ff.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://farm7.static.flickr.com/6188/6085320344_1fc12d35ff.jpg" /></a></div><div style="font-family: arial; font-size: small;"><br />
</div><div style="font-family: arial; font-size: small;">Although failed to be the top 5 in the final(which means no chance to get my favorate mobile device N900 before N9/N950 was officially announced by NOKIA at Singapore),Nothing regret.My app <a href="http://qt-apps.org/content/show.php/HappyFrog?content=140171">HappyFrog</a> attracts lots of attention.Besides gift,it's really good feeling for me to see people get something pretty enjoyable out of it.That's why I keeping working on that project.</div><div style="font-family: arial; font-size: small;">Btw,I almost forgot the PDF ebook is still on my KDE desktop but for this gift.</div><div style="font-family: arial; font-size: small;"><br />
</div><div style="font-family: arial; font-size: small;">Keep calm and Hack on.</div>Gary.Wzlhttp://www.blogger.com/profile/03036274913898890925noreply@blogger.com0tag:blogger.com,1999:blog-4161665574104864247.post-80049257544374078722011-07-27T18:55:00.000-07:002011-07-27T18:55:44.463-07:00HappyFrog for Harmattan<div class="separator" style="clear: both; text-align: center;"><a href="http://farm7.static.flickr.com/6014/5982801053_8e8bd88014_z.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://farm7.static.flickr.com/6014/5982801053_8e8bd88014_z.jpg" /></a></div><br />
Can't wait to say finally...finally I got my <a href="http://mynokiablog.com/2011/07/11/video-unboxing-the-nokia-n950-meego-harmattan-dev-kit/">N950</a> throught Qt-Ambassador Program.I was waiting impatiently for a long time (two suffering weeks :)) to got it on hand.Unboxing it.........very very fantastic and beautiful design and very 'soft' and fabulous to the touch.The brand-new user interface-Swipe.I feel like the whole view is completely undisciplined unbounded,yet full of the magic and power of the artist view(a image cross my mind,it reminds me of "Steve jobs" in the film "<a href="http://en.wikipedia.org/wiki/Pirates_of_Silicon_Valley">Pirates of Silicon Valley</a>".He was yelling "I need artist!!" and speak to bill "we're artist"..........*(^*&%&^$&^%)Dreams will not remains as a dream.<a href="http://conversations.nokia.com/2011/02/11/mobile-phones-the-next-billion/">The Next Billion</a>.So Come on,nokia don't let me down : ).<br />
Well,I am prepared to deploy two games on N9. <br />
One is <a href="http://qt-apps.org/content/show.php/HappyFrog?content=140171">HappyFrog</a>(someone has played it),another....keep you guessing. <br />
So first priority is to make some improvment on Happy Frog. three features on HappyFrog 0.0.3. details as follows <br />
1.parallax scrolling(see the hills) and re-design some levels <br />
2.add tyre fixture(enable Motor in Box2D) <br />
3.add windmill fixture(disanble Motor in Box2D)<br />
<br />
<div class="separator" style="clear: both;"><a href="http://farm7.static.flickr.com/6002/5980683712_610cc81b2e_z.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://farm7.static.flickr.com/6002/5980683712_610cc81b2e_z.jpg" /></a></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"><span style="color: black; font-family: 'Times New Roman', serif;"><br />
</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"><span class="Apple-style-span" style="font-family: 'Times New Roman', serif;">you can download HappyFrog for different platform here</span></div><div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm;"><span class="Apple-style-span" style="background-color: #f8f8f8; font-family: Verdana, 'Bitstream Vera Sans', Arial, Helvetica, Sans, 'Bitstream Vera Serif'; font-size: 12px;"><span class="contenttext" style="font-size: 8pt;">1.<a href="http://qt-apps.org/content/download.php?content=140171&id=1&tan=80955844">HappyFrog 0.0.3 For Symbian^3</a>(N8 C7,E7,C6-01)</span></span></div><div><span class="Apple-style-span" style="background-color: #f8f8f8; font-family: Verdana, 'Bitstream Vera Sans', Arial, Helvetica, Sans, 'Bitstream Vera Serif'; font-size: 12px;">2.<span class="Apple-style-span" style="font-size: 11px;"><a href="http://qt-apps.org/content/download.php?content=140171&id=2&tan=9022743">HappyFrog 0.0.3 For Symbian^1</a></span></span><span class="Apple-style-span" style="background-color: #f8f8f8; font-family: Verdana, 'Bitstream Vera Sans', Arial, Helvetica, Sans, 'Bitstream Vera Serif'; font-size: 12px;"><span class="Apple-style-span" style="font-size: 11px;">(5800,n97,c6,5230..)</span></span></div><div><span class="Apple-style-span" style="background-color: #f8f8f8; font-family: Verdana, 'Bitstream Vera Sans', Arial, Helvetica, Sans, 'Bitstream Vera Serif'; font-size: 12px;">3.<a href="http://qt-apps.org/content/download.php?content=140171&id=3&tan=29105321">HappyFrog 0.0.3 For Frementle</a>(N900)</span></div><div><span class="Apple-style-span" style="background-color: #f8f8f8; font-family: Verdana, 'Bitstream Vera Sans', Arial, Helvetica, Sans, 'Bitstream Vera Serif'; font-size: 12px;">4.<a href="http://qt-apps.org/content/download.php?content=140171&id=4&tan=11414801">HappyFrog 0.0.3 For Harmattan</a>(N950)</span></div><div><span class="Apple-style-span" style="background-color: #f8f8f8; font-family: Verdana, 'Bitstream Vera Sans', Arial, Helvetica, Sans, 'Bitstream Vera Serif'; font-size: 12px;"><br />
</span></div><div><span class="Apple-style-span" style="font-family: Verdana, 'Bitstream Vera Sans', Arial, Helvetica, Sans, 'Bitstream Vera Serif';"><span class="Apple-style-span" style="font-size: 12px;">source code is here </span></span><span class="Apple-style-span" style="background-color: #f8f8f8; font-family: Verdana, 'Bitstream Vera Sans', Arial, Helvetica, Sans, 'Bitstream Vera Serif'; font-size: 11px;"><a href="http://qt-apps.org/content/download.php?content=140171&id=5&tan=71658088">Happyfrog-Src-0.0.3.tar.bz2 </a>,you can </span><span class="Apple-style-span" style="background-color: white; font-family: arial, sans-serif; font-size: x-small; line-height: 16px;">checkout it also at here </span></div><div><span class="Apple-style-span" style="background-color: white; font-family: arial, sans-serif; font-size: x-small; line-height: 16px;"><em style="font-style: normal; font-weight: bold;">git</em>://<em style="font-style: normal; font-weight: bold;">gitorious</em>.org/happyfrog/happyfrog.<em style="font-style: normal; font-weight: bold;">git</em></span></div><div></div><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: x-small;"><span class="Apple-style-span" style="line-height: 16px;">Next game is in-progress,stay tuned.</span></span><br />
<span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: x-small;"><span class="Apple-style-span" style="line-height: 16px;"><br />
</span></span><br />
<span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: x-small;"><span class="Apple-style-span" style="line-height: 16px;">Br</span></span><br />
<span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: x-small;"><span class="Apple-style-span" style="line-height: 16px;">Gary</span></span></div>Gary.Wzlhttp://www.blogger.com/profile/03036274913898890925noreply@blogger.com0tag:blogger.com,1999:blog-4161665574104864247.post-30971276792386807662011-07-06T23:14:00.000-07:002011-07-06T23:14:40.351-07:00Making HMAC-SHA1 scriptable in appsLong time no blog due to busy on project.<br />
<span class="Apple-style-span">It's a funny coincident that I need to do some work based on OAUTH open protocol again.But according to the <a href="http://qt-apps.org/content/show.php/QOAuth?content=107420">qoauth libs</a> implementation and <a href="http://garywang77.blogspot.com/2010/04/using-hmac-sha1-in-qoauth-on-symbian.html">the previous blog</a> I mentioned,there is a need for me to make it with little code change for different platform(on Desktop I need to compile and import <a href="http://delta.affinix.com/qca/">QCA</a> libraries in addition to <a href="http://delta.affinix.com/download/qca/2.0/plugins/qca-ossl-2.0.0-beta3.tar.bz2">qca-ossl-plugin</a> see below on that page,on Symbian I need to import hash.lib by using related class </span>CSHA1,CMAC).Hum,is there a better solution for me to utilize to make it easier?<br />
So I think it's time to play a small trick.My proposal is that do HMAC-SHA1 in app without any change to fit all platform with Qt(Desktop,embed,mobile device).<b>The main idea is that making HMAC-SHA1 scriptable in apps.</b><br />
The step as following.<br />
<i>1.Please check <a href="http://pajhome.org.uk/crypt/md5/sha1.html">http://pajhome.org.uk/crypt/md5/sha1.html</a> and import sha1.js in your project.</i><br />
<i>2.QtScript module provides powerful embedded scripting environment through the QtScript classes.So we can call a Qt script function from C++ like this.</i><br />
<div><pre class="brush:cpp">...
...
QFile file("./sha1.js");
file.open(QIODevice::ReadOnly);
QString jsContent = QString::append(file.readAll());
file.close();
....
....
QScriptEngine engine;
engine.evaluate(jsContent);// very similar with function QWebFrame::evaluateJavaScript ()
QScriptValue value = engine.globalObject();
QScriptValueList paramList;
paramList<<key<<baseString;
QString result = value.property("b64_hmac_sha1").call(QStringValue(),valueList).toString()
//call js function b64_hmac_sha1 from C++ and result is what you want. ;)
</pre><br />
Ps:<br />
special present from Finland before my birthday.<br />
can't wait to test it.<br />
I will be waiting impatiently for the time when I get it.</div>Gary.Wzlhttp://www.blogger.com/profile/03036274913898890925noreply@blogger.com0tag:blogger.com,1999:blog-4161665574104864247.post-48142539939679775352011-03-21T23:18:00.000-07:002011-03-21T23:18:35.219-07:00HappyFrog........just for fun<span style="font-family: "Arial","sans-serif";">In the wake of angry bird become more and more popular,so I just wonder how to implement it with Qt.Below are some hint.<br />
1.<a href="http://doc.qt.nokia.com/latest/graphicsview.html">GraphicsView Framework</a>(or <a href="http://doc.qt.nokia.com/4.7-snapshot/qmlruntime.html">Declarative UI</a>) interagted with <a href="http://www.box2d.org/">Box2D physics engine</a>.<br />
2.Explosion effect can be done with function <a href="https://idlebox.net/2010/apidocs/qt-everywhere-opensource-4.7.0.zip/qpainter.html#drawPixmapFragments" target="_blank">drawPixmapFragment</a>(which is introduced in Qt 4.7,make an optimize on state changes for QPainter,so it's faster than multiple calls to drawPixmap())<br />
3.In order to boost my development,I wanna use some Element from <a href="http://doc.qt.nokia.com/4.7-snapshot/qdeclarativeintroduction.html" target="_blank">Qml,</a>such as<a href="http://doc.qt.nokia.com/4.7-snapshot/qml-flickable.html" target="_blank"> flickAble</a> or <a href="http://doc.qt.nokia.com/4.7-snapshot/qml-listview.html" target="_blank">ListView</a>,etc..</span><br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://farm6.static.flickr.com/5267/5549392446_f6e37a43a0.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://farm6.static.flickr.com/5267/5549392446_f6e37a43a0.jpg" /></a></div><br />
<span style="font-family: "Arial","sans-serif";">The first two are not difficult to implement it.<br />
basically,lots of people want to know how to integrated qml with c++ in this demo,in particularly how to add item in the flickAble element (you konw,I am a lazy and humble guy and on the flip side,I guest not everyone konws that how to make <a href="http://stechz.com/2010/robust-kinetic-animation/" target="_blank">kinetic animation</a>,In fact it's not difficult).</span><span style="font-family: "Arial","sans-serif";">(more detaileds watch the video Below).</span><br />
<div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/UjcL65mzPLA?feature=player_embedded' frameborder='0'></iframe></div>In order to dynamically add item in the flickable,we can write some code in qml<br />
<pre class="brush:cpp">Flickable {
id: myFlickable
......
function addItem(file) {
var component = Qt.createComponent(file)
component.createObject(myFlickable.contentItem);
}
}
</pre><span style="font-family: "Arial","sans-serif";">Maybe someone just figure out an "easier" way<br />
</span><br />
<pre class="brush:cpp">Flickable{
id: myFlickable
......
Loader { id: itemLoader }
......
MouseArea {
anchors.fill: parent
onClicked: itemLoader.source = "items.qml"
}
}
}</pre>In case code you wrote like above,unfortunately,item inserted dynamiclly <b>can not be "flicked"</b>,so it didn't work out if you forget passing Flickable.contentItem for the item created,even thought it seems like itemLoader is a "child" of myFlickable.<br />
In C++<br />
consider about foregoing problem we met.There are two little things we need to care about.<br />
1.How to get the pointer of "Flickable"<br />
2.How to get the pointer of "myFlickable.contentItem"(a property of Flickable)<br />
;) some related apis have been prepared by Qt,easy and convinient.<br />
1.create <a href="http://doc.qt.nokia.com/4.7-snapshot/qml-qtobject.html">QtObject Element </a>for Flickable element,as the qt document mentioned "It can also be useful for C++ integration, as it is just a plain QObject.This allows a C++ application to locate an item within a QML component using the QObject::findChild() method". <br />
2.with QObject'property to fetch the pointer of Flickable.contentItem.<br />
main.qml<br />
<pre class="brush:cpp">Flikable {
id:flickable;
objectName: "flickArea"
.......
.......
}
</pre> main.cpp<br />
<pre class="brush:cpp"> QDeclarativeComponent component(&engine,QUrl("main.qml"));
if(component.status() != QDeclarativeComponent::Ready){
foreach(const QDeclarativeError &error,component.errors()){
qFatal(error.toString().toStdString().c_str());
}
}
QDeclarativeItem *mainView = qobject_cast< QDeclarativeItem *>(component.create());
QDeclarativeItem *flickArea = mainView->findChild< QDeclarativeItem * >("flickArea");
QDeclarativeItem *contentItem = qvariant_cast< QDeclarativeItem * >(flickArea->property("contentItem"));
//pass contenItem as item's parent.
ItemInserted *item = new (contentItem);
</pre>That's all.Btw.<br />
If you are a qml enthusiast,qml-Box2d(<a href="http://gitorious.org/qml-box2d" target="_blank">http://<wbr></wbr>gitorious.org/qml-box2d</a>) plugins is on the <br />
way,here,Maybe it's useful for you to write fantastic game or something related stuff.<br />
of course,HappyFrog is an opensource project,you can find here<br />
<a href="http://code.google.com/p/happyfrog/">http://code.google.com/p/happyfrog/</a><br />
you can also checkout the latest source which is hosted on the my gitorious page.<br />
git clone git://gitorious.org/happyfrog/happyfrog.gitGary.Wzlhttp://www.blogger.com/profile/03036274913898890925noreply@blogger.com0tag:blogger.com,1999:blog-4161665574104864247.post-26307277018780415542011-03-14T22:40:00.000-07:002011-03-14T22:40:00.143-07:00Sth From NorwayThis morning,I got sth which is sent from Norway,meanwhile I have been accepted as a <a href="http://qt.nokia.com/qt-in-use/ambassadors/qtambassador/">Qt Ambassador</a>.Maybe It's good news for me during these times(seems like the T-shirt isn't fit me,small size would be fine),<br />
Btw,I am working on a qt-apps integrated with Box2d and Declarative UI,I call it "Happy Frog" and about to prepare to release these days,stay tuned.<br />
<br />
<div style="text-align: center;"><a href="http://farm6.static.flickr.com/5055/5528543672_fd81583592.jpg"><img border="0" src="http://farm6.static.flickr.com/5055/5528543672_fd81583592.jpg" /> </a></div><div style="text-align: center;"> </div>Gary.Wzlhttp://www.blogger.com/profile/03036274913898890925noreply@blogger.com0tag:blogger.com,1999:blog-4161665574104864247.post-50213919959243491062011-03-06T10:02:00.000-08:002011-03-14T22:00:42.209-07:00Recent thoughts:my future<div style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: small;">I suppose that everyone who gets involved with qt or focuses on Symbian, Maemo(Meego in the future) has been aware of the collaboration between Nokia and Microsoft.First time I heard of this, I feel shocked and then a lot of disappointment.You know,I am looking forward to the Meego platform for a long time.I am eager to get n900 mobile device still now.I stick to suppose that the Meego platform is still the first option for Nokia as mobile device operation system before this happened.But finally Nokia choose the Microsoft as parter and select window phone 7 as new platform.For my part,I have no idea if this is huge mistake for Nokia.For my part,I have no right to judge or criticize the collaboration or anyone involved with this,which should be on the agenda of those "Big man",not for nobody like me.Indeed,It's none of my business.I think I just an recent-undergraduate who get falling in love with qt programming from second year of college life and also a little "kid" in programming area.........</span></div><div style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: x-small;"><span style="font-size: small;">On the flip side,I really hope qt has a brilliant future,as well for nokia(without question,Qt never let us down).also hope Lots of people who love free and open (software) can continue concentrating on qt or any other (open source) related stuff instead of turning more attention on the wp7.I will guarantee that I will not get involved with wp7,so don't count me in.<br />
............<br />
Yeah,It's really tough time.at this point it reminds me of a famous blog post <a href="http://conversations.nokia.com/2010/07/02/the-fightback-starts-now/">The fightback starts now</a>.Comparision with <a href="http://www.engadget.com/2011/02/08/nokia-ceo-stephen-elop-rallies-troops-in-brutally-honest-burnin/">burning platform</a>,it's so obvious that "<a href="http://www.reuters.com/resources/r/?m=02&d=20100920&t=2&i=208151725&w=&fh=&fw=&ll=460&pl=300&r=2010-09-20T140416Z_01_BTRE68J133600_RTROPTP_0_NOKIA">angry bird</a>" is not the right person for that position.hum.Just let it go and see what happen next.Good luck to nokia.hope I am on the right way.</span></span></div>Gary.Wzlhttp://www.blogger.com/profile/03036274913898890925noreply@blogger.com0tag:blogger.com,1999:blog-4161665574104864247.post-20203865991789479082011-02-03T07:59:00.000-08:002011-03-14T22:05:53.122-07:00It's OK now<div style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: small;">Happy Chinese New Year.<br />
<br />
I am home now for spring festival.I suppose I've wasted two days on busy with getting together at home or restaurant to have dinner with families.There are also days when people get around the city ,go camp or travel.But for me,home is the cheeriest place in the world.I can get up late or do some stuff on my own Laptop,such as configuration meego environment.</span></div><div style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: small;">To be frankly,It is very slow when I startup meego-simulator.I suppose my laptop is not bad.<br />
</span></div><div style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: small;"><b>Processor:</b> Inter core2 Due T9600 @ 2.80GHz<br />
<b>RAM</b>: 4GB <br />
<b>Graphics card</b>: Nvidia Quadro FX770M<br />
<b>Operating system</b>: Kubuntu 10.04.2 LTS <br />
<br />
And when I run my first meego app "Hello world",I get the info <br />
"..........QGLContedxt::makeCurrent():Cannot make invalid context current..........".Obviously,something is wrong with my graphics card driver.And the desktop effect was failed as well when I launch it.Think think twice,I find that I forget updating the video card driver when I upgrade linux kernel.oh,My gosh.<br />
</span></div><div style="font-family: Arial,Helvetica,sans-serif;"><span style="font-size: small;">Fortunately,Nvidia release new display drivers for linux recently.<br />
<a href="http://www.nvidia.com/object/linux-display-ia32-260.19.36-driver.html">http://www.nvidia.com/object/linux-display-ia32-260.19.36-driver.html</a><br />
It takes a little time to install the latest version.then I take snapshot on glxgears.Of cause,everything is OK again now.</span></div><div class="separator" style="clear: both; text-align: center;"><a href="http://farm5.static.flickr.com/4081/5413573716_becb565c58.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="261" src="http://farm5.static.flickr.com/4081/5413573716_becb565c58.jpg" width="320" /></a></div><div class="separator" style="clear: both; text-align: center;"><br />
</div><span style="font-size: small;">Br,all.</span>Gary.Wzlhttp://www.blogger.com/profile/03036274913898890925noreply@blogger.com0tag:blogger.com,1999:blog-4161665574104864247.post-10436083427755904882011-01-17T18:17:00.000-08:002011-01-17T18:20:27.563-08:00A Simple Qml Game - Thumder<div style="font-family: arial; font-size: small;">Yeah,I've not updated my blog entry for a long time.Last blog entry was five months ago. one reason is I am basically a lazy guy,the other is busy work Frankly.Look back upon the past three months(First Workday on 10.18 2010),many things happend to me: a good job looks like,great changes in my routine life,work on project I am good at,making some innovative work with one or two talent guys.totally, a new journey for me has come to the beginning and I am on my way.</div><div style="font-family: arial; font-size: small;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><a href="http://farm6.static.flickr.com/5204/5365874670_d81594dfdc.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://farm6.static.flickr.com/5204/5365874670_d81594dfdc.jpg" width="172" /></a></div><div style="font-family: arial;"><div style="text-align: center;"><span class="Apple-style-span" style="font-size: x-small;"> </span><span class="Apple-style-span" style="font-size: xx-small;"><i>screenshot of</i> <i> Thumder</i></span></div></div><div style="font-family: arial; font-size: small;">Btw,I spend free time writing a small pure qml game(Thumder) instead of complex qt-apps integrated with qml like <a href="http://code.google.com/p/qdou/downloads/list">qDou</a>.I am sure someone has played it in their childhood.:-) this simple one is just a part of a another interesting project(What's it ? secret).And when that interesting project is done.It will be going to wonderful,people will barely be able to comprehend it.But actually it's very easy.Maybe in the next post, I will give some details on It.</div><div style="font-family: arial; font-size: small;"><br />
</div><div style="font-family: arial; font-size: small;">get the source code</div><div style="font-family: arial; font-size: small;">git clone git://gitorious.org/thumder/thumder.git</div><div style="font-family: arial; font-size: small;"><br />
</div><div style="font-family: arial; font-size: small;">Be good all.</div>Gary.Wzlhttp://www.blogger.com/profile/03036274913898890925noreply@blogger.com0tag:blogger.com,1999:blog-4161665574104864247.post-25484297630542773622010-08-16T04:09:00.000-07:002010-08-16T04:09:48.484-07:00The stronger lineedit<span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;">I haven't update my blog for a long time.</span></span><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;">One reason is I am waiting impatiently for the time when Qt 4.7 release to rewrite qDou(qDou is programmed with Qt 4.6,at that time Qml is on the way.In the latter days,it changes a lot. here,</span></span><a href="http://labs.trolltech.com/blogs/2010/03/16/qml-on-the-road-to-release/"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;">QML on the Road to Release</span></span></a><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;">).Meanwhile I finished my under graduation last month.It's days of fun and good feelings and memories.There are the days when I stay up for the world cup and so amazing about spanish team work and Paul (The Octopus )'performance.The other Reason is looking forward to doing something useful software on the desktop,Just like<a href="http://userbase.kde.org/Plasma/Krunner"> Krunner</a> or <a href="http://chrome.blogspot.com/2009/06/get-to-know-omnibox.html">omnibox</a>. </span></span><br />
<div style="-qt-block-indent: 0; -qt-user-state: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"><br />
</span></span><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"> </span></span></div><div class="separator" style="clear: both; text-align: center;"><a href="http://farm5.static.flickr.com/4074/4897494116_57620f294e.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"></a><a href="http://farm5.static.flickr.com/4119/4896907433_4944de8e28.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"><img border="0" height="133" src="http://farm5.static.flickr.com/4119/4896907433_4944de8e28.jpg" width="200" /></span></span></a><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"> <img border="0" height="156" src="http://farm5.static.flickr.com/4074/4897494116_57620f294e.jpg" width="320" /></span></span></div><div class="separator" style="clear: both; text-align: center;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"><br />
</span></span></div><div style="-qt-block-indent: 0; -qt-user-state: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"> </span></span></div><div style="-qt-block-indent: 0; -qt-user-state: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;">Give all you need to the LineEdit,let it give you answers.</span></span><br />
<span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;">such as </span></span><span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif; font-size: small;">what's the weather like in chengdu?</span></div><div style="-qt-block-indent: 0; -qt-user-state: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"><br />
</span></span><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"> </span></span></div><div class="separator" style="clear: both; text-align: center;"><a href="http://farm5.static.flickr.com/4137/4896859773_679c82c36a.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"><img border="0" src="http://farm5.static.flickr.com/4137/4896859773_679c82c36a.jpg" /></span></span></a></div><div style="-qt-block-indent: 0; -qt-user-state: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"><br />
</span></span><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"> </span></span></div><div style="-qt-block-indent: 0; -qt-user-state: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"><br />
</span></span><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"> </span></span></div><div style="-qt-block-indent: 0; -qt-paragraph-type: empty; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"></div><div style="-qt-block-indent: 0; -qt-paragraph-type: empty; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"></div><div style="-qt-block-indent: 0; -qt-user-state: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;">but the first things I need to consider in programming is the result ranking </span></span></div><div style="-qt-block-indent: 0; -qt-user-state: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;">two factors for the result ranking </span></span></div><div style="-qt-block-indent: 0; -qt-user-state: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;">1.DateTime.the later the Matching words putted in the historyList,the more frontly will be it shows.</span></span></div><div style="-qt-block-indent: 0; -qt-user-state: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;">2.Frequence.the More times that you queryed for a same word ,The more frontly ........</span></span></div><div class="separator" style="clear: both; text-align: center;"><a href="http://farm5.static.flickr.com/4117/4897454168_2149526ee4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"><img border="0" height="129" src="http://farm5.static.flickr.com/4117/4897454168_2149526ee4.jpg" width="320" /></span></span></a></div><div style="-qt-block-indent: 0; -qt-user-state: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"><br />
</span></span><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"> </span></span></div><div style="-qt-block-indent: 0; -qt-paragraph-type: empty; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"></div><div style="-qt-block-indent: 0; -qt-paragraph-type: empty; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"></div><div style="-qt-block-indent: 0; -qt-user-state: 0; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;">btw,I really indebted to </span></span><a href="http://code.google.com/p/arora/"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;">Arora</span></span></a><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;">(is opensource webkit based browser)'writer for his work.With his clear contributed code, it makes me benefit from it,especially how to re-construct </span></span><a href="http://doc.qt.nokia.com/4.6/qcompleter.html"><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;">QCompleter</span></span></a><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;"> supporting filter and sorting </span></span><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-family: 'Trebuchet MS', sans-serif;">with matching algorithm in post-facto.Actually what attracted me most in Arora's feature is Adblock.Althought it's not perfect,it's a really interesting way to block ads.</span></span></div><div style="-qt-block-indent: 0; -qt-paragraph-type: empty; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-indent: 0px;"></div>Gary.Wzlhttp://www.blogger.com/profile/03036274913898890925noreply@blogger.com0tag:blogger.com,1999:blog-4161665574104864247.post-36055122308340092242010-05-26T10:52:00.000-07:002010-05-26T10:52:07.384-07:00Dismantle my old laptopIt has been considered for a long time that I decided to dismantle my old laptop once Again----Acer TravelMate 3270 which is my first laptop.To be honest, it's good too,especially keyboard design and soft feel experience.It stays with me for 4 years at university,Programming,game(nba ,pes),.film,music,These are days of fun and good feeling and memories. Although previous failure make me vacillating,I am going to make my laptop stop making a loud fan noise,I can't take it anymore really.That's another reason why I have to buy a powerful laptop.The only thing I can make it recovery is dismantling it. <br />
<br />
Searching something useful on google and eventually take me about 2h to make it.Brilliant!!<br />
Just like someone says "keep your attention on the here and now,your efforts will pay graet divdends." That's right.<br />
now I can't hear anything about the insistent jangles and slip into the blissful dreamland.<br />
<br />
<div class="separator" style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; clear: both; text-align: center;"><a href="http://farm5.static.flickr.com/4020/4641997161_c45c58e1be.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" gu="true" src="http://farm5.static.flickr.com/4020/4641997161_c45c58e1be.jpg" /></a></div>Gary.Wzlhttp://www.blogger.com/profile/03036274913898890925noreply@blogger.com0tag:blogger.com,1999:blog-4161665574104864247.post-57140776247055818312010-05-10T07:49:00.000-07:002010-05-10T08:52:17.956-07:00My new laptopIt's a mobile workstation:Dell Precision M4400,But for me it's just a laptop.At the beginning of this month,I was going to buy a N900 which I was eager to get for such a long time.after waiting for about 2 months,I suppose it's still a little expensive.evaluating all of choices,I have come to realize a new powerful laptop maybe fit for me rather than a Maemo mobile phone.Of course,It's mush more expensive,But it's more useful for ones who want to get deep into the linux like me.So I change my mind and take 1 week to pick my new laptop online.think think twice.......,Maybe,although it's almost 4 times expensive than N900.........But,It's worth it and I will not say goodbye to my old friend TrevelMate 3270.It's great too.<br />
Tomorrow I will go back to school for my graduation project.How time flies.<br />
Take care.<br />
<div class="separator" style="clear: both; text-align: center;"><img border="0" src="http://farm4.static.flickr.com/3411/4595232321_4fc253544c_o.jpg" tt="true" /></div>Gary.Wzlhttp://www.blogger.com/profile/03036274913898890925noreply@blogger.com0tag:blogger.com,1999:blog-4161665574104864247.post-3288270861272571332010-04-17T01:39:00.000-07:002010-04-17T03:11:10.233-07:00Using HMAC-SHA1 in qOAuth on SymbianIn the wake of <a href="http://code.google.com/p/qdou/">qDou 0.2.5 release</a>,I am working on Deploying qDou on Sybmain recently,But I am sorry about.........;-( I must admit I am a rookie on Symbian,irrespective Of playing with Symbiam Os phone,or Development on Symbian Os.To take trial instance how scornful I was when using a 3250,I thought that it was just phone with colorful push buttons that can make happy noise and it was just a practical tools for accessing family,friends and business associats (maybe in the future,Because I am an undergraduate still now ).Upon a careful study these days,I learn a lot on Symbian development,really,Or at least To a rookie.When I look back,I just feel funny.So I change my mind.Symbian is Strong.<br />
Back to the topic,becouse qDou release depends on <a href="http://qt-apps.org/content/show.php/QOAuth?content=107420">qOAuth</a> and oAuth request using the HMAC-SHA1 signature method.<br />
On the Windows or linux,In order to do that<br />
the following steps are<br />
<em>1. build </em><a href="http://www.openssl.org/"><em>OpenSSL 0.9.6+</em></a><em> </em><br />
<em>2. build </em><a href="http://delta.affinix.com/qca/"><em>qca-2.0.0</em></a><br />
<em>3. build the </em><a href="http://delta.affinix.com/download/qca/2.0/plugins/qca-ossl-2.0.0-beta3.tar.bz2"><em>qca plugin for OpenSSL</em></a><em> (the Capabilities of qca-ossl contains HMAC_SHA1)?</em><br />
<em>4. build qOAuth</em><br />
But on the Symbian,as a result of different platform,you will have a lot of work to do.<br />
even though you achieved,Maybe It doesn't work at last and you will get into trouble when deploy your apps on Symbian.em.........There is a easy way,Look this.<br />
<em><a href="http://wiki.forum.nokia.com/index.php/How_to_generate_oauth_signature_using_HMAC-SHA1_in_Symbian_C%2B%2B">How to generate oauth signature using HMAC-SHA1 in Symbian C++</a></em><br />
Follow These Tips .<br />
we just need to do little stuff<br />
1.add macro Q_OS_SYMBIAN to remove anything about QCA from *.cpp or *.h in qOAuth when Precompiled<br />
2.generating your own random number method to replace the following codes<br />
<pre class="brush:cpp">QCA::InitializationVector iv( 16 );
QByteArray nonce = iv.toByteArray().toHex();
</pre>3.add these lines in function:createSignature<br />
<div class="separator" style="clear: both; text-align: center;"></div><pre ;?="" class="brush: cpp" style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;">#ifdnef Q_OS_SYMBIAN
.....
.....
.....
#else
CSHA1* sha=CSHA1::NewL();
TBuf8<100> keyVal;
keyVal.Copy(_L8(QByteArray(consumerSecret + "&" + tokenSecret).constData()));
CHMAC* hmac=CHMAC::NewL(keyVal,sha);
TBuf8<1024> baseString;
TPtrC8 hashedSig(hmac->Hash(baseString));
TImCodecB64 b64enc;
b64enc.Initialise();
HBufC8* buf = HBufC8::NewL(hashedSig.Length() * 2);
buf->Des().Copy(hashedSig);
TBuf8<512> result;
b64enc.Encode(buf->Des(),result);
result.Copy(result.Left(result.Length()));
if(hmac)
{
delete hmac;
hmac=NULL;
}
digest = QByteArray::fromRawData((char*)result.Ptr(),result.Length());
#endif
</pre><div class="separator" style="clear: both; text-align: center;"><a href="http://farm5.static.flickr.com/4058/4527226603_b16829165b_o.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="http://farm5.static.flickr.com/4058/4527226603_b16829165b_o.jpg" width="299" wt="true" /></a></div><div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;">It's very easy right?</div><div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;">hope this is useful for thoses like me who want to use qOauth on Symbian</div><div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;">see you.</div>Gary.Wzlhttp://www.blogger.com/profile/03036274913898890925noreply@blogger.com5tag:blogger.com,1999:blog-4161665574104864247.post-24930236550721598472010-03-11T02:32:00.000-08:002010-03-11T02:32:10.366-08:00Video about visual text comparisonAfter releasing qDou 0.1.2,I think it's time to stop to have a test and prepare to do lots of stuff with <br />
Qt on Webkit.I am looking forward to it for a long time,although qDou is not deployed on Symbian or Maemo yet.But there is a long way to go.<br />
Make a video about visual text comparison while I am Recoding qDou's video.The <a href="http://garywang77.blogspot.com/2009/12/three-amazing-days.html">demo</a> takes me 3 days to finish it.Data visual looks like beautiful.The day before yesterday I went to Qt lab Blog and found some interesting things for developer to do some work on Data visual and games.The library is <a href="http://labs.trolltech.com/blogs/">Box2D</a>.I believe Box2D + Qt's Graphics View application will be fantastic Visually.<br />
As matter of visual text comparison ,I suppose that there are a lot of room to imporve.Till now It can be only used on English word segment.Maybe in the future It can support other language such as Chinese and add some new features.......<br />
Time Flys.Go ahead and do what you like.See you.<br />
<object height="385" width="640"><param name="movie" value="http://www.youtube.com/v/ZETxDTcNryM&hl=zh_CN&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/ZETxDTcNryM&hl=zh_CN&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object>Gary.Wzlhttp://www.blogger.com/profile/03036274913898890925noreply@blogger.com0tag:blogger.com,1999:blog-4161665574104864247.post-50455854420708577392010-03-08T02:12:00.000-08:002010-03-08T02:12:13.801-08:00qDou 0.1.2 Released<a href="http://www.blogger.com/"></a><span id="goog_1268042981669"></span><span id="goog_1268042981670"></span>after one week ,I update qDou'source and Released <a href="http://qdou.googlecode.com/files/qDou%200.1.2-setup.exe">qDou 0.1.2</a>. <br />
qDou 0.1.2 provide some bug fixes,optimization and new features which you can view comments about <br />
movie,music or book and even publish your comments about your favourite.<br />
More info about <a href="http://www.douban.com/note/62592340/">qDou 0.1.2</a>.Gary.Wzlhttp://www.blogger.com/profile/03036274913898890925noreply@blogger.com0tag:blogger.com,1999:blog-4161665574104864247.post-11536601002878391422010-03-03T11:21:00.000-08:002010-03-03T11:21:55.662-08:00qDou 0.1.0 ReleasedI can't wait to say that qDou 0.1.0 is Released.You can download <a href="http://qdou.googlecode.com/files/qDou%200.1.0-setup.exe">here</a>. With powerful GraphicsView and smooth, beauty of Qml,qDou would't let you down.Before first time you play with qDou,you need to register douban's accout and apply for an APIKEY.More Information,you can find <a href="http://code.google.com/p/qdou/">here</a>.Please test and give feedback to me in the <a href="http://www.douban.com/note/61362937/">gruop</a>.<br />
By the way,I will talk about Deploying an application on Windows,especially your app with plugins.<br />
First of all,you can follow the step By the <a href="http://doc.trolltech.com/4.6/deployment-windows.html">document</a>.Two easy ways to make plugins work out.you can choose anyone of them below . <br />
1.put document named plugins which contains all you need plugins for you app in your applicationDirPath and In main.cpp you add a custom path using QApplication::addLibraryPath like this: <br />
qApp->addLibraryPath(qApp->applicationDirPath()+"./plugins");<br />
2.Using qt.conf<br />
After you deploy your app on Windows with these methods above and your app still failed with loading plugins,It's not your fault.What you need is <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=32BC1BEE-A3F9-4C13-9C99-220B62A191EE">vcredist_x86.exe</a>.Install it and the problems would be solved.In fact,Qt document refer to the point.<br />
here is the video about qDou ,enjoy.<br />
<br />
<div align="center"><object height="385" width="640"><param name="movie" value="http://www.youtube.com/v/-R9xVWpapdk&hl=zh_CN&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/-R9xVWpapdk&hl=zh_CN&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object></div>Gary.Wzlhttp://www.blogger.com/profile/03036274913898890925noreply@blogger.com0tag:blogger.com,1999:blog-4161665574104864247.post-81596733900533175882010-02-18T00:04:00.000-08:002010-02-18T00:04:08.145-08:00QDou is not far awayHappy chinese new year.For my part,There is one more important thing I can tell you: what tedious days of study ,thought ,practice,experience ,went to the equipment of I who was able to impose upon all of you that QDou is not far away.<br />
Meanwhile,I decided to buy N900 for testing.I can't wait to release QDou,But there is some small problems to consider them.Just give me sometime. :-) <br />
<em>photoview of QDou</em> <br />
<a href="http://farm5.static.flickr.com/4033/4366774507_6d186db999_o.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" ct="true" src="http://farm5.static.flickr.com/4033/4366774507_6d186db999_o.png" /></a>Gary.Wzlhttp://www.blogger.com/profile/03036274913898890925noreply@blogger.com0tag:blogger.com,1999:blog-4161665574104864247.post-27370978315027589862010-01-28T08:18:00.000-08:002010-01-28T08:18:13.140-08:00When Qt for Window meets Qt for SymbianToday,I install Qt libraries for Symbian again in my computer which has been installed Qt libraries for Windows.Of course,the version(4.6.1) is higher than last time. It reminds me of trouble that happened in the previous time.I just remember it’s a summer of last year.The situation is that every time I build the Symbian apps,the compiler displays a error that can't find bld.inf and *.mmp .I google it and ask many people how to solve the problem.Later I find that the reason why miss there two important files is that compiler does not generate them.And How to.I didn’t know.So last time,I failed.But today,I make it.Look <a href="http://labs.trolltech.com/forums/topic/298">here</a>,If the environment variable QMAKESPEC sets symbian-abld.It will be ok.It turns out that Qt for Symbian use symbian-abld not the value I set for Qt libraries for windows.<br />
Like aamer4yu says:<br />
"I dont know if you will read this post.. but just wanted to thank you a lot.. a ton of thanks..<br />
I was not able to build qt projects for symbian...and was searching for a solution for almost a month"<br />
A month to aamer4yu,half a year for me.<br />
Why am I interested in Qt for Symbian suddenly?<br />
The answer is QDou. :-)Gary.Wzlhttp://www.blogger.com/profile/03036274913898890925noreply@blogger.com2tag:blogger.com,1999:blog-4161665574104864247.post-57728925256429764842010-01-23T04:07:00.000-08:002010-08-31T00:44:42.064-07:00QDou is on the wayI am home for about 1 month, after home, I am going to finish my graduate design: Qdou(Douban client on Symbian).This time I will use Declarative UI to finish it.With this Computer language,you can build the animation rich, fluid user interfaces,such as iphone.But........I am familiar with Qt rather than ECMAScript(QML is an extension to ECMAScript,So is javascript).at the beginning,It's a little difficult for me.Fortunately, there is a document about QML provided by Qt.after viewing document,you will find gradually that it's more convenient in some respects,like automatic property bindings and network transparency.This is what I need.Just like qt engineer says,even if you do not know how to use Qt, you can also program a pretty apps with Qml.Of course,qt would not let us down on extending.Because QML is fully extensible from C++.It's absolutely fantastic property for me. I have completed coding parts of qDou on the pc.From now on,maybe I will speed up.<br />
seach ATB's album Trilogy(detail)<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://farm5.static.flickr.com/4004/4297468418_1ac3d0b08e_o.png" imageanchor="1" style="clear: left; cssfloat: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" mt="true" src="http://farm5.static.flickr.com/4004/4297468418_1ac3d0b08e_o.png" /></a><a href="http://farm5.static.flickr.com/4049/4296772803_0c3829b812_o.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" mt="true" src="http://farm5.static.flickr.com/4049/4296772803_0c3829b812_o.png" width="229" /></a></div>Gary.Wzlhttp://www.blogger.com/profile/03036274913898890925noreply@blogger.com0tag:blogger.com,1999:blog-4161665574104864247.post-54998760688017044612010-01-11T08:42:00.000-08:002010-01-11T08:42:04.367-08:00Html view With New QWebElement In Qt 4.6Take a rest and I look at the "<a href="http://doc.trolltech.com/4.6/qt4-6-intro.html">What's New in Qt 4.6"in"Qt Reference Documentation</a>" <br />
and find a new class QWebElement.I feel html view can use a another way to generate the tag node.<br />
Four months age, I make it with QtNetwork and html parser (with QtNetwork to Get page source and Html parser to parse It),I need to code a Html parser because of no Qwebelement that Time.In this way,Although fast, Coding a html parser is not easy.<br />
And Now, Using QWebElement in Webkit, It's very convenient, although Getting Page source with Qtwebkit will spend longer, it's easier.Just for fun.<br />
the source of html view is <a href="http://qt-apps.org/content/show.php/html+view?content=118261&PHPSESSID=ce14b19821409868ce5d405e1756a113">Here</a>.<br />
By the way,QDou is on the way.Gary.Wzlhttp://www.blogger.com/profile/03036274913898890925noreply@blogger.com0tag:blogger.com,1999:blog-4161665574104864247.post-253183970440176222010-01-05T02:24:00.000-08:002010-01-05T02:27:13.581-08:00Video about Html viewI'm home for graduate design Now. Initially, I choosen a subject on the search engines, but later I found that the subject has been already selected by another student, and accidentally I discovered a cell phone related. At this time, Qt 4.6 just released. The next generation of control: <a href="http://labs.trolltech.com/blogs/2009/05/13/qt-declarative-ui/">Declarative UI</a> can be used on the phone. The subject is "douban mobile phone client", <a href="http://www.douban.com/">douban</a> is a Chinese social network site, you can learn about a lot of books, movies, music, or the latest activities in your city. Of course, you can make friends, write diary. surprised.I named my client as "QDou",I think I can take advantage of opportunity to buy a new phone.Maybe 5800 or N97 because of them for s60v5.<br />
Take a short break and recorded a video about the html view,enjoy.<br />
<br />
<div align="center"><object height="385" width="480"><param name="movie" value="http://www.youtube.com/v/UKIDIrAbDME&hl=zh_CN&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/UKIDIrAbDME&hl=zh_CN&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object><br />
</div>Gary.Wzlhttp://www.blogger.com/profile/03036274913898890925noreply@blogger.com0