<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Flavio Castelli &#187; KDE</title>
	<atom:link href="http://flavio.castelli.name/category/kde/feed" rel="self" type="application/rss+xml" />
	<link>http://flavio.castelli.name</link>
	<description>debugging my life</description>
	<lastBuildDate>Sat, 05 Dec 2009 15:48:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>QJson code moves to gitorious</title>
		<link>http://flavio.castelli.name/qjson-code-moves-to-gitorious</link>
		<comments>http://flavio.castelli.name/qjson-code-moves-to-gitorious#comments</comments>
		<pubDate>Sat, 05 Dec 2009 15:48:25 +0000</pubDate>
		<dc:creator>Flavio</dc:creator>
				<category><![CDATA[KDE]]></category>
		<category><![CDATA[Qt]]></category>
		<category><![CDATA[qjson]]></category>

		<guid isPermaLink="false">http://flavio.castelli.name/?p=285</guid>
		<description><![CDATA[Just a quick note: I have just moved QJson source code to this git repository hosted by gitorious.
I&#8217;ll keep the code on KDE&#8217;s svn synchronized with the git repository.
]]></description>
			<content:encoded><![CDATA[<p>Just a quick note: I have just moved QJson source code to <a href="http://gitorious.org/qjson" target="_blank">this</a> git repository hosted by gitorious.</p>
<p>I&#8217;ll keep the code on KDE&#8217;s svn synchronized with the git repository.</p>
]]></content:encoded>
			<wfw:commentRss>http://flavio.castelli.name/qjson-code-moves-to-gitorious/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>QJson: from QObject to JSON and vice-versa</title>
		<link>http://flavio.castelli.name/qjson-qobject-serialization-deserialization</link>
		<comments>http://flavio.castelli.name/qjson-qobject-serialization-deserialization#comments</comments>
		<pubDate>Fri, 04 Dec 2009 00:07:48 +0000</pubDate>
		<dc:creator>Flavio</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[Qt]]></category>
		<category><![CDATA[qjson]]></category>

		<guid isPermaLink="false">http://flavio.castelli.name/?p=273</guid>
		<description><![CDATA[Some days ago I introduced the possibility to serialize a QObject instance to JSON. Today I&#8217;m going to show you the opposite operation: initializing a QObject using a JSON object.
I refactored a bit my latest changes: I created a new class called QObjectHelper that provides the methods required to convert a QObject instance to a [...]]]></description>
			<content:encoded><![CDATA[<p>Some days ago I introduced the possibility to serialize a QObject instance to JSON. Today I&#8217;m going to show you the opposite operation: initializing a QObject using a JSON object.</p>
<p>I refactored a bit my latest changes: I created a new class called QObjectHelper that provides the methods required to convert a QObject instance to a QVariantMap and vice-versa.</p>
<p>This class can be used in conjunction with the Serializer and Parser classes to serialize and deserialize QObject instances to and from JSON.</p>
<p>Let me show a quick example, suppose the declaration of Person class looks like this:</p>
<pre name="code" class="cpp:nocontrols">
class Person : public QObject
{
  Q_OBJECT

  Q_PROPERTY(QString name READ name WRITE setName)
  Q_PROPERTY(int phoneNumber READ phoneNumber WRITE setPhoneNumber)
  Q_PROPERTY(Gender gender READ gender WRITE setGender)
  Q_PROPERTY(QDate dob READ dob WRITE setDob)
  Q_ENUMS(Gender)

public:
    Person(QObject* parent = 0);
    ~Person();

    QString name() const;
    void setName(const QString&amp; name);

    int phoneNumber() const;
    void setPhoneNumber(const int  phoneNumber);

    enum Gender {Male, Female};
    void setGender(Gender gender);
    Gender gender() const;

    QDate dob() const;
    void setDob(const QDate&amp; dob);

  private:
    QString m_name;
    int m_phoneNumber;
    Gender m_gender;
    QDate m_dob;
};</pre>
<h3>From QObject to JSON</h3>
<p>The following code will serialize an instance of Person to JSON :</p>
<pre name="code" class="cpp:nocontrols">
Person person;
person.setName("Flavio");
person.setPhoneNumber(123456);
person.setGender(Person::Male);
person.setDob(QDate(1982, 7, 12));

QVariantMap variant = QObjectHelper::qobject2qvariant(&#038;person);
Serializer serializer;
qDebug() << serializer.serialize( variant);
</pre>
<p>The generated output will be:</p>
<pre name="code" class="cpp:nocontrols">
{ "dob" : "1982-07-12", "gender" : 0, "name" : "Flavio", "phoneNumber" : 123456 }
</pre>
<h3>From JSON to QObject</h3>
<p>Suppose you have the following JSON data stored into a QString: </p>
<pre name="code" class="cpp:nocontrols">
{ "dob" : "1982-07-12", "gender" : 0, "name" : "Flavio", "phoneNumber" : 123456 }
</pre>
<p> The following code will initialize an already allocated instance of Person using the JSON values: </p>
<pre name="code" class="cpp:nocontrols">
Parser parser;
QVariant variant = parser.parse(json);

Person person;
QObjectHelper::qvariant2qobject(variant.toMap(), &#038;person);
</pre>
<h3>A new release</h3>
<p>These changes have been included inside the new release of QJson: 0.7.0.</p>
<p>Packages for openSUSE are building right now.</p>
]]></content:encoded>
			<wfw:commentRss>http://flavio.castelli.name/qjson-qobject-serialization-deserialization/feed</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>QJson: easier serialization of QObject instances to JSON</title>
		<link>http://flavio.castelli.name/qjson-easier-serialization-of-qobject-instances-to-json</link>
		<comments>http://flavio.castelli.name/qjson-easier-serialization-of-qobject-instances-to-json#comments</comments>
		<pubDate>Mon, 30 Nov 2009 19:20:58 +0000</pubDate>
		<dc:creator>Flavio</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[Qt]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[qjson]]></category>

		<guid isPermaLink="false">http://flavio.castelli.name/?p=263</guid>
		<description><![CDATA[I have just committed into trunk a couple of changes that make easier to serialize a QObject instance to JSON.
This solution relies on the awesome Qt&#8217;s property system.
Suppose the declaration of Person class looks like this:

class Person : public QObject
{
  Q_OBJECT

  Q_PROPERTY(QString name READ name WRITE setName)
  Q_PROPERTY(int phoneNumber READ phoneNumber WRITE [...]]]></description>
			<content:encoded><![CDATA[<p>I have just committed into trunk a couple of changes that make easier to serialize a QObject instance to JSON.</p>
<p>This solution relies on the awesome <a href="http://doc.trolltech.com/latest/properties.html" target="_blank">Qt&#8217;s property system</a>.</p>
<p>Suppose the declaration of Person class looks like this:</p>
<pre name="code" class="cpp:nocontrols">
class Person : public QObject
{
  Q_OBJECT

  Q_PROPERTY(QString name READ name WRITE setName)
  Q_PROPERTY(int phoneNumber READ phoneNumber WRITE setPhoneNumber)
  Q_PROPERTY(Gender gender READ gender WRITE setGender)
  Q_PROPERTY(QDate dob READ dob WRITE setDob)
  Q_ENUMS(Gender)

public:
    Person(QObject* parent = 0);
    ~Person();

    QString name() const;
    void setName(const QString&amp; name);

    int phoneNumber() const;
    void setPhoneNumber(const int  phoneNumber);

    enum Gender {Male, Female};
    void setGender(Gender gender);
    Gender gender() const;

    QDate dob() const;
    void setDob(const QDate&amp; dob);

  private:
    QString m_name;
    int m_phoneNumber;
    Gender m_gender;
    QDate m_dob;
};</pre>
<p>The following code will serialize an instance of Person to JSON:</p>
<pre name="code" class="cpp:nocontrols">
Person person;
person.setName("Flavio");
person.setPhoneNumber(123456);
person.setGender(Person::Male);
person.setDob(QDate(1982, 7, 12));

Serializer serializer;
qDebug() << serializer.serialize( &#038;person);
</pre>
<p>The generated output will be:</p>
<pre name="code" class="cpp:nocontrols">
{ "dob" : "1982-07-12", "gender" : 0, "name" : "Flavio", "phoneNumber" : 123456 }
</pre>
<p>I hope you will find this new feature useful. I'm also considering to create a similar method inside the Parser class.</p>
<p>As usual suggestions are welcome.</p>
]]></content:encoded>
			<wfw:commentRss>http://flavio.castelli.name/qjson-easier-serialization-of-qobject-instances-to-json/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>kaveau updates</title>
		<link>http://flavio.castelli.name/kaveau-updates</link>
		<comments>http://flavio.castelli.name/kaveau-updates#comments</comments>
		<pubDate>Mon, 14 Sep 2009 22:38:54 +0000</pubDate>
		<dc:creator>Flavio</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Qt]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[kaveau]]></category>

		<guid isPermaLink="false">http://flavio.castelli.name/?p=237</guid>
		<description><![CDATA[Some weeks have passed since the announcement of kaveau. I&#8217;m really proud and happy about this project because I received a lot of positive feedback messages and it has been chosen as one of the best Hackweek&#8217;s projects.
In the meantime I kept working on kaveau, so let me show you what has changed:

rdiff-backup has been [...]]]></description>
			<content:encoded><![CDATA[<p>Some weeks have passed since the announcement of kaveau. I&#8217;m really proud and happy about this project because I received a lot of positive feedback messages and it has been chosen as one of the best Hackweek&#8217;s projects.</p>
<p>In the meantime I kept working on kaveau, so let me show you what has changed:</p>
<ul>
<li><a href="http://rdiff-backup.nongnu.org/" target="_blank">rdiff-backup</a> has been replaced by <a href="http://www.samba.org/rsync/" target="_blank">rsync</a>.</li>
<li>the setup wizard has been improved according to the feedback messages I received.</li>
<li>old backups are now automatically removed.</li>
<li>the code has been refactored a lot.</li>
</ul>
<h3>The switch to rsync</h3>
<p>Previously kaveau used rdiff-backup as backup back-end. rdiff-backup is a great program but unfortunately it relies on the outdated <a href="http://librsync.sourceforge.net/" target="_blank">librsync</a> library. The latest release of librsync is dated 2004. It has a couple of serious bugs still open and, while rsync has reached version three, this library is still stuck at version one.</p>
<p>These are the reasons of the switch from rdiff-backup to rsync. This choice breaks the compatibility with the previous backups but it introduces a lot of advantages.<br />
One of the most important improvements brought by the adoption of rsync is an easier restore procedure: now <strong>all</strong> the backups can be accessed using a standard file manager, while previously rdiff-backup was needed to access the old backups.</p>
<h4>Backup directory structure</h4>
<p>On the backup device everything is saved under the <em>kaveau</em>/<em>hostname</em>/<em>username</em> path.</p>
<p>The directory will have a similar structure:</p>
<pre class="bash:nocontrols">drwxr-xr-x 3 flavio users 4096 2009-09-12 18:50 2009-09-12T18:50:19
drwxr-xr-x 3 flavio users 4096 2009-09-14 23:07 2009-09-14T23:07:46
drwxr-xr-x 3 flavio users 4096 2009-09-14 23:30 2009-09-14T23:30:36
lrwxrwxrwx 1 flavio users   19 2009-09-14 23:30 current -&gt; 2009-09-14T23:30:36</pre>
<p>As you can see there&#8217;s one directory per backup, plus a symlink called <em>current</em> pointing to the latest backup.</p>
<h3>Old backup deletion</h3>
<p>Nowadays big external storage devices are pretty cheap, but it&#8217;s always good to save some disk space.<br />
Now kaveau keeps:</p>
<ul>
<li>hourly backups for the past 24 hours.</li>
<li>daily backups for the past month.</li>
<li>weekly backups until the external disk is full.</li>
</ul>
<p>Thanks to hard links&#8217; magic, old backups can be deleted without causing damages to the other ones.</p>
<h3>Plans for the future</h3>
<p>Before starting to work on the restore user interface I will spend some time figuring out how to add support for network devices.</p>
<p>A lot of users requested this feature, hence I want to make them happy <img src='http://flavio.castelli.name/wp-content/plugins/smilies-themer/tango/face-smile.png' alt=':)' class='wp-smiley' /> .</p>
<p>I&#8217;m planning to use <a href="http://avahi.org/" target="_blank">avahi</a> to discover network shares (nfs, samba) or network machines running ssh and use them as backup devices. Honestly, I want to achieve something similar to <a href="http://www.apple.com/timecapsule/" target="_blank">Apple&#8217;s time capsule</a>.</p>
<p>As usual, feedback messages are really appreciated.</p>
]]></content:encoded>
			<wfw:commentRss>http://flavio.castelli.name/kaveau-updates/feed</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Using QJson under Windows</title>
		<link>http://flavio.castelli.name/using-qjson-under-windows</link>
		<comments>http://flavio.castelli.name/using-qjson-under-windows#comments</comments>
		<pubDate>Fri, 04 Sep 2009 12:44:42 +0000</pubDate>
		<dc:creator>Flavio</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[Qt]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[qjson]]></category>

		<guid isPermaLink="false">http://flavio.castelli.name/?p=228</guid>
		<description><![CDATA[Recently lots of people asked me how to build QJson under Windows. Most of them reported build/link errors, so I decided to try personally.
The good news is that QJson can be successfully built under Window, I can show you proof  
I have written the build instructions on QJson website: just take a look here.
One [...]]]></description>
			<content:encoded><![CDATA[<p>Recently lots of people asked me how to build QJson under Windows. Most of them reported build/link errors, so I decided to try personally.</p>
<p>The good news is that QJson can be successfully built under Window, I can show you proof <img src='http://flavio.castelli.name/wp-content/plugins/smilies-themer/tango/face-wink.png' alt=';)' class='wp-smiley' /> </p>

<a href='http://flavio.castelli.name/using-qjson-under-windows/qjson_windows_1' title='QJson unit test'><img width="150" height="150" src="http://flavio.castelli.name/wp-content/uploads/2009/09/qjson_windows_1-150x150.png" class="attachment-thumbnail" alt="" title="QJson unit test" /></a>
<a href='http://flavio.castelli.name/using-qjson-under-windows/qjson_windows_2' title='Building completed'><img width="150" height="150" src="http://flavio.castelli.name/wp-content/uploads/2009/09/qjson_windows_2-150x150.png" class="attachment-thumbnail" alt="" title="Building completed" /></a>

<p>I have written the build instructions on QJson website: just take a look <a href="http://qjson.sourceforge.net/download.html#windows" target="_blank">here</a>.</p>
<p>One last note: if you have problems with QJson please subscribe to the <a href="https://lists.sourceforge.net/lists/listinfo/qjson-devel" target="_blank">developer mailing list</a> and post a message.</p>
]]></content:encoded>
			<wfw:commentRss>http://flavio.castelli.name/using-qjson-under-windows/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>kaveau: easy and integrated backups solution for KDE</title>
		<link>http://flavio.castelli.name/kaveau-easy-integrated-backup-solution-kde</link>
		<comments>http://flavio.castelli.name/kaveau-easy-integrated-backup-solution-kde#comments</comments>
		<pubDate>Tue, 28 Jul 2009 08:47:05 +0000</pubDate>
		<dc:creator>Flavio</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[Qt]]></category>
		<category><![CDATA[kaveau]]></category>

		<guid isPermaLink="false">http://flavio.castelli.name/?p=185</guid>
		<description><![CDATA[During the last week I had the possibility to work on anything I wanted, Novell&#8217;s hackweek is so cool  
I decided to dedicate myself to an idea that has been obsessing me since a long time. Last December my brand new hard disk suddenly died, making impossible to recover anything. Fortunately I had just [...]]]></description>
			<content:encoded><![CDATA[<p>During the last week I had the possibility to work on anything I wanted, Novell&#8217;s hackweek is so cool <img src='http://flavio.castelli.name/wp-content/plugins/smilies-themer/tango/face-smile.png' alt=':)' class='wp-smiley' /> </p>
<p>I decided to dedicate myself to an idea that has been obsessing me since a long time. Last December my brand new hard disk suddenly died, making impossible to recover anything. Fortunately I had just synchronized the most important documents between my workstation and my laptop, so I didn&#8217;t lose anything important. This incident make me realize that I should perform backups regularly and I immediately started looking for a good solution.</p>
<p>Personally I think that doing backups is pretty boring so I wanted something damned easy to setup and use. Something that once configured runs in the background and does the dirty job without bothering you. Let&#8217;s face the truth: I wanted Apple&#8217;s Time Machine for KDE.</p>
<p>After some searches I realized that nothing was fitting my requirements and I decided to create something new: <em>kaveau</em>.</p>
<h3>What is kaveau?</h3>
<p>Kaveau is a backup program that makes backup easy for the average user.</p>
<p>As you will see while coding/planning kaveau I made some assumptions and so only few things are configurable. I really think that sometimes <a href="http://en.wikipedia.org/wiki/Minimalism" target="_blank"><em>&#8220;less is more&#8221;</em></a>.</p>
<h3>What does kaveau?</h3>
<p>Current features:</p>
<ul>
<li> it performs backups to an external storage device: I don&#8217;t think it will ever store backup data on a remote host. If you want to do that just use some good project like <a href="http://backuppc.sourceforge.net/" target="_blank">Backup pc</a>.</li>
<li> it backs up the complete home directory of the user: storage is cheap and average users (like me) keep everything inside their home directory ( but it&#8217;s possible to exclude some directories from the backup).</li>
<li>it performs incremental backups.</li>
<li>the backup data are neither compressed nor stored in fancy formats: in this way you can plug your external disk into another machine and access your data without additional work.</li>
<li>backups are performed automatically every hour (of course only if your external disk is plugged).</li>
<li>notification messages are shown if your backup is older that a week.</li>
</ul>
<p>More enhancements are coming&#8230;</p>
<h3>What technologies does it use?</h3>
<p>Backups are performed using <a href="http://rdiff-backup.nongnu.org/" target="_blank">rdiff-backup</a> because it&#8217;s damned easy to use, well tested (it&#8217;s used also in production environments) and packaged by all distributions.</p>
<p>The awesome <a href="http://solid.kde.org/" target="_blank">solid</a> library is used for interacting with the external disks is super easy.</p>
<h3>Status of kaveau</h3>
<p>I have been working on kaveau just for five days, so <strong>there&#8217;s still a lot of work to do</strong>.</p>
<p>A screenshot tour will give you the right idea of its status.</p>

<a href='http://flavio.castelli.name/kaveau-easy-integrated-backup-solution-kde/sf1' title='First run - external storage device attached'><img width="150" height="150" src="http://flavio.castelli.name/wp-content/uploads/2009/07/sf1-150x150.png" class="attachment-thumbnail" alt="First run - external storage device attached" title="First run - external storage device attached" /></a>
<a href='http://flavio.castelli.name/kaveau-easy-integrated-backup-solution-kde/sf3' title='Backup wizard - page 1'><img width="150" height="150" src="http://flavio.castelli.name/wp-content/uploads/2009/07/sf3-150x150.png" class="attachment-thumbnail" alt="Backup wizard - page 1" title="Backup wizard - page 1" /></a>
<a href='http://flavio.castelli.name/kaveau-easy-integrated-backup-solution-kde/sf4' title='Backup wizard - page 2'><img width="150" height="150" src="http://flavio.castelli.name/wp-content/uploads/2009/07/sf4-150x150.png" class="attachment-thumbnail" alt="Backup wizard - page 2" title="Backup wizard - page 2" /></a>
<a href='http://flavio.castelli.name/kaveau-easy-integrated-backup-solution-kde/sf5' title='Backup wizard - final page'><img width="150" height="150" src="http://flavio.castelli.name/wp-content/uploads/2009/07/sf5-150x150.png" class="attachment-thumbnail" alt="Backup wizard - final page" title="Backup wizard - final page" /></a>
<a href='http://flavio.castelli.name/kaveau-easy-integrated-backup-solution-kde/sf6' title='Backup operation in progress'><img width="150" height="150" src="http://flavio.castelli.name/wp-content/uploads/2009/07/sf6-150x150.png" class="attachment-thumbnail" alt="Backup operation in progress" title="Backup operation in progress" /></a>
<a href='http://flavio.castelli.name/kaveau-easy-integrated-backup-solution-kde/sf7' title='Backup completed'><img width="150" height="150" src="http://flavio.castelli.name/wp-content/uploads/2009/07/sf7-150x150.png" class="attachment-thumbnail" alt="Backup completed" title="Backup completed" /></a>

<p>Right now the code is available on <a href="http://github.com/flavio/kaveau/tree/master" target="_blank">this</a> git repository but I don&#8217;t recommend you to try it (unless you want to find and fix bugs <img src='http://flavio.castelli.name/wp-content/plugins/smilies-themer/tango/face-wink.png' alt=';)' class='wp-smiley' /> ).</p>
<p>I would really appreciate:</p>
<ul>
<li>feedback about the user interface (right now it looks too much like Time Machine).</li>
<li>icons: it would be great to have a desktop icon and some system tray icons (contact me for more details).</li>
<li>new code, bug fixes, code reviews, hints,&#8230;</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://flavio.castelli.name/kaveau-easy-integrated-backup-solution-kde/feed</wfw:commentRss>
		<slash:comments>36</slash:comments>
		</item>
		<item>
		<title>rockmarble: see who is going to rock in your town</title>
		<link>http://flavio.castelli.name/rockmarble-rock-in-your-town</link>
		<comments>http://flavio.castelli.name/rockmarble-rock-in-your-town#comments</comments>
		<pubDate>Tue, 07 Apr 2009 16:40:45 +0000</pubDate>
		<dc:creator>Flavio</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Qt]]></category>
		<category><![CDATA[last.fm]]></category>
		<category><![CDATA[marble]]></category>
		<category><![CDATA[qjson]]></category>

		<guid isPermaLink="false">http://flavio.castelli.name/?p=135</guid>
		<description><![CDATA[During the last weekend I hacked a bit on rockmarble and I added a new feature: retrieve all the events happening in a certain city.



As usual data is provided by last.fm, which should return also the events &#8220;near&#8221; the specified city (don&#8217;t ask me to define a value for near  ).
I have created new [...]]]></description>
			<content:encoded><![CDATA[<p>During the last weekend I hacked a bit on rockmarble and I added a new feature: retrieve all the events happening in a certain city.</p>
<p><span id="more-135"></span></p>
<p style="text-align: center;"><a rel="lightbox" href="http://rockmarble.sourceforge.net/images/screenshots/rockmarble4.png" title="Events happening near Milan, Italy"><br />
<img class="aligncenter" title="Events in Milan" src="http://rockmarble.sourceforge.net/images/screenshots/rockmarble4.png" alt="" width="50%" height="50%" /></a></p>
<p>As usual data is provided by last.fm, which should return also the events <em>&#8220;near&#8221; </em>the specified city (don&#8217;t ask me to define a value for <em>near</em> <img src='http://flavio.castelli.name/wp-content/plugins/smilies-themer/tango/face-smile.png' alt=':)' class='wp-smiley' /> ).</p>
<p>I have created new openSUSE packages, this time everything should work fine. Just make sure to remove all <a href="http://qjson.sourceforge.net/" target="_blank">qjson</a> packages before installing this release (in fact all the previous problems were due to packaging errors of qjson, now I have created new packages called libqjson0).</p>
<p>Packages are available for openSUSE 11.0, 11.1 and Factory (both for i586 and x86_64 architectures).</p>
<p>One last news: rockmarble has also a new <a href="http://rockmarble.sourceforge.net" target="_blank">site</a>, something slightly better than github wiki <img src='http://flavio.castelli.name/wp-content/plugins/smilies-themer/tango/face-wink.png' alt=';)' class='wp-smiley' /> </p>
<p><a href="http://cloud.github.com/downloads/flavio/rockmarble/rockmarble.ymp"><img src="../files/rockmarble_1click.png" alt="" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://flavio.castelli.name/rockmarble-rock-in-your-town/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>rockmarble: how to follow your favourite artists tour with Marble</title>
		<link>http://flavio.castelli.name/rockmarble-follow-artists-tours-with-marble</link>
		<comments>http://flavio.castelli.name/rockmarble-follow-artists-tours-with-marble#comments</comments>
		<pubDate>Thu, 02 Apr 2009 07:51:43 +0000</pubDate>
		<dc:creator>Flavio</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[last.fm]]></category>
		<category><![CDATA[marble]]></category>
		<category><![CDATA[qjson]]></category>

		<guid isPermaLink="false">http://flavio.castelli.name/?p=125</guid>
		<description><![CDATA[During the last weekend I wanted to have some fun with QJson. So I came out with this idea: retrieve from last.fm the tour dates of my favourite artists and display the locations using Marble.
After some hacking I created this small application: rockmarble&#8230;

If you have a last.fm account rockmarble will import your favourite artist list. [...]]]></description>
			<content:encoded><![CDATA[<p>During the last weekend I wanted to have some fun with <a title="qjson" href="http://qjson.sourceforge.net/" target="_blank">QJson</a>. So I came out with this idea: retrieve from <a title="last.fm" href="http://www.last.fm/home" target="_blank">last.fm</a> the tour dates of my favourite artists and display the locations using <a title="Marble" href="http://edu.kde.org/marble/" target="_blank">Marble</a>.</p>
<p>After some hacking I created this small application: <em>rockmarble</em>&#8230;</p>
<p><span id="more-125"></span><img class="aligncenter" title="rockmarbleflow" src="http://flavio.castelli.name/files/rockmarbleflow.png" alt="" width="800" height="269" /></p>
<p>If you have a last.fm account rockmarble will import your favourite artist list. Otherwise you can add one artists at a time.</p>
<p>The tour location will be displayed inside Marble, using <a href="http://www.openstreetmap.org/" target="_blank">openstreetmap</a>.</p>
<h2>Requirements</h2>
<p>In order to build/run it you will need:</p>
<ul>
<li><a href="http://www.qtsoftware.com/downloads">Qt4</a></li>
<li><a href="http://edu.kde.org/marble/">marble</a></li>
<li><a href="http://qjson.sourceforge.net/">QJson</a></li>
</ul>
<h2>Installation</h2>
<p>You can grab the source code of rockmarble <a href="http://github.com/flavio/rockmarble/tree/master" target="_blank">here</a>.</p>
<p>If you are an openSUSE user you can use 1click install:</p>
<p><a href="http://cloud.github.com/downloads/flavio/rockmarble/rockmarble.ymp"><img src="../files/rockmarble_1click.png" alt="" /></a></p>
<h2>Issues</h2>
<h3>Geolocalization</h3>
<p>The geolocalization data are given by last.fm, so if you discover that Metallica are going to give a concert in the middle of the Pacific Ocean please don’t bother me <img src='http://flavio.castelli.name/wp-content/plugins/smilies-themer/tango/face-smile.png' alt=':)' class='wp-smiley' /> </p>
<h3>Special names</h3>
<p>It seems that QJson doesn’t handle properly special characters. Maybe you will some artist with a blank name. I’m going to fix this issue asap.</p>
<h2>More details</h2>
<p>Visit <a href="http://rockmarble.sourceforge.net" target="_blank">rockmarble website</a></p>
<h2>Future</h2>
<p>Who wants to integrate it into amarok&#8217;s context view? <img src='http://flavio.castelli.name/wp-content/plugins/smilies-themer/tango/face-wink.png' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://flavio.castelli.name/rockmarble-follow-artists-tours-with-marble/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>QJson: a Qt-based library for mapping JSON data to QVariant objects</title>
		<link>http://flavio.castelli.name/qjson_qt_json_library</link>
		<comments>http://flavio.castelli.name/qjson_qt_json_library#comments</comments>
		<pubDate>Tue, 04 Nov 2008 12:37:07 +0000</pubDate>
		<dc:creator>Flavio</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Qt]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[qjson]]></category>

		<guid isPermaLink="false">http://flavio.castelli.name/?p=98</guid>
		<description><![CDATA[In order to realize a project of mine I started looking for a Qt library for mapping JSON data to Qt objects.
I came over a couple of solutions but none of them made me happy. So in the last weekend I wrote my own library : QJson

The library is based on Qt toolkit and converts [...]]]></description>
			<content:encoded><![CDATA[<p>In order to realize a project of mine I started looking for a Qt library for mapping JSON data to Qt objects.</p>
<p>I came over a couple of solutions but none of them made me happy. So in the last weekend I wrote my own library : <strong>QJson</strong><br />
<span id="more-98"></span><br />
The library is based on Qt toolkit and converts JSON data to <em>QVariant</em> instances.<br />
JSON arrays will be mapped to <em>QVariantList</em> instances, while JSON&#8217;s objects will be mapped to <em>QVariantMap</em>.<br />
The JSON parser is generated with Bison, while the scanner has been coded by me.</p>
<h3>Usage</h3>
<p>Converting JSON&#8217;s data to <em>QVariant</em> instance is really simple:</p>
<pre name="code" class="cpp:nocontrols">// create a JSonDriver instance
JSonDriver driver;
bool ok;
// json is a QString containing the data to convert
QVariant result = driver.parse (json, &amp;ok);</pre>
<p>Suppose you&#8217;re going to convert this JSON data:</p>
<blockquote><p>{<br />
&#8220;encoding&#8221; : &#8220;UTF-8&#8243;,<br />
&#8220;plug-ins&#8221; : [<br />
"python",<br />
"c++",<br />
"ruby"<br />
],<br />
&#8220;indent&#8221; : { &#8220;length&#8221; : 3, &#8220;use_space&#8221; : true }<br />
}</p></blockquote>
<p>The following code would convert the JSON data and parse it:</p>
<pre name="code" class="cpp:nocontrols">JSonDriver driver;
bool ok;
QVariantMap result = driver.parse (json, &amp;ok).toMap();
if (!ok) {
    qFatal("An error occured during parsing");
    exit (1);
}
qDebug() &lt;&lt; "encoding:" &lt;&lt; result["encoding"].toString();
qDebug() &lt;&lt; "plugins:";
foreach (QVariant plugin, result["plug-ins"].toList()) {
    qDebug() &lt;&lt; "\t-" &lt;&lt; plugin.toString();
}
QVariantMap nestedMap = result["indent"].toMap();
qDebug() &lt;&lt; "length:" &lt;&lt; nestedMap["length"].toInt();
qDebug() &lt;&lt; "use_space:" &lt;&lt; nestedMap["use_space"].toBool();</pre>
<p>The output would be:</p>
<blockquote><p>encoding: &#8220;UTF-8&#8243;<br />
plugins:<br />
- &#8220;python&#8221;<br />
- &#8220;c++&#8221;<br />
- &#8220;ruby&#8221;<br />
length: 3<br />
use_space: true</p></blockquote>
<h3>Requirements</h3>
<p>QJson requires:</p>
<ul>
<li>cmake</li>
<li>Qt</li>
</ul>
<h3>Obtain the source</h3>
<p>Actually QJson code is hosted on KDE subversion repository. You can download it using a svn client:</p>
<blockquote><p>svn co svn://anonsvn.kde.org/home/kde/trunk/playground/libs/qjson</p></blockquote>
<p>For more informations visit <a href="http://qjson.sourceforge.net">QJson site</a></p>
]]></content:encoded>
			<wfw:commentRss>http://flavio.castelli.name/qjson_qt_json_library/feed</wfw:commentRss>
		<slash:comments>31</slash:comments>
		</item>
		<item>
		<title>Still coding</title>
		<link>http://flavio.castelli.name/still-coding</link>
		<comments>http://flavio.castelli.name/still-coding#comments</comments>
		<pubDate>Tue, 27 May 2008 20:36:29 +0000</pubDate>
		<dc:creator>Flavio</dc:creator>
				<category><![CDATA[KDE]]></category>
		<category><![CDATA[Qt]]></category>
		<category><![CDATA[Strigi]]></category>

		<guid isPermaLink="false">http://www.flavio.castelli.name/?p=86</guid>
		<description><![CDATA[Yes, long time has passed since my last post (really strange, isn&#8217;t it  ).
It has been a busy period, full of work, dog training and&#8230; coding (fortunately!).
During this time I&#8217;ve been working on XesamQLib creation. This is a Qt based library for accessing Xesam services.
Its API is going to be similar to Xesam-glib one [...]]]></description>
			<content:encoded><![CDATA[<p>Yes, long time has passed since my last post (really strange, isn&#8217;t it <img src='http://flavio.castelli.name/wp-content/plugins/smilies-themer/tango/face-smile-big.png' alt=':D' class='wp-smiley' /> ).<br />
It has been a busy period, full of work, dog training and&#8230; coding (fortunately!).</p>
<p>During this time I&#8217;ve been working on XesamQLib creation. This is a Qt based library for accessing <a href="http://www.xesam.org/main">Xesam</a> services.<br />
Its API is going to be similar to <a href="http://xesam.org/people/kamstrup/xesam-glib/">Xesam-glib</a> one and it will make life easier for developers who want to interact with programs exposing Xesam service (who talked about <em>Strigi</em>? <img src='http://flavio.castelli.name/wp-content/plugins/smilies-themer/tango/face-smile-big.png' alt=':D' class='wp-smiley' /> )</p>
<p>Right now I&#8217;m finishing to clean the code, in order to publish a first version of XesamQLib on KDE repository.<br />
I&#8217;ll keep you updated.</p>
]]></content:encoded>
			<wfw:commentRss>http://flavio.castelli.name/still-coding/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
