Exemplo n.º 1
0
    def refresh(self):

        if GpuManager.has_bbswitch():
            self._gpu_state = GpuManager.state()
        else:
            self._gpu_state = False
        self._set_on_off_label()
Exemplo n.º 2
0
    def refresh(self):

        if GpuManager.has_bbswitch():
            self._gpu_state = GpuManager.state()
        else:
            self._gpu_state = False
        self._set_on_off_label()
Exemplo n.º 3
0
    def _change_gpu_state(self):

        self._gpu_state = not self._gpu_state
        GpuManager.set_state(self._gpu_state)
        gpu_state = GpuManager.state()
        if gpu_state == self._gpu_state:
            self._set_on_off_label()
        else:
            raise NameError('Gpu refuse to change of state')
Exemplo n.º 4
0
    def _change_gpu_state(self):

        self._gpu_state = not self._gpu_state
        GpuManager.set_state(self._gpu_state)
        gpu_state = GpuManager.state()
        if gpu_state == self._gpu_state:
            self._set_on_off_label()
        else:
            raise NameError('Gpu refuse to change of state')
Exemplo n.º 5
0
    def _init_connection(self):

        if GpuManager.has_bbswitch():
            self._form.on_off_button.clicked.connect(self._change_gpu_state)
Exemplo n.º 6
0
    def _init_connection(self):

        if GpuManager.has_bbswitch():
            self._form.on_off_button.clicked.connect(self._change_gpu_state)