self.composeMap()
self.show()
-class mapWidget ( AbstractmapWidget , gtk.Image ) :
+class simpleMapWidget ( AbstractmapWidget , gtk.Image ) :
def __init__ ( self , config , map_size=(800,480) ) :
AbstractmapWidget.__init__( self , config , map_size )
del(pixbuf)
self.draw_paths()
+ self.plot_APs()
def draw_paths( self ) :
pixmap.draw_rectangle(blue, True , dest_x , dest_y , 3 , 3 )
fd.close()
- db = wifimap.db.database( os.path.join( self.conf.homedir , self.conf.dbname ) )
- db.open()
- for ap in db.db.execute( "SELECT * FROM ap" ) :
- if ap[3] > 1 :
- dest_x , dest_y = self.gps2pix( ( ap[4]/ap[3] , ap[5]/ap[3] ) , ( center_x , center_y ) )
- pixmap.draw_rectangle(red, True , dest_x , dest_y , 3 , 3 )
- db.close()
-
self.get_pixbuf().get_from_drawable( pixmap , pixmap.get_colormap() , 0, 0 , 0 , 0 , self.win_x, self.win_y )
def plot_APs( self ) :
self.get_pixbuf().get_from_drawable( pixmap , pixmap.get_colormap() , 0, 0 , 0 , 0 , self.win_x, self.win_y )
+class mapWidget ( simpleMapWidget , interactiveMapWidget ) :
+
+ pass
+