-__all__ = [ 'config' , 'db' , 'gps' , 'wifiscan' , 'view' ]
+__all__ = [ 'config' , 'db' , 'gps' , 'wifiscan' , 'scanner' , 'view' ]
from config import *
from wifiscan import *
+from scanner import *
+
from view import *
+from replay import *
+
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
+
self.config = wifimap.config.Configuration()
self.config.zoom = 16
- self.map = wifimap.mapWidget( self.config )
+ self.map = wifimap.simpleMapWidget( self.config )
self.map.plot_APs()
self.add( self.map )
self.config = wifimap.config.Configuration()
self.config.zoom = 16
- self.add( wifimap.mapWidget( self.config , (640,400) ) )
+ self.add( wifimap.simpleMapWidget( self.config , (640,400) ) )
class Wifiscanner ( AbstractWifiscanner , gtk.Window ) :