Beispiel #1
0
 def addReader(self, reader):
     print type(reader)
     # connect the signals from the reader/parser to the slots
     dec = reader.getDecoder()
     self.connect(dec, SIGNAL("addAircraft(PyQt_PyObject)"), self.t.addAircraft)
     self.connect(dec, SIGNAL("updateAircraft(PyQt_PyObject)"), self.t.updateAircraft)
     self.connect(dec, SIGNAL("updateAircraftPosition(PyQt_PyObject)"), self.t.updateAircraftPosition)
     self.connect(dec, SIGNAL("delAircraft()"), self.t.delAircraft)
     self.connect(dec, SIGNAL("updateStats(PyQt_PyObject)"), self.updateStats)
     self.connect(dec, SIGNAL("updateAircraftPosition(PyQt_PyObject)"), self.gmapsWindow.updateAircraftPosition)
     self.connect(dec, SIGNAL("appendText(const QString&)"), self.logmsg.append)
     self.connect(self.daclevel, SIGNAL("valueChanged(int)"), reader, SLOT("setDAC(int)"))
     self.connect(self.daclevel, SIGNAL("valueChanged(int)"), self.testDAC)
     self.feedsWidget.addFeed(None)
Beispiel #2
0
    def addReader(self, reader):
        print "MyApplication::addReader called"
        print reader

        # connect the signals from the reader/parser to the slots
        dec = reader.getDecoder()
        self.connect(dec, SIGNAL("appendText(const QString&)"), self.logMsg)  # so we can print to console too
        self.connect(
            dec, SIGNAL("addAircraft(PyQt_PyObject)"), self.fr24Thread.addAircraft
        )  # fixme - better way to order this after db.addAircraft has been executed
        self.connect(dec, SIGNAL("addAircraft(PyQt_PyObject)"), self.dbThread.db.addAircraft)

        # some signals are only used with gui
        if self.mainWindow:
            self.mainWindow.addReader(reader)

        self.readers.append(reader)
        reader.start()
Beispiel #3
0
    def addReader(self, reader):
        print "MyApplication::addReader called"
        print reader

        # connect the signals from the reader/parser to the slots
        dec = reader.getDecoder()
        self.connect(dec, SIGNAL("appendText(const QString&)"),
                     self.logMsg)  # so we can print to console too
        self.connect(
            dec, SIGNAL("addAircraft(PyQt_PyObject)"),
            self.fr24Thread.addAircraft
        )  # fixme - better way to order this after db.addAircraft has been executed
        self.connect(dec, SIGNAL("addAircraft(PyQt_PyObject)"),
                     self.dbThread.db.addAircraft)

        # some signals are only used with gui
        if self.mainWindow:
            self.mainWindow.addReader(reader)

        self.readers.append(reader)
        reader.start()
Beispiel #4
0
 def addReader(self, reader):
     print type(reader)
     # connect the signals from the reader/parser to the slots
     dec = reader.getDecoder()
     self.connect(dec, SIGNAL("addAircraft(PyQt_PyObject)"),
                  self.t.addAircraft)
     self.connect(dec, SIGNAL("updateAircraft(PyQt_PyObject)"),
                  self.t.updateAircraft)
     self.connect(dec, SIGNAL("updateAircraftPosition(PyQt_PyObject)"),
                  self.t.updateAircraftPosition)
     self.connect(dec, SIGNAL("delAircraft()"), self.t.delAircraft)
     self.connect(dec, SIGNAL("updateStats(PyQt_PyObject)"),
                  self.updateStats)
     self.connect(dec, SIGNAL("updateAircraftPosition(PyQt_PyObject)"),
                  self.gmapsWindow.updateAircraftPosition)
     self.connect(dec, SIGNAL("appendText(const QString&)"),
                  self.logmsg.append)
     self.connect(self.daclevel, SIGNAL("valueChanged(int)"), reader,
                  SLOT("setDAC(int)"))
     self.connect(self.daclevel, SIGNAL("valueChanged(int)"), self.testDAC)
     self.feedsWidget.addFeed(None)