[Qgis-developer] multi-view
Nathan Woodrow
madmanwoo at gmail.com
Tue Feb 8 21:55:31 EST 2011
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.
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.
The general layout and rules are:
1. There is only one active canvas at a time.
2. The active canvas is stored in the mMapCanvas QgisApp variable. This
is updated when the user clicks on the map or tab eg on subWindowChanged
signal
3. 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's canvas gets changed.
4. On subWindowChanged the legends canvas is updated to reflect the new
maps layers.
5. Opening a vector layer opens it in the curent active canvas.
6. Try a limit the amount of new code code added, try and use as much
that is already there.
7. Being able to switch between tabbed or floating windows would be very
powerful.
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.
I was thinking about pushing what I have to git hub tonight if anyone is
interested.
Just my thoughts on the subject.
- NathanW
On Wed, Feb 9, 2011 at 10:11 AM, Tim Sutton <tim at linfiniti.com> wrote:
> Hi
>
>
>
> On Thu, Jan 13, 2011 at 6:15 PM, Marco Hugentobler
> <marco.hugentobler at sourcepole.ch> wrote:
> > Hi Massimo
> >
> > My apologies. Yes, the patch got forgotten after the Vienna hackfest. I
> > remember it was postponed because of a release and not taken afterwards.
> >
> >> just having it fixed to be able to apply it on the actual trunk ..
> should
> >> be a good first step
> >
> > That would be great. After porting it to trunk, please assign it to Tim
> (app
> > guru in the dev team).
>
> I am just following up on this - did you manage to port your work to
> trunk? My apologies if you already mentioned this and I missed the
> notice.
>
> Regards
>
> Tim
>
> 8<----------snip------------
>
> --
> Tim Sutton - QGIS Project Steering Committee Member (Release Manager)
> ==============================================
> Visit http://linfiniti.com to find out about:
> * QGIS programming services
> * Mapserver and PostGIS based hosting plans
> * FOSS Consulting Services
> Skype: timlinux Irc: timlinux on #qgis at freenode.net
> ==============================================
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20110209/888131d0/attachment.html
More information about the Qgis-developer
mailing list