Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(176)  |  Call(176)  |  Derive(0)  |  Import(0)

src/m/o/modrana-HEAD/modules/mod_messages.py   modrana(Download)
                    if value == str(i):
                        value = i
                self.set(key, value)
 
            elif module == 'toggle': # toggle a boolean value in the persistent dict
                self.set(text, not self.get(text, 0))
                    if value == str(i):
                        value = i
                self.set(key, value, mode=mode)
 
            elif module == "setWithCurrentMode":
                        value = i
                mode = self.get('mode', 'car')
                self.set(key, value, mode=mode)
 
            else:

src/m/o/modrana-HEAD/modules/mod_route/mod_route.py   modrana(Download)
        self.osdMenuState = None
 
        self.set('startPos', None)
        self.set('endPos', None)
 
        self.pxpyRoute = [] # route in screen coordinates
        self.directions = [] # directions object
        self.set('midText', [])
        self.durationString = None # in seconds
        self.start = None
    def handleMessage(self, message, messageType, args):
        if message == "clear":
            self._goToInitialState()
            self.set('startPos', None)
            self.set('endPos', None)

src/m/o/modrana-HEAD/modules/mod_location/mod_location.py   modrana(Download)
    def __init__(self, m, d, i):
        RanaModule.__init__(self, m, d, i)
        self.tt = 0
        self.connected = False
        self.set('speed', None)
        self.set('metersPerSecSpeed', None)
        self.set('bearing', None)
        self.set('elevation', None)
            sFromLastRequest = time() - self.modrana.gui.getLastFullRedrawRequest()
            if sFromLastRequest > 0.85:
                self.set('needRedraw', True)
 
    def _debugCB(self, key, oldValue, newValue):

src/m/o/modrana-HEAD/modules/mod_showTracklogs.py   modrana(Download)
                if nItem in visibleTracklogs:
                    del visibleTracklogs[nItem]
            self.set('visibleTracklogsDict', visibleTracklogs)
 
            # from the input list
        else:
            visibleTracklogs[path] = {'colorName': self.getDistinctColorName()}
            self.set('visibleTracklogsDict', visibleTracklogs)
        self.set('showTracklog', 'simple')
        return
        if path in visibleTracklogs:
            del visibleTracklogs[path]
        self.set('visibleTracklogsDict', visibleTracklogs)
 
 
    def setTrackColor(self, path, colorName):
        visibleTracklogs = self.get('visibleTracklogsDict', {})
        if path in visibleTracklogs:
            visibleTracklogs[path]['colorName'] = colorName
            self.set('visibleTracklogsDict', visibleTracklogs)

src/m/o/modrana-HEAD/modules/mod_showPOI.py   modrana(Download)
                    with self.expectLock: # nobody expects a lock here
                        self.expectPoint = True # turn on registering the whole screen clickable
                    self.set('menu', None)
                    self.sendMessage('ml:notification:m:Tap on the map to add POI;3')
                    self.set('needRedraw', True)
                    self.listMenusDirty = True
                    # go to the new POI menu
                    self.set('menu', 'showPOI#POIDetail')
 
            elif message == 'checkMenus':
                self.makePOIVisible(self.activePOI)
                self.drawPOI()
                self.set('menu', None)
                self.set('needRedraw', True)
 

src/m/o/modrana-HEAD/modules/mod_mapView.py   modrana(Download)
    def handleMessage(self, message, messageType, args):
        z = self.get('z', 15)
        if message == 'zoomIn':
            newZ = z + 1
            self.set('z', newZ)
        elif message == 'zoomOut':
            newZ = max(z - 1, 4)
            self.set('z', newZ)
            proj = self.m.get('projection', None)
            if proj:
                    zoom = z
                proj = self.m.get('projection', None)
                self.set("centred", False) # turn off centering before moving screen to the coordinates
                proj.recentre(lat, lon, zoom)
            except Exception:
            if proj:
                proj.nudge(dx, dy)
                self.set('needRedraw', True)
 
    def handleCentring(self):
        if proj and pos:
            (lat, lon) = pos
            self.set('map_centre', pos)
            z = int(self.get('z', 15))
            if not self.d.has_key('viewport'):

src/m/o/modrana-HEAD/modules/mod_search.py   modrana(Download)
            if self.scroll > 0:
                self.scroll -= 1
                self.set("needRedraw", True)
        elif (message == "down") and self.scroll < self.maxIndex:
            print("down")
            self.scroll += 1
            self.set("needRedraw", True)
        elif message == "reset":
            self.scroll = 0
            self.set("needRedraw", True)
            self.sendMessage('route:clearRoute|md:route:route:type=pos2ll;toLat=%f;toLon=%f;show=start' % (lat, lon))
 
        self.set("needRedraw", True)
 
 
        if results:
            self.localSearchResults = results
            self.set('menu', 'search#searchResults')
 
    def _handleWikipediaResultsCB(self, results):

src/m/o/modrana-HEAD/modules/mod_mapData/mod_mapData.py   modrana(Download)
            if self.scroll > 0:
                self.scroll -= 1
                self.set('needRedraw', True)
        elif message == "down":
            print("down")
            self.scroll += 1
            self.set('needRedraw', True)
        elif message == "reset":
            self.scroll = 0
            self.set("needRedraw", True)
            # -> look at the map OR the batch progress :)**
            (x1, y1, w, h) = self.get('viewport', None)
            self.set('dataMenu', 'edit')
            menus = self.m.get("menu", None)
            self.set("batchMenuEntered", True)

src/m/o/modrana-HEAD/modules/mod_menu.py   modrana(Download)
    def needRedraw(self):
        """convenience function for asking for redraw"""
        self.set('needRedraw', True)
 
    def showText(self, cr, text, x, y, widthLimit=None, fontSize=40, colorString=None):
        if menu is None:
            print("Menu %s doesn't exist, returning to main screen" % menuName)
            self.set('menu', None)
            self.set('needRedraw', True)
            return
            persist = self.get('persistentToggleButtons', None)
            if persist is None:
                self.set('persistentToggleButtons', {})
                persist = {}
 
            if uniqueName in persist:
                index = persist[uniqueName]
            else:
                persist[uniqueName] = index
                self.set('persistentToggleButtons', persist)

src/m/o/modrana-HEAD/modules/mod_tracklog.py   modrana(Download)
                print("tracklog: resuming the logging")
                self.loggingPaused = False
            self.set('needRedraw', True)
 
        elif message == "pauseLogging":
            self.pauseLogging()
            self.set('needRedraw', True)
            print("tracklog: stopping logging")
            self.stopLogging()
            self.set('needRedraw', True)
 
        elif message == 'nameInput':
                entryText = logNameEntry
            entry.entryBox(self, 'logNameEntry', 'Write tracklog name', entryText)
            self.set('needRedraw', True)
 
        elif message == 'clearTrace':
    def handleTextEntryResult(self, key, result):
        if key == 'logNameEntry':
            self.set('logNameEntry', result)
 
    def initLog(self, logType='gpx', name=None):

  1 | 2 | 3  Next