示例#1
0
 def __init__(self):
     Widget.__init__(self)
     self.app = None
     self.course_selector = None
     self.sections_map = {}
     self.active_section_grades_panel = None
     self.active_goal_grades_panels = []
示例#2
0
 def build(self):
     parent = Widget()
     print("what now?")
     btn = Button(text ="sunroof")
     btn.bind(on_press = sunroof)
     parent.add_widget(btn)
     return parent
 def __init__(self):
     Widget.__init__(self)
     self.username = ObjectProperty(None)
     self.password = ObjectProperty(None)
     self.host = ObjectProperty(None)
     self.app = None
     self.login_prog = None
示例#4
0
 def teste(self):
     self.img1 = Image(source='images/1.jpg')
     layout = Widget()
     layout.add_widget(self.img1)
     #opencv2 stuffs
     self.capture = cv2.VideoCapture(0)
     ret, frame = self.capture.read()
     #cv2.namedWindow("CV2 Image")
     #cv2.imshow("CV2 Image", frame)
     Clock.schedule_interval(self.update, 1.0 / 33.0)
     return layout
示例#5
0
    def __init__(self, lightSrc, maxRadius, minRadius, *args, **kwargs):
        Widget.__init__(self, *args, **kwargs)

        self.minRadius = minRadius
        self.maxRadius = maxRadius
        self.lightSrc = lightSrc

        d = getDistance(centerX, centerY, self.lightSrc[0], self.lightSrc[1])
        t = np.linspace(0, 20, int(20 / 0.2), endpoint=False)

        # Get how pupil oscillates
        calculateMovement(1.135, 0.05, 1.135, 0.0003, 1250, 0.01, t)
        self.r = maxRadius * calculateMovement(
            1, self.lightSrc[2] / maxRadius, d / maxRadius, 0.0003, 1250, 0.01,
            t)
        self.counter = 0

        self.dilate = Clock.schedule_interval(self.updatePupil, 0.2)

        # plot results
        plt.plot(t, self.r)
        plt.xlabel('time')
        plt.ylabel('y(t)')
        plt.show()
示例#6
0
 def build(self):
     self.root = Widget()
     return self.root  # build() should always return a widget object
示例#7
0
 def build(self):
     self.title = "Hello world"
     self.root = Widget()
     return self.root
 def __init__(self):
     Widget.__init__(self)
     self.curriculum = classes.Curriculum()
     self.req_courses = set()
     self.opt_courses = set()
     self.cur_topics = []
示例#9
0
 def __init__(self):
     Widget.__init__(self)
     self.curriculum = classes.Curriculum()
示例#10
0
 def build(self):
     self.root = Widget()
     return self.root  # build() always returns a widget object
示例#11
0
 def build(self):
     self.root = Widget()
     self.title = "My first Kivy"
     return self.root
示例#12
0
 def build(self):
     return Widget()
 def __init__(self):
     Widget.__init__(self)
     self.app = None
     self.curriculum_selector = None
示例#14
0
 def __init__(self):
     Widget.__init__(self)
     self.course_topics = {}  # indexed by topic id
     self.course_goals = {}  # indexed by goal id
 def __init__(self):
     Widget.__init__(self)
     self.app = None
示例#16
0
 def build(self):
     self.root = Widget()
     return self.root
示例#17
0
 def build(self):#self means this build()belong to Demo1
     self.title = "hellow, world"
     self.root= Widget()
     return self.root
示例#18
0
 def __init__(self):
     Widget.__init__(self)
     self.app = None
     self.course_selector = None