Ejemplo n.º 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 = []
Ejemplo n.º 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
Ejemplo n.º 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
Ejemplo n.º 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()
Ejemplo n.º 6
0
 def build(self):
     self.root = Widget()
     return self.root  # build() should always return a widget object
Ejemplo n.º 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 = []
Ejemplo n.º 9
0
 def __init__(self):
     Widget.__init__(self)
     self.curriculum = classes.Curriculum()
Ejemplo n.º 10
0
 def build(self):
     self.root = Widget()
     return self.root  # build() always returns a widget object
Ejemplo n.º 11
0
 def build(self):
     self.root = Widget()
     self.title = "My first Kivy"
     return self.root
Ejemplo n.º 12
0
 def build(self):
     return Widget()
 def __init__(self):
     Widget.__init__(self)
     self.app = None
     self.curriculum_selector = None
Ejemplo n.º 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
Ejemplo n.º 16
0
 def build(self):
     self.root = Widget()
     return self.root
Ejemplo n.º 17
0
 def build(self):#self means this build()belong to Demo1
     self.title = "hellow, world"
     self.root= Widget()
     return self.root
Ejemplo n.º 18
0
 def __init__(self):
     Widget.__init__(self)
     self.app = None
     self.course_selector = None