Ejemplo n.º 1
0
    def __init__(self):
        self.lock = Locker()
        self.console = ConsoleThreadOutput()
        self.settings = SettingsCamera()
        self.settings.setup_settings()
        self.fan = Fan()

        # Campos da janela principal para as informações da câmera
        self.firmware_field = None
        self.model_field = None

        self.main = Status()
        self.now_plus_10 = datetime.now()
        self.settedhour = datetime.now()
        self.continuousShooterThread = ContinuousShooterThread(
            int(self.settings.get_camera_settings()[4]))
        self.ephemerisShooterThread = EphemerisShooter()

        self.sthread = SThread()

        self.commands = CameraQThread(self)
        self.shooting = False
        # Initiating the Slots
        self.init_slots()

        self.info_ini = []

        info_ini = self.get_camera_settings_ini()
        self.aux_temperature = int(info_ini[0])

        self.temp = 0
        self.temp_contador = 0
        self.temp_contador_manual = 0
Ejemplo n.º 2
0
 def __init__(self):
     super(Main, self).__init__()
     Status(self)
     # Init Layouts
     self.init_widgets()
     self.init_user_interface()
     self.createActions()
     self.createToolBars()
     self.auto_connect_filter_and_camera()
Ejemplo n.º 3
0
    def __init__(self):
        super(Main, self).__init__()
        Status(self)
        # Init Layouts
        self.init_widgets()
        self.init_user_interface()
        self.createActions()

        self.createToolBars()
Ejemplo n.º 4
0
    def __init__(self):
        super(Main, self).__init__()
        Status(self)
        # Init Layouts
        if sys.platform.startswith("win"):
            import ctypes
            user32 = ctypes.windll.user32
            self.screensize = user32.GetSystemMetrics(
                0), user32.GetSystemMetrics(1)
        else:
            import subprocess
            output = subprocess.Popen('xrandr | grep "\*" | cut -d" " -f4',
                                      shell=True,
                                      stdout=subprocess.PIPE).communicate()[0]
            self.screensize = output.split()[0].split(b'x')
            self.screensize[0] = str(self.screensize[0], "utf-8")
            self.screensize[1] = str(self.screensize[1], "utf-8")
            self.screensize[0] = int(self.screensize[0])
            self.screensize[1] = int(self.screensize[1])

        # self.setWindowFlags(Qt.WindowMinimizeButtonHint | Qt.WindowCloseButtonHint)
        self.init_widgets()
        self.init_user_interface()
        self.createActions()

        if self.cam.is_connected:
            if self.cam.ephemerisShooterThread.continuousShooterThread.isRunning(
            ):
                self.actions_enabled(False, False, False, False, True, False)
            else:
                self.actions_enabled(False, False, False, False, True, True)
            '''
            self.connectAction.setEnabled(False)
            self.disconnectAction.setEnabled(True)
            self.automaticAction.setEnabled(False)
            self.manualAction.setEnabled(False)
            self.stopAction.setEnabled(True)
            '''
        else:
            '''
            self.connectAction.setEnabled(True)
            self.disconnectAction.setEnabled(False)
            self.automaticAction.setEnabled(False)
            self.manualAction.setEnabled(False)
            self.stopAction.setEnabled(False)
            '''
            self.actions_enabled(True, False, False, False, False, True)

        self.createToolBars()
Ejemplo n.º 5
0
    def __init__(self, parent=None):
        super(FanStatus, self).__init__(parent)

        self.status = Status()

        # Creating the Widgets
        self.FanField = QtWidgets.QLabel(self)
        self.FanLabel = QtWidgets.QLabel("Fan: ", self)

        # Creating a Fan Object
        self.fan = Fan()
        self.fan.set_fanField(self.FanField)

        # Setting up
        self.setting_up()

        # Set up the layout
        self.setLayout(set_hbox(self.FanLabel, self.FanField))
Ejemplo n.º 6
0
    def __init__(self):
        self.lock = Locker()
        self.console = ConsoleThreadOutput()
        self.settings = SettingsCamera()
        self.settings.setup_settings()
        self.fan = Fan()

        # Campos da janela principal para as informações da câmera
        self.firmware_field = None
        self.model_field = None
        self.valor_pixels_x = None
        self.valor_pixels_y = None

        self.main = Status()
        self.now_plus = datetime.now()
        self.settedhour = datetime.now()
        """
        executa o modo manual continuousShooterThread
        """
        self.continuousShooterThread = ContinuousShooterThread(
            int(self.settings.get_camera_settings()[4]))
        """
        executa o modo automatico ephemerisShooterThread
        """
        self.ephemerisShooterThread = EphemerisShooter()

        self.sthread = SThread()

        self.commands = CameraQThread(self)
        self.shooting = False
        # Initiating the Slots
        self.init_slots()

        self.info_ini = []
        self.pass_list = [1024, 1024]
        self.pass_list_str = ["1024", "1024"]

        info_ini = self.get_camera_settings_ini()
        self.aux_temperature = int(info_ini[0])

        self.temp = 0
        self.temp_contador = False
        self.temp_contador_manual = False
        self.is_connected = False
Ejemplo n.º 7
0
    def __init__(self):
        super(Main, self).__init__()
        Status(self)
        # Init Layouts
        if sys.platform.startswith("win"):
            import ctypes
            user32 = ctypes.windll.user32
            self.screensize = user32.GetSystemMetrics(
                0), user32.GetSystemMetrics(1)
        else:
            import subprocess
            output = subprocess.Popen('xrandr | grep "\*" | cut -d" " -f4',
                                      shell=True,
                                      stdout=subprocess.PIPE).communicate()[0]
            self.screensize = output.split()[0].split(b'x')
            self.screensize[0] = str(self.screensize[0], "utf-8")
            self.screensize[1] = str(self.screensize[1], "utf-8")
            self.screensize[0] = int(self.screensize[0])
            self.screensize[1] = int(self.screensize[1])
        self.init_widgets()
        self.init_user_interface()
        self.createActions()

        if self.cam.is_connected:
            self.connectAction.setEnabled(False)
            self.disconnectAction.setEnabled(True)
            self.automaticAction.setEnabled(False)
            self.manualAction.setEnabled(False)
            self.stopAction.setEnabled(True)
        else:
            self.connectAction.setEnabled(True)
            self.disconnectAction.setEnabled(False)
            self.automaticAction.setEnabled(False)
            self.manualAction.setEnabled(False)
            self.stopAction.setEnabled(False)

        self.createToolBars()
Ejemplo n.º 8
0
Archivo: main.py Proyecto: hiyoku/ccd10
 def __init__(self):
     super(Main, self).__init__()
     Status(self)
     # Init Layouts
     self.init_widgets()
     self.init_user_interface()