<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    <title>/Kretz/blog/ - for Planet</title>
    <link>http://vir.homelinux.org/blog/</link>
    <description>Things we want to tell the world...</description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.2.2 - http://www.s9y.org/</generator>
    <pubDate>Thu, 14 Aug 2008 12:07:22 GMT</pubDate>

    <image>
        <url>http://vir.homelinux.org/blog/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: /Kretz/blog/ - for Planet - Things we want to tell the world...</title>
        <link>http://vir.homelinux.org/blog/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>download and test Quasar</title>
    <link>http://vir.homelinux.org/blog/archives/120-download-and-test-Quasar.html</link>
            <category>Phonon</category>
    
    <comments>http://vir.homelinux.org/blog/archives/120-download-and-test-Quasar.html#comments</comments>
    <wfw:comment>http://vir.homelinux.org/blog/wfwcomment.php?cid=120</wfw:comment>

    <slash:comments>4</slash:comments>
    <wfw:commentRss>http://vir.homelinux.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=120</wfw:commentRss>
    

    <author>nospam@example.com (Matthias Kretz)</author>
    <content:encoded>
    &lt;img class=&quot;serendipity_authorpic&quot; src=&quot;http://vir.homelinux.org/blog/templates/default/img/Matthias_Kretz.png&quot; alt=&quot;Author&quot; title=&quot;Matthias Kretz&quot; /&gt;&lt;p&gt;So, there&#039;s much interest in the Phonon + Quasar code - as I had hoped &lt;img src=&quot;http://vir.homelinux.org/blog/templates/default/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;/p&gt;&lt;p&gt;To reproduce the result on your computer you need to get current phonon, current phonon-xine (with libxine &gt;= 1.1.12) and current quasar from SVN. For those that don&#039;t know where Quasar lives, you can find it here: &lt;a href=&quot;http://websvn.kde.org/trunk/playground/base/quasar/&quot;&gt;http://websvn.kde.org/trunk/playground/base/quasar/&lt;/a&gt;. To compile quasar you need to set the KDEDIR environment variable to the prefix where you installed phonon and then run qmake and make in the source dir. Then go to the examples/phonon subdir and run &lt;pre&gt;./phonon /path/to/video.ogg&lt;/pre&gt;. With S and Shift-S you can change the edge detection threshold.&lt;/p&gt;&lt;p&gt;Have fun detecting edges in your videos ...&lt;/p&gt; 
    </content:encoded>

    <pubDate>Wed, 13 Aug 2008 17:58:00 +0200</pubDate>
    <guid isPermaLink="false">http://vir.homelinux.org/blog/archives/120-guid.html</guid>
    
</item>
<item>
    <title>Phonon + Quasar</title>
    <link>http://vir.homelinux.org/blog/archives/119-Phonon-+-Quasar.html</link>
            <category>Phonon</category>
    
    <comments>http://vir.homelinux.org/blog/archives/119-Phonon-+-Quasar.html#comments</comments>
    <wfw:comment>http://vir.homelinux.org/blog/wfwcomment.php?cid=119</wfw:comment>

    <slash:comments>9</slash:comments>
    <wfw:commentRss>http://vir.homelinux.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=119</wfw:commentRss>
    

    <author>nospam@example.com (Matthias Kretz)</author>
    <content:encoded>
    &lt;img class=&quot;serendipity_authorpic&quot; src=&quot;http://vir.homelinux.org/blog/templates/default/img/Matthias_Kretz.png&quot; alt=&quot;Author&quot; title=&quot;Matthias Kretz&quot; /&gt;&lt;p&gt;I&#039;ve got it working a long time ago, but since this Akademy it is finally available in KDE trunk: Phonon now can give the raw video frames (as RGB, YV12 or YUY2) to an application and Quasar gained a node to upload those frames as textures and uses Shaders to convert YUV formats to RGB and then do arbitrary effects with them. The cool part about that, obviously, is that the data intensive calculations are happening on the graphics card (you need OpenGL 2 for this to work). To demonstrate the power of this I wrote a simple example that connects the PhononInputNode to an EdgeDetection node and then to a RenderNode. I did a &lt;a href=&quot;http://www.rzuser.uni-heidelberg.de/~mkretz2/phonon-quasar-bbb-edgedetection.ogv&quot;&gt;screencapture of the result&lt;/a&gt;, but that looks a lot worse than the real performance, which is totally smooth and, of course, doesn&#039;t show much CPU usage.&lt;/p&gt;&lt;p&gt;You can also see me adjusting the threshold value of the edge detection filter with a keyboard shortcut.&lt;/p&gt;&lt;p&gt;Here&#039;s the code:&lt;br /&gt;
&lt;div class=&quot;cpp-qt&quot; style=&quot;text-align: left&quot;&gt;m_input = &lt;span style=&quot;color: #333366;&quot;&gt;new&lt;/span&gt; PhononInputNode&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: #333399;&quot;&gt;connect&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;m_input, &lt;span style=&quot;color: #333399;&quot;&gt;SIGNAL&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;needUpdate&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;, SLOT&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;updateGL&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;m_compo.&lt;span style=&quot;color: #666666;&quot;&gt;addNode&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;m_input&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;m_displayNode = m_compo.&lt;span style=&quot;color: #666666;&quot;&gt;createNode&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #CC3333;&quot;&gt;&quot;/output/render&quot;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;m_saturationNode = m_compo.&lt;span style=&quot;color: #666666;&quot;&gt;createNode&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #CC3333;&quot;&gt;&quot;/color/edgedetect&quot;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;Quasar::&lt;span style=&quot;color: #666666;&quot;&gt;link&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;m_input, &lt;span style=&quot;color: #CC3333;&quot;&gt;&quot;output&quot;&lt;/span&gt;, m_saturationNode, &lt;span style=&quot;color: #CC3333;&quot;&gt;&quot;texture&quot;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;Quasar::&lt;span style=&quot;color: #666666;&quot;&gt;link&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;m_saturationNode, &lt;span style=&quot;color: #CC3333;&quot;&gt;&quot;output&quot;&lt;/span&gt;, m_displayNode, &lt;span style=&quot;color: #CC3333;&quot;&gt;&quot;texture&quot;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;Phonon::&lt;span style=&quot;color: #666666;&quot;&gt;createPath&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;m_media, m_input&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;m_compo.&lt;span style=&quot;color: #666666;&quot;&gt;prepare&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: #333399;&quot;&gt;connect&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;m_media, &lt;span style=&quot;color: #333399;&quot;&gt;SIGNAL&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;finished&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;, m_media, SLOT&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;play&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;m_media-&amp;gt;play&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160;&lt;/div&gt;&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;Things to note:&lt;ul&gt;&lt;br /&gt;
&lt;li&gt;the PhononInputNode is both a Phonon::MediaNode and a Quasar::Node&lt;/li&gt;&lt;br /&gt;
&lt;li&gt;the Quasar API is not final, especially wrt. PhononInputNode&lt;/li&gt;&lt;br /&gt;
&lt;/ul&gt;&lt;/p&gt; 
    </content:encoded>

    <pubDate>Wed, 13 Aug 2008 13:49:00 +0200</pubDate>
    <guid isPermaLink="false">http://vir.homelinux.org/blog/archives/119-guid.html</guid>
    
</item>
<item>
    <title>Akademy Travel</title>
    <link>http://vir.homelinux.org/blog/archives/118-Akademy-Travel.html</link>
            <category>KDE</category>
    
    <comments>http://vir.homelinux.org/blog/archives/118-Akademy-Travel.html#comments</comments>
    <wfw:comment>http://vir.homelinux.org/blog/wfwcomment.php?cid=118</wfw:comment>

    <slash:comments>4</slash:comments>
    <wfw:commentRss>http://vir.homelinux.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=118</wfw:commentRss>
    

    <author>nospam@example.com (Matthias Kretz)</author>
    <content:encoded>
    &lt;img class=&quot;serendipity_authorpic&quot; src=&quot;http://vir.homelinux.org/blog/templates/default/img/Matthias_Kretz.png&quot; alt=&quot;Author&quot; title=&quot;Matthias Kretz&quot; /&gt;&lt;p&gt;As &lt;img width=&quot;320&quot; height=&quot;178&quot; style=&quot;border: 0px; padding: 0px; vertical-align: middle;&quot; src=&quot;http://vir.homelinux.org/blog/uploads/goingakademy08.png&quot; alt=&quot;I&#039;m going to Akademy&quot; title=&quot;I&#039;m going to Akademy&quot; /&gt; and there will surely be a few more people traveling the same way, I wanted to ask if there&#039;s interest in traveling together - or to share a car ride. I&#039;ve already talked to &lt;a href=&quot;http://blog.martin-graesslin.com/blog/&quot;&gt;Martin Gräßlin&lt;/a&gt; who lives in Mannheim (I&#039;m in Heidelberg, in case you didn&#039;t know already), and we&#039;d probably take a train together. Neither of us owns a car, but if you do and drive by Mannheim/Heidelberg (A5) and want company and people sharing the high fuel cost with you, let me know. If not, you still might want to try to meet up in the train... in that case also let me know.&lt;/p&gt;&lt;p&gt;For the train I&#039;d probably take the ICE 610 (12:35 Mannheim - Köln) and ICE 14 (14:44 Köln - Bruxelles-Nord) on Fr, 8th, of course. But sharing a car ride would probably be cheaper.&lt;/p&gt;&lt;p&gt;Now back to exam preparations...&lt;/p&gt; 
    </content:encoded>

    <pubDate>Tue, 29 Jul 2008 15:26:00 +0200</pubDate>
    <guid isPermaLink="false">http://vir.homelinux.org/blog/archives/118-guid.html</guid>
    
