<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://bugs.maemo.com/skins/common/feed.css?207"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>QML-EnhancedCalcExample - Revision history</title>
		<link>http://bugs.maemo.com/index.php?title=QML-EnhancedCalcExample&amp;action=history</link>
		<description>Revision history for this page on the wiki</description>
		<language>en</language>
		<generator>MediaWiki 1.15.5-7</generator>
		<lastBuildDate>Sat, 04 Apr 2026 05:50:30 GMT</lastBuildDate>
		<item>
			<title>88.113.8.125:&amp;#32;/* CalcButton */</title>
			<link>http://bugs.maemo.com/index.php?title=QML-EnhancedCalcExample&amp;diff=35841&amp;oldid=prev</link>
			<guid>http://bugs.maemo.com/index.php?title=QML-EnhancedCalcExample&amp;diff=35841&amp;oldid=prev</guid>
			<description>&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;CalcButton&lt;/span&gt;&lt;/p&gt;

		&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
		&lt;col class='diff-marker' /&gt;
		&lt;col class='diff-content' /&gt;
		&lt;col class='diff-marker' /&gt;
		&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 17:05, 15 June 2010&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 222:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 222:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;On the above, we define the bg of the button and the highlight of the button. &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;THe &lt;/del&gt;highlight is img and the bg image is, well, bgimg.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;On the above, we define the bg of the button and the highlight of the button. &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;The &lt;/ins&gt;highlight is img and the bg image is, well, bgimg.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 265:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 265:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Above defines the transitions for the button. &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Above defines the transitions for the button.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Calculator.js ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Calculator.js ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff generator: internal 2026-04-04 05:50:30 --&gt;
&lt;/table&gt;</description>
			<pubDate>Tue, 15 Jun 2010 17:05:50 GMT</pubDate>			<dc:creator>88.113.8.125</dc:creator>			<comments>http://bugs.maemo.com/Talk:QML-EnhancedCalcExample</comments>		</item>
		<item>
			<title>88.113.8.125:&amp;#32;/* Calculator.qml */</title>
			<link>http://bugs.maemo.com/index.php?title=QML-EnhancedCalcExample&amp;diff=35840&amp;oldid=prev</link>
			<guid>http://bugs.maemo.com/index.php?title=QML-EnhancedCalcExample&amp;diff=35840&amp;oldid=prev</guid>
			<description>&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Calculator.qml&lt;/span&gt;&lt;/p&gt;

		&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
		&lt;col class='diff-marker' /&gt;
		&lt;col class='diff-content' /&gt;
		&lt;col class='diff-marker' /&gt;
		&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 17:04, 15 June 2010&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 32:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 32:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;We use column layout for the numeric operations (the field that shows the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;calcuations&lt;/del&gt;) layout, with small &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;intendation &lt;/del&gt;(2 px) and small padding. &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;We use column layout for the numeric operations (the field that shows the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;calculations&lt;/ins&gt;) layout, with small &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;indentation &lt;/ins&gt;(2 px) and small padding. &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 94:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 94:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Common operations to clean the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;calcuations &lt;/del&gt;are on one row, along with &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;speacial &lt;/del&gt;wider toggle button for advanced mode. &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Common operations to clean the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;calculations &lt;/ins&gt;are on one row, along with &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;special &lt;/ins&gt;wider toggle button for advanced mode. &amp;nbsp;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 174:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 174:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/source&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;States definition for advanced mode. Basic mode doesn't need to be defined, as we have defined that already as the default mode of operation. For advanced state, we modify the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;bacspace &lt;/del&gt;to be visible, we move basic buttons a bit, we enable advanced and trigonometry buttons and move them a bit for visual candy.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;States definition for advanced mode. Basic mode doesn't need to be defined, as we have defined that already as the default mode of operation. For advanced state, we modify the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;backspace &lt;/ins&gt;to be visible, we move basic buttons a bit, we enable advanced and trigonometry buttons and move them a bit for visual candy.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 185:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 185:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Above defines the animations for the transition to and from advanced mode.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Above defines the animations for the transition to and from advanced mode.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== CalcButton ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== CalcButton ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff generator: internal 2026-04-04 05:50:31 --&gt;
