{"id":455,"date":"2010-07-30T01:04:31","date_gmt":"2010-07-29T23:04:31","guid":{"rendered":"http:\/\/mattiesworld.gotdns.org\/weblog\/2010\/07\/30\/project-announcement-telemeter-widget-plasmoid\/"},"modified":"2013-08-26T18:07:43","modified_gmt":"2013-08-26T16:07:43","slug":"project-announcement-telemeter-widget-plasmoid","status":"publish","type":"post","link":"https:\/\/mattiesworld.gotdns.org\/weblog\/2010\/07\/30\/project-announcement-telemeter-widget-plasmoid\/","title":{"rendered":"Project announcement: Telemeter widget \/ plasmoid"},"content":{"rendered":"<p>Lately I&#8217;ve been running low on my internet download\/upload quota. Although my ISP (<a href=\"http:\/\/telenet.be\/\">Telenet<\/a>) <a href=\"https:\/\/mattiesworld.gotdns.org\/weblog\/2010\/02\/26\/digicorder-getting-tivo-like-features\/\">trippled my quota<\/a>, a combination of <a href=\"http:\/\/news.opensuse.org\/2010\/07\/15\/opensuse-11-3-is-here\/\">new suse release<\/a>, <a href=\"http:\/\/store.steampowered.com\/news\/4090\/\">new steam games<\/a> and my isp failing to reset my quota (bug in upgrade process I guess), I managed to reach its limit inadvertently at 200 MB left. Since a) my ISP offers a webservice to access your usage data, b) I always wanted to write a useful <a href=\"http:\/\/en.wikipedia.org\/wiki\/Plasma_(KDE)\">plasmoid<\/a> and c) wanted to try out soap services using Qt, I contemplated to write a quota monitor widget \/ plasmoid. This evening I gave it a shot.<\/p>\n<p>After comparing available c++ toolkits for web services, I stuck to <a href=\"http:\/\/gsoap2.sourceforge.net\/\">gSOAP<\/a> rather than <a href=\"http:\/\/qt.nokia.com\/products\/appdev\/add-on-products\/catalog\/4\/Utilities\/qtsoap\/\">QtSoap<\/a> as gSOAP seems the de facto standard when it comes to soap and cpp. gSOAP has some handy <a href=\"http:\/\/en.wikipedia.org\/wiki\/JAXB\">JAXB<\/a>-ish utils to convert your wsdl into proxy classes. For a moment, I was afraid I would have to give up the nice and easy Qt network support (proxy, ssl,..) but it seems gSOAP has abundant support. All in all, in a few hours I had it up and running. Actually, I lost most of the time finding the relevant webservice url (you have to subscribe to a private wiki although eventually someone mailed it to me through a fairly private mailinglist I found on a user forum). In the meantime I found that putting a #define in my main is not the same as adding it as a compiler flag even when you rebuild everything. \ud83d\ude09 Adding a compiler flag the right way using qmake, goes like this:<br \/>\n<code><br \/>\nQMAKE_CXXFLAGS += -DWITH_OPENSSL<br \/>\n<\/code><br \/>\nWhen I finally could connect to the webservice, I received bogus data, all 0 usage! Only to find out that this was a problem with my account only. Btw, I good and cross platform tool to try out \/ debug webservices is <a href=\"http:\/\/www.soapui.org\/\" target=\"_blank\">SoapUI<\/a>.<\/p>\n<p>To keep it a little sexy, I threw in the <a href=\"http:\/\/qt-apps.org\/content\/show.php\/QNeedleIndicator?content=118474\">QNeedleIndicator<\/a> I recently stumbled upon on qt-apps.org and adapted it a bit to my needs and voila, we have an alpha:<\/p>\n<p><center><img decoding=\"async\" src=\"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-content\/uploads\/2010\/07\/telemeterwidget.png\" alt=\"Telemeter widget\" \/><\/center><br \/>\nIt is not a plasmoid yet and credentials are hardcoded so it&#8217;s not useful to anybody but I couldn&#8217;t wait to blog. \ud83d\ude09 Note that in the screenshot I seem to have plenty of quota left. That&#8217;s only because it shows my parent&#8217;s account usage. \ud83d\ude42<\/p>\n<p>It is currently developed as a Qt app but I definitely plan on wrapping it in a plasmoid. Maybe I&#8217;ll keep the Qt app alive for some poor windows users. After I clean it up a bit I will post the code on gitorious.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Lately I&#8217;ve been running low on my internet download\/upload quota. Although my ISP (Telenet) trippled my quota, a combination of new suse release, new steam games and my isp failing to reset my quota (bug in upgrade process I guess), I managed to reach its limit inadvertently at 200 MB left. Since a) my ISP &hellip; <a href=\"https:\/\/mattiesworld.gotdns.org\/weblog\/2010\/07\/30\/project-announcement-telemeter-widget-plasmoid\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Project announcement: Telemeter widget \/ plasmoid<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30],"tags":[],"class_list":["post-455","post","type-post","status-publish","format-standard","hentry","category-telemeter-plasmoid"],"_links":{"self":[{"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/posts\/455","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/comments?post=455"}],"version-history":[{"count":2,"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/posts\/455\/revisions"}],"predecessor-version":[{"id":589,"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/posts\/455\/revisions\/589"}],"wp:attachment":[{"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/media?parent=455"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/categories?post=455"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mattiesworld.gotdns.org\/weblog\/wp-json\/wp\/v2\/tags?post=455"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}