Beispiel #1
0
    def start(self):
        global config
        ### Initialize Logger
        initConfig(self.configFile,logging.getLogger("config"))
        
        logger = logging.getLogger("red")
        logger.info("Zebra 14 is booting")
        
        app = QtGui.QApplication(sys.argv)

        
        #logger.info('Reading config; ' + self.configFile) 
        #config.read(self.configFile)



        self.kernel = Kernel(app)
        signal.signal(signal.SIGINT, self.signal_handler)
        self.window = None
        
        ##### This is QT load UI ######
        services = config.get('Services','Services').split(",")
        if "display" in services:
            logger.info("Zebra GUI is initiating")
            from red.mainwindow import MainWindow
            self.window = MainWindow.instance()
            self.window.show()
            logger.info('Zebra GUI initiated')
        
        ###############################
        self.kernel.start()
        
        ###### This fellow must be run in the end ######
        if "display" in services:
            sys.exit(app.exec_())
Beispiel #2
0
                inp = raw_input()
            
            except:     
                break
            if inp == "":
                inp = self.last
            self.socket.send_json({"head":"set_layout","data":inp})
            self.last = inp
           



listener = InThreasd()


display = Display(name=socketName)


window = MainWindow.instance()
window.show()

display.start()
listener.start()



sys.exit(app.exec_())