&lt;/table&gt;</description>
			<pubDate>Tue, 15 Jun 2010 17:04:54 GMT</pubDate>			<dc:creator>88.113.8.125</dc:creator>			<comments>http://bugs.maemo.com/Talk:QML-EnhancedCalcExample</comments>		</item>
		<item>
			<title>amigadave:&amp;#32;{{expand}}</title>
			<link>http://bugs.maemo.com/index.php?title=QML-EnhancedCalcExample&amp;diff=35154&amp;oldid=prev</link>
			<guid>http://bugs.maemo.com/index.php?title=QML-EnhancedCalcExample&amp;diff=35154&amp;oldid=prev</guid>
			<description>&lt;p&gt;{{expand}}&lt;/p&gt;

		&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
		&lt;col class='diff-marker' /&gt;
		&lt;col class='diff-content' /&gt;
		&lt;col class='diff-marker' /&gt;
		&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 11:57, 31 May 2010&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;{{expand}}&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== About the Enhanced Calc Example ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== About the Enhanced Calc Example ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff generator: internal 2026-04-04 05:50:31 --&gt;
&lt;/table&gt;</description>
			<pubDate>Mon, 31 May 2010 11:57:14 GMT</pubDate>			<dc:creator>amigadave</dc:creator>			<comments>http://bugs.maemo.com/Talk:QML-EnhancedCalcExample</comments>		</item>
		<item>
			<title>amigadave:&amp;#32;use &lt;source&gt;</title>
			<link>http://bugs.maemo.com/index.php?title=QML-EnhancedCalcExample&amp;diff=35152&amp;oldid=prev</link>
			<guid>http://bugs.maemo.com/index.php?title=QML-EnhancedCalcExample&amp;diff=35152&amp;oldid=prev</guid>
			<description>&lt;p&gt;use &amp;lt;source&amp;gt;&lt;/p&gt;
&lt;a href=&quot;http://bugs.maemo.com/index.php?title=QML-EnhancedCalcExample&amp;amp;diff=35152&amp;amp;oldid=28941&quot;&gt;Show changes&lt;/a&gt;</description>
			<pubDate>Mon, 31 May 2010 11:55:30 GMT</pubDate>			<dc:creator>amigadave</dc:creator>			<comments>http://bugs.maemo.com/Talk:QML-EnhancedCalcExample</comments>		</item>
		<item>
			<title>amigadave:&amp;#32;Category:Development and Category:Qt</title>
			<link>http://bugs.maemo.com/index.php?title=QML-EnhancedCalcExample&amp;diff=28941&amp;oldid=prev</link>
			<guid>http://bugs.maemo.com/index.php?title=QML-EnhancedCalcExample&amp;diff=28941&amp;oldid=prev</guid>
			<description>&lt;p&gt;&lt;a href=&quot;/Category:Development&quot; title=&quot;Category:Development&quot;&gt;Category:Development&lt;/a&gt; and &lt;a href=&quot;/Category:Qt&quot; title=&quot;Category:Qt&quot;&gt;Category:Qt&lt;/a&gt;&lt;/p&gt;

		&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
		&lt;col class='diff-marker' /&gt;
		&lt;col class='diff-content' /&gt;
		&lt;col class='diff-marker' /&gt;
		&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 14:57, 11 February 2010&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 345:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 345:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Development]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Qt]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff generator: internal 2026-04-04 05:50:31 --&gt;
