def __init__(self, runaslib=True): # Load Glade XML self.xml = gtk.glade.XML("NewPatterns.glade") # get Library self.detection = detectionAPI.detection() self.conf = Config("./properties.conf") # Get Window self.w = self.xml.get_widget('window1') self.on_load_translate() self.w.connect("delete_event", gtk.main_quit) # Get Windows child self.w_child = self.w.get_child() # self.widget will be attached to the Activity # This can be any GTK widget except a window self.widget = self.w_child if not runaslib: self.w.show_all() gtk.main()
def __init__(self, runaslib=True): # Load Glade XML self.xml = gtk.glade.XML("NewPatternsActivity.glade") # get Library self.detection = detectionAPI.detection() # Get Window self.w = self.xml.get_widget('window1') self.on_load_translate() self.w.connect("delete_event", gtk.main_quit) # Get Windows child self.w_child = self.w.get_child() # self.widget will be attached to the Activity # This can be any GTK widget except a window self.widget = self.w_child if not runaslib: self.w.show_all() gtk.main()
""" Loads the C api, prints the ids of the markers defined in object_data file. Queries the api to detect the first defined marker """ import multiPatternDetectionAPI det = multiPatternDetectionAPI.detection() salida = det.arMultiGetIdsMarker() markers = salida.split(";") print "Markers: " + str(markers) det.init() while 1: #det.refresh() x = det.getMarkerTrigDist("NotEnter") if x!= -1: print x
def __init__(self, parent): self._parent = parent self._status = False self.detection = detectionAPI.detection()