</item>
<item>
    <title>more UI feedback</title>
    <link>http://vir.homelinux.org/blog/archives/98-more-UI-feedback.html</link>
            <category>Phonon</category>
    
    <comments>http://vir.homelinux.org/blog/archives/98-more-UI-feedback.html#comments</comments>
    <wfw:comment>http://vir.homelinux.org/blog/wfwcomment.php?cid=98</wfw:comment>

    <slash:comments>8</slash:comments>
    <wfw:commentRss>http://vir.homelinux.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=98</wfw:commentRss>
    

    <author>nospam@example.com (Matthias Kretz)</author>
    <content:encoded>
    &lt;img class=&quot;serendipity_authorpic&quot; src=&quot;http://vir.homelinux.org/blog/templates/default/img/Matthias_Kretz.png&quot; alt=&quot;Author&quot; title=&quot;Matthias Kretz&quot; /&gt;&lt;p&gt;After a month of no KDE coding I&#039;m back to do a few things in KDE again - though I really want to (and need to) do more for University if I ever want to get done with it...&lt;/p&gt;&lt;p&gt;Anyway, what I wanted to show is how to do simple animations in the UI that should help the user to understand how the different UI elements play together. I have one such case with the Phonon KCM where I now tried the following animation to clear things up a bit:&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://vir.homelinux.org/blog/uploads/Phonon/more_ui_feedback.ogg&quot; title=&quot;more_ui_feedback.ogg&quot; target=&quot;_blank&quot;&gt;more_ui_feedback.ogg&lt;/a&gt;&lt;/p&gt;&lt;p&gt;The way I achieved this effect was to add a special Animation widget that sits above the other widgets and is not added to any QLayout. Reimplement the paintEvent to draw the animation frames and use a QTimeLine member to call repaint(). It needs two pixmaps: one of the old content of the QListView at the right and one with the new content. The paintEvent then draws the old content over the QListView so that it seems the widget contents have not changed yet and draws the new content depending on the frame number of QTimeLine (with 50% opacity). QTimeLine::finished() is connected to the deleteLater slot which removes the animation widget.&lt;/p&gt;&lt;p&gt;Here&#039;s the code:&lt;div class=&quot;cpp-qt&quot; style=&quot;text-align: left&quot;&gt;&lt;span style=&quot;color: #333399;&quot;&gt;class&lt;/span&gt; SelectionChangeAnimation : &lt;span style=&quot;color: #333399;&quot;&gt;public&lt;/span&gt; &lt;a href=&quot;http://doc.trolltech.com/latest/QWidget.html&quot;&gt;&lt;span style=&quot;color: #3333FF;&quot;&gt;QWidget&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #333399;&quot;&gt;public&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; SelectionChangeAnimation&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333399;&quot;&gt;const&lt;/span&gt; &lt;a href=&quot;http://doc.trolltech.com/latest/QRect.html&quot;&gt;&lt;span style=&quot;color: #3333FF;&quot;&gt;QRect&lt;/span&gt;&lt;/a&gt; &amp;amp;sourceRect, &lt;a href=&quot;http://doc.trolltech.com/latest/QWidget.html&quot;&gt;&lt;span style=&quot;color: #3333FF;&quot;&gt;QWidget&lt;/span&gt;&lt;/a&gt; *destWidget, &lt;a href=&quot;http://doc.trolltech.com/latest/QWidget.html&quot;&gt;&lt;span style=&quot;color: #3333FF;&quot;&gt;QWidget&lt;/span&gt;&lt;/a&gt; *parent&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #333399;&quot;&gt;void&lt;/span&gt; start&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #333399;&quot;&gt;protected&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #333399;&quot;&gt;void&lt;/span&gt; paintEvent&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://doc.trolltech.com/latest/QPaintEvent.html&quot;&gt;&lt;span style=&quot;color: #3333FF;&quot;&gt;QPaintEvent&lt;/span&gt;&lt;/a&gt; *&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #333399;&quot;&gt;bool&lt;/span&gt; eventFilter&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://doc.trolltech.com/latest/QObject.html&quot;&gt;&lt;span style=&quot;color: #3333FF;&quot;&gt;QObject&lt;/span&gt;&lt;/a&gt; *, &lt;a href=&quot;http://doc.trolltech.com/latest/QEvent.html&quot;&gt;&lt;span style=&quot;color: #3333FF;&quot;&gt;QEvent&lt;/span&gt;&lt;/a&gt; *&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #333399;&quot;&gt;private&lt;/span&gt;:&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;a href=&quot;http://doc.trolltech.com/latest/QTimeLine.html&quot;&gt;&lt;span style=&quot;color: #3333FF;&quot;&gt;QTimeLine&lt;/span&gt;&lt;/a&gt; m_timeLine;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;a href=&quot;http://doc.trolltech.com/latest/QPixmap.html&quot;&gt;&lt;span style=&quot;color: #3333FF;&quot;&gt;QPixmap&lt;/span&gt;&lt;/a&gt; m_old, m_new;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;a href=&quot;http://doc.trolltech.com/latest/QRect.html&quot;&gt;&lt;span style=&quot;color: #3333FF;&quot;&gt;QRect&lt;/span&gt;&lt;/a&gt; m_sourceRect;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;a href=&quot;http://doc.trolltech.com/latest/QRect.html&quot;&gt;&lt;span style=&quot;color: #3333FF;&quot;&gt;QRect&lt;/span&gt;&lt;/a&gt; m_destRect;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;a href=&quot;http://doc.trolltech.com/latest/QWidget.html&quot;&gt;&lt;span style=&quot;color: #3333FF;&quot;&gt;QWidget&lt;/span&gt;&lt;/a&gt; *m_destWidget;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;span style=&quot;color: #333399;&quot;&gt;bool&lt;/span&gt; m_needPixmapUpdate;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#125;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;SelectionChangeAnimation::&lt;span style=&quot;color: #666666;&quot;&gt;SelectionChangeAnimation&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333399;&quot;&gt;const&lt;/span&gt; &lt;a href=&quot;http://doc.trolltech.com/latest/QRect.html&quot;&gt;&lt;span style=&quot;color: #3333FF;&quot;&gt;QRect&lt;/span&gt;&lt;/a&gt; &amp;amp;sourceRect, &lt;a href=&quot;http://doc.trolltech.com/latest/QWidget.html&quot;&gt;&lt;span style=&quot;color: #3333FF;&quot;&gt;QWidget&lt;/span&gt;&lt;/a&gt; *destWidget, &lt;a href=&quot;http://doc.trolltech.com/latest/QWidget.html&quot;&gt;&lt;span style=&quot;color: #3333FF;&quot;&gt;QWidget&lt;/span&gt;&lt;/a&gt; *parent&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; : &lt;a href=&quot;http://doc.trolltech.com/latest/QWidget.html&quot;&gt;&lt;span style=&quot;color: #3333FF;&quot;&gt;QWidget&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;parent&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;&amp;#160; &amp;#160; m_timeLine&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;200&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;&amp;#160; &amp;#160; m_sourceRect&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;sourceRect&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;&amp;#160; &amp;#160; m_destRect&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;destWidget-&amp;gt;mapTo&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;parent, &lt;a href=&quot;http://doc.trolltech.com/latest/QPoint.html&quot;&gt;&lt;span style=&quot;color: #3333FF;&quot;&gt;QPoint&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;0&lt;/span&gt;, &lt;span style=&quot;color: #009900;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;, destWidget-&amp;gt;size&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;&amp;#160; &amp;#160; m_destWidget&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;destWidget&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;&amp;#160; &amp;#160; m_needPixmapUpdate&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333399;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; setGeometry&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;m_sourceRect | m_destRect&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; m_sourceRect.&lt;span style=&quot;color: #666666;&quot;&gt;moveTopLeft&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;mapFrom&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;parent, m_sourceRect.&lt;span style=&quot;color: #666666;&quot;&gt;topLeft&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; m_destRect.&lt;span style=&quot;color: #666666;&quot;&gt;moveTopLeft&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;mapFrom&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;parent, m_destRect.&lt;span style=&quot;color: #666666;&quot;&gt;topLeft&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; m_old = &lt;a href=&quot;http://doc.trolltech.com/latest/QPixmap.html&quot;&gt;&lt;span style=&quot;color: #3333FF;&quot;&gt;QPixmap&lt;/span&gt;&lt;/a&gt;::&lt;span style=&quot;color: #666666;&quot;&gt;grabWidget&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;m_destWidget&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; m_timeLine.&lt;span style=&quot;color: #666666;&quot;&gt;setFrameRange&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;0&lt;/span&gt;, &lt;span style=&quot;color: #009900;&quot;&gt;63&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #333399;&quot;&gt;connect&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&amp;amp;m_timeLine, &lt;span style=&quot;color: #333399;&quot;&gt;SIGNAL&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;finished&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;, SLOT&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;deleteLater&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; m_destWidget-&amp;gt;installEventFilter&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333366;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; show&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #333399;&quot;&gt;void&lt;/span&gt; SelectionChangeAnimation::&lt;span style=&quot;color: #666666;&quot;&gt;start&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; m_timeLine.&lt;span style=&quot;color: #666666;&quot;&gt;start&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #333399;&quot;&gt;connect&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&amp;amp;m_timeLine, &lt;span style=&quot;color: #333399;&quot;&gt;SIGNAL&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;frameChanged&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333399;&quot;&gt;int&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;, SLOT&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;repaint&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #333399;&quot;&gt;bool&lt;/span&gt; SelectionChangeAnimation::&lt;span style=&quot;color: #666666;&quot;&gt;eventFilter&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://doc.trolltech.com/latest/QObject.html&quot;&gt;&lt;span style=&quot;color: #3333FF;&quot;&gt;QObject&lt;/span&gt;&lt;/a&gt; *o, &lt;a href=&quot;http://doc.trolltech.com/latest/QEvent.html&quot;&gt;&lt;span style=&quot;color: #3333FF;&quot;&gt;QEvent&lt;/span&gt;&lt;/a&gt; *e&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #333399;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;o == m_destWidget &amp;amp;&amp;amp; e-&amp;gt;type&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt; == &lt;a href=&quot;http://doc.trolltech.com/latest/QEvent.html&quot;&gt;&lt;span style=&quot;color: #3333FF;&quot;&gt;QEvent&lt;/span&gt;&lt;/a&gt;::&lt;span style=&quot;color: #666666;&quot;&gt;Paint&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; m_needPixmapUpdate = &lt;span style=&quot;color: #333399;&quot;&gt;true&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #333399;&quot;&gt;return&lt;/span&gt; &lt;a href=&quot;http://doc.trolltech.com/latest/QWidget.html&quot;&gt;&lt;span style=&quot;color: #3333FF;&quot;&gt;QWidget&lt;/span&gt;&lt;/a&gt;::&lt;span style=&quot;color: #666666;&quot;&gt;eventFilter&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;o, e&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #333399;&quot;&gt;void&lt;/span&gt; SelectionChangeAnimation::&lt;span style=&quot;color: #666666;&quot;&gt;paintEvent&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://doc.trolltech.com/latest/QPaintEvent.html&quot;&gt;&lt;span style=&quot;color: #3333FF;&quot;&gt;QPaintEvent&lt;/span&gt;&lt;/a&gt; *&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #333399;&quot;&gt;const&lt;/span&gt; &lt;span style=&quot;color: #333399;&quot;&gt;int&lt;/span&gt; f = m_timeLine.&lt;span style=&quot;color: #666666;&quot;&gt;currentFrame&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #333399;&quot;&gt;const&lt;/span&gt; &lt;a href=&quot;http://doc.trolltech.com/latest/QRect.html&quot;&gt;&lt;span style=&quot;color: #3333FF;&quot;&gt;QRect&lt;/span&gt;&lt;/a&gt; animRect = &lt;a href=&quot;http://doc.trolltech.com/latest/QRect.html&quot;&gt;&lt;span style=&quot;color: #3333FF;&quot;&gt;QRect&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; m_sourceRect.&lt;span style=&quot;color: #666666;&quot;&gt;x&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt; + &lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;m_destRect.&lt;span style=&quot;color: #666666;&quot;&gt;x&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt; - m_sourceRect.&lt;span style=&quot;color: #666666;&quot;&gt;x&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt; * f &amp;gt;&amp;gt; &lt;span style=&quot;color: #009900;&quot;&gt;6&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; m_sourceRect.&lt;span style=&quot;color: #666666;&quot;&gt;y&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt; + &lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;m_destRect.&lt;span style=&quot;color: #666666;&quot;&gt;y&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt; - m_sourceRect.&lt;span style=&quot;color: #666666;&quot;&gt;y&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt; * f &amp;gt;&amp;gt; &lt;span style=&quot;color: #009900;&quot;&gt;6&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; m_sourceRect.&lt;span style=&quot;color: #666666;&quot;&gt;width&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt; + &lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;m_destRect.&lt;span style=&quot;color: #666666;&quot;&gt;width&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt; - m_sourceRect.&lt;span style=&quot;color: #666666;&quot;&gt;width&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt; * f &amp;gt;&amp;gt; &lt;span style=&quot;color: #009900;&quot;&gt;6&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;,&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; m_sourceRect.&lt;span style=&quot;color: #666666;&quot;&gt;height&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt; + &lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;m_destRect.&lt;span style=&quot;color: #666666;&quot;&gt;height&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt; - m_sourceRect.&lt;span style=&quot;color: #666666;&quot;&gt;height&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt; * f &amp;gt;&amp;gt; &lt;span style=&quot;color: #009900;&quot;&gt;6&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #ff0000;&quot;&gt;// by masking the widget the flicker when deleting the animation widget is reduced&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; setMask&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://doc.trolltech.com/latest/QRegion.html&quot;&gt;&lt;span style=&quot;color: #3333FF;&quot;&gt;QRegion&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;animRect&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt; + &lt;a href=&quot;http://doc.trolltech.com/latest/QRegion.html&quot;&gt;&lt;span style=&quot;color: #3333FF;&quot;&gt;QRegion&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;m_destRect&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;a href=&quot;http://doc.trolltech.com/latest/QPainter.html&quot;&gt;&lt;span style=&quot;color: #3333FF;&quot;&gt;QPainter&lt;/span&gt;&lt;/a&gt; p&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333366;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; p.&lt;span style=&quot;color: #666666;&quot;&gt;drawPixmap&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;m_destRect, m_old&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #333399;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;m_needPixmapUpdate&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; m_destWidget-&amp;gt;removeEventFilter&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333366;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; m_new = &lt;a href=&quot;http://doc.trolltech.com/latest/QPixmap.html&quot;&gt;&lt;span style=&quot;color: #3333FF;&quot;&gt;QPixmap&lt;/span&gt;&lt;/a&gt;::&lt;span style=&quot;color: #666666;&quot;&gt;grabWidget&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;m_destWidget&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; m_destWidget-&amp;gt;installEventFilter&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333366;&quot;&gt;this&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; p.&lt;span style=&quot;color: #666666;&quot;&gt;setOpacity&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;0&lt;/span&gt;.&lt;span style=&quot;color: #009900;&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; p.&lt;span style=&quot;color: #666666;&quot;&gt;drawPixmap&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;animRect, m_new&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;/p&gt; 
    </content:encoded>

    <pubDate>Mon, 21 Jan 2008 08:43:00 +0100</pubDate>
    <guid isPermaLink="false">http://vir.homelinux.org/blog/archives/98-guid.html</guid>
    
