Exemplo n.º 1
1
 def __init__(self, folder="", ext=[], startDate=0, startMonth=0, startYear=0, parent=None, *args, **kwargs):
     QtCore.QThread.__init__(self, parent)
     
     self.data = None
     self._folder = folder
     self._ext = ext
     self._startDate = startDate
     self._startMonth = startMonth
     self._startYear = startYear
     
     self.cl = CodeLines(
             qThread=self,
             folder=self._folder,
             ext=self._ext,
             startDate=self._startDate,
             startMonth=self._startMonth,
             startYear=self._startYear
            )
Exemplo n.º 2
0
class RunAnalyticsTask(QtCore.QThread):
    def __init__(self, folder="", ext=[], startDate=0, startMonth=0, startYear=0, parent=None, *args, **kwargs):
        QtCore.QThread.__init__(self, parent)
        
        self.data = None
        self._folder = folder
        self._ext = ext
        self._startDate = startDate
        self._startMonth = startMonth
        self._startYear = startYear
        
        self.cl = CodeLines(
                qThread=self,
                folder=self._folder,
                ext=self._ext,
                startDate=self._startDate,
                startMonth=self._startMonth,
                startYear=self._startYear
               )
        

    # Call this to launch the thread
    def runAnalytics(self):
        self.start()

    # This run method is called by Qt as a result of calling start()
    def run(self):
        self.data = self.cl.runThread()