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()
评论列表
文章目录