コード例 #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
コード例 #3
0
 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
ファイル: kivy_demo0.py プロジェクト: jc345932/sp53
 def build(self):
     self.title = "Hello world"
     self.root = Widget()
     return self.root
コード例 #8
0
 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
コード例 #15
0
 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