# Path: photobooth/Threading.py
# class Workers(IntEnum):
# 
#     MASTER = 0
#     GUI = 1
#     CAMERA = 2
#     GPIO = 3
#     WORKER = 4


from PyQt5 import QtCore
from ...Threading import Workers
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.




class Receiver(QtCore.QThread):

    notify = QtCore.pyqtSignal(object)

    def __init__(self, comm):

        super().__init__()
        self._comm = comm

    def handle(self, state):

        self.notify.emit(state)

    def run(self):


# Path: photobooth/Threading.py
# class Workers(IntEnum):
# 
#     MASTER = 0
#     GUI = 1
#     CAMERA = 2
#     GPIO = 3
#     WORKER = 4


# Path: photobooth/gui/Qt5Gui/Receiver.py
from PyQt5 import QtCore
from ...Threading import Workers

# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.




class Receiver(QtCore.QThread):

    notify = QtCore.pyqtSignal(object)

    def __init__(self, comm):

        super().__init__()
        self._comm = comm

    def handle(self, state):

        self.notify.emit(state)

    def run(self):


        for state in self._comm.iter(Workers.GUI):