<div>I started working on something similar the other day as I could not get this patch to apply and thought about a different way of going about it.</div><div><br></div><div>The general idea is to use a QMdiArea(tabbed or floating) as the central widget for QGisApp class.  You can then create a new window using QMdiArea.addSubWindow(QgsMapCanvas).  You would then connect to the sub window changed event to know when the user changed windows in order to update the legend, undo stack, tool etc.</div>

<div><br></div><div>The general layout and rules are:</div><div><ol><li>There is only one active canvas at a time.</li><li>The active canvas is stored in the mMapCanvas QgisApp variable.  This is updated when the user clicks on the map or tab eg on s<meta http-equiv="content-type" content="text/html; charset=utf-8">ubWindowChanged signal</li>

<li>When the user clicks a tool it sets the tool for the current canvas active via.  mMapCanvas.setMapTool({maptool}  the map tools canvas is updated using {maptool}.setCanvas(mMapCanvas).  This means there is only one instance of {mapTool} just it&#39;s canvas gets changed.</li>

<li>On <meta http-equiv="content-type" content="text/html; charset=utf-8">subWindowChanged the legends canvas is updated to reflect the new maps layers.</li><li>Opening a vector layer opens it in the curent active canvas.</li>

<li>Try a limit the amount of new code code added, try and use as much that is already there.</li><li>Being able to switch between tabbed or floating windows would be very powerful.</li></ol>I know this is no easy task, no matter which way you run with it.  And there a lot of user cases which needed to be taken into account.</div>

<div><br></div><div>I was thinking about pushing what I have to git hub tonight if anyone is interested.</div><div><br></div><div>Just my thoughts on the subject.</div><div><br></div><div>- NathanW  </div><div><br><div class="gmail_quote">

On Wed, Feb 9, 2011 at 10:11 AM, Tim Sutton <span dir="ltr">&lt;<a href="mailto:tim@linfiniti.com" target="_blank">tim@linfiniti.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



Hi<br>
<br>
<br>
<br>
On Thu, Jan 13, 2011 at 6:15 PM, Marco Hugentobler<br>
<div>&lt;<a href="mailto:marco.hugentobler@sourcepole.ch" target="_blank">marco.hugentobler@sourcepole.ch</a>&gt; wrote:<br>
</div><div>&gt; Hi Massimo<br>
&gt;<br>
&gt; My apologies. Yes, the patch got forgotten after the Vienna hackfest. I<br>
&gt; remember it was postponed because of a release and not taken afterwards.<br>
&gt;<br>
&gt;&gt; just having it fixed to be able to apply it on the actual trunk .. should<br>
&gt;&gt; be a good first step<br>
&gt;<br>
&gt; That would be great. After porting it to trunk, please assign it to Tim (app<br>
&gt; guru in the dev team).<br>
<br>
</div>I am just following up on this - did you manage to port your work to<br>
trunk? My apologies if you already mentioned this and I missed the<br>
notice.<br>
<br>
Regards<br>
<br>
Tim<br>
<br>
8&lt;----------snip------------<br>
<br>
--<br>
<font color="#888888">Tim Sutton - QGIS Project Steering Committee Member (Release  Manager)<br>
==============================================<br>
Visit <a href="http://linfiniti.com" target="_blank">http://linfiniti.com</a> to find out about:<br>
 * QGIS programming services<br>
 * Mapserver and PostGIS based hosting plans<br>
 * FOSS Consulting Services<br>
Skype: timlinux Irc: timlinux on #qgis at <a href="http://freenode.net" target="_blank">freenode.net</a><br>
==============================================<br>
</font><div><div></div><div>_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org" target="_blank">Qgis-developer@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</div></div></blockquote></div><br></div>