ascii_qgis.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:ascii_qgis 作者: NathanW2 项目源码 文件源码
def main(screen):
    """
    Main entry point
    :param screen:
    :return:
    """
    logging.info("Supports color: {}".format(curses.can_change_color()))
    logging.info("Colors: {}".format(curses.COLORS))
    logging.info("Color Pairs: {}".format(curses.COLOR_PAIRS))
    logging.info("Loading config")
    with open("ascii_qgis.config") as f:
        global config
        config = json.load(f)


    init_colors()

    screen.refresh()

    global scr, pad, aboutwindow, legendwindow, mapwindow, modeline
    scr = screen
    pad = EditPad()
    modeline = ModeLine()
    mapwindow = Map()
    legendwindow = Legend()
    aboutwindow = AboutWindow()

    legendwindow.render_legend()
    mapwindow.render_map()

    screen.addstr(0, 0, "ASCII")
    screen.addstr(0, 5, " QGIS Enterprise", curses.color_pair(4))
    screen.refresh()

    if config.get('showhelp', True):
        show_help()

    pad.focus()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号