Esempio n. 1
0
 def __init__(self, future, task, args, kwargs):
     QRunnable.__init__(self)
     self.future = future
     self.task = task
     self.args = args
     self.kwargs = kwargs
     self.eventLoop = None
Esempio n. 2
0
 def __init__(self, future, task, args, kwargs):
     QRunnable.__init__(self)
     self.future = future
     self.task = task
     self.args = args
     self.kwargs = kwargs
     self.eventLoop = None
Esempio n. 3
0
 def __init__(self, label, parent=None):
     QRunnable.__init__(self)
     self.label = label
     self.parent = parent
     self.data = None
     self.mutex = QMutex()
     self.setAutoDelete(True)
Esempio n. 4
0
 def __init__(self, label, parent=None):
     QRunnable.__init__(self)
     self.imap = None
     self.label = label
     self.parent = parent
     self.mutex = QMutex()
     self.login()
Esempio n. 5
0
    def __init__(self, ifname, ofname, cls):

        """
        This class does the work of moving the files to the executable to
        process the pdf pages.

        This class should not be called directly as it is a QRunnable object
        therefore we need a QThreadPool object to start/stop and monitor
        progress.

        The worker is QWorker and will create these instances for us.
        """

        # Init parent object
        QRunnable.__init__(self)

        # create an instance of a QObject so we can emit signals
        self.q_object = QObject()

        # take the inputs
        self.ofname = ofname
        self.ifname = ifname
        self.res = cls.resolution
        self.mode = cls.mode

        # gs exe
        self.gscriptpath = '"' +  os.getcwd() + r'\gs\gs9.02\bin'
Esempio n. 6
0
 def __init__(self, label, parent=None):
     QRunnable.__init__(self)
     self.imap = None
     self.label = label
     self.parent = parent
     self.mutex = QMutex()
     self.login()
Esempio n. 7
0
 def __init__(self, label, parent=None):
     QRunnable.__init__(self)
     self.label = label
     self.parent = parent
     self.data = None
     self.mutex = QMutex()
     self.setAutoDelete(True)
Esempio n. 8
0
 def __init__(self, fkt, p):
     """
     :type fkt: ()->
     :type p: object
     """
     QRunnable.__init__(self)
     self.fkt = fkt
     self.p = p
Esempio n. 9
0
 def __init__(self, parent, cb, *args, **kwargs):
     QRunnable.__init__(self)
     self._mutex = Lock()
     self._parent = parent
     with self._mutex:
         self._cb = cb
         self._args = args
         self._kwargs = kwargs
         self._parent._threads.add(self)
Esempio n. 10
0
    def __init__(self, deletions, cls):

        """
        Create instance of QFileCleaner with new list
        """

        QRunnable.__init__(self)
        self.deletions = deletions
        self.cls = cls
Esempio n. 11
0
 def __init__(self, parent, cb, *args, **kwargs):
     QRunnable.__init__(self)
     self._mutex = Lock()
     self._parent = parent
     with self._mutex:
         self._cb = cb
         self._args = args
         self._kwargs = kwargs
         self._parent._threads.add(self)
Esempio n. 12
0
    def __init__(self, filename, width, height, parent=None):
        QRunnable.__init__(self)

        self.dontrun = False

        self.filename = filename
        self._w = width
        self._h = height

        # Need a QObject to emit signals from a QRunnable
        self.obj = QObject()
Esempio n. 13
0
 def __init__(self, query, model, dialog_tool, top, left, right, bottom, time_begin, time_end, filters):
     QRunnable.__init__(self)
     self.query = query
     self.model = model
     self.dialog_tool = dialog_tool
     self.top = top
     self.left = left
     self.right = right
     self.bottom = bottom
     self.time_begin = time_begin
     self.time_end = time_end
     self.filters = filters
     self.task_object = CatalogTaskObject()
Esempio n. 14
0
 def __init__(self, query, model, dialog_tool, top, left, right, bottom,
              time_begin, time_end, filters):
     QRunnable.__init__(self)
     self.query = query
     self.model = model
     self.dialog_tool = dialog_tool
     self.top = top
     self.left = left
     self.right = right
     self.bottom = bottom
     self.time_begin = time_begin
     self.time_end = time_end
     self.filters = filters
     self.task_object = CatalogTaskObject()
