Esempio n. 1
0
    def prepare_graphics(self, container):
        self.text0 = Text('Master: 0')
        self.text0.pos = -0.2, 0.5

        self.text1 = Text('Daq 1: 0')
        self.text1.pos = -0.2, 0

        self.text2 = Text('Daq 2: 0')
        self.text2.pos = -0.2, -0.5

        canvas = Canvas()
        canvas.add_item(self.text0)
        canvas.add_item(self.text1)
        canvas.add_item(self.text2)
        container.set_widget(canvas)
Esempio n. 2
0
    def prepare_graphics(self, container):
        canvas = Canvas()
        container.set_widget(canvas)

        self.text0 = Text('')
        self.text0.pos = -0.15, 0
        canvas.add_item(self.text0)
Esempio n. 3
0
 def prepare_graphics(self, container):
     """Define the GUI by using Items etc.
     """
     self.canvas = Canvas()
     self.text = Text(text='', color='red')
     self.canvas.add_item(self.text)
     container.set_widget(self.canvas)
Esempio n. 4
0
    def prepare_graphics(self, container):
        canvas = Canvas()
        container.set_widget(canvas)

        # create a couple text items that tick with each daq update
        self.text1 = Text('0')
        self.text1.pos = -0.5, 0
        canvas.add_item(self.text1)

        self.text2 = Text('0')
        self.text2.pos = 0.5, 0
        canvas.add_item(self.text2)

        # counters keeping track of the updates
        self.counter1 = Counter(100, reset_on_timeout=False)
        self.counter2 = Counter(100, reset_on_timeout=False)

        # stop updating when the faster DAQ has updated 100 times
        self.counter1.timeout.connect(self.done)
Esempio n. 5
0
    def run(self, *tasks):
        """Run the experimental tasks."""
        if self.subject is None:
            self.configure()

        self.screen.key_pressed.connect(self.key_press)

        # screen to show "Ready" between tasks
        self.confirm_screen = Canvas(draw_border=False)
        self.confirm_screen.add_item(Text("Ready (enter to start)"))

        self.storage.subject_id = self.subject
        self.tasks = tasks

        self.current_task = None
        self.task_iter = iter(self.tasks)
        self._task_finished()

        self.screen.run()
 def prepare_graphics(self, container):
     self.countdown = Canvas()
     self.countdowntext = Text("Flex!")
     self.countdown.add_item(self.countdowntext)
     container.set_widget(self.countdown)