Spatial Galaxy

Exploring the depths of open source GIS and more

Why QGIS Class Names Start With Qgs

If you’re a developer, or have looked at the QGIS source code, you’ve likely noticed that most C++ classes in the project start with Qgs.

Back before the dark ages of QGIS, Trolltech (now Digia) allowed you to reserve name prefixes for classes that used the Qt framework.

Shortly afterwards, I reserved the gs prefix for my use, resulting in class names that start with Qgs.

You might think this is based on some mangling of words like QGIS or perhaps GIS, but it was purely egocentric:

/images/qgs_prefix.png

As far as I can tell, reservation of prefix names is no longer possible. For a view into what it was like back then, take a look at the Internet Archive:

http://web.archive.org/web/20030303075955/http://www.trolltech.com/documentation/naming.html

Although the choice of prefix wasn’t based on technology or discipline, years later it seems to fit…

Comments