本文整理汇总了Python中tools.Tools.remove方法的典型用法代码示例。如果您正苦于以下问题:Python Tools.remove方法的具体用法?Python Tools.remove怎么用?Python Tools.remove使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tools.Tools
的用法示例。
在下文中一共展示了Tools.remove方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from tools import Tools [as 别名]
# 或者: from tools.Tools import remove [as 别名]
#.........这里部分代码省略.........
print_button = gtk.Button("Print")
vbox_toolbar.pack_start(print_button, False, False, 0)
print_button.connect_object("clicked", self.print_dialog, "")
print_button.show()
self.status_bar = gtk.Statusbar()
self._status = "Ready"
self.status_bar.push(1, self._status)
vbox.pack_start(self.status_bar, False, False, 0)
self.status_bar.show()
#self.main_window.add(self.draw_area)
#self.main_window.set_size_request(area.width, area.height)
self.screen = GisGTK2Screen(self.draw_area)
self.screen.add(ScreenText("@ FoxyCAD", SceenOverlay.BOTTOM_RIGHT, (-60, -5)))
self.screen.add(ScreenCrosshair(SceenOverlay.CENTER))
self.tools = Tools(self.screen) # tools dirbs tik su ekrano koordinatemis
self.printer = Printer(self.screen) # viskas kas susije su paruosimu spausdinimui
# As durnas, o mano vartotojai dar durnesni, todel viskas turi buti maximaliai aisku ir paprasta
#self.canvas.setCoordinateCenter(("WGS", 54.7892, 24.7852)) # ten padesime kyziuka
#self.canvas.setUnit("meters", 1) # rodysime liniuotes kastuose metrus
# @----10m----->@ su pelia traukiojma ir matom atstuma metrais
#self.canvas.add_random_points(10000, gtk.gdk.Rectangle(0, 0, 6800, 4000))
#self.canvas.add_random_points(100000, gtk.gdk.Rectangle(0, 0, 12000, 8000), generator=True)
self.main_window.show() #show_all()
def status(self, text):
self._status = text #"Device: (%i, %i) User: (%i, %i) Map: (%f, %f) " % (point.x, point.y, user.x, user.y, map.x, map.y)
self.status_bar.remove_all(1)
self.status_bar.push(1, self._status)
def destroy_event(self, widget):
gtk.main_quit()
def set_tool(self, tool_name):
self.tools.run(tool_name)
def save(self, file_name="dump"):
self.screen.get_canvas().save(file_name)
def clear(self, file_path=None):
self.tools.remove() # stop active
self.screen.clear()
self.screen.redraw()
def center(self, point):
self.screen.get_canvas().center(point)
self.screen.redraw()
def load_file(self, file_path=None):
if file_path:
self.screen.open_file(file_path)
else:
self.screen.ui_open_file()
def undo(self, arg):
Invoker.undo()
#print "ui undo"
def redo(self, arg):