コード例 #1
0
class thread_showHad(QThread):
    finished = QtCore.pyqtSignal(list)

    def __init__(self,lo):
        super(thread_showHad, self).__init__()
        self.sumReq = SummitReq(lo)
        self.datas = list()

    def run(self):
        url ,header = self.sumReq.bulidCheckHeader(30,4)
        print "get url and header!"
        pageResp = self.sumReq.getPage(url,header)
        if pageResp:
            pro = ProData()
            self.datas.append(pro.getHadDataList(pageResp))
        else:
            self.datas.append(0)
        url ,header = self.sumReq.bulidCheckHeader(21,4)
        print "get url and header!"
        pageResp = self.sumReq.getPage(url,header)
        if pageResp:
            pro = ProData()
            self.datas.append(pro.getHadDataList(pageResp))
        else:
            self.datas.append(0)
        self.finished.emit(self.datas)
コード例 #2
0
class thread_getPage(QThread):
    signal = QtCore.pyqtSignal(list)
    def __init__(self,lo,kclb,xqm):
        super(thread_getPage, self).__init__()
        self.sumReq = SummitReq(lo)
        self.kclb = kclb
        self.xqm = xqm
        print "build thread_getPage object"

    def run(self):
        url ,header = self.sumReq.bulidCheckHeader(self.kclb,self.xqm)
        print "get url and header!"
        pageResp = self.sumReq.getPage(url,header)
        print "get response!"
        if pageResp:
            pro = ProData()
            data = pro.getDataList(pageResp)
            self.signal.emit(data)
        else:
            return None
コード例 #3
0
class thread_run(QThread):
    signal = QtCore.pyqtSignal()
    eachTime = QtCore.pyqtSignal()

    def __init__(self,lo,kclb,wdic):
        super(thread_run, self).__init__()
        self.Lsn = wdic.values()
        self.kclb = kclb
        self.smq = SummitReq(lo)

    def run(self):
        print "submit begin!"
        self.Lsn = self.smq.submit(self.Lsn,self.kclb)

    def stopSum(self):
        print 'user stop'
        self.smq.runFlag = False
コード例 #4
0
 def __init__(self,lo):
     super(thread_showHad, self).__init__()
     self.sumReq = SummitReq(lo)
     self.datas = list()
コード例 #5
0
 def __init__(self,lo,kclb,wdic):
     super(thread_run, self).__init__()
     self.Lsn = wdic.values()
     self.kclb = kclb
     self.smq = SummitReq(lo)
コード例 #6
0
 def __init__(self,lo,kclb,xqm):
     super(thread_getPage, self).__init__()
     self.sumReq = SummitReq(lo)
     self.kclb = kclb
     self.xqm = xqm
     print "build thread_getPage object"