</item>
<item>
    <title>got a present today</title>
    <link>http://vir.homelinux.org/blog/archives/91-got-a-present-today.html</link>
            <category>Phonon</category>
    
    <comments>http://vir.homelinux.org/blog/archives/91-got-a-present-today.html#comments</comments>
    <wfw:comment>http://vir.homelinux.org/blog/wfwcomment.php?cid=91</wfw:comment>

    <slash:comments>2</slash:comments>
    <wfw:commentRss>http://vir.homelinux.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=91</wfw:commentRss>
    

    <author>nospam@example.com (Matthias Kretz)</author>
    <content:encoded>
    &lt;img class=&quot;serendipity_authorpic&quot; src=&quot;http://vir.homelinux.org/blog/templates/default/img/Matthias_Kretz.png&quot; alt=&quot;Author&quot; title=&quot;Matthias Kretz&quot; /&gt;&lt;p&gt;Today I checked my mails and saw a few Phonon-related commits. I always read those commit messages with priority... and I was a bit surprised. I knew this day would come. But I didn&#039;t know when and I didn&#039;t know whether it&#039;s going to be GPL+commercial or LGPL. And I found the commit messages all said &quot;[License: LGPL]&quot;. *dance* &lt;img src=&quot;http://vir.homelinux.org/blog/templates/default/img/emoticons/laugh.png&quot; alt=&quot;:-D&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;/p&gt;&lt;p&gt;Now what does that license mean? It means everybody can contribute without having to sign a copyright assignment. That just makes it so much easier to handle contributions!&lt;/p&gt;&lt;p&gt;Now I know what code I&#039;m going to read and play with the next days. &lt;img src=&quot;http://vir.homelinux.org/blog/templates/default/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;/p&gt;&lt;p&gt;Read the rest &lt;a href=&quot;http://trolltech.com/company/newsroom/announcements/press.2007-12-11.2263733764&quot;&gt;here&lt;/a&gt; and &lt;a href=&quot;http://dot.kde.org/1197535003&quot;&gt;here&lt;/a&gt;&lt;/p&gt; 
    </content:encoded>

    <pubDate>Thu, 13 Dec 2007 11:38:00 +0100</pubDate>
    <guid isPermaLink="false">http://vir.homelinux.org/blog/archives/91-guid.html</guid>
    
</item>
<item>
    <title>going crazy</title>
    <link>http://vir.homelinux.org/blog/archives/89-going-crazy.html</link>
            <category>KDE</category>
    
    <comments>http://vir.homelinux.org/blog/archives/89-going-crazy.html#comments</comments>
    <wfw:comment>http://vir.homelinux.org/blog/wfwcomment.php?cid=89</wfw:comment>

    <slash:comments>17</slash:comments>
    <wfw:commentRss>http://vir.homelinux.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=89</wfw:commentRss>
    

    <author>nospam@example.com (Matthias Kretz)</author>
    <content:encoded>
    &lt;img class=&quot;serendipity_authorpic&quot; src=&quot;http://vir.homelinux.org/blog/templates/default/img/Matthias_Kretz.png&quot; alt=&quot;Author&quot; title=&quot;Matthias Kretz&quot; /&gt;I have nothing to say in my defense. But I must be crazy.&lt;br /&gt;
