Beispiel #1
0
class ModeFrame(LabelFrame):
    """Has controls for setting the laser tracker's mode."""
    def __init__(self, master, text="Modes", **options):
        LabelFrame.__init__(self, master, text=text, **options)
        self.tracker = master.tracker

        self.mode_menu = OptionMenu(self, (tracker.IFM_SET_BY_ADM,
                                           tracker.IFM, tracker.ADM))
        self.mode_menu.grid(row=0, column=0)
        self.set_mode_button = Button(self, text="Set mode",
                                      command=bg_caller(self.set_mode))
        self.set_mode_button.grid(row=0, column=1)

    def set_mode(self):
        mode = self.mode_menu.get()
        self.tracker.set_mode(mode)
        logger.info("Set tracker mode to "+mode)
Beispiel #2
0
    def __init__(self, master, text="Modes", **options):
        LabelFrame.__init__(self, master, text=text, **options)
        self.tracker = master.tracker

        self.mode_menu = OptionMenu(self, (tracker.IFM_SET_BY_ADM,
                                           tracker.IFM, tracker.ADM))
        self.mode_menu.grid(row=0, column=0)
        self.set_mode_button = Button(self, text="Set mode",
                                      command=bg_caller(self.set_mode))
        self.set_mode_button.grid(row=0, column=1)