<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Pdiego's Blog</title>
	<atom:link href="http://pdiego.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://pdiego.wordpress.com</link>
	<description>Qt QtTest</description>
	<lastBuildDate>Sun, 05 Jul 2009 20:40:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='pdiego.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Pdiego's Blog</title>
		<link>http://pdiego.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://pdiego.wordpress.com/osd.xml" title="Pdiego&#039;s Blog" />
	<atom:link rel='hub' href='http://pdiego.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Hudson &#8211; Tool to build/test your project</title>
		<link>http://pdiego.wordpress.com/2009/07/05/hudson-tool-to-buildtest-your-project/</link>
		<comments>http://pdiego.wordpress.com/2009/07/05/hudson-tool-to-buildtest-your-project/#comments</comments>
		<pubDate>Sun, 05 Jul 2009 20:40:11 +0000</pubDate>
		<dc:creator>pdiego</dc:creator>
				<category><![CDATA[Automatized]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://pdiego.wordpress.com/2009/07/05/hudson-tool-to-buildtest-your-project/</guid>
		<description><![CDATA[I started a new project and now I am using new tool, One of them is Hudson . Hudson is a tool to build easy and simple using. The tool is made in Java.The dependencies basically is Java.How to install the Hudson:$ apt-get install sun-java6-jdk sun-java6-jre sun-java6-binorvisit the : http://www.java.com/en/download/linux_manual.jsp?locale=en&#38;host=www.java.com:80On Debian-based distributions, such as Ubuntu, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pdiego.wordpress.com&amp;blog=7278113&amp;post=11&amp;subd=pdiego&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><br style="font-family:Verdana;" /><span style="font-family:Verdana;">    I started a new project and now I am using new tool, One of them is </span><a style="font-family:Verdana;" href="https://hudson.dev.java.net/">Hudson</a><span style="font-family:Verdana;"> . Hudson is a tool to build easy and simple using. The tool is made in Java.</span><br style="font-family:Verdana;" /><span style="font-family:Verdana;">The dependencies basically is Java.</span><br style="font-family:Verdana;" /><br style="font-family:Verdana;" /><span style="font-family:Verdana;font-weight:bold;">How to install the Hudson:</span><br style="font-family:Verdana;" /><br style="font-family:Verdana;" /><span style="font-family:Verdana;">$ apt-get install sun-java6-jdk sun-java6-jre sun-java6-bin</span><br style="font-family:Verdana;" /><br style="font-family:Verdana;" /><span style="font-family:Verdana;">or</span><br style="font-family:Verdana;" /><br style="font-family:Verdana;" /><span style="font-family:Verdana;">visit the :</span><a style="font-family:Verdana;" href="http://www.java.com/en/download/linux_manual.jsp?locale=en&amp;host=www.java.com:80"> http://www.java.com/en/download/linux_manual.jsp?locale=en&amp;host=www.java.com:80</a><br style="font-family:Verdana;" /><br style="font-family:Verdana;" /><br style="font-family:Verdana;" /><span style="font-family:Verdana;">On Debian-based distributions, such as Ubuntu, you can install Hudson through apt-get.</span><br style="font-family:Verdana;" /><span style="font-family:Verdana;"><span style="font-weight:bold;">1.</span>Add the following line to your </span><span style="font-weight:bold;font-family:Verdana;">/etc/apt/sources.lis</span><span style="font-family:Verdana;">t:</span><br style="font-family:Verdana;" /><span style="font-family:Verdana;">$ deb http://hudson-ci.org/debian binary/</span><br style="font-family:Verdana;" /><br style="font-family:Verdana;" /><span style="font-family:Verdana;"><span style="font-weight:bold;">2.</span>Update the APT index</span><br style="font-family:Verdana;" /><span style="font-family:Verdana;">$ sudo apt-get update</span><br style="font-family:Verdana;" /><br style="font-family:Verdana;" /><span style="font-family:Verdana;"><span style="font-weight:bold;">3.</span>Install Hudson:</span><br style="font-family:Verdana;" /><span style="font-family:Verdana;">$ sudo apt-get install hudson</span><br style="font-family:Verdana;" /><br style="font-family:Verdana;" /><span style="font-family:Verdana;font-weight:bold;">For execute the Hudson:</span><br />
<br style="font-family:Verdana;" /><span style="font-family:Verdana;"><span style="font-weight:bold;">1</span>. If you using the .war. </span><span style="font-family:Verdana;">If you installed the packages .deb,go to the next step.</span><br />
<span style="font-family:Verdana;"><br />
$ java -jar hudson.war</span><br style="font-family:Verdana;" /><span style="font-family:Verdana;"></span><span style="font-family:Verdana;"><br />
<span style="font-weight:bold;">2.</span> Open the browser and type:<br />
</span><span style="font-family:Verdana;">http://localhost:8080/</span></p>
<p><img src="http://lh4.ggpht.com/_hHkmIVpWass/SlELpGaGvgI/AAAAAAAAABo/9hjbKNtfPb8/s800/hudson01.jpg" title="" alt="" /><br style="font-family:Verdana;" /><br style="font-family:Verdana;" /><span style="font-family:Verdana;"><span style="font-weight:bold;">3.</span> For create a new job is very simple.</span><br style="font-family:Verdana;" /><span style="font-family:Verdana;"><br />
&nbsp;3.1. Click on &#8221; New Job &#8220;</span><br />
<img src="http://picasaweb.google.com/pablodie/Hudson?locked=true#5355074232370787042" style="display:block;text-align:center;margin:0 auto 10px;" title="" alt="" /><img src="http://lh4.ggpht.com/_hHkmIVpWass/SlELpFZO8uI/AAAAAAAAABc/TU64Go0myDw/hudson1.jpg" title="" alt="" /><br style="font-family:Verdana;" /><span style="font-family:Verdana;"><br />
&nbsp;3.2. Select the option , im my case I choose the &#8220;Build a free-style software project&#8221; </span><br />
<img src="http://picasaweb.google.com/pablodie/Hudson?locked=true#5355074233031515922" style="display:block;text-align:center;margin:0 auto 10px;" title="" alt="" /><img src="http://lh6.ggpht.com/_hHkmIVpWass/SlELpH2w3xI/AAAAAAAAABg/RLeO3WHRu4s/s1024/hudson3.jpg" title="" alt="" /><br style="font-family:Verdana;" /><span style="font-family:Verdana;"><br />
&nbsp;3.3 Select the options</span> , wirte scripts and save.<br style="font-family:Verdana;" /><br style="font-family:Verdana;" /><img src="http://lh3.ggpht.com/_hHkmIVpWass/SlELpOTBnvI/AAAAAAAAABk/2iINin2jrsY/s800/hudson4.jpg" title="" alt="" /><br style="font-family:Verdana;" /></p>
<p><br style="font-family:Verdana;" />
<div class="flockcredit" style="text-align:right;color:#CCC;font-size:x-small;">Blogged with the <a href="http://www.flock.com/blogged-with-flock" style="color:#999;font-weight:bold;" target="_new" title="Flock Browser">Flock Browser</a></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pdiego.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pdiego.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pdiego.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pdiego.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pdiego.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pdiego.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pdiego.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pdiego.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pdiego.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pdiego.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pdiego.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pdiego.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pdiego.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pdiego.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pdiego.wordpress.com&amp;blog=7278113&amp;post=11&amp;subd=pdiego&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pdiego.wordpress.com/2009/07/05/hudson-tool-to-buildtest-your-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6a138d5d40c33aaf2dbd5a0b97172fe2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pdiego</media:title>
		</media:content>

		<media:content url="http://lh4.ggpht.com/_hHkmIVpWass/SlELpGaGvgI/AAAAAAAAABo/9hjbKNtfPb8/s800/hudson01.jpg" medium="image" />

		<media:content url="http://picasaweb.google.com/pablodie/Hudson?locked=true#5355074232370787042" medium="image" />

		<media:content url="http://lh4.ggpht.com/_hHkmIVpWass/SlELpFZO8uI/AAAAAAAAABc/TU64Go0myDw/hudson1.jpg" medium="image" />

		<media:content url="http://picasaweb.google.com/pablodie/Hudson?locked=true#5355074233031515922" medium="image" />

		<media:content url="http://lh6.ggpht.com/_hHkmIVpWass/SlELpH2w3xI/AAAAAAAAABg/RLeO3WHRu4s/s1024/hudson3.jpg" medium="image" />

		<media:content url="http://lh3.ggpht.com/_hHkmIVpWass/SlELpOTBnvI/AAAAAAAAABk/2iINin2jrsY/s800/hudson4.jpg" medium="image" />
	</item>
		<item>
		<title>State Machine</title>
		<link>http://pdiego.wordpress.com/2009/04/23/untitled/</link>
		<comments>http://pdiego.wordpress.com/2009/04/23/untitled/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 00:37:10 +0000</pubDate>
		<dc:creator>pdiego</dc:creator>
				<category><![CDATA[Qt]]></category>
		<category><![CDATA[QT, QStateMachine, QPushButton, QVBoxLayout]]></category>

		<guid isPermaLink="false">http://pdiego.wordpress.com/2009/04/23/untitled/</guid>
		<description><![CDATA[Hi, I am posting an example that demonstrates the use of QStateMachine. A state machine with three states, state1, state2 and state3. The state machine is controlled by three QPushButton; when the button is clicked, the machine transitions to another state. Initially, the state machine is in state state1. main.cpp &#160; 1 #include &#60;QtGui&#62;&#160; 2 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pdiego.wordpress.com&amp;blog=7278113&amp;post=7&amp;subd=pdiego&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<div id="result_box" dir="ltr">I am posting an example that demonstrates the use of<span style="color:rgb(51,51,255);text-decoration:underline;"> <a href="http://doc.trolltech.com/solutions/4/qtstatemachine/statemachine-api.html">QStateMachine</a></span>.
</div>
<p>A state machine with three states, <tt>state1</tt>, <tt>state2</tt> and <tt>state3</tt>. The state machine is controlled by three <a href="http://doc.trolltech.com/4.4/qpushbutton.html">QPushButton</a>; when the button is clicked, the machine transitions to another state. Initially, the state machine is in state <tt>state1</tt>.</p>
<p>main.cpp</p>
<hr />
<span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp; 1 #include &lt;QtGui&gt;</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp; 2 #include &lt;QApplication&gt;</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp; 3 #include &lt;QVBoxLayout&gt;</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp; 4 #include &lt;QPushButton&gt;</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp; 5 #include &lt;QStateMachine&gt;</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp; 6 </span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp; 7 </span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp; 8 </span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp; 9 </span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;10 int main ( int argc, char **argv)</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;11 {</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;12&nbsp;&nbsp;&nbsp;&nbsp; QApplication app(argc, argv );</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;13 </span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;14&nbsp;&nbsp;&nbsp;&nbsp; /* Set the name application */</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;15 </span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;16&nbsp;&nbsp;&nbsp;&nbsp; app.setApplicationName(&#8220;EX_State&#8221;);</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;17 </span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;18&nbsp;&nbsp;&nbsp;&nbsp; /* Here created a window */</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;19 </span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;20&nbsp;&nbsp;&nbsp;&nbsp; QWidget *window = new QWidget;</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;21 </span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;22&nbsp;&nbsp;&nbsp;&nbsp; /* Here created the buttons */</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;23 </span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;24&nbsp;&nbsp;&nbsp;&nbsp; QPushButton *button1 = new QPushButton (&#8220;Estate 1&#8243;);</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;25&nbsp;&nbsp;&nbsp;&nbsp; QPushButton *button2 = new QPushButton (&#8220;Estate 2&#8243;);</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;26&nbsp;&nbsp;&nbsp;&nbsp; QPushButton *button3 = new QPushButton (&#8220;Estate 3&#8243;);</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;27 </span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;28&nbsp;&nbsp;&nbsp;&nbsp; /* Here created the Layout */</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;29 </span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;30&nbsp;&nbsp;&nbsp;&nbsp; QVBoxLayout&nbsp; *vbox = new QVBoxLayout;</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;31 </span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;32&nbsp;&nbsp;&nbsp;&nbsp; /* Here the buttons are added&nbsp; in the Layout */</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;33 </span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;34&nbsp;&nbsp;&nbsp;&nbsp; vbox-&gt;addWidget(button1);</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;35&nbsp;&nbsp;&nbsp;&nbsp; vbox-&gt;addWidget(button2);</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;36&nbsp;&nbsp;&nbsp;&nbsp; vbox-&gt;addWidget(button3);</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;37 </span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;38 </span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;39 </span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;40&nbsp;&nbsp;&nbsp;&nbsp; window-&gt;setLayout(vbox);</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;41&nbsp;&nbsp;&nbsp;&nbsp; window-&gt;resize(480,600);</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;42 </span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;43 </span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;44 </span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;45&nbsp;&nbsp;&nbsp;&nbsp; /* The state machine is created */</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;46 </span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;47&nbsp;&nbsp;&nbsp;&nbsp; QStateMachine machine;</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;48 </span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;49&nbsp;&nbsp;&nbsp;&nbsp; /* State are created&nbsp; */</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;50 </span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;51&nbsp;&nbsp;&nbsp;&nbsp; QState *state1 = new QState();</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;52&nbsp;&nbsp;&nbsp;&nbsp; QState *state2 = new QState();</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;53&nbsp;&nbsp;&nbsp;&nbsp; QState *state3 = new QState();</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;54 </span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;55 </span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;56 </span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;57&nbsp;&nbsp;&nbsp;&nbsp; state1-&gt;setPropertyOnEntry(button1,&#8221;geometry&#8221;,QRectF(0,0,100,100));</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;58&nbsp;&nbsp;&nbsp;&nbsp; state1-&gt;setPropertyOnEntry(button2,&#8221;geometry&#8221;,QRectF(100,100,200,200));</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;59&nbsp;&nbsp;&nbsp;&nbsp; state1-&gt;setPropertyOnEntry(button3,&#8221;geometry&#8221;,QRectF(300,300,150,150));</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;60 </span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;61&nbsp;&nbsp;&nbsp;&nbsp; state2-&gt;setPropertyOnEntry(button1,&#8221;geometry&#8221;, QRectF(380,1,100,210));</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;62&nbsp;&nbsp;&nbsp;&nbsp; state2-&gt;setPropertyOnEntry(button2,&#8221;geometry&#8221;, QRectF(1,99,100,310));</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;63&nbsp;&nbsp;&nbsp;&nbsp; state2-&gt;setPropertyOnEntry(button3,&#8221;geometry&#8221;, QRectF(200,200,100,410));</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;64 </span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;65&nbsp;&nbsp;&nbsp;&nbsp; state3-&gt;setPropertyOnEntry(button1,&#8221;geometry&#8221;, QRectF(10,10,470,20));</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;66&nbsp;&nbsp;&nbsp;&nbsp; state3-&gt;setPropertyOnEntry(button2,&#8221;geometry&#8221;, QRectF(10,300,470,20));</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;67&nbsp;&nbsp;&nbsp;&nbsp; state3-&gt;setPropertyOnEntry(button3,&#8221;geometry&#8221;, QRectF(10,570,470,20));</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;68 </span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;69 </span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;70&nbsp;&nbsp;&nbsp;&nbsp; state1-&gt;addTransition(button1, SIGNAL (clicked()), state1);</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;71&nbsp;&nbsp;&nbsp;&nbsp; state1-&gt;addTransition(button2, SIGNAL(clicked()),state2);</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;72&nbsp;&nbsp;&nbsp;&nbsp; state1-&gt;addTransition(button3, SIGNAL(clicked()),state3);</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;73 </span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;74&nbsp;&nbsp;&nbsp;&nbsp; state2-&gt;addTransition(button1, SIGNAL (clicked()), state1);</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;75&nbsp;&nbsp;&nbsp;&nbsp; state2-&gt;addTransition(button2, SIGNAL(clicked()),state2);</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;76&nbsp;&nbsp;&nbsp;&nbsp; state2-&gt;addTransition(button3, SIGNAL(clicked()),state3);</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;77 </span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;78&nbsp;&nbsp;&nbsp;&nbsp; state3-&gt;addTransition(button1, SIGNAL (clicked()), state1);</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;79&nbsp;&nbsp;&nbsp;&nbsp; state3-&gt;addTransition(button2, SIGNAL(clicked()),state2);</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;80&nbsp;&nbsp;&nbsp;&nbsp; state3-&gt;addTransition(button3, SIGNAL(clicked()),state3);</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;81 </span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;82&nbsp;&nbsp;&nbsp;&nbsp; /* States are added in state machine */</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;83 </span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;84&nbsp;&nbsp;&nbsp;&nbsp; machine.addState(state1);</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;85&nbsp;&nbsp;&nbsp;&nbsp; machine.addState(state2);</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;86&nbsp;&nbsp;&nbsp;&nbsp; machine.addState(state3);</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;87 </span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;88&nbsp;&nbsp;&nbsp;&nbsp; /*&nbsp; Set the state initial for the state machine */</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;89 </span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;90&nbsp;&nbsp;&nbsp;&nbsp; machine.setInitialState(state1);</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;91 </span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;92&nbsp;&nbsp;&nbsp;&nbsp; /* Start the state machine */</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;93&nbsp;&nbsp;&nbsp;&nbsp; machine.start();</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;94 </span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;95&nbsp;&nbsp;&nbsp;&nbsp; window-&gt;show();</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;96 </span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;97&nbsp;&nbsp;&nbsp;&nbsp; return app.exec();</span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;98 </span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">&nbsp;99 </span><br style="font-family:Times New Roman;color:rgb(255,102,0);" /><span style="font-family:Times New Roman;color:rgb(255,102,0);">100 }</span></p>
<hr />
<div class="flockcredit" style="text-align:right;color:#CCC;font-size:x-small;">Blogged with the <a href="http://www.flock.com/blogged-with-flock" target="_new" title="Flock Browser">Flock Browser</a></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pdiego.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pdiego.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pdiego.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pdiego.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pdiego.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pdiego.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pdiego.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pdiego.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pdiego.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pdiego.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pdiego.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pdiego.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pdiego.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pdiego.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pdiego.wordpress.com&amp;blog=7278113&amp;post=7&amp;subd=pdiego&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pdiego.wordpress.com/2009/04/23/untitled/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6a138d5d40c33aaf2dbd5a0b97172fe2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pdiego</media:title>
		</media:content>
	</item>
		<item>
		<title>The Simple Test</title>
		<link>http://pdiego.wordpress.com/2009/04/21/4/</link>
		<comments>http://pdiego.wordpress.com/2009/04/21/4/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 23:37:42 +0000</pubDate>
		<dc:creator>pdiego</dc:creator>
				<category><![CDATA[Qt]]></category>
		<category><![CDATA[QtTest, QVERIFY, QCOMPARE]]></category>

		<guid isPermaLink="false">http://pdiego.wordpress.com/?p=4</guid>
		<description><![CDATA[I am learning a few of QtTest and I am showing the simple and little test  for QtDate . The test verify if  the date is valid and compare the actual date. == test.cpp== 1 #include &#60;QtTest&#62; 2 3 4 5 class testDate: public QObject 6 { 7 Q_OBJECT 8 9 private slots: 10 11 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pdiego.wordpress.com&amp;blog=7278113&amp;post=4&amp;subd=pdiego&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I am learning a few of QtTest and I am showing  the simple and little test  for QtDate . The test verify if  the date is valid and compare the actual date.</p>
<p>== test.cpp==</p>
<p style="text-indent:0;margin:0;"><!--StartFragment--><span style="color:#ff6600;"> 1 #include &lt;QtTest&gt;<br />
2<br />
3<br />
4<br />
5 class testDate: public QObject<br />
6 {<br />
7         Q_OBJECT<br />
8<br />
9         private slots:<br />
10<br />
11         void testValidity();<br />
12         void testCurrentDate();<br />
13<br />
14 };<br />
15<br />
16 /* Here the test for verifying if the date is Valid, can you change the Day for plus 31 and the Mo    nth plus 12 */<br />
17 void testDate::testValidity()<br />
18 {<br />
19         QDate date (2009, 04, 33);<br />
20         QVERIFY(date.isValid());<br />
21 }<br />
22<br />
23<br />
24 /* Here the Date is compared with the actual Date */<br />
25 void testDate::testCurrentDate()<br />
26 {<br />
27<br />
28         QDate date, date2;<br />
29         date.setYMD(2009, 4, 22);<br />
30         date2 = QDate::currentDate();<br />
31         QCOMPARE(date, date2);<br />
32 }<br />
33<br />
34<br />
35<br />
36<br />
37 QTEST_MAIN(testDate);<br />
38 #include &#8220;test1.moc&#8221;</span></p>
<p style="text-indent:0;margin:0;">
<p style="text-indent:0;margin:0;">==</p>
<h3 class="fn">QVERIFY (  <em>condition</em> )</h3>
<p>The QVERIFY() macro checks whether the <em>condition</em> is true or not. If it is true, execution continues. If not, a failure is recorded in the test log and the test won&#8217;t be executed further.</p>
<h3 class="fn">QCOMPARE (  <em>actual</em>,  <em>expected</em> )</h3>
<p>The QCOMPARE macro compares an <em>actual</em> value to an <em>expected</em> value using the equals operator. If <em>actual</em> and <em>expected</em> are identical, execution continues. If not, a failure is recorded in the test log and the test won&#8217;t be executed further.</p>
<p><strong>References:</strong></p>
<p><a class="alignleft" href="http://doc.trolltech.com/4.5/qtestlib-manual.html" target="_blank">http://doc.trolltech.com/4.5/qtestlib-manual.html</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pdiego.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pdiego.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pdiego.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pdiego.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pdiego.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pdiego.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pdiego.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pdiego.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pdiego.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pdiego.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pdiego.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pdiego.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pdiego.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pdiego.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pdiego.wordpress.com&amp;blog=7278113&amp;post=4&amp;subd=pdiego&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pdiego.wordpress.com/2009/04/21/4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6a138d5d40c33aaf2dbd5a0b97172fe2?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pdiego</media:title>
		</media:content>
	</item>
	</channel>
</rss>