&lt;br /&gt;
See for yourself:&lt;br /&gt;
&lt;div class=&quot;serendipity_imageComment_center&quot; style=&quot;width: 151px; clear:both;&quot;&gt;&lt;div class=&quot;serendipity_imageComment_img&quot;&gt;&lt;a href=&#039;http://vir.homelinux.org/blog/uploads/mirrors_everywhere.png&#039;&gt;&lt;img width=&quot;151&quot; height=&quot;160&quot; src=&quot;http://vir.homelinux.org/blog/uploads/mirrors_everywhere.serendipityThumb.png&quot; alt=&quot;&quot;  /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;serendipity_imageComment_txt&quot;&gt;Look at the KTitleWidget and the bottom margin of KDialog&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;serendipity_imageComment_center&quot; style=&quot;width: 160px&quot;&gt;&lt;div class=&quot;serendipity_imageComment_img&quot;&gt;&lt;a href=&#039;http://www.rzuser.uni-heidelberg.de/~mkretz2/crazy-buttons.mpg&#039;&gt;&lt;img width=&quot;160&quot; height=&quot;111&quot; src=&quot;http://vir.homelinux.org/blog/uploads/crazy-buttons.serendipityThumb.png&quot; alt=&quot;&quot;  /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;serendipity_imageComment_txt&quot;&gt;Who said buttons should fall over?&lt;/div&gt;&lt;/div&gt; 
    </content:encoded>

    <pubDate>Sun, 09 Dec 2007 23:45:53 +0100</pubDate>
    <guid isPermaLink="false">http://vir.homelinux.org/blog/archives/89-guid.html</guid>
    
</item>
<item>
    <title>QWidget::render</title>
    <link>http://vir.homelinux.org/blog/archives/88-QWidgetrender.html</link>
            <category>KDE</category>
    
    <comments>http://vir.homelinux.org/blog/archives/88-QWidgetrender.html#comments</comments>
    <wfw:comment>http://vir.homelinux.org/blog/wfwcomment.php?cid=88</wfw:comment>

    <slash:comments>9</slash:comments>
    <wfw:commentRss>http://vir.homelinux.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=88</wfw:commentRss>
    

    <author>nospam@example.com (Matthias Kretz)</author>
    <content:encoded>
    &lt;img class=&quot;serendipity_authorpic&quot; src=&quot;http://vir.homelinux.org/blog/templates/default/img/Matthias_Kretz.png&quot; alt=&quot;Author&quot; title=&quot;Matthias Kretz&quot; /&gt;&lt;p&gt;Yesterday on IRC I was reminded of the nice abstractions Qt has with QPaintDevice. (There are many useful paint devices, but most important for this discourse are QWidget, QPixmap and QImage.) So there are several things Qt4 allows you to do:&lt;ul&gt;&lt;li&gt;QPainter::setRedirected&lt;/li&gt;&lt;li&gt;QPixmap::grabWidget&lt;/li&gt;&lt;li&gt;QWidget::render&lt;/li&gt;&lt;/ul&gt;&lt;/p&gt;&lt;p&gt;Inspired by the video from &lt;a href=&quot;http://macslow.thepimp.net/?p=147&quot;&gt;Mirco Müller&lt;/a&gt; I wanted to see what could be done with those functions. I started with setRedirected but couldn&#039;t make it work immediately. So I did what the docs said and tried QPixmap::grabWidget. And without much effort I was able to draw a widget someplace else. But then I wanted to transform the image which needs a conversion to QImage. Expecting that Qt might optimize a bit if it renders directly into a QImage instead of a QPixmap and then converts to QImage I used QWidget::render to render a widget directly onto a QImage. Piece of cake. Now I had a QImage, transformed and painted into a different widget. Last missing piece is to update the image if the original widget changes (e.g. mouse or keyboard events). QObject::installEventFilter makes it easy to listen for paint events on the other widget and update accordingly. And to make it a fully featured class I added the ability to look for child widget paint events and made it repaint only as little as needed.&lt;/p&gt;&lt;p&gt;The result is this code:&lt;div class=&quot;cpp-qt&quot; style=&quot;text-align: left&quot;&gt;&lt;span style=&quot;color: #333399;&quot;&gt;int&lt;/span&gt; main&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333399;&quot;&gt;int&lt;/span&gt; argc, &lt;span style=&quot;color: #333399;&quot;&gt;char&lt;/span&gt; **argv&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;a href=&quot;http://doc.trolltech.com/latest/QApplication.html&quot;&gt;&lt;span style=&quot;color: #3333FF;&quot;&gt;QApplication&lt;/span&gt;&lt;/a&gt; app&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;argc, argv&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &lt;a href=&quot;http://doc.trolltech.com/latest/QWidget.html&quot;&gt;&lt;span style=&quot;color: #3333FF;&quot;&gt;QWidget&lt;/span&gt;&lt;/a&gt; topLevel;&lt;br /&gt;&amp;#160; &amp;#160; &lt;a href=&quot;http://doc.trolltech.com/latest/QWidget.html&quot;&gt;&lt;span style=&quot;color: #3333FF;&quot;&gt;QWidget&lt;/span&gt;&lt;/a&gt; w&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&amp;amp;topLevel&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; WidgetMirror leMirror&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&amp;amp;topLevel&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; leMirror.&lt;span style=&quot;color: #666666;&quot;&gt;setMirroredWidget&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&amp;amp;w&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &lt;a href=&quot;http://doc.trolltech.com/latest/QPushButton.html&quot;&gt;&lt;span style=&quot;color: #3333FF;&quot;&gt;QPushButton&lt;/span&gt;&lt;/a&gt; b&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #CC3333;&quot;&gt;&quot;Button&quot;&lt;/span&gt;, &amp;amp;w&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &lt;a href=&quot;http://doc.trolltech.com/latest/QLineEdit.html&quot;&gt;&lt;span style=&quot;color: #3333FF;&quot;&gt;QLineEdit&lt;/span&gt;&lt;/a&gt; le&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&amp;amp;w&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &lt;a href=&quot;http://doc.trolltech.com/latest/QListWidget.html&quot;&gt;&lt;span style=&quot;color: #3333FF;&quot;&gt;QListWidget&lt;/span&gt;&lt;/a&gt; lw&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&amp;amp;w&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; lw.&lt;span style=&quot;color: #666666;&quot;&gt;setMaximumHeight&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;64&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; lw.&lt;span style=&quot;color: #666666;&quot;&gt;addItems&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;a href=&quot;http://doc.trolltech.com/latest/QStringList.html&quot;&gt;&lt;span style=&quot;color: #3333FF;&quot;&gt;QStringList&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt; &amp;lt;&amp;lt; &lt;span style=&quot;color: #CC3333;&quot;&gt;&quot;Item 1&quot;&lt;/span&gt; &amp;lt;&amp;lt; &lt;span style=&quot;color: #CC3333;&quot;&gt;&quot;Item 2&quot;&lt;/span&gt; &amp;lt;&amp;lt; &lt;span style=&quot;color: #CC3333;&quot;&gt;&quot;Item 3&quot;&lt;/span&gt; &amp;lt;&amp;lt; &lt;span style=&quot;color: #CC3333;&quot;&gt;&quot;Item 4&quot;&lt;/span&gt; &amp;lt;&amp;lt; &lt;span style=&quot;color: #CC3333;&quot;&gt;&quot;Item 5&quot;&lt;/span&gt; &amp;lt;&amp;lt; &lt;span style=&quot;color: #CC3333;&quot;&gt;&quot;Item 6&quot;&lt;/span&gt; &amp;lt;&amp;lt; &lt;span style=&quot;color: #CC3333;&quot;&gt;&quot;Item 7&quot;&lt;/span&gt; &amp;lt;&amp;lt; &lt;span style=&quot;color: #CC3333;&quot;&gt;&quot;Item 8&quot;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &lt;a href=&quot;http://doc.trolltech.com/latest/QGridLayout.html&quot;&gt;&lt;span style=&quot;color: #3333FF;&quot;&gt;QGridLayout&lt;/span&gt;&lt;/a&gt; layout&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&amp;amp;w&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; layout.&lt;span style=&quot;color: #666666;&quot;&gt;setMargin&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; layout.&lt;span style=&quot;color: #666666;&quot;&gt;addWidget&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&amp;amp;b, &lt;span style=&quot;color: #009900;&quot;&gt;0&lt;/span&gt;, &lt;span style=&quot;color: #009900;&quot;&gt;0&lt;/span&gt;, Qt::&lt;span style=&quot;color: #666666;&quot;&gt;AlignBottom&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; layout.&lt;span style=&quot;color: #666666;&quot;&gt;addWidget&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&amp;amp;le, &lt;span style=&quot;color: #009900;&quot;&gt;0&lt;/span&gt;, &lt;span style=&quot;color: #009900;&quot;&gt;1&lt;/span&gt;, Qt::&lt;span style=&quot;color: #666666;&quot;&gt;AlignBottom&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; layout.&lt;span style=&quot;color: #666666;&quot;&gt;addWidget&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&amp;amp;lw, &lt;span style=&quot;color: #009900;&quot;&gt;0&lt;/span&gt;, &lt;span style=&quot;color: #009900;&quot;&gt;2&lt;/span&gt;, Qt::&lt;span style=&quot;color: #666666;&quot;&gt;AlignBottom&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &lt;a href=&quot;http://doc.trolltech.com/latest/QVBoxLayout.html&quot;&gt;&lt;span style=&quot;color: #3333FF;&quot;&gt;QVBoxLayout&lt;/span&gt;&lt;/a&gt; outerLayout&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&amp;amp;topLevel&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; outerLayout.&lt;span style=&quot;color: #666666;&quot;&gt;setSpacing&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; outerLayout.&lt;span style=&quot;color: #666666;&quot;&gt;addWidget&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&amp;amp;w&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; outerLayout.&lt;span style=&quot;color: #666666;&quot;&gt;addWidget&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&amp;amp;leMirror&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; topLevel.&lt;span style=&quot;color: #666666;&quot;&gt;show&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #333399;&quot;&gt;return&lt;/span&gt; app.&lt;span style=&quot;color: #666666;&quot;&gt;exec&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
