Ejemplo n.º 1
0
    def __init__(self):
        self.__master = MainView(tap_number_handler = self.__did_number_tapped, tap_operator_handler = self.__did_operator_tapped)

        self.__display_text = "0"
        self.__display_number = 0
        self.__is_typing_number = True
        self.__master.display(self.__display_text)
Ejemplo n.º 2
0
    def __init__(self):
        for port in list_ports.comports(include_links=True):
            print(port.device, port.name, port.description)

        self.__master = MainView(tap_handler=self.__toggle_did_change)
        self.__arduino = serial.Serial('/dev/tty.usbmodem1421', 115200)
        self.__master.protocol("WM_DELETE_WINDOW", self.__on_closing)
Ejemplo n.º 3
0
    def __init__(self):
        self.view = MainView()

        #create data
        self.img_data = ImgData()
        self.calibration_data = CalibrationData(self.img_data)
        self.mask_data = MaskData()
        self.spectrum_data = SpectrumData()
        self.phase_data = PhaseData()

        self.load_directories()
        #create controller
        self.calibration_controller = CalibrationController(
            self.working_dir, self.view.calibration_widget, self.img_data,
            self.calibration_data)
        self.mask_controller = MaskController(self.working_dir,
                                              self.view.mask_widget,
                                              self.img_data, self.mask_data)
        self.integration_controller = IntegrationController(
            self.working_dir, self.view.integration_widget, self.img_data,
            self.mask_data, self.calibration_data, self.spectrum_data,
            self.phase_data)

        self.create_signals()
        self.raise_window()
Ejemplo n.º 4
0
    def __init__(self, app):
        self.splash_img = QtGui.QPixmap("UiFiles/splash.png")
        self.splash_screen = QtGui.QSplashScreen(
            self.splash_img, QtCore.Qt.WindowStaysOnTopHint)
        self.splash_screen.show()
        app.processEvents()
        time.sleep(1)
        app.processEvents()

        self.view = MainView()
        #create data
        self.img_data = ImgData()
        self.calibration_data = CalibrationData(self.img_data)
        self.mask_data = MaskData()
        self.spectrum_data = SpectrumData()
        self.phase_data = PhaseData()

        self.load_directories()
        #create controller
        self.calibration_controller = CalibrationController(
            self.working_dir, self.view.calibration_widget, self.img_data,
            self.mask_data, self.calibration_data)
        self.mask_controller = MaskController(self.working_dir,
                                              self.view.mask_widget,
                                              self.img_data, self.mask_data)
        self.integration_controller = IntegrationController(
            self.working_dir, self.view.integration_widget, self.img_data,
            self.mask_data, self.calibration_data, self.spectrum_data,
            self.phase_data)
        self.create_signals()
        self.set_title()
        self.raise_window()
        self.splash_screen.finish(self.view)
Ejemplo n.º 5
0
    def __init__(self):
        for port in list_ports.comports(include_links=True):
            print(port.device, port.name, port.description)

        self.__master = MainView()
        self.__arduino = serial.Serial(self.Constants.port, self.Constants.baud)
        self.__master.protocol(self.Constants.close_event, self.__on_closing)
        self.__update_clock()
Ejemplo n.º 6
0
    def __init__(self):
        self.__master = MainView(
            tap_number_handler=self.__did_number_tapped,
            tap_operator_handler=self.__did_operator_tapped)
        self.__brain = CalculatorBrain(
            update_handler=self.__result_was_updated)

        self.__display_text = "0"
        self.__display_number = 0
        self.__is_typing_number = True
        self.__master.display(self.__display_text)
Ejemplo n.º 7
0
    def __init__(self, sys_argv):
        super(App, self).__init__(sys_argv)
        self._model = Model()
        self._mainView = MainView()

        self._loginController = LoginController(self._model)
        self._loginView = LoginView(self._model, self._loginController)

        apply_stylesheet(self._loginView, theme='dark_cyan.xml')

        self._mainView.setScreen(self._loginView)
        self._mainView.show()
Ejemplo n.º 8
0
 def __init__(self):
     self.__master = MainView(convert_handler = self.__convert)
Ejemplo n.º 9
0
 def __init__(self):
     self.__master = MainView(convert_handler=self.__convert)
     self.__currency = CurrencyManager.get_currency(
         self.__master.Constants.exchange_rate)
Ejemplo n.º 10
0
 def __init__(self):
     self.__master = MainView(convert_handler=self.__convert)
     self.__currency = CurrencyManager.get_currency("USD")
Ejemplo n.º 11
0
 def __init__(self):
     self.__currency = CurrencyManager.get_currency("USD")
     self.__options_menu = self.__currency.rates
     self.__master = MainView(convert_handler=self.__convert,
                              options_menu=self.__options_menu)
Ejemplo n.º 12
0
 def __init__(self):
     self.__master = MainView(send_handler = self.__send)
     self.__client = MessageManager()
Ejemplo n.º 13
0
 def __init__(self):
     self.__get_currency("USD")
     self.__master = MainView(convert_handler = self.__convert, origin_currency = self.__get_currency, options = self.__currencies)
Ejemplo n.º 14
0
 def __init__(self):
     self.__master = MainView(convert_handler=self.__convert)
     self.__currency = CurrencyManager.get_currency(
         self.__master.Constants.default_from_currency)
Ejemplo n.º 15
0
 def __init__(self):
     self.__master = MainView(
         convert_handler=self.__convert,
         get_currency_names=CurrencyManager.get_currency_names)
Ejemplo n.º 16
0
 def __init__(self):
     self.__currency = CurrencyManager.get_currency("MXN")
     self.__menu = self.__currency.name
     self.__master = MainView(convert_handler=self.__convert,
                              menu=self.__menu)
Ejemplo n.º 17
0
 def __init__(self):
     self.__master = MainView(tap_button_handler=self.__did_button_tap,
                              tap_space_handler=self.__did_space_tap)
     self.__port = serial.Serial(self.Constants.port, self.Constants.baud)
     self.__master.protocol(self.Constants.close_event, self.__on_closing)
     self.__update_coordinate()
Ejemplo n.º 18
0
 def __init__(self):
     self.__master = MainView()