Gui Postprocessing with basic printing support
This commit is contained in:
@@ -2,6 +2,10 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
from .GuiState import *
|
||||
from .GuiPostprocess import *
|
||||
|
||||
|
||||
# Available gui modules as tuples of (config name, module name, class name)
|
||||
modules = ( ('qt5', 'PyQt5Gui', 'PyQt5Gui'), )
|
||||
|
||||
@@ -13,151 +17,8 @@ class Gui:
|
||||
pass
|
||||
|
||||
|
||||
def run(self, send, recv):
|
||||
def run(self, camera_conn, worker_queue):
|
||||
|
||||
raise NotImplementedError()
|
||||
|
||||
|
||||
|
||||
class GuiState:
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
|
||||
assert not kwargs
|
||||
|
||||
|
||||
|
||||
class ErrorState(GuiState):
|
||||
|
||||
def __init__(self, title, message, **kwargs):
|
||||
|
||||
super().__init__(**kwargs)
|
||||
|
||||
self.title = title
|
||||
self.message = message
|
||||
|
||||
|
||||
@property
|
||||
def title(self):
|
||||
|
||||
return self._title
|
||||
|
||||
|
||||
@title.setter
|
||||
def title(self, title):
|
||||
|
||||
self._title = title
|
||||
|
||||
|
||||
@property
|
||||
def message(self):
|
||||
|
||||
return self._message
|
||||
|
||||
|
||||
@message.setter
|
||||
def message(self, message):
|
||||
|
||||
self._message = message
|
||||
|
||||
|
||||
class IdleState(GuiState):
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
|
||||
super().__init__(**kwargs)
|
||||
|
||||
|
||||
|
||||
class PictureState(GuiState):
|
||||
|
||||
def __init__(self, picture, **kwargs):
|
||||
|
||||
super().__init__(**kwargs)
|
||||
|
||||
self.picture = picture
|
||||
|
||||
|
||||
@property
|
||||
def picture(self):
|
||||
|
||||
return self._pic
|
||||
|
||||
|
||||
@picture.setter
|
||||
def picture(self, picture):
|
||||
|
||||
self._pic = picture
|
||||
|
||||
|
||||
class MessageState(GuiState):
|
||||
|
||||
def __init__(self, message, **kwargs):
|
||||
|
||||
super().__init__(**kwargs)
|
||||
|
||||
self.message = message
|
||||
|
||||
|
||||
@property
|
||||
def message(self):
|
||||
|
||||
return self._msg
|
||||
|
||||
|
||||
@message.setter
|
||||
def message(self, message):
|
||||
|
||||
if not isinstance(message, str):
|
||||
raise ValueError('Message must be a string')
|
||||
|
||||
self._msg = message
|
||||
|
||||
|
||||
|
||||
class TriggerState(GuiState):
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
|
||||
super().__init__(**kwargs)
|
||||
|
||||
|
||||
class GreeterState(GuiState):
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
|
||||
super().__init__(**kwargs)
|
||||
|
||||
|
||||
class PoseState(GuiState):
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
|
||||
super().__init__(**kwargs)
|
||||
|
||||
|
||||
class AssembleState(GuiState):
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
|
||||
super().__init__(**kwargs)
|
||||
|
||||
|
||||
class CountdownState(GuiState):
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
|
||||
super().__init__(**kwargs)
|
||||
|
||||
|
||||
class PreviewState(PictureState):
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
|
||||
super().__init__(**kwargs)
|
||||
|
||||
class TeardownState(GuiState):
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
|
||||
super().__init__(**kwargs)
|
||||
|
||||
Reference in New Issue
Block a user