which makes for this &lt;div class=&quot;serendipity_imageComment_left&quot; style=&quot;width: 561px&quot;&gt;&lt;div class=&quot;serendipity_imageComment_img&quot;&gt;&lt;a href=&quot;http://www.rzuser.uni-heidelberg.de/~mkretz2/widgetMirror.mpg&quot;&gt;&lt;img width=&quot;561&quot; height=&quot;158&quot; src=&quot;http://vir.homelinux.org/blog/uploads/redirectedPainterVideo.png&quot; alt=&quot;&quot;  /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;serendipity_imageComment_txt&quot;&gt;Video&lt;/div&gt;&lt;/div&gt; (All the artifacts and &quot;unsmoothness&quot; are results of the screen-capture).&lt;/p&gt;&lt;p&gt;Today I wanted to see whether this eye-candy can be put into KDE at some place and I have not succeeded. Perhaps somebody can make a mockup of how this could be used without making you feel &quot;something is wrong&quot;.&lt;/p&gt;&lt;p&gt;Anyway more pictures:&lt;br /&gt;
&lt;a href=&#039;http://vir.homelinux.org/blog/uploads/kdialog-bling.png&#039;&gt;&lt;img width=&quot;160&quot; height=&quot;67&quot; style=&quot;float: left; border: 0px; padding-left: 5px; padding-right: 5px;&quot; src=&quot;http://vir.homelinux.org/blog/uploads/kdialog-bling.serendipityThumb.png&quot; alt=&quot;&quot;  /&gt;&lt;/a&gt; &lt;a href=&#039;http://vir.homelinux.org/blog/uploads/kdialog-bling1.png&#039;&gt;&lt;img width=&quot;160&quot; height=&quot;122&quot; style=&quot;float: left; border: 0px; padding-left: 5px; padding-right: 5px;&quot; src=&quot;http://vir.homelinux.org/blog/uploads/kdialog-bling1.serendipityThumb.png&quot; alt=&quot;&quot;  /&gt;&lt;/a&gt; &lt;a href=&#039;http://vir.homelinux.org/blog/uploads/kdialog-bling2.png&#039;&gt;&lt;img width=&quot;160&quot; height=&quot;133&quot; style=&quot;float: left; border: 0px; padding-left: 5px; padding-right: 5px;&quot; src=&quot;http://vir.homelinux.org/blog/uploads/kdialog-bling2.serendipityThumb.png&quot; alt=&quot;&quot;  /&gt;&lt;/a&gt; &lt;a href=&#039;http://vir.homelinux.org/blog/uploads/kdialog-bling3.png&#039;&gt;&lt;img width=&quot;160&quot; height=&quot;130&quot; style=&quot;float: left; border: 0px; padding-left: 5px; padding-right: 5px;&quot; src=&quot;http://vir.homelinux.org/blog/uploads/kdialog-bling3.serendipityThumb.png&quot; alt=&quot;&quot;  /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style=&quot;clear:both;&quot;&gt;Notice that all this is just fooling around with what Qt provides. This is neither useful nor going into KDE 4.0 &lt;img src=&quot;http://vir.homelinux.org/blog/templates/default/img/emoticons/tongue.png&quot; alt=&quot;:-P&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;&lt;/p&gt;&lt;p&gt;For the interested people, the implementation of WidgetMirror looks like this:&lt;/p&gt; &lt;br /&gt;&lt;a href=&quot;http://vir.homelinux.org/blog/archives/88-QWidgetrender.html#extended&quot;&gt;Continue reading &quot;QWidget::render&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Sat, 08 Dec 2007 17:44:00 +0100</pubDate>
    <guid isPermaLink="false">http://vir.homelinux.org/blog/archives/88-guid.html</guid>
    
</item>
<item>
    <title>Practicing my template skills</title>
    <link>http://vir.homelinux.org/blog/archives/84-Practicing-my-template-skills.html</link>
            <category>C++</category>
    
    <comments>http://vir.homelinux.org/blog/archives/84-Practicing-my-template-skills.html#comments</comments>
    <wfw:comment>http://vir.homelinux.org/blog/wfwcomment.php?cid=84</wfw:comment>

    <slash:comments>2</slash:comments>
    <wfw:commentRss>http://vir.homelinux.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=84</wfw:commentRss>
    

    <author>nospam@example.com (Matthias Kretz)</author>
    <content:encoded>
    &lt;img class=&quot;serendipity_authorpic&quot; src=&quot;http://vir.homelinux.org/blog/templates/default/img/Matthias_Kretz.png&quot; alt=&quot;Author&quot; title=&quot;Matthias Kretz&quot; /&gt;&lt;p&gt;While working on assignments for the &lt;a href=&quot;http://www.iwr.uni-heidelberg.de/groups/ngg/CG200708/lecture.php&quot;&gt;Computergraphics course&lt;/a&gt; I&#039;m taking this semester I was missing signals and slots. Using Qt for the assignments is not possible (well actually I didn&#039;t ask explicitly whether I could use it), so I felt challenged to code the convenient things I&#039;m so used to...&lt;/p&gt;&lt;p&gt;I knew that boost had some implementation of signals and slots that used templates but I had never actually taken a look at it. And I didn&#039;t want to, yet. I wanted to think about the problem myself first. Basically I came up with that a signal needs to be an object where as a slot may not have to be an object, but must also work as a member function. After a few iterations I came up with a header that now allows me to do the following:&lt;/p&gt;&lt;div class=&quot;cpp-qt&quot; style=&quot;text-align: left&quot;&gt;&lt;span style=&quot;color: #339900;&quot;&gt;#include &amp;quot;signal.h&amp;quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #339900;&quot;&gt;#include &amp;lt;iostream&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #333399;&quot;&gt;struct&lt;/span&gt; A&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #333399;&quot;&gt;void&lt;/span&gt; operator&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; std::&lt;span style=&quot;color: #333366;&quot;&gt;cout&lt;/span&gt; &amp;lt;&amp;lt; &lt;span style=&quot;color: #CC3333;&quot;&gt;&quot;A::operator()&quot;&lt;/span&gt; &amp;lt;&amp;lt; std::&lt;span style=&quot;color: #666666;&quot;&gt;endl&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #333399;&quot;&gt;void&lt;/span&gt; f&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; std::&lt;span style=&quot;color: #333366;&quot;&gt;cout&lt;/span&gt; &amp;lt;&amp;lt; &lt;span style=&quot;color: #CC3333;&quot;&gt;&quot;A::f&quot;&lt;/span&gt; &amp;lt;&amp;lt; std::&lt;span style=&quot;color: #666666;&quot;&gt;endl&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#125;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #333399;&quot;&gt;struct&lt;/span&gt; B&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #333399;&quot;&gt;void&lt;/span&gt; operator&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333399;&quot;&gt;int&lt;/span&gt; x&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; std::&lt;span style=&quot;color: #333366;&quot;&gt;cout&lt;/span&gt; &amp;lt;&amp;lt; &lt;span style=&quot;color: #CC3333;&quot;&gt;&quot;B::operator() &quot;&lt;/span&gt; &amp;lt;&amp;lt; x &amp;lt;&amp;lt; std::&lt;span style=&quot;color: #666666;&quot;&gt;endl&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #333399;&quot;&gt;void&lt;/span&gt; f&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333399;&quot;&gt;int&lt;/span&gt; x&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; std::&lt;span style=&quot;color: #333366;&quot;&gt;cout&lt;/span&gt; &amp;lt;&amp;lt; &lt;span style=&quot;color: #CC3333;&quot;&gt;&quot;B::f &quot;&lt;/span&gt; &amp;lt;&amp;lt; x &amp;lt;&amp;lt; std::&lt;span style=&quot;color: #666666;&quot;&gt;endl&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #333333;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#125;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #333399;&quot;&gt;void&lt;/span&gt; g&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; std::&lt;span style=&quot;color: #333366;&quot;&gt;cout&lt;/span&gt; &amp;lt;&amp;lt; &lt;span style=&quot;color: #CC3333;&quot;&gt;&quot;g&quot;&lt;/span&gt; &amp;lt;&amp;lt; std::&lt;span style=&quot;color: #666666;&quot;&gt;endl&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #333399;&quot;&gt;void&lt;/span&gt; g&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333399;&quot;&gt;int&lt;/span&gt; x&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; std::&lt;span style=&quot;color: #333366;&quot;&gt;cout&lt;/span&gt; &amp;lt;&amp;lt; &lt;span style=&quot;color: #CC3333;&quot;&gt;&quot;g &quot;&lt;/span&gt; &amp;lt;&amp;lt; x &amp;lt;&amp;lt; std::&lt;span style=&quot;color: #666666;&quot;&gt;endl&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: #333399;&quot;&gt;int&lt;/span&gt; main&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#123;&lt;/span&gt;&lt;br /&gt;&amp;#160; &amp;#160; A a;&lt;br /&gt;&amp;#160; &amp;#160; Signal&amp;lt;&amp;gt; s;&lt;br /&gt;&amp;#160; &amp;#160; s.&lt;span style=&quot;color: #333399;&quot;&gt;connect&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&amp;amp;a&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; s.&lt;span style=&quot;color: #333399;&quot;&gt;connect&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&amp;amp;a, &amp;amp;A::&lt;span style=&quot;color: #666666;&quot;&gt;f&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; s.&lt;span style=&quot;color: #333399;&quot;&gt;connect&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&amp;amp;g&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; s&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; B b;&lt;br /&gt;&amp;#160; &amp;#160; Signal&amp;lt;int&amp;gt; s2;&lt;br /&gt;&amp;#160; &amp;#160; s2.&lt;span style=&quot;color: #333399;&quot;&gt;connect&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&amp;amp;b&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; s2.&lt;span style=&quot;color: #333399;&quot;&gt;connect&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&amp;amp;b, &amp;amp;B::&lt;span style=&quot;color: #666666;&quot;&gt;f&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; s2.&lt;span style=&quot;color: #333399;&quot;&gt;connect&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&amp;amp;g&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160; &amp;#160; s2&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #009900;&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&amp;#160; &amp;#160; &lt;span style=&quot;color: #333399;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #009900;&quot;&gt;0&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#125;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;p&gt;The output of that program is:&lt;br /&gt;