Esempio n. 15
0
 def __init__(self, client_id, client_secret, username, password,
              serial_no, top, left, right, bottom, time_begin, time_end, vector_header_dict):
     QRunnable.__init__(self)
     self.username = username
     self.password = password
     self.client_id = client_id
     self.client_secret = client_secret
     self.serial_no = serial_no
     self.top = top
     self.left = left
     self.right = right
     self.bottom = bottom
     self.time_begin = time_begin
     self.time_end = time_end
     self.vector_header_dict = vector_header_dict
     self.csv_object = CSVObject()
Esempio n. 16
0
 def __init__(self, client_id, client_secret, username, password, serial_no,
              top, left, right, bottom, time_begin, time_end,
              vector_header_dict):
     QRunnable.__init__(self)
     self.username = username
     self.password = password
     self.client_id = client_id
     self.client_secret = client_secret
     self.serial_no = serial_no
     self.top = top
     self.left = left
     self.right = right
     self.bottom = bottom
     self.time_begin = time_begin
     self.time_end = time_end
     self.vector_header_dict = vector_header_dict
     self.csv_object = CSVObject()
Esempio n. 17
0
    def __init__(self, pdf, cls):

        """
        This is the only class that gets called from the main thread.

        It is called when we wish to split a PDF document and when we
        want to start a new batch of threads for image processing
        This class is a thread of it's own, controlling other threads.

        I believe this is a good method as it behaves as below:

        Main thread
            |
        Call to QThreadHandle----> Start image processing
            |                               |
        Main thread carries on              |
                                         output

        Requires a PdfFileReader object and a reference to the calling class
        """

        # init parent
        QRunnable.__init__(self)

        # take refs
        self.pdf = pdf
        self.cls = cls

        # create QWorker object
        self.work = QWorker()

        try:
            self.work.threadpool.setMaxThreadCount(self.cls.thread_number)
            self.cls.debug(self.cls.thread_number)
        except AttributeError:
            self.work.threadpool.setMaxThreadCount(5)
Esempio n. 18
0
    def __init__(self, parent):
        QRunnable.__init__(self, parent)

        self.setAutoDelete(True)
Esempio n. 19
0
 def __init__(self, acquisitions, export_filename):
     QRunnable.__init__(self)
     self.task_object = CatalogTaskObject()
     self.acquisitions = acquisitions
     self.export_filename = export_filename
Esempio n. 20
0
 def __init__(self, acquisitions, export_filename):
     QRunnable.__init__(self)
     self.task_object = CatalogTaskObject()
     self.acquisitions = acquisitions
     self.export_filename = export_filename
Esempio n. 21
0
 def __init__(self, func, next):
     QRunnable.__init__(self)
     self.func = func
     self.next = next
Esempio n. 22
0
 def __init__(self, future, func, args, kwargs):
     QRunnable.__init__(self)
     self.future = future
     self.func = func
     self.args = args
     self.kwargs = kwargs
Esempio n. 23
0
 def __init__(self,fileSharerGui):
     QRunnable.__init__(self)
     self.fileSharerGui=fileSharerGui
 def __init__(self, call):
     QRunnable.__init__(self)
     self.setAutoDelete(False)
     self._call = call
Esempio n. 25
0
 def __init__(self, future, func, args, kwargs):
     QRunnable.__init__(self)
     self.future = future
     self.func = func
     self.args = args
     self.kwargs = kwargs
Esempio n. 26
0
 def __init__(self, call):
     QRunnable.__init__(self)
     self.setAutoDelete(False)
     self._call = call
Esempio n. 27
0
 def __init__(self, func, next):
     QRunnable.__init__(self)
     self.func = func
     self.next = next
Esempio n. 28
0
 def __init__(self, element, content_handler, hostname):
     QRunnable.__init__(self)
     self.element = element
     self.content_handler = content_handler
     self.hostname = hostname
     self.canceled = False