Graphics Reference
In-Depth Information
Along with the map itself, our application will sport a toolbar and a menu bar, both of
which let the user access the various features of the system. The following actions will be
available in the toolbar and menu bar:
Zoom in : This will let the user zoom in on the map.
Zoom out : This lets the user zoom out.
Pan : This is the pan mode we implemented earlier, which allows the user to move
around on the map.
Edit : Clicking on this item will turn on the track editing mode. If we are already
in the track editing mode, clicking on it again will prompt the user to save their
changes before turning off the editing mode.
Add track : This lets the user add a new track. Note that this item is only avail-
able while in the track editing mode.
Edit track : This lets the user edit an existing track. This is only enabled if the
user is in the track editing mode.
Delete track : This lets the user delete a track. This is only available in the track
editing mode.
Get info : This enables the Get Info map tool. When the user clicks on a track, this
tool will display the attributes for that track, and allow the user to make changes
to those attributes.
Set start point : This lets the user set the current starting point for the shortest
path calculation.
Set end point : This item lets the user click on the map to set the ending point for
the shortest path calculation.
Find the shortest path : This displays the shortest available path between the cur-
rent starting and ending points. Clicking on this item again will hide the path.
This gives us a good idea of what our application should look like, and how it will work.
Let's now start writing our ForestTrails program by implementing the basic logic for the
application and its main window.
Search WWH ::




Custom Search