Shows a wait cursor while processing.

    :param object: Object to decorate.
    :type object: object
    :return: Object.
    :rtype: object
488223
def show_wait_cursor(object):
    

    @functools.wraps(object)
    def show_wait_cursorWrapper(*args, **kwargs):
        """
        Shows a wait cursor while processing.

        :param \*args: Arguments.
        :type \*args: \*
        :param \*\*kwargs: Keywords arguments.
        :type \*\*kwargs: \*\*
        :return: Object.
        :rtype: object
        """

        QApplication.setOverrideCursor(Qt.WaitCursor)
        value = None
        try:
            value = object(*args, **kwargs)
        finally:
            QApplication.restoreOverrideCursor()
            return value

    return show_wait_cursorWrapper
1067704
def wait_while(self, condition, *args, **kw):
    
    return self.wait_for(lambda: not condition(), *args, **kw)
919735
def wait_input(self, prompt=''):
        """"""
        self.new_prompt(prompt)
        self.setFocus()
        self.input_mode = True
        self.input_loop = QEventLoop()
        self.input_loop.exec_()
        self.input_loop = None
1179233
def simple_wait(func):
    
    @wraps(func)
    def wrapper(*args, **kwargs):
        wait = Wait()
        wait.start()
        try:
            ret = func(*args, **kwargs)
        finally:
            wait.stop()
        sys.stdout.write('\n')
        return ret
    return wrapper
441251
def wait(self, till=None):
        
        waiter = Signal()
        if self.waiting:
            DEBUG and _Log.note("waiting with {{num}} others on {{name|quote}}", num=len(self.waiting), name=self.name, stack_depth=1)
            self.waiting.insert(0, waiter)
        else:
            DEBUG and _Log.note("waiting by self on {{name|quote}}", name=self.name)
            self.waiting = [waiter]

        try:
            self.lock.release()
            DEBUG and _Log.note("out of lock {{name|quote}}", name=self.name)
            (waiter | till).wait()
            if DEBUG:
                _Log.note("done minimum wait (for signal {{till|quote}})", till=till.name if till else "", name=self.name)
        except Exception as e:
            if not _Log:
                _late_import()
            _Log.warning("problem", cause=e)
        finally:
            self.lock.acquire()
            DEBUG and _Log.note("re-acquired lock {{name|quote}}", name=self.name)

        try:
            self.waiting.remove(waiter)
            DEBUG and _Log.note("removed own signal from {{name|quote}}", name=self.name)
        except Exception:
            pass

        return bool(waiter)
1160885
def disable_busy_cursor():
    """"""
    while QgsApplication.instance().overrideCursor() is not None and \
            QgsApplication.instance().overrideCursor().shape() == \
            QtCore.Qt.WaitCursor:
        QgsApplication.instance().restoreOverrideCursor()
713629
def wait(self):
        
        d = defer.Deferred()
        if self._result is None:
            self._waiters.append(d)
        else:
            self._fire_deferred(d)
        return d
640269
def _cursor(self):
        """"""
        if self._conn is None:
            self._conn = sqlite3.connect(self.filename,
                                         check_same_thread=False)
        return self._conn.cursor()
611899
def wait(button=LEFT, target_types=(UP, DOWN, DOUBLE)):
    
    from threading import Lock
    lock = Lock()
    lock.acquire()
    handler = on_button(lock.release, (), [button], target_types)
    lock.acquire()
    _listener.remove_handler(handler)
185194
def enable_busy_cursor(self):
        """"""
        QgsApplication.instance().setOverrideCursor(
            QtGui.QCursor(QtCore.Qt.WaitCursor)
        )
99394
public void setCursor(Object object, String cursor) {
		if (isAttached()) {
			helper.setCursor(object, cursor);
		}
	}
710898
def delay(self, wait, *args):
        

        def call_it():
            self.obj(*args)

        t = Timer((float(wait) / float(1000)), call_it)
        t.start()
        return self._wrap(self.obj)
117864
def hidden_cursor():
    """"""
    if sys.stdout.isatty():
        _LOGGER.debug('Hiding cursor.')
        print('\x1B[?25l', end='')
        sys.stdout.flush()
    try:
        yield
    finally:
        if sys.stdout.isatty():
            _LOGGER.debug('Showing cursor.')
            print('\n\x1B[?25h', end='')
            sys.stdout.flush()
547134
def wait(self, timeout=None):
        
        import threading

        if self._state!=self.PENDING:
            return

        e = threading.Event()
        self.addCallback(lambda v: e.set())
        self.addErrback(lambda r: e.set())
        e.wait(timeout)
708621
def _wait_until(obj, att, desired, callback, interval, attempts, verbose,
        verbose_atts):
    
    if not isinstance(desired, (list, tuple)):
        desired = [desired]
    if verbose_atts is None:
        verbose_atts = []
    if not isinstance(verbose_atts, (list, tuple)):
        verbose_atts = [verbose_atts]
    infinite = (attempts == 0)
    attempt = 0
    start = time.time()
    while infinite or (attempt < attempts):
        try:
            # For servers:
            obj.get()
        except AttributeError:
            try:
                # For other objects that don't support .get()
                obj = obj.manager.get(obj.id)
            except AttributeError:
                # punt
                raise exc.NoReloadError("The 'wait_until' method is not "
                        "supported for '%s' objects." % obj.__class__)
        attval = getattr(obj, att)
        if verbose:
            elapsed = time.time() - start
            msgs = ["Current value of %s: %s (elapsed: %4.1f seconds)" % (
                    att, attval, elapsed)]
            for vatt in verbose_atts:
                vattval = getattr(obj, vatt, None)
                msgs.append("%s=%s" % (vatt, vattval))
            print(" ".join(msgs))
        if attval in desired:
            return obj
        time.sleep(interval)
        attempt += 1
    return obj
14213
def wait(self):
        
        self.wait_event = threading.Event()
        timeout = int(self.timeout) if self.timeout else None
        self.timed_out = not self.wait_event.wait(timeout)
959975
def wait(
        self, timeout: Union[int, float] = None, safe: bool = False
    ) -> List[Union[Any, Exception]]:
        
        return self.process_list.wait(timeout, safe)