Graphics Reference
In-Depth Information
This is very similar to the __init__() method for the Lex application; we'll define the
Ui_MainWindow class in the ui_mainWindow.py module to set up the application's
user interface. This is where all those actionXXX instance variables will be defined. In
our __init__() method, we're connecting these actions to various methods, which will
respond when the user selects the action from the toolbar or menu bar.
The rest of the __init__() method simply sets up a map canvas and lays it out within
the window. With this method behind us, we can now define all those action-handling
methods. We can borrow two of these directly from lex.py :
def zoomIn(self):
self.mapCanvas.zoomIn()
def zoomOut(self):
self.mapCanvas.zoomOut()
For the rest, we'll hold off on implementing them until the application is a bit more com-
plete. To allow our program to run, we'll set up empty placeholder methods for the re-
maining action handlers:
def quit(self):
pass
def setPanMode(self):
pass
def setEditMode(self):
pass
def addTrack(self):
pass
def editTrack(self):
pass
def deleteTrack(self):
pass
def getInfo(self):
Search WWH ::




Custom Search