&lt;code&gt;A::operator()&lt;br /&gt;
A::f&lt;br /&gt;
g&lt;br /&gt;
B::operator() 5&lt;br /&gt;
B::f 5&lt;br /&gt;
g 5&lt;/code&gt;&lt;br /&gt;
as you probably expected. Notice that&lt;ul&gt;&lt;li&gt;You can use 0 to 10 types in the template parameter of the Signal class.&lt;/li&gt;&lt;li&gt;You can connect to functions, member functions and objects that have an operator() with the right signature. This allows to connect one signal to another one, like:&lt;div class=&quot;cpp-qt&quot; style=&quot;text-align: left&quot;&gt;Signal&amp;lt;const std::&lt;span style=&quot;color: #666666;&quot;&gt;vector&lt;/span&gt;&amp;lt;int&amp;gt; &amp;amp;&amp;gt; s1;&lt;br /&gt;Signal&amp;lt;const std::&lt;span style=&quot;color: #666666;&quot;&gt;vector&lt;/span&gt;&amp;lt;int&amp;gt; &amp;amp;&amp;gt; s2;&lt;br /&gt;s1.&lt;span style=&quot;color: #333399;&quot;&gt;connect&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&amp;amp;s2&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;s2.&lt;span style=&quot;color: #333399;&quot;&gt;connect&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&amp;amp;someFunction&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;s1&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;std::&lt;span style=&quot;color: #666666;&quot;&gt;vector&lt;/span&gt;&amp;lt;int&amp;gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#40;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;&lt;span style=&quot;color: #333333;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;/div&gt; This will call &lt;code&gt;someFunction(std::vector&lt;int&gt;())&lt;/code&gt;.&lt;/li&gt;&lt;li&gt;Signal will only allow &quot;slot&quot; connections and operator() calls with the correct signature. I needed to make Signal have different member functions depending on the number of its template arguments. Took me some time to realize but this was possible using inheritance.&lt;/li&gt;&lt;/ul&gt;&lt;/p&gt;&lt;p&gt;Now you probably want to see the code for Signal:&lt;/p&gt; &lt;br /&gt;&lt;a href=&quot;http://vir.homelinux.org/blog/archives/84-Practicing-my-template-skills.html#extended&quot;&gt;Continue reading &quot;Practicing my template skills&quot;&lt;/a&gt;
    </content:encoded>

    <pubDate>Wed, 28 Nov 2007 22:24:00 +0100</pubDate>
    <guid isPermaLink="false">http://vir.homelinux.org/blog/archives/84-guid.html</guid>
    
</item>
<item>
    <title>volume change popup</title>
    <link>http://vir.homelinux.org/blog/archives/73-volume-change-popup.html</link>
            <category>Phonon</category>
    
    <comments>http://vir.homelinux.org/blog/archives/73-volume-change-popup.html#comments</comments>
    <wfw:comment>http://vir.homelinux.org/blog/wfwcomment.php?cid=73</wfw:comment>

    <slash:comments>12</slash:comments>
    <wfw:commentRss>http://vir.homelinux.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=73</wfw:commentRss>
    

    <author>nospam@example.com (Matthias Kretz)</author>
    <content:encoded>
    &lt;img class=&quot;serendipity_authorpic&quot; src=&quot;http://vir.homelinux.org/blog/templates/default/img/Matthias_Kretz.png&quot; alt=&quot;Author&quot; title=&quot;Matthias Kretz&quot; /&gt;Just playing around with our libs:&lt;br /&gt;
&lt;a href=&quot;http://www.rzuser.uni-heidelberg.de/~mkretz2/xvidcap-0000.mpeg&quot;&gt;first look&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.rzuser.uni-heidelberg.de/~mkretz2/xvidcap-0001.mpeg&quot;&gt;second look&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Ignore the not-smooth blends, it&#039;s only in the video. On screen it&#039;s smooth. 
    </content:encoded>

    <pubDate>Thu, 01 Nov 2007 17:16:54 +0100</pubDate>
    <guid isPermaLink="false">http://vir.homelinux.org/blog/archives/73-guid.html</guid>
    
</item>
<item>
    <title>Mixer API Design</title>
    <link>http://vir.homelinux.org/blog/archives/59-Mixer-API-Design.html</link>
            <category>Phonon</category>
    
    <comments>http://vir.homelinux.org/blog/archives/59-Mixer-API-Design.html#comments</comments>
    <wfw:comment>http://vir.homelinux.org/blog/wfwcomment.php?cid=59</wfw:comment>

    <slash:comments>29</slash:comments>
    <wfw:commentRss>http://vir.homelinux.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=59</wfw:commentRss>
    

    <author>nospam@example.com (Matthias Kretz)</author>
    <content:encoded>
    &lt;img class=&quot;serendipity_authorpic&quot; src=&quot;http://vir.homelinux.org/blog/templates/default/img/Matthias_Kretz.png&quot; alt=&quot;Author&quot; title=&quot;Matthias Kretz&quot; /&gt;&lt;p&gt;After playing with the mixer API a bit I feel confident to be able to go forward a propose a design.&lt;/p&gt;&lt;div style=&quot;clear:both;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;serendipity_imageComment_left&quot; style=&quot;width: 78px&quot;&gt;&lt;div class=&quot;serendipity_imageComment_img&quot;&gt;&lt;a href=&#039;http://vir.homelinux.org/blog/uploads/Phonon/phononmixer.png&#039;&gt;&lt;img width=&quot;78&quot; height=&quot;160&quot; src=&quot;http://vir.homelinux.org/blog/uploads/Phonon/phononmixer.serendipityThumb.png&quot; alt=&quot;&quot;  /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;serendipity_imageComment_txt&quot;&gt;class diagram&lt;/div&gt;&lt;/div&gt;&lt;p&gt;I&#039;m happy for people to look over it. Don&#039;t think about implementation details but whether this API would be easy to understand, use and still powerful enough for all our desktop uses.&lt;/p&gt;&lt;div style=&quot;clear:both;&quot;&gt;&lt;/div&gt;&lt;br /&gt;
&lt;b&gt;Update:&lt;/b&gt; latest version of the diagram at &lt;a href=&quot;http://vir.homelinux.org/phononmixer.png&quot;&gt;http://vir.homelinux.org/phononmixer.png&lt;/a&gt; 
    </content:encoded>

    <pubDate>Thu, 20 Sep 2007 15:09:00 +0200</pubDate>
    <guid isPermaLink="false">http://vir.homelinux.org/blog/archives/59-guid.html</guid>
    