&lt;/table&gt;</description>
			<pubDate>Thu, 11 Feb 2010 14:57:50 GMT</pubDate>			<dc:creator>amigadave</dc:creator>			<comments>http://bugs.maemo.com/Talk:QML-EnhancedCalcExample</comments>		</item>
		<item>
			<title>konttori:&amp;#32;/* About the Enhanced Calc Example */</title>
			<link>http://bugs.maemo.com/index.php?title=QML-EnhancedCalcExample&amp;diff=25787&amp;oldid=prev</link>
			<guid>http://bugs.maemo.com/index.php?title=QML-EnhancedCalcExample&amp;diff=25787&amp;oldid=prev</guid>
			<description>&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;About the Enhanced Calc Example&lt;/span&gt;&lt;/p&gt;

		&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
		&lt;col class='diff-marker' /&gt;
		&lt;col class='diff-content' /&gt;
		&lt;col class='diff-marker' /&gt;
		&lt;col class='diff-content' /&gt;
		&lt;tr valign='top'&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
		&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 10:48, 4 January 2010&lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 4:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 4:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Source code available from [http://qmlexamples.garage.maemo.org/ qml examples garage page]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Calculator.qml ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Calculator.qml ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff generator: internal 2026-04-04 05:50:31 --&gt;
&lt;/table&gt;</description>
			<pubDate>Mon, 04 Jan 2010 10:48:58 GMT</pubDate>			<dc:creator>konttori</dc:creator>			<comments>http://bugs.maemo.com/Talk:QML-EnhancedCalcExample</comments>		</item>
		<item>
			<title>konttori:&amp;#32;QML Calculator Example</title>
			<link>http://bugs.maemo.com/index.php?title=QML-EnhancedCalcExample&amp;diff=25662&amp;oldid=prev</link>
			<guid>http://bugs.maemo.com/index.php?title=QML-EnhancedCalcExample&amp;diff=25662&amp;oldid=prev</guid>
			<description>&lt;p&gt;QML Calculator Example&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== About the Enhanced Calc Example ==&lt;br /&gt;
&lt;br /&gt;
See [http://www.youtube.com/watch?v=BGmw2IjLLv0&amp;amp;feature=player_embedded Youtube video] for demo of the app.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Calculator.qml ==&lt;br /&gt;
&lt;br /&gt;
The file below defines the layouts of the calculator. It uses the button below to draw nice looking button shape, that has glow effect. &lt;br /&gt;
&lt;br /&gt;
import Qt 4.6&lt;br /&gt;
&lt;br /&gt;
 Rectangle {&lt;br /&gt;
    width: parent.width; height: 480; color: palette.window&lt;br /&gt;
    anchors.fill: parent;&lt;br /&gt;
    SystemPalette { id: palette }&lt;br /&gt;
    Script { source: &amp;quot;calculator.js&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
We use the system palette for colors and the calculator.js file for all of the calculation logic. &lt;br /&gt;
&lt;br /&gt;
    Column {&lt;br /&gt;
        x: 2; spacing: 2;&lt;br /&gt;
        Row {&lt;br /&gt;
          id: numericOperations&lt;br /&gt;
          spacing: 2&lt;br /&gt;
&lt;br /&gt;
We use column layout for the numeric operations (the field that shows the calcuations) layout, with small intendation (2 px) and small padding. &lt;br /&gt;
&lt;br /&gt;
          Rectangle {&lt;br /&gt;
              id: container&lt;br /&gt;
              width: 400; height: 55&lt;br /&gt;
              border.color: palette.dark; color: palette.base&lt;br /&gt;
  &lt;br /&gt;
              Text {&lt;br /&gt;
                  id: curNum&lt;br /&gt;
                  font.bold: true; font.pointSize: 22&lt;br /&gt;
                  color: palette.text&lt;br /&gt;
                  anchors.right: container.right&lt;br /&gt;
                  anchors.rightMargin: 5&lt;br /&gt;
                  anchors.verticalCenter: container.verticalCenter&lt;br /&gt;
              }&lt;br /&gt;
  &lt;br /&gt;
              Text {&lt;br /&gt;
                  id: currentOperation&lt;br /&gt;
                  color: palette.text&lt;br /&gt;
                  font.bold: true; font.pointSize: 26&lt;br /&gt;
                  anchors.left: container.left&lt;br /&gt;
                  anchors.leftMargin: 5&lt;br /&gt;
                  anchors.verticalCenter: container.verticalCenter&lt;br /&gt;
              }&lt;br /&gt;
              &lt;br /&gt;
          }&lt;br /&gt;
          CalcButton { operation: &amp;quot;Bksp&amp;quot;; id: bksp; opacity: 0 }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
The Text area for the calculations, surrounded by dark border, with two text areas: the operation and the value. The operation (e.g. &amp;quot;*&amp;quot; to signal multiplication, is anchored left, and the calculation is anchored to the right.&lt;br /&gt;
&lt;br /&gt;
        Item {&lt;br /&gt;
            height:460; width: 420;&lt;br /&gt;
 &lt;br /&gt;
            Item {&lt;br /&gt;
                id: basicButtons&lt;br /&gt;
                x: 55; width: 460; height: 400&lt;br /&gt;
&lt;br /&gt;
The above defines the compound item of the basicButtons. The actual buttons are defined below. We intend by default this with 55 so that the buttons in basic layout don't feel like they are in the left side of the screen. This padding is changed in the transition to advanced layout.                &lt;br /&gt;
                &lt;br /&gt;
                Row {&lt;br /&gt;
                    id: commonOperations&lt;br /&gt;
                    spacing: 0&lt;br /&gt;
                    height:150&lt;br /&gt;
                        &lt;br /&gt;
                    CalcButton { &lt;br /&gt;
                        operation: &amp;quot;Advanced&amp;quot;&lt;br /&gt;
                        id: advancedCheckBox&lt;br /&gt;
                        width: 160&lt;br /&gt;
                        toggable: true&lt;br /&gt;
                    }&lt;br /&gt;
                    CalcButton { operation: &amp;quot;C&amp;quot;; id: c; }&lt;br /&gt;
                    CalcButton { operation: &amp;quot;AC&amp;quot;; id: ac;}&lt;br /&gt;
                    &lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
Common operations to clean the calcuations are on one row, along with speacial wider toggle button for advanced mode. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
                Grid {&lt;br /&gt;
                    id: numKeypad; y:60; spacing: 0; columns: 3&lt;br /&gt;
                    CalcButton { operation: &amp;quot;7&amp;quot; }&lt;br /&gt;
                    CalcButton { operation: &amp;quot;8&amp;quot; }&lt;br /&gt;
                    CalcButton { operation: &amp;quot;9&amp;quot; }&lt;br /&gt;
                    CalcButton { operation: &amp;quot;4&amp;quot; }&lt;br /&gt;
                    CalcButton { operation: &amp;quot;5&amp;quot; }&lt;br /&gt;
                    CalcButton { operation: &amp;quot;6&amp;quot; }&lt;br /&gt;
                    CalcButton { operation: &amp;quot;1&amp;quot; }&lt;br /&gt;
                    CalcButton { operation: &amp;quot;2&amp;quot; }&lt;br /&gt;
                    CalcButton { operation: &amp;quot;3&amp;quot; }&lt;br /&gt;
                    CalcButton { operation: &amp;quot;0&amp;quot; }&lt;br /&gt;
                    CalcButton { operation: &amp;quot;.&amp;quot; }&lt;br /&gt;
                    CalcButton { operation: &amp;quot;=&amp;quot; }                    &lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
Normal numbers and . and = keys are in grid layout&lt;br /&gt;
&lt;br /&gt;
                Column {&lt;br /&gt;
                    id: simpleOperations&lt;br /&gt;
                    x: 240;  y: 60; spacing: 0&lt;br /&gt;
                    CalcButton { operation: &amp;quot;x&amp;quot; }&lt;br /&gt;
                    CalcButton { operation: &amp;quot;/&amp;quot; }&lt;br /&gt;
                    CalcButton { operation: &amp;quot;-&amp;quot; }&lt;br /&gt;
                    CalcButton { operation: &amp;quot;+&amp;quot; }&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
Basic calculation operations are in one column (for easy layouting).&lt;br /&gt;
&lt;br /&gt;
            Grid {&lt;br /&gt;
                id: advancedButtons&lt;br /&gt;
                x: 250; spacing: 0; columns: 2; opacity: 0&lt;br /&gt;
                CalcButton { operation: &amp;quot;Abs&amp;quot; }&lt;br /&gt;
                CalcButton { operation: &amp;quot;Int&amp;quot; }&lt;br /&gt;
                CalcButton { operation: &amp;quot;MC&amp;quot; }&lt;br /&gt;
                CalcButton { operation: &amp;quot;Sqrt&amp;quot; }&lt;br /&gt;
                CalcButton { operation: &amp;quot;MR&amp;quot; }&lt;br /&gt;
                CalcButton { operation: &amp;quot;^2&amp;quot; }&lt;br /&gt;
                CalcButton { operation: &amp;quot;MS&amp;quot; }&lt;br /&gt;
                CalcButton { operation: &amp;quot;1/x&amp;quot; }&lt;br /&gt;
                CalcButton { operation: &amp;quot;M+&amp;quot; }&lt;br /&gt;
                CalcButton { operation: &amp;quot;+/-&amp;quot; }&lt;br /&gt;
            }&lt;br /&gt;
            Row {&lt;br /&gt;
              id: trigonometryOperations&lt;br /&gt;
              spacing: 0;opacity: 0;y: 280;x:40&lt;br /&gt;
              CalcButton { operation: &amp;quot;Sin&amp;quot; }&lt;br /&gt;
              CalcButton { operation: &amp;quot;Cos&amp;quot; }&lt;br /&gt;
              CalcButton { operation: &amp;quot;Tan&amp;quot; }&lt;br /&gt;
              CalcButton { operation: &amp;quot;Log&amp;quot; }&lt;br /&gt;
              CalcButton { operation: &amp;quot;e^x&amp;quot; }&lt;br /&gt;
              CalcButton { operation: &amp;quot;x^y&amp;quot; }&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
Advanced operations are in 2x5 grid and trigonometry operations are on one row. Easy positioning of those compound elements.&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    states: State {&lt;br /&gt;
        name: &amp;quot;Advanced&amp;quot;; when: advancedCheckBox.toggled == true&lt;br /&gt;
        PropertyChanges { target: basicButtons; x: 0 }&lt;br /&gt;
        PropertyChanges { target: bksp; opacity: 1 }&lt;br /&gt;
        PropertyChanges { target: commonOperations; x: 0;  }&lt;br /&gt;
        PropertyChanges { target: advancedButtons; x: 320; opacity: 1 }&lt;br /&gt;
        PropertyChanges { target: trigonometryOperations; x:0; y: 300; opacity: 1 }&lt;br /&gt;
        &lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
States definition for advanced mode. Basic mode doesn't need to be defined, as we have defined that already as the default mode of operation. For advanced state, we modify the bacspace to be visible, we move basic buttons a bit, we enable advanced and trigonometry buttons and move them a bit for visual candy.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    transitions: Transition {&lt;br /&gt;
        NumberAnimation { matchProperties: &amp;quot;x,y,width&amp;quot;; easing: &amp;quot;easeOutBounce&amp;quot;; duration: 500 }&lt;br /&gt;
        NumberAnimation { matchProperties: &amp;quot;opacity&amp;quot;; easing: &amp;quot;easeInOutQuad&amp;quot;; duration: 500 }&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Above defines the animations for the transition to and from advanced mode.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== CalcButton ==&lt;br /&gt;
The code below makes a button that has a glow effect when tapped on. &lt;br /&gt;
&lt;br /&gt;
import Qt 4.6&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 Rectangle {&lt;br /&gt;
    property alias operation: label.text&lt;br /&gt;
    property bool toggable: false&lt;br /&gt;
    property bool toggled: false&lt;br /&gt;
    signal clicked&lt;br /&gt;
    id: button; width: 80; height: 60&lt;br /&gt;
    color: &amp;quot;black&amp;quot;      &lt;br /&gt;
    BorderImage {&lt;br /&gt;
      id: img&lt;br /&gt;
      width: parent.width&lt;br /&gt;
      height: parent.height&lt;br /&gt;
      border.left: 14&lt;br /&gt;
      border.right: 14      &lt;br /&gt;
      source:&amp;quot;Button_h.png&amp;quot;&lt;br /&gt;
      transformOrigin: Item.Center  &lt;br /&gt;
      &lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    BorderImage {&lt;br /&gt;
      id: bgimg&lt;br /&gt;
      width: parent.width&lt;br /&gt;
      height: parent.height&lt;br /&gt;
      border.left: 14&lt;br /&gt;
      border.right: 14      &lt;br /&gt;
      source:&amp;quot;Button.png&amp;quot;  &lt;br /&gt;
    }&lt;br /&gt;
    Text { id: label; anchors.centerIn: parent; color: palette.buttonText }&lt;br /&gt;
&lt;br /&gt;
On the above, we define the bg of the button and the highlight of the button. THe highlight is img and the bg image is, well, bgimg.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    MouseRegion {&lt;br /&gt;
        id: clickRegion&lt;br /&gt;
        anchors.fill: parent&lt;br /&gt;
        onClicked: {&lt;br /&gt;
            doOp(operation);&lt;br /&gt;
            button.clicked();&lt;br /&gt;
            if (!button.toggable) return;&lt;br /&gt;
            button.toggled ? button.toggled = false : button.toggled = true&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
Above handles the mouse clicks.&lt;br /&gt;
&lt;br /&gt;
    states: [&lt;br /&gt;
        State {&lt;br /&gt;
            name: &amp;quot;Pressed&amp;quot;; when: clickRegion.pressed == true&lt;br /&gt;
            PropertyChanges { target: img; scale: 2.0 }&lt;br /&gt;
            PropertyChanges { target: button; z: 1 }&lt;br /&gt;
            PropertyChanges { target: button.parent; z: 1 }&lt;br /&gt;
            PropertyChanges { target: button.parent.parent; z: 1 }&lt;br /&gt;
            PropertyChanges { target: img; z: 1.1 }&lt;br /&gt;
            PropertyChanges { target: img; opacity: 0 }&lt;br /&gt;
            &lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
&lt;br /&gt;
Above defines state &amp;quot;pressed&amp;quot;, which triggers the highlight to come up all the way, moves all of the parent objects also up in the stack and sets target opacity for the highlight to be 0.&lt;br /&gt;
    &lt;br /&gt;
        transitions: Transition {&lt;br /&gt;
            NumberAnimation { matchProperties: &amp;quot;z,scale&amp;quot;; easing: &amp;quot;easeOutExpo&amp;quot;; duration: 200 }&lt;br /&gt;
            NumberAnimation { matchProperties: &amp;quot;opacity&amp;quot;; easing: &amp;quot;easeInQuad&amp;quot;; duration: 300 }&lt;br /&gt;
            &lt;br /&gt;
        }&lt;br /&gt;
Above defines the transitions for the button. &lt;br /&gt;
&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Calculator.js ==&lt;br /&gt;
&lt;br /&gt;
I won't comment the javascript code. It's self explanatory. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
var curVal = 0;&lt;br /&gt;
var memory = 0;&lt;br /&gt;
var lastOp = &amp;quot;&amp;quot;;&lt;br /&gt;
var timer = 0;&lt;br /&gt;
&lt;br /&gt;
function disabled(op) {&lt;br /&gt;
    if (op == &amp;quot;.&amp;quot; &amp;amp;&amp;amp; curNum.text.toString().search(/\./) != -1) {&lt;br /&gt;
        return true;&lt;br /&gt;
    } else if (op == &amp;quot;Sqrt&amp;quot; &amp;amp;&amp;amp;  curNum.text.toString().search(/-/) != -1) {&lt;br /&gt;
        return true;&lt;br /&gt;
    } else {&lt;br /&gt;
        return false;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function doOp(op) {&lt;br /&gt;
    if (disabled(op)) {&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    if (op.toString().length==1 &amp;amp;&amp;amp; ((op &amp;gt;= &amp;quot;0&amp;quot; &amp;amp;&amp;amp; op &amp;lt;= &amp;quot;9&amp;quot;) || op==&amp;quot;.&amp;quot;) ) {&lt;br /&gt;
        if (curNum.text.toString().length &amp;gt;= 14)&lt;br /&gt;
            return; // No arbitrary length numbers&lt;br /&gt;
        if (lastOp.toString().length == 1 &amp;amp;&amp;amp; ((lastOp &amp;gt;= &amp;quot;0&amp;quot; &amp;amp;&amp;amp; lastOp &amp;lt;= &amp;quot;9&amp;quot;) || lastOp==&amp;quot;.&amp;quot;) ) {&lt;br /&gt;
            curNum.text = curNum.text + op.toString();&lt;br /&gt;
        } else {&lt;br /&gt;
            curNum.text = op;&lt;br /&gt;
        }&lt;br /&gt;
        lastOp = op;&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
    lastOp = op;&lt;br /&gt;
&lt;br /&gt;
    // Pending operations&lt;br /&gt;
    if (currentOperation.text == &amp;quot;+&amp;quot;) {&lt;br /&gt;
        curNum.text = Number(curNum.text.valueOf()) + Number(curVal.valueOf());&lt;br /&gt;
    } else if (currentOperation.text == &amp;quot;-&amp;quot;) {&lt;br /&gt;
        curNum.text = Number(curVal) - Number(curNum.text.valueOf());&lt;br /&gt;
    } else if (currentOperation.text == &amp;quot;x&amp;quot;) {&lt;br /&gt;
        curNum.text = Number(curVal) * Number(curNum.text.valueOf());&lt;br /&gt;
    } else if (currentOperation.text == &amp;quot;x^y&amp;quot;) {&lt;br /&gt;
        curNum.text = (Math.pow(Number(curVal),curNum.text.valueOf())).toString();&lt;br /&gt;
    } else if (currentOperation.text == &amp;quot;/&amp;quot;) {&lt;br /&gt;
        curNum.text = Number(Number(curVal) / Number(curNum.text.valueOf())).toString();&lt;br /&gt;
    } else if (currentOperation.text == &amp;quot;=&amp;quot;) {&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    if (op == &amp;quot;+&amp;quot; || op == &amp;quot;-&amp;quot; || op == &amp;quot;x&amp;quot; || op==&amp;quot;x^y&amp;quot; || op == &amp;quot;/&amp;quot;) {&lt;br /&gt;
        currentOperation.text = op;&lt;br /&gt;
        curVal = curNum.text.valueOf();&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
    curVal = 0;&lt;br /&gt;
    currentOperation.text = &amp;quot;&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    // Immediate operations&lt;br /&gt;
    if (op == &amp;quot;1/x&amp;quot;) { // reciprocal&lt;br /&gt;
        curNum.text = (1 / curNum.text.valueOf()).toString();&lt;br /&gt;
    } else if (op == &amp;quot;^2&amp;quot;) { // squared&lt;br /&gt;
        curNum.text = (curNum.text.valueOf() * curNum.text.valueOf()).toString();&lt;br /&gt;
    } else if (op == &amp;quot;Abs&amp;quot;) {&lt;br /&gt;
        curNum.text = (Math.abs(curNum.text.valueOf())).toString();&lt;br /&gt;
    } else if (op == &amp;quot;Sin&amp;quot;) {&lt;br /&gt;
        curNum.text = (Math.sin(curNum.text.valueOf())).toString();&lt;br /&gt;
    } else if (op == &amp;quot;Cos&amp;quot;) {&lt;br /&gt;
        curNum.text = (Math.cos(curNum.text.valueOf())).toString();&lt;br /&gt;
    } else if (op == &amp;quot;Tan&amp;quot;) {&lt;br /&gt;
        curNum.text = (Math.tan(curNum.text.valueOf())).toString();&lt;br /&gt;
    } else if (op == &amp;quot;Log&amp;quot;) {&lt;br /&gt;
        curNum.text = (Math.log(curNum.text.valueOf())).toString();&lt;br /&gt;
    } else if (op == &amp;quot;e^x&amp;quot;) {&lt;br /&gt;
        curNum.text = (Math.exp(curNum.text.valueOf())).toString();&lt;br /&gt;
    } else if (op == &amp;quot;Int&amp;quot;) {&lt;br /&gt;
        curNum.text = (Math.floor(curNum.text.valueOf())).toString();&lt;br /&gt;
    } else if (op == &amp;quot;+/-&amp;quot;) { // plus/minus&lt;br /&gt;
        curNum.text = (curNum.text.valueOf() * -1).toString();&lt;br /&gt;
    } else if (op == &amp;quot;Sqrt&amp;quot;) { // square root&lt;br /&gt;
        curNum.text = (Math.sqrt(curNum.text.valueOf())).toString();&lt;br /&gt;
    } else if (op == &amp;quot;MC&amp;quot;) { // memory clear&lt;br /&gt;
        memory = 0;&lt;br /&gt;
    } else if (op == &amp;quot;M+&amp;quot;) { // memory increment&lt;br /&gt;
        memory += curNum.text.valueOf();&lt;br /&gt;
    } else if (op == &amp;quot;MR&amp;quot;) { // memory recall&lt;br /&gt;
        curNum.text = memory.toString();&lt;br /&gt;
    } else if (op == &amp;quot;MS&amp;quot;) { // memory set&lt;br /&gt;
        memory = curNum.text.valueOf();&lt;br /&gt;
    } else if (op == &amp;quot;Bksp&amp;quot;) {&lt;br /&gt;
        curNum.text = curNum.text.toString().slice(0, -1);&lt;br /&gt;
    } else if (op == &amp;quot;C&amp;quot;) {&lt;br /&gt;
        curNum.text = &amp;quot;0&amp;quot;;&lt;br /&gt;
    } else if (op == &amp;quot;AC&amp;quot;) {&lt;br /&gt;
        curVal = 0;&lt;br /&gt;
        memory = 0;&lt;br /&gt;
        lastOp = &amp;quot;&amp;quot;;&lt;br /&gt;
        curNum.text =&amp;quot;0&amp;quot;;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;/div&gt;</description>
			<pubDate>Sun, 03 Jan 2010 19:56:03 GMT</pubDate>			<dc:creator>konttori</dc:creator>			<comments>http://bugs.maemo.com/Talk:QML-EnhancedCalcExample</comments>		</item>
	</channel>
</rss>