Book Image

Building Mapping Applications with QGIS

By : Erik Westra
Book Image

Building Mapping Applications with QGIS

By: Erik Westra

Overview of this book

Table of Contents (16 chapters)
Building Mapping Applications with QGIS
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
1
Getting Started with QGIS
Index

Connecting the actions


You might have noticed that none of the menu commands and toolbar icons do anything yet—even the Quit command doesn't work. Before our actions do anything, we have to connect them to the appropriate method. To do this, add the following to your MapExplorer.__init__() method, immediately after the call to setupUi():

        self.connect(self.actionQuit,
                     SIGNAL("triggered()"), qApp.quit)
        self.connect(self.actionShowBasemapLayer,
                     SIGNAL("triggered()"), self.showBasemapLayer)
        self.connect(self.actionShowLandmarkLayer,
                     SIGNAL("triggered()"),
                     self.showLandmarkLayer)
        self.connect(self.actionZoomIn,
                     SIGNAL("triggered()"), self.zoomIn)
        self.connect(self.actionZoomOut,
                     SIGNAL("triggered()"), self.zoomOut)
        self.connect(self.actionPan,
                     SIGNAL("triggered()"), self.setPanMode)
        self.connect...