</item>
<item>
    <title>Mastering the Mixer</title>
    <link>http://vir.homelinux.org/blog/archives/57-Mastering-the-Mixer.html</link>
            <category>Phonon</category>
    
    <comments>http://vir.homelinux.org/blog/archives/57-Mastering-the-Mixer.html#comments</comments>
    <wfw:comment>http://vir.homelinux.org/blog/wfwcomment.php?cid=57</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://vir.homelinux.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=57</wfw:commentRss>
    

    <author>nospam@example.com (Matthias Kretz)</author>
    <content:encoded>
    &lt;img class=&quot;serendipity_authorpic&quot; src=&quot;http://vir.homelinux.org/blog/templates/default/img/Matthias_Kretz.png&quot; alt=&quot;Author&quot; title=&quot;Matthias Kretz&quot; /&gt;&lt;p&gt;After a phonon/phonon-xine debug session (where I got stuck at KIO playback showing inexplicable memory access violations inside xine-lib) I had to do something creative again. So I tackled the mixer.&lt;/p&gt;&lt;p&gt;First I started with trying out ALSA&#039;s softvol plugin, and whether that would have less latency than the software volume control inside xine-lib. As it&#039;s close to impossible to measure I have to rely on my senses and that&#039;s telling me there&#039;s no audible difference. Ok, so for AudioOutput&#039;s volume property I could stay with xine-lib&#039;s offering, but seeing softvol work for the first time that got me started on exploring the ALSA mixer.&lt;/p&gt;&lt;p&gt;When an application uses an ALSA &quot;device&quot; that contains the softvol plugin then this will add a new &quot;integer control&quot; to the mixer. KMix and also alsamixer do not show the new control without a restart, and the control does not disappear again when the application is done and no app uses the softvol anymore.&lt;/p&gt;&lt;p&gt;From there I went to look at kmix (trunk)&#039;s abilities wrt. custom layout definitions and whether it would be possible to group KDE made softvol controls in a sensible way. This was not getting where I wanted without touching the code so I finally started libphononmixer.&lt;/p&gt;&lt;p&gt;When you want to use libasound (ALSA&#039;s user space lib) to fulfill a task it is, IMHO, best to not go from the doxygen generated documentation (which partially on their website is empty anyway) but open an editor in the libasound code and look at the header and source files. As the doxygen comments often don&#039;t tell much more than the function and parameter names already do the code is really the best to go with. And now I have a Mixer class that can be constructed from a Phonon::AudioOutputDevice object, a QString or an enum value. This installs a QSocketNotifier on the poll_descriptors libasound gives me and reads out all the events when the filedescriptor is ready for reading. With this I get all change notifications of a given mixer, even when a softvol control is added.&lt;/p&gt;&lt;p&gt;From there I&#039;ll go and make a nice high-level mixer API that lists all available mixers, gives notifications when a mixer appears/disappears, lists all the elements of a mixer, makes those elements give value change notifications and so on. I&#039;ll look into the possibility of removing softvol controls from the mixer, and whether it&#039;s possible to identify their origin and group them correctly. Once this is all ready it&#039;ll be the perfect base for a Plasma Data Engine and then a Plasma Applet for controlling your sound.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;Personal Note: I&#039;m close to being done with my sickness and probably today I&#039;ll go back home (where I&#039;m alone because my wife is far away in Spain &lt;img src=&quot;http://vir.homelinux.org/blog/templates/default/img/emoticons/cry.png&quot; alt=&quot;:&#039;(&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt;). I stayed with my parents for the time I was sick. It&#039;s great to have them, not only as fallback solution, but in those cases it becomes so much more obvious just how much a great family is worth!&lt;/p&gt; 
    </content:encoded>

    <pubDate>Wed, 19 Sep 2007 12:27:00 +0200</pubDate>
    <guid isPermaLink="false">http://vir.homelinux.org/blog/archives/57-guid.html</guid>
    
</item>
<item>
    <title>computer lab</title>
    <link>http://vir.homelinux.org/blog/archives/50-computer-lab.html</link>
            <category>Linux</category>
    
    <comments>http://vir.homelinux.org/blog/archives/50-computer-lab.html#comments</comments>
    <wfw:comment>http://vir.homelinux.org/blog/wfwcomment.php?cid=50</wfw:comment>

    <slash:comments>15</slash:comments>
    <wfw:commentRss>http://vir.homelinux.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=50</wfw:commentRss>
    

    <author>nospam@example.com (Matthias Kretz)</author>
    <content:encoded>
    &lt;img class=&quot;serendipity_authorpic&quot; src=&quot;http://vir.homelinux.org/blog/templates/default/img/Matthias_Kretz.png&quot; alt=&quot;Author&quot; title=&quot;Matthias Kretz&quot; /&gt;Today Flora and I went to the Universidad de Sevilla and there we checked up on the computer lab. This is what I found (besides many Win XP computers): &lt;a href=&#039;http://vir.homelinux.org/blog/uploads/whoami.jpg&#039;&gt;&lt;img width=&quot;160&quot; height=&quot;122&quot; style=&quot;border: 0px; padding-left: 5px; padding-right: 5px;&quot; src=&quot;http://vir.homelinux.org/blog/uploads/whoami.serendipityThumb.jpg&quot; alt=&quot;&quot;  /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Though to be fair I also have to mention that they then said I should stay away from that computer. &lt;img src=&quot;http://vir.homelinux.org/blog/templates/default/img/emoticons/smile.png&quot; alt=&quot;:-)&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt; 
    </content:encoded>

    <pubDate>Tue, 04 Sep 2007 14:25:26 +0200</pubDate>
    <guid isPermaLink="false">http://vir.homelinux.org/blog/archives/50-guid.html</guid>
    
</item>
<item>
    <title>Phonon-Trolltech</title>
    <link>http://vir.homelinux.org/blog/archives/45-Phonon-Trolltech.html</link>
            <category>Phonon</category>
    
    <comments>http://vir.homelinux.org/blog/archives/45-Phonon-Trolltech.html#comments</comments>
    <wfw:comment>http://vir.homelinux.org/blog/wfwcomment.php?cid=45</wfw:comment>

    <slash:comments>10</slash:comments>
    <wfw:commentRss>http://vir.homelinux.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=45</wfw:commentRss>
    

    <author>nospam@example.com (Matthias Kretz)</author>
    <content:encoded>
    &lt;img class=&quot;serendipity_authorpic&quot; src=&quot;http://vir.homelinux.org/blog/templates/default/img/Matthias_Kretz.png&quot; alt=&quot;Author&quot; title=&quot;Matthias Kretz&quot; /&gt;&lt;p&gt;&lt;br /&gt;
It&#039;s been a month already since I was at the Trolltech office in Oslo, but ever since I wanted to write about it...&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;br /&gt;
Trolltech invited me to be able to discuss the design of Phonon or, more in general, what their needs are for a multimedia API that they want to provide with or in addition to Qt. The first three days (Wed.-Fri.) we&#039;ve been whiteboarding the whole day, which was quite exhausting but OTOH exactly what I always wished to be able to do when I was designing Phonon in the beginning. The outcome was that we agreed that we want to have an API that provides all the flexibility of a graph based approach while simplifying the concepts as good as possible so that non-experts have no trouble using the API for simple tasks without getting any details wrong.&lt;br /&gt;
&lt;/p&gt;&lt;h3&gt;Before&lt;/h3&gt;&lt;p&gt;&lt;br /&gt;
This is where we needed a small change in the Phonon frontend API to make this possible. Before August Phonon allowed &quot;graphs&quot; of the form: &lt;img width=&quot;481&quot; height=&quot;279&quot; style=&quot;border: 0px; padding-left: 5px; padding-right: 5px;&quot; src=&quot;http://vir.homelinux.org/blog/uploads/Phonon/graph1.png&quot; alt=&quot;&quot;  /&gt;&lt;br /&gt;
&lt;/p&gt;&lt;h3&gt;Path changes&lt;/h3&gt;&lt;p&gt;&lt;br /&gt;
Now the AudioPath and VideoPath objects are replaced by a value based class called Path, which is hidden for simple cases:&lt;br /&gt;
&lt;img width=&quot;481&quot; height=&quot;63&quot; style=&quot;border: 0px; padding-left: 5px; padding-right: 5px;&quot; src=&quot;http://vir.homelinux.org/blog/uploads/Phonon/graph2.png&quot; alt=&quot;&quot;  /&gt;&lt;br /&gt;
vs.&lt;br /&gt;
&lt;img width=&quot;481&quot; height=&quot;63&quot; style=&quot;border: 0px; padding-left: 5px; padding-right: 5px;&quot; src=&quot;http://vir.homelinux.org/blog/uploads/Phonon/graph3.png&quot; alt=&quot;&quot;  /&gt;&lt;br /&gt;
or in code:&lt;br /&gt;
&lt;div class=&quot;cpp&quot; style=&quot;text-align: left&quot;&gt;MediaObject *media = &lt;span style=&quot;color: #0000dd;&quot;&gt;new&lt;/span&gt; MediaObject;&lt;br /&gt;AudioPath *path = &lt;span style=&quot;color: #0000dd;&quot;&gt;new&lt;/span&gt; AudioPath;&lt;br /&gt;AudioOutput *output = &lt;span style=&quot;color: #0000dd;&quot;&gt;new&lt;/span&gt; AudioOutput&lt;span style=&quot;color: #000000;&quot;&gt;&amp;#40;&lt;/span&gt;Phonon::&lt;span style=&quot;color: #00eeff;&quot;&gt;MusicCategory&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;media-&amp;gt;addAudioPath&lt;span style=&quot;color: #000000;&quot;&gt;&amp;#40;&lt;/span&gt;path&lt;span style=&quot;color: #000000;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;path-&amp;gt;addOutput&lt;span style=&quot;color: #000000;&quot;&gt;&amp;#40;&lt;/span&gt;output&lt;span style=&quot;color: #000000;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160;&lt;/div&gt;&lt;br /&gt;
vs.&lt;br /&gt;
&lt;div class=&quot;cpp&quot; style=&quot;text-align: left&quot;&gt;&lt;br /&gt;MediaObject *media = &lt;span style=&quot;color: #0000dd;&quot;&gt;new&lt;/span&gt; MediaObject;&lt;br /&gt;AudioOutput *output = &lt;span style=&quot;color: #0000dd;&quot;&gt;new&lt;/span&gt; AudioOutput&lt;span style=&quot;color: #000000;&quot;&gt;&amp;#40;&lt;/span&gt;Phonon::&lt;span style=&quot;color: #00eeff;&quot;&gt;MusicCategory&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;color: #ff0000; font-style: italic;&quot;&gt;/*Path path =*/&lt;/span&gt; Phonon::&lt;span style=&quot;color: #00eeff;&quot;&gt;createPath&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&amp;#40;&lt;/span&gt;media, output&lt;span style=&quot;color: #000000;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160;&lt;/div&gt;&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;br /&gt;
I wanted to keep the Path concept to make it easier to support the most common &quot;graph reconnection&quot;: to insert/remove effects. With the common graph you&#039;d have to disconnect media and output, connect media to effect, and effect to output and also somehow tell the objects that they should not lose any signal data while they&#039;re still disconnected and that playback needs to continue seemlessly after the effect insertion. With the path object it&#039;s a simple &lt;div class=&quot;cpp&quot; style=&quot;text-align: left&quot;&gt;&lt;span style=&quot;color: #ff0000; font-style: italic;&quot;&gt;/*Effect *effect =*/&lt;/span&gt; path.&lt;span style=&quot;color: #00eeff;&quot;&gt;insertEffect&lt;/span&gt;&lt;span style=&quot;color: #000000;&quot;&gt;&amp;#40;&lt;/span&gt;effectDescription&lt;span style=&quot;color: #000000;&quot;&gt;&amp;#41;&lt;/span&gt;;&lt;br /&gt;&amp;#160;&lt;/div&gt;&lt;br /&gt;
&lt;/p&gt;&lt;h3&gt;Mixing&lt;/h3&gt;&lt;p&gt;&lt;br /&gt;
Another change is that &lt;img width=&quot;433&quot; height=&quot;149&quot; style=&quot;border: 0px; padding-left: 5px; padding-right: 5px;&quot; src=&quot;http://vir.homelinux.org/blog/uploads/Phonon/graph4.png&quot; alt=&quot;&quot;  /&gt; is not allowed anymore. The implicit mixing of audio data is removed. (For video it was never allowed anyway). The plan is to add a special class that handles mixing &lt;img width=&quot;471&quot; height=&quot;149&quot; style=&quot;border: 0px; padding-left: 5px; padding-right: 5px;&quot; src=&quot;http://vir.homelinux.org/blog/uploads/Phonon/graph5.png&quot; alt=&quot;&quot;  /&gt; after the 4.0 release. &lt;i&gt;Implementation note: This is close to impossible to implement using libxine&lt;/i&gt;.&lt;br /&gt;
&lt;/p&gt;&lt;h3&gt;What&#039;s the gain?&lt;/h3&gt;&lt;p&gt;&lt;br /&gt;
Perhaps you&#039;ve already seen it, but why is this now more flexible than what Phonon provided before? The answer is that you can now define arbitrary graphs like &lt;img width=&quot;494&quot; height=&quot;231&quot; style=&quot;border: 0px; padding-left: 5px; padding-right: 5px;&quot; src=&quot;http://vir.homelinux.org/blog/uploads/Phonon/graph6.png&quot; alt=&quot;&quot;  /&gt;. In a later version we also want to have an object that can &quot;contain&quot; multiple MediaObjects in order to be able to control them in sync. This is basically the concept of a media graph containing multiple source nodes. But if you have only one source, which is the case for most apps, the MediaObject defines the graph implicitly. This hides the graph concept for most developers using Phonon, which IMO helps to make Phonon easier to use.&lt;br /&gt;
&lt;/p&gt;&lt;h3&gt;Trolltech&lt;/h3&gt;&lt;p&gt;&lt;br /&gt;
Now what&#039;s Trolltech&#039;s role with regard to Phonon? They want to provide multimedia API with Qt 4.4. And they decided to set their bets on Phonon. This means they will work (with me and the rest of the community that is interested) on continuing the design of the frontend API to support use cases like capture, transcoding, VoIP apps, Video chat, ... And they will work on backends for Windows, MacOS X and Linux (including embedded). KDE will ship the xine backend with 4.0, but that one has several problems:&lt;ul&gt;&lt;br /&gt;
&lt;li&gt;libxine is GPL-only, so they cannot tell commercial customers to simply use Phonon on Linux for multimedia&lt;/li&gt;&lt;br /&gt;
&lt;li&gt;libxine does not support mixing of audio streams, and I tried to separate the clock and ticket system in libxine to make it more flexible, but I feel like this is a dead end. libxine is designed for simple playback tasks and that&#039;s it.&lt;/li&gt;&lt;br /&gt;
&lt;li&gt;no capture or encoding with libxine&lt;/li&gt;&lt;br /&gt;
&lt;/ul&gt;For 4.0 it&#039;s still the best lib to use so I&#039;ll stick with it till then.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;br /&gt;
On another note, 2h per workday, while I&#039;m working on Phonon, are now sponsored by Trolltech. This additional money is very welcome, especially now that we&#039;ll have to pay the rent for a flat in Heidelberg and another one in &lt;a href=&quot;http://vir.homelinux.org/blog/index.php?/archives/44-Sevilla.html&quot;&gt;Sevilla&lt;/a&gt;.&lt;br /&gt;
&lt;/p&gt; 
    </content:encoded>

    <pubDate>Thu, 30 Aug 2007 16:39:00 +0200</pubDate>
    <guid isPermaLink="false">http://vir.homelinux.org/blog/archives/45-guid.html</guid>
    
</item>
<item>
    <title>Sevilla</title>
    <link>http://vir.homelinux.org/blog/archives/44-Sevilla.html</link>
            <category>personal</category>
    
    <comments>http://vir.homelinux.org/blog/archives/44-Sevilla.html#comments</comments>
    <wfw:comment>http://vir.homelinux.org/blog/wfwcomment.php?cid=44</wfw:comment>

    <slash:comments>8</slash:comments>
    <wfw:commentRss>http://vir.homelinux.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=44</wfw:commentRss>
    

    <author>nospam@example.com (Matthias Kretz)</author>
    <content:encoded>
    &lt;img class=&quot;serendipity_authorpic&quot; src=&quot;http://vir.homelinux.org/blog/templates/default/img/Matthias_Kretz.png&quot; alt=&quot;Author&quot; title=&quot;Matthias Kretz&quot; /&gt;&lt;p&gt;I&#039;ll be gone for 10 days to visit Sevilla, Spain. My wife will spend a semester abroad (and I&#039;ll stay in Heidelberg) &lt;img src=&quot;http://vir.homelinux.org/blog/templates/default/img/emoticons/cry.png&quot; alt=&quot;:&#039;(&quot; style=&quot;display: inline; vertical-align: bottom;&quot; class=&quot;emoticon&quot; /&gt; at the University of Sevilla.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;img width=&quot;254&quot; height=&quot;209&quot; style=&quot;float: right; border: 0px; padding-left: 5px; padding-right: 5px;&quot; src=&quot;http://vir.homelinux.org/blog/uploads/weather_sevilla.png&quot; alt=&quot;&quot;  /&gt;&lt;br /&gt;
As finding a place to stay is not as organized as in most other (european) countries, the first task we&#039;ll have to accomplish is finding a flat that is not overpriced and not &quot;interior&quot; (meaning without windows). Until then we&#039;ll stay at a hostel and hope to also find time to do a bit of vacation.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;br /&gt;
The weather is supposed to be too hot for my taste, but just right for Flora.&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;br /&gt;
I&#039;ll not be reading mailinglists, but if you send a mail directly to my address you have a small chance that I will see (and perhaps answer) it before Sept. 11th. &lt;br /&gt;
&lt;/p&gt; 
    </content:encoded>

    <pubDate>Thu, 30 Aug 2007 15:07:00 +0200</pubDate>
    <guid isPermaLink="false">http://vir.homelinux.org/blog/archives/44-guid.html</guid>
    
</item>
<item>
    <title>Yay!</title>
    <link>http://vir.homelinux.org/blog/archives/43-Yay!.html</link>
            <category>Phonon</category>
    
    <comments>http://vir.homelinux.org/blog/archives/43-Yay!.html#comments</comments>
    <wfw:comment>http://vir.homelinux.org/blog/wfwcomment.php?cid=43</wfw:comment>

    <slash:comments>1</slash:comments>
    <wfw:commentRss>http://vir.homelinux.org/blog/rss.php?version=2.0&amp;type=comments&amp;cid=43</wfw:commentRss>
    

    <author>nospam@example.com (Matthias Kretz)</author>
    <content:encoded>
    &lt;img class=&quot;serendipity_authorpic&quot; src=&quot;http://vir.homelinux.org/blog/templates/default/img/Matthias_Kretz.png&quot; alt=&quot;Author&quot; title=&quot;Matthias Kretz&quot; /&gt;&lt;p&gt;&lt;a href=&quot;http://www.motama.com/index.php?id=press&amp;amp;n=11&quot;&gt;NMM Release 1.0.0 &quot;April&quot;&lt;/a&gt;&lt;br /&gt;
&lt;/p&gt;&lt;p&gt;&lt;br /&gt;
I&#039;ll be taking a closer look at this release the next weeks and will be more actively looking into the NMM backend again.&lt;br /&gt;
&lt;/p&gt; 
    </content:encoded>

    <pubDate>Tue, 14 Aug 2007 12:24:34 +0200</pubDate>
    <guid isPermaLink="false">http://vir.homelinux.org/blog/archives/43-guid.html</guid>
    
</item>

</channel>
</rss>