• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python base_module.RanaModule类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中modules.base_module.RanaModule的典型用法代码示例。如果您正苦于以下问题:Python RanaModule类的具体用法?Python RanaModule怎么用?Python RanaModule使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了RanaModule类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: __init__

    def __init__(self, m, d, i):
        RanaModule.__init__(self, m, d, i)

        self.defaultTheme = constants.DEFAULT_THEME_ID
        self.cantLoad = []
        self.imageOrderList = [] # for cache trimming
        self.maxImages = 200 # default 200
        self.images = {}

        self.currentTheme = self.defaultTheme
        self.themeList = []

        # structure -> color_key:color_object
        self.defaultColors = {} # default color set
        self.colors = {} # main combined color set
        defaultThemeConfig = os.path.join(
            self.modrana.paths.getThemesFolderPath(),
            self.defaultTheme,
            'theme.conf'
        )
        # TODO: make themes GUI toolkit independent
        if gs.GUIString == "GTK":
            # load the default set of colors
            defaultColors = self.loadColorsFromFile(defaultThemeConfig)
            self.defaultColors = defaultColors
            self.colors = defaultColors.copy()
            self.colorInfoSubscribers = {}

            #color shortcuts
            self.buttonOutlineColor = (0, 0, 0, 1)
            self.buttonFillColor = (1, 1, 1, 1)
开发者ID:EdwinTauro,项目名称:modrana,代码行数:31,代码来源:mod_icons.py


示例2: __init__

    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)
        self.status = "Unknown"
        self._enabled = False
        self.provider = None
        self.startSignal = Signal()
        self.stopSignal = Signal()

        # check if the device handles location by itself
        if not self.modrana.dmod.handlesLocation():
            method = self.modrana.dmod.getLocationType()
            if method == "qt_mobility":
                print(" @ location: using Qt Mobility")
                from . import qt_mobility

                self.provider = qt_mobility.QtMobility(self)
            elif method == "gpsd": # GPSD
                print(" @ location: using GPSD")
                from . import gps_daemon

                self.provider = gps_daemon.GPSD(self)

        # watch if debugging needs to be enabled
        self.modrana.watch("gpsDebugEnabled", self._debugCB, runNow=True)
开发者ID:EdwinTauro,项目名称:modrana,代码行数:30,代码来源:mod_location.py


示例3: __init__

 def __init__(self, m, d, i):
     RanaModule.__init__(self, m, d, i)
     self.loggingEnabled = False
     self.loggingPaused = False
     self.loggingStartTimestamp = None
     self.logInterval = 1 #loggin interval in seconds
     self.saveInterval = 10 #saving interval in seconds
     self.lastUpdateTimestamp = None
     self.lastCoords = None
     self.logName = None #name of the current log
     self.logFilename = None #name of the current log
     self.logPath = None #path to the current log
     self.currentTempLog = []
     # primary and secondary AOWay objects for
     # persistent log storage during logging
     self.log1 = None
     self.log2 = None
     # timer ids
     self.updateLogTimerId = None
     self.saveLogTimerId = None
     # statistics
     self.maxSpeed = None
     self.avg1 = 0
     self.avg2 = 0
     self.avgSpeed = None
     self.distance = None
     self.toolsMenuDone = False
     self.category = 'logs'
     # trace
     self.traceColor = 'blue'
     self.lastTracePoint = None
     self.traceIndex = 0
     self.pxpyIndex = deque()
开发者ID:starhawking,项目名称:modrana,代码行数:33,代码来源:mod_tracklog.py


示例4: __init__

 def __init__(self, *args, **kwargs):
     RanaModule.__init__(self, *args, **kwargs)
     self.nodes = []
     self.pos = 0
     self.numNodes = 0
     self.updateTime = 0
     self.replayPeriod = 1 # second
开发者ID:fferner,项目名称:modrana,代码行数:7,代码来源:_mod_replayGpx.py


示例5: __init__

 def __init__(self, m, d, i):
     RanaModule.__init__(self, m, d, i)
     self.nodes = []
     self.pos = 0
     self.numNodes = 0
     self.updateTime = 0
     self.replayPeriod = 1 # second
开发者ID:EdwinTauro,项目名称:modrana,代码行数:7,代码来源:_mod_replayGpx.py


示例6: __init__

    def __init__(self, m, d, i):
        RanaModule.__init__(self, m, d, i)
        self.layers = {}
        self.threadLayers = {}
        self.currentStorageVersion = 1
        self.maxDbFileSizeGibiBytes = 3.7 # maximum database file size (to avoid the FAT32 file size limitation) in GibiBytes
        self.maxTilesInQueue = 50
        self.sqliteTileQueue = Queue.Queue(self.maxTilesInQueue)
        """if there are more tiles in the buffer than maxTilesInBuffer,
           the whole buffer will be processed at once (flushed) to avoid a potential memory leak
        """
        self.processPerUpdate = 1 #how many tiles will be processed per update (updates should happen every 100ms)
        self.commitInterval = 5 # how often we commit to the database (only happens when there is something in the queue)
        self.lastCommit = time.time()
        self.dirty = set() # a set of connections, that have uncommitted data
        # locks

        # TODO: this lock might not be needed for python2.6+,
        # as their sqlite version should be thread safe

        self.lookupConnectionLock = threading.RLock()

        self._mapTiles = None
        self._mapLayers = None

        self.tileFolder = "/dev/null"
开发者ID:starhawking,项目名称:modrana,代码行数:26,代码来源:mod_storeTiles.py


示例7: __init__

 def __init__(self, *args, **kwargs):
     RanaModule.__init__(self, *args, **kwargs)
     self.workerThreads = []
     self.drawOverlay = False
     self.workStartTimestamp = None
     self._connectingCondition = threading.Condition()
     # TODO: move to location ?
     self._initGPSCondition = threading.Condition()
开发者ID:fferner,项目名称:modrana,代码行数:8,代码来源:mod_onlineServices.py


示例8: __init__

 def __init__(self, m, d, i):
     RanaModule.__init__(self, m, d, i)
     self.espaekProcess = None
     # this lock is used to make sure there is only one voice speaking at once
     self.voiceLock = threading.Lock()
     # default espeak string for manual editing
     self.defaultStrings = {"espeak": "espeak -v %language% -s 120 -a %volume% -m %qmessage%"}
     self.defaultProvider = "espeak"
开发者ID:starhawking,项目名称:modrana,代码行数:8,代码来源:mod_voice.py


示例9: __init__

 def __init__(self, *args, **kwargs):
     RanaModule.__init__(self, *args, **kwargs)
     self.tempOnlinePOI = None # temporary slot for an uncommitted POI from online search
     # to which menu to return after the POI is stored
     # NOTE: False => unset, None => map screen
     self.menuNameAfterStorageComplete = False
     # connect to the POI database
     self._db = self.connect_to_database()
开发者ID:M4rtinK,项目名称:modrana,代码行数:8,代码来源:mod_storePOI.py


示例10: __init__

 def __init__(self, m, d, i):
     RanaModule.__init__(self, m, d, i)
     self.activePOI = None
     self.visiblePOI = []
     self.listMenusDirty = False
     self.drawActivePOI = False
     self.expectPoint = False
     self.expectLock = threading.Lock()
开发者ID:EdwinTauro,项目名称:modrana,代码行数:8,代码来源:mod_showPOI.py


示例11: __init__

 def __init__(self, m, d, i):
     RanaModule.__init__(self, m, d, i)
     self.tracklogs = {} # dictionary of all loaded tracklogs, path is the key
     #self.set('tracklogs', self.tracklogs) # now we make the list easily acessible to other modules
     self.cache = {}
     self.tracklogList = []
     self.tracklogPathList = []
     self.categoryList = []
开发者ID:EdwinTauro,项目名称:modrana,代码行数:8,代码来源:mod_loadTracklogs.py


示例12: __init__

 def __init__(self, *args, **kwargs):
     RanaModule.__init__(self, *args, **kwargs)
     self.beforeDraw()
     self.ignoreNextClicks = 0
     self.layers = {2: [], 0: []}
     self.dragAreas = []
     self.dragScreen = None
     self.timedActionInProgress = None
开发者ID:fferner,项目名称:modrana,代码行数:8,代码来源:mod_clickHandler.py


示例13: __init__

 def __init__(self, *args, **kwargs):
     RanaModule.__init__(self, *args, **kwargs)
     self.lines = ['hello', 'world']
     self.oldLines = ['', '']
     self.mode = 0
     self.isGraphical = False
     self.modes = ['pos', 'gps', 'road', 'speed', 'maxSpeed', 'bearing', 'time']
     self.unitString = ""
开发者ID:fferner,项目名称:modrana,代码行数:8,代码来源:_mod_infoOverlay.py


示例14: __init__

 def __init__(self, m, d, i):
     RanaModule.__init__(self, m, d, i)
     """
     # we consider 2km/h as as stationary
     (to filter out the standard GPS drift while not moving)
     """
     self.notMovingSpeed = 2
     self._updateUnitTable()
开发者ID:EdwinTauro,项目名称:modrana,代码行数:8,代码来源:mod_units.py


示例15: __init__

    def __init__(self, *args, **kwargs):
        RanaModule.__init__(self, *args, **kwargs)
        self.points = []

        if 0: # to test
            m = self.m.get("menu", None)
            if m:
                m.clearMenu('sketch', "set:menu:None")
                self.set("menu", "sketch")
开发者ID:fferner,项目名称:modrana,代码行数:9,代码来源:mod_sketch.py


示例16: __init__

 def __init__(self, *args, **kwargs):
     RanaModule.__init__(self, *args, **kwargs)
     self.minimalSpeed = 2 #  in kmh, we don't update the avg speed if the current speed is like this
     self.lastT = None
     self.maxSpeed = 0
     self.avg1 = 0
     self.avg2 = 0
     # update stats once new position info is available
     self.modrana.watch('locationUpdated', self.updateStatsCB)
开发者ID:fferner,项目名称:modrana,代码行数:9,代码来源:mod_stats.py


示例17: __init__

    def __init__(self, *args, **kwargs):
        RanaModule.__init__(self, *args, **kwargs)

        self.xyValid = False
        self.llValid = False
        self.needsEdgeFind = False

        # Scale is the number of display pixels per projected unit
        self.scale = tileSizePixels()
开发者ID:fferner,项目名称:modrana,代码行数:9,代码来源:mod_projection.py


示例18: __init__

 def __init__(self, *args, **kwargs):
     RanaModule.__init__(self, *args, **kwargs)
     self._layers = {}
     self._groups = {}
     self._tree = {}
     # TODO: actually support runtime layer reconfiguration
     # and use this signal
     self.layersChanged = Signal()
     # parse the config file
     self._parseConfig()
开发者ID:fferner,项目名称:modrana,代码行数:10,代码来源:mod_mapLayers.py


示例19: __init__

    def __init__(self, *args, **kwargs):
        RanaModule.__init__(self, *args, **kwargs)
        self.items = None
        self.routeProfileData = None
        self.nearestPoint = None
        self.nearestIndex = None
        self.distanceList = None # sorted distances from current position

        # colors
        self.widgetBackgroundColor = (0, 0, 1, 0.45) # transparent blue
        self.widgetTextColor = (1, 1, 1, 0.95) # slightly transparent white
开发者ID:M4rtinK,项目名称:modrana,代码行数:11,代码来源:mod_showOSD.py


示例20: __init__

 def __init__(self, *args, **kwargs):
     RanaModule.__init__(self, *args, **kwargs)
     self.localSearchResults = None # GLS results from onlineServices
     self.scroll = 0
     self.list = None # processed results: (distance from pos, result, absolute index)
     self.maxIndex = 0 # based on the number of items in the list
     self.where = 'position'
     self.menuWatchId = None
     self.filters = {}
     # names of marker groups used for search results
     self._relatedMarkerGroups = ["addressResults", "wikipediaResults"]
开发者ID:fferner,项目名称:modrana,代码行数:11,代码来源:mod_search.py



注:本文中的modules.base_module.RanaModule类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python blankspace.remove_whitespaces函数代码示例发布时间:2022-05-27
下一篇:
Python Progress.updateProgress函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap