{"id":219,"date":"2009-08-25T23:42:59","date_gmt":"2009-08-25T21:42:59","guid":{"rendered":"http:\/\/enricoros.wordpress.com\/?p=219"},"modified":"2013-04-21T15:51:15","modified_gmt":"2013-04-21T22:51:15","slug":"quax4","status":"publish","type":"post","link":"https:\/\/www.enricoros.com\/oldblog\/2009\/08\/quax4\/","title":{"rendered":"Quax 4 &#8211; a tale of porting"},"content":{"rendered":"<p><strong>Note for <a href=\"http:\/\/www.planetqt.org\" target=\"_blank\">planetqt<\/a> readers: the title should be &#8216;Quax 4 &#8211; a tale of porting&#8217;<br \/>\n<\/strong><\/p>\n<p>Once upon a time, a little application called <a href=\"http:\/\/www.kde-apps.org\/content\/show.php\/Quax?content=10436\" target=\"_blank\">quax<\/a> was landed on <a href=\"http:\/\/www.kde-apps.org\" target=\"_blank\">kde-apps<\/a>. As imagination is better served by a picture, here is what quax looks like:<\/p>\n<div id=\"attachment_220\" style=\"width: 386px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-220\" class=\"size-full wp-image-220\" title=\"Quax 1.2 Screenshot\" src=\"http:\/\/enricoros.files.wordpress.com\/2009\/08\/quax-1-2-screenshot-1.png\" alt=\"Quax after being ported to Qt 4.5.\" width=\"376\" height=\"265\" srcset=\"https:\/\/www.enricoros.com\/oldblog\/wp-content\/uploads\/2009\/08\/quax-1-2-screenshot-1.png 376w, https:\/\/www.enricoros.com\/oldblog\/wp-content\/uploads\/2009\/08\/quax-1-2-screenshot-1-300x211.png 300w\" sizes=\"auto, (max-width: 376px) 100vw, 376px\" \/><p id=\"caption-attachment-220\" class=\"wp-caption-text\">Quax after being ported to Qt 4.5.<\/p><\/div>\n<p>It&#8217;s nothing but a <em>simple and easy to use screen magnifier<\/em>. You can move it around and place it near the detail to magnify. Plus it lets you pick the color of a pixel. It&#8217;s the perfect tool when you&#8217;re tuning the style, pixels and gradients of your <a href=\"http:\/\/www.enricoros.com\/opensource\/fotowall\/\" target=\"_blank\">beloved app<\/a> \ud83d\ude09 It had only one drawback: it was build with Qt 3.<\/p>\n<h4>Porting Quax to Qt4<\/h4>\n<p>It was the first time I had to port an application from Qt3 to Qt4. Here are some stats:<\/p>\n<ul>\n<li>The porting took <strong>3 hours<\/strong> (you can see it from the <a href=\"http:\/\/gitorious.org\/quax\/quax\/commits\/master\" target=\"_blank\">git history<\/a>, dinner included \ud83d\ude09 )<\/li>\n<li>I did the following:\n<ul>\n<li>create the project files<\/li>\n<li>use qt3to4 with that files<\/li>\n<li>make it compile disabling some code chunks<\/li>\n<li>re-enable the disabled code in a qt4 way<\/li>\n<li>disabled qt3 support from the .pro file and fixed all until it compiled<\/li>\n<li>update the packaging informations, readme&#8217;s<\/li>\n<li>published Quax 4 in kde-apps<\/li>\n<\/ul>\n<\/li>\n<li> The source code dropped from 670 to 547 lines of code. So <strong>Qt4 saved 14% of code<\/strong> compared to Qt3 for this project.<\/li>\n<li>The <strong>cleanness went drastically up<\/strong>, the API of Qt4 is a big improvement over that of Qt3.<\/li>\n<li>I can&#8217;t talk about speed or graphics improvements.. but if you look at the <a href=\"http:\/\/www.kde-apps.org\/content\/preview.php?preview=2&amp;id=10436&amp;file1=10436-1.jpg&amp;file2=10436-2.jpg&amp;file3=10436-3.jpg&amp;name=Quax\" target=\"_blank\">old screenshots<\/a> you&#8217;ll see that the font rendering was really improved in Qt4<\/li>\n<\/ul>\n<h4>Conclusion<\/h4>\n<p>Finally I have quax back, and <a href=\"http:\/\/gitorious.org\/quax\" target=\"_blank\">you can have it too<\/a>! \ud83d\ude09 The source code is on <a href=\"http:\/\/gitorious.org\/quax\/quax\" target=\"_blank\">gitorious<\/a>, and here is the <a href=\"http:\/\/www.kde-apps.org\/content\/show.php\/Quax+%284%29?content=110929\" target=\"_blank\">kde-apps page<\/a>. A final thank word to Claudiu Costin (the original author) and Vlad Oancea (the skin designer). I won&#8217;t maintain quax4 and I don&#8217;t plan to add any features, I&#8217;m just glad I can keep my box Qt3 free while designing pixel-perfect graphics thanks to this cute little utility \ud83d\ude09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Note for planetqt readers: the title should be &#8216;Quax 4 &#8211; a tale of porting&#8217; Once upon a time, a little application called quax was landed on kde-apps. As imagination is better served by a picture, here is what quax looks like: It&#8217;s nothing but a simple and easy to use screen magnifier. You can [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[22,24,26],"class_list":["post-219","post","type-post","status-publish","format-standard","hentry","category-software","tag-open-source","tag-planetqt","tag-qt"],"_links":{"self":[{"href":"https:\/\/www.enricoros.com\/oldblog\/wp-json\/wp\/v2\/posts\/219","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.enricoros.com\/oldblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.enricoros.com\/oldblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.enricoros.com\/oldblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.enricoros.com\/oldblog\/wp-json\/wp\/v2\/comments?post=219"}],"version-history":[{"count":3,"href":"https:\/\/www.enricoros.com\/oldblog\/wp-json\/wp\/v2\/posts\/219\/revisions"}],"predecessor-version":[{"id":590,"href":"https:\/\/www.enricoros.com\/oldblog\/wp-json\/wp\/v2\/posts\/219\/revisions\/590"}],"wp:attachment":[{"href":"https:\/\/www.enricoros.com\/oldblog\/wp-json\/wp\/v2\/media?parent=219"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.enricoros.com\/oldblog\/wp-json\/wp\/v2\/categories?post=219"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.enricoros.com\/oldblog\/wp-json\/wp\/v2\/tags?post=219"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}