{"id":354,"date":"2009-10-11T20:15:51","date_gmt":"2009-10-11T18:15:51","guid":{"rendered":"http:\/\/www.enricoros.com\/blog\/?p=354"},"modified":"2013-04-21T15:51:15","modified_gmt":"2013-04-21T22:51:15","slug":"addiqted","status":"publish","type":"post","link":"https:\/\/www.enricoros.com\/oldblog\/2009\/10\/addiqted\/","title":{"rendered":"AddiQted to 4.6"},"content":{"rendered":"<p><strong>note for <a href=\"http:\/\/www.planetkde.org\">planetkde<\/a> readers: check the <a href=\"http:\/\/www.enricoros.com\/blog\/2009\/10\/addiqted\/\">original article<\/a> to see the video!<\/strong><\/p>\n<p>I confess, I&#8217;m addi<em>Qt<\/em>ed. You obviously think it&#8217;s normal (you&#8217;re not reading this blog by <em>accident<\/em>, aren&#8217;t you?) but it wasn&#8217;t always like this: I&#8217;ve liked some previous versions, but the upcoming Qt <strong>4.6<\/strong> really <a href=\"http:\/\/www.missouri-vacations.com\/images\/elephant-rocks-body.jpg\">rocks<\/a>!<\/p>\n<h4>The Fotowall case<\/h4>\n<p>As I shown <a href=\"http:\/\/www.enricoros.com\/blog\/2009\/09\/cuteness-4-6\/\">previosly<\/a>, <a href=\"http:\/\/www.enricoros.com\/opensource\/fotowall\">Fotowall<\/a> already uses some features of Qt 4.6. How much?<br \/>\nQt 4.6 is referenced in <em>32 places<\/em>, for example in snippets like this:<\/p>\n<pre class=\"brush: cpp; collapse: false; title: ; notranslate\" title=\"\">\r\n    \/\/ center the path\r\n    QPointF pathCenter = path.boundingRect().center();\r\n    #if QT_VERSION &gt;= 0x040600\r\n        path.translate(-pathCenter);\r\n    #elif QT_VERSION &gt;= 0x040500\r\n        path = QTransform::fromTranslate(-pathCenter.x(), -pathCenter.y()).map(path);\r\n    #else\r\n        QTransform tx;\r\n        tx.translate(-pathCenter.x(), -pathCenter.y());\r\n        path = tx.map(path);\r\n    #endif\r\n<\/pre>\n<p>From simple <a href=\"http:\/\/doc.trolltech.com\/4.6-snapshot\/qpainterpath.html#translate\">path translations<\/a> to more complex <a href=\"http:\/\/doc.trolltech.com\/4.6-snapshot\/qmetaproperty.html#notifySignalIndex\">property manipulations<\/a>, everything got better. See this code snipped about extending QGraphicsObject in 4.6 versus 4.5 and 4.4.<\/p>\n<pre class=\"brush: cpp; collapse: false; title: ; notranslate\" title=\"\">\r\n    #if QT_VERSION &gt;= 0x040600\r\n    class AbstractContent : public QGraphicsObject\r\n    #else\r\n    class AbstractContent : public QObject, public QGraphicsItem\r\n    #endif\r\n    {\r\n        Q_OBJECT\r\n    #if QT_VERSION &lt; 0x040600\r\n        Q_PROPERTY(QPointF pos READ pos WRITE setPos)\r\n        Q_PROPERTY(qreal rotation READ rotation WRITE setRotation NOTIFY rotationChanged)\r\n    #endif\r\n    #if QT_VERSION &lt; 0x040600 &amp;&amp; QT_VERSION &gt;= 0x040500\r\n        Q_PROPERTY(qreal opacity READ opacity WRITE setOpacity)\r\n    #endif\r\n<\/pre>\n<p><em>Do you feel the pain<\/em>?<\/p>\n<h4>I Need it<\/h4>\n<p>I need a world with Qt 4.6 only, because:<\/p>\n<ul>\n<li>It&#8217;s too much of a <strong>pain to support older versions<\/strong> in the same codebase<\/li>\n<li>It&#8217;s not even fair, because <strong>non-4.6 users won&#8217;t enjoy the program as it&#8217;s meant to be<\/strong><\/li>\n<li><strong>I can&#8217;t use A TON of new features<\/strong> because they&#8217;ll either <strong>simplify too much the code<\/strong>, or just because they don&#8217;t have a pre-4.6 equivalent<\/li>\n<li>and because I&#8217;d like to finally use\n<ul>\n<li><a href=\"http:\/\/doc.qt.nokia.com\/4.6-snapshot\/qgraphicseffect.html\">QGraphicsEffect<\/a> for Fotowall&#8217;s content<\/li>\n<li><a href=\"http:\/\/doc.qt.nokia.com\/4.6-snapshot\/qvector3d.html\">QVector3D<\/a> to say goodbye to <a href=\"http:\/\/github.com\/enricoros\/fotowall\/raw\/master\/3rdparty\/enricomath.h\"><em>enricomath.h<\/em><\/a><\/li>\n<li><a href=\"http:\/\/doc.qt.nokia.com\/4.6-snapshot\/qgesture.html\">QGesture<\/a> for multi-finger interaction<\/li>\n<li><a href=\"http:\/\/doc.qt.nokia.com\/4.6-snapshot\/qpropertyanimation.html\">QPropertyAnimation<\/a> to its full potential!<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h4>More 4.6 TEASING<\/h4>\n<ol>\n<li>As <a href=\"http:\/\/www.enricoros.com\/blog\/2009\/09\/cuteness-4-6\/\">you seem to like videos<\/a>, here is a preview of something we&#8217;re working on for <a href=\"http:\/\/amarok.kde.org\">Amarok<\/a> \ud83d\ude09 <span style=\"text-decoration: underline;\">Qt 4.6 only!!<\/span><br \/>\n[youtube width=&#8221;420&#8243; height=&#8221;220&#8243;]http:\/\/www.youtube.com\/watch?v=RSd9v5xHWa4[\/youtube]<\/li>\n<li>Also, since I&#8217;m <em>soooo much a giver<\/em>, see the new Fotowall&#8217;s <a href=\"http:\/\/www.enricoros.com\/opensource\/fotowall\/assets\/screenshots\/teaser-wordcloud-1.png\">Word Cloud<\/a> feature, coming in 0.9 \ud83d\ude09<\/li>\n<\/ol>\n<h4>See you  @ Munich<\/h4>\n<p>I&#8217;m packing for the <a href=\"http:\/\/qt.nokia.com\/qtdevdays2009\">DevDays 2009<\/a> Munich. See you there \ud83d\ude09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>note for planetkde readers: check the original article to see the video! I confess, I&#8217;m addiQted. You obviously think it&#8217;s normal (you&#8217;re not reading this blog by accident, aren&#8217;t you?) but it wasn&#8217;t always like this: I&#8217;ve liked some previous versions, but the upcoming Qt 4.6 really rocks! The Fotowall case As I shown previosly, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,6],"tags":[32,10,13,16,23,24,26,27],"class_list":["post-354","post","type-post","status-publish","format-standard","hentry","category-computer-graphics","category-software","tag-amarok","tag-avanguardia","tag-creativity","tag-graphicsview","tag-planetkde","tag-planetqt","tag-qt","tag-qtsoftware"],"_links":{"self":[{"href":"https:\/\/www.enricoros.com\/oldblog\/wp-json\/wp\/v2\/posts\/354","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=354"}],"version-history":[{"count":43,"href":"https:\/\/www.enricoros.com\/oldblog\/wp-json\/wp\/v2\/posts\/354\/revisions"}],"predecessor-version":[{"id":357,"href":"https:\/\/www.enricoros.com\/oldblog\/wp-json\/wp\/v2\/posts\/354\/revisions\/357"}],"wp:attachment":[{"href":"https:\/\/www.enricoros.com\/oldblog\/wp-json\/wp\/v2\/media?parent=354"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.enricoros.com\/oldblog\/wp-json\/wp\/v2\/categories?post=354"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.enricoros.com\/oldblog\/wp-json\/wp\/v2\/tags?post=354"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}