def __init__(self, cmndpipe, rspdpipe):
    '\n        Create a PyQt viewer which reads commands from the Pipe\n        cmndpipe and writes responses back to rspdpipe.\n        '
    super(PipedImagerPQ, self).__init__()
    self.__cmndpipe = cmndpipe
    self.__rspdpipe = rspdpipe
    signal.signal(signal.SIGINT, signal.SIG_IGN)
    self.__sceneimage = None
    self.__scenedata = None
    self.__loadingimage = False
    self.__scenewidth = int((10.8 * self.physicalDpiX()))
    self.__sceneheight = int((8.8 * self.physicalDpiY()))
    self.__noalpha = False
    self.__lastclearcolor = QColor(16777215)
    self.__lastclearcolor.setAlpha(255)
    self.__scalefactor = 1.0
    self.__autoscale = True
    self.__minsize = 128
    self.__scrollarea = QScrollArea(self)
    self.__label = QLabel(self.__scrollarea)
    self.__label.setMinimumSize(self.__scenewidth, self.__sceneheight)
    self.__label.resize(self.__scenewidth, self.__sceneheight)
    self.__scrollarea.setWidget(self.__label)
    self.__scrollarea.setBackgroundRole(QPalette.Dark)
    self.setCentralWidget(self.__scrollarea)
    self.__lastfilename = 'ferret.png'
    self.__lastformat = 'png'
    self.__helper = CmndHelperPQ(self)
    self.__scaleact = QAction(self.tr('&Scale'), self, shortcut=self.tr('Ctrl+S'), statusTip=self.tr('Scale the image (canvas and image change size)'), triggered=self.inquireSceneScale)
    self.__saveact = QAction(self.tr('Save &As...'), self, shortcut=self.tr('Ctrl+A'), statusTip=self.tr('Save the image to file'), triggered=self.inquireSaveFilename)
    self.__redrawact = QAction(self.tr('&Redraw'), self, shortcut=self.tr('Ctrl+R'), statusTip=self.tr('Clear and redraw the image'), triggered=self.redrawScene)
    self.__aboutact = QAction(self.tr('&About'), self, statusTip=self.tr('Show information about this viewer'), triggered=self.aboutMsg)
    self.__aboutqtact = QAction(self.tr('About &Qt'), self, statusTip=self.tr('Show information about the Qt library'), triggered=self.aboutQtMsg)
    self.createMenus()
    self.__framedelta = 4
    mwwidth = (self.__scenewidth + self.__framedelta)
    mwheight = (((self.__sceneheight + self.__framedelta) + self.menuBar().height()) + self.statusBar().height())
    self.resize(mwwidth, mwheight)
    self.__timer = QTimer(self)
    self.__timer.timeout.connect(self.checkCommandPipe)
    self.__timer.setInterval(0)
    self.__timer.start()
Create a PyQt viewer which reads commands from the Pipe
cmndpipe and writes responses back to rspdpipe.
def __init__(self, cmndpipe, rspdpipe):
    '\n        Create a PyQt viewer which reads commands from the Pipe\n        cmndpipe and writes responses back to rspdpipe.\n        '
    super(PipedImagerPQ, self).__init__()
    self.__cmndpipe = cmndpipe
    self.__rspdpipe = rspdpipe
    signal.signal(signal.SIGINT, signal.SIG_IGN)
    self.__sceneimage = None
    self.__scenedata = None
    self.__loadingimage = False
    self.__scenewidth = int((10.8 * self.physicalDpiX()))
    self.__sceneheight = int((8.8 * self.physicalDpiY()))
    self.__noalpha = False
    self.__lastclearcolor = QColor(16777215)
    self.__lastclearcolor.setAlpha(255)
    self.__scalefactor = 1.0
    self.__autoscale = True
    self.__minsize = 128
    self.__scrollarea = QScrollArea(self)
    self.__label = QLabel(self.__scrollarea)
    self.__label.setMinimumSize(self.__scenewidth, self.__sceneheight)
    self.__label.resize(self.__scenewidth, self.__sceneheight)
    self.__scrollarea.setWidget(self.__label)
    self.__scrollarea.setBackgroundRole(QPalette.Dark)
    self.setCentralWidget(self.__scrollarea)
    self.__lastfilename = 'ferret.png'
    self.__lastformat = 'png'
    self.__helper = CmndHelperPQ(self)
    self.__scaleact = QAction(self.tr('&Scale'), self, shortcut=self.tr('Ctrl+S'), statusTip=self.tr('Scale the image (canvas and image change size)'), triggered=self.inquireSceneScale)
    self.__saveact = QAction(self.tr('Save &As...'), self, shortcut=self.tr('Ctrl+A'), statusTip=self.tr('Save the image to file'), triggered=self.inquireSaveFilename)
    self.__redrawact = QAction(self.tr('&Redraw'), self, shortcut=self.tr('Ctrl+R'), statusTip=self.tr('Clear and redraw the image'), triggered=self.redrawScene)
    self.__aboutact = QAction(self.tr('&About'), self, statusTip=self.tr('Show information about this viewer'), triggered=self.aboutMsg)
    self.__aboutqtact = QAction(self.tr('About &Qt'), self, statusTip=self.tr('Show information about the Qt library'), triggered=self.aboutQtMsg)
    self.createMenus()
    self.__framedelta = 4
    mwwidth = (self.__scenewidth + self.__framedelta)
    mwheight = (((self.__sceneheight + self.__framedelta) + self.menuBar().height()) + self.statusBar().height())
    self.resize(mwwidth, mwheight)
    self.__timer = QTimer(self)
    self.__timer.timeout.connect(self.checkCommandPipe)
    self.__timer.setInterval(0)
    self.__timer.start()