Another QGIS plugin idea I have had is to create a method of splitting the map canvas within QGIS to have two side-by-side maps that can track and interact with each other. There are lots of possibilities for this type of “reconfiguring” of the QGIS interface on the fly via plugins, so I decided to dive in and give it a go.
Here is a link to a video showing some of the basic operation of the MirrorMap plugin.
*** This plugin is very “Alpha” in that it makes the size of the map canvas static after invoking the plugin (until you launch QGIS again), does not handle layers of differing projections, does not allow for re-ordering layers in the mirror canvas, and many other deficiencies I am sure. But hey, its just a test!

MirrorMap in action
GIS Tool Dev, General
Well, the title might better read “debugging PyQt applications…”, but much of my PyQt foo happens when developing QGIS plugins. In general I am old school… emacs and gdb are my friends. When it comes to developing in PyQt there is one life saving code snip that will make your life much easier:
from PyQt4 import QtCore
import pdb
...
QtCore.pyqtRemoveInputHook()
pdb.set_trace()
This not only sets a trace (breakpoint) in your code, but it stops the PyQt event loop. The call to pyqtRemoveInputHook() is a tasty little tidbit in PyQt to allow for this “stop it in it’s tracks” behavior. This is a must have for debugging PyQGIS or Python based plugins.
Once you are in pdb, you are set to go with interactive debugging:
--Return--
> /home/aaronr/.qgis/python/plugins/refmap/refmap.py(101)__init__()->None
-> pdb.set_trace()
(Pdb) bt
<string>(1)<module>()
/home/aaronr/.qgis/python/plugins/refmap/refmap.py(144)initGui()
-> self.refmap_gui = ReferenceMapWindow(self.iface,flags,self)
> /home/aaronr/.qgis/python/plugins/refmap/refmap.py(101)__init__()->None
-> pdb.set_trace()
(Pdb) print self
<refmap.refmap.ReferenceMapWindow object at 0x8cc6c2c>
(Pdb) print self.iface.mainWindow().windowTitle()
Quantum GIS - 1.1.0-Unstable-trunk
(Pdb)
Happy debugging!!!
GIS Tool Dev, General
http://blog.qgis.org/?q=node/104
As I noted over on the QGIS blog I have started to organize my python plugins and will be adding more soon.
GIS Tool Dev, General
Well, I got Ubuntu 7.10 installed on an 8 gig SDHC card and away I go…
4.5 gigs used for the base Ubuntu system as well as the base GIS software:
1) Proj4 (4.6.0)
2) GDAL/OGR (1.5.0)
3) GEOS (3.0.0)
4) Postgresql (8.2.5)
5) PostGIS (1.3.2)
6) QT dev environment (4.3.2)
7) QGIS svn (0.9.2)
What do you get? Well, an ultra portable GIS workstation weighing in at less than 2 lbs that is very fun!
Check out a video:
http://www.reprojected.com/presentations/Videos/eee_qgis_install/eee_qgis_install.html
GIS Tool Dev, GIS Tool Install, General