Exemplo n.º 1
0
    def __init__(self):
        super(self.__class__, self).__init__()
        self.setupUi(self)  # gets defined in the UI file

        l = QVBoxLayout(self.graph)
        self.dc = PlanCanvas(self.graph, width=10, height=4, dpi=100)
        l.addWidget(self.dc)

        self.robthread = RobThreadClass()
        self.robthread.start()
        self.robthread.date_signal.connect(self.showdate)
        self.robthread.shift_num_signal.connect(self.showshift)
        self.hours = ['07:20-08:00', '08:00-09:00', '09:00-10:00', '10:00-11:00',
                 '11:00-12:00',
                 '12:00-13:00', '13:00-14:00', '14:00-15:00', '15:00-16:00']

        self.robthread.graph_signal.connect(self.plot)
        self.robthread.hours_signal.connect(self.hours_show)
        self.robthread.plan_signal.connect(self.show_plan)
        self.robthread.bdt_signal.connect(self.show_bdt)
        config = XmlParser.ConfigParse(config_file)
        logopixmap = QPixmap(config.logopicture())
        self.label_2.setText(config.logotext())
        h = self.logo.height()
        w = self.logo.width()
        self.logo.setPixmap(logopixmap.scaled(w, h, QtCore.Qt.KeepAspectRatio))
Exemplo n.º 2
0
    def __init__(self):

        super(self.__class__, self).__init__()
        self.config = XmlParser.ConfigParse(config_file)
        self.rob = RobClient.Client(self.config.ip(), self.config.port())