123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- .. This is a autogemerated documentation from python docstrings. It was generated using DStrings2Doc.
- .. module:: storage
- .. _storage:
- Module storage
- ==============
- .. py:class:: StorageError(Exception)
- Simple Storage Error Base Class
- .. py:class:: Storage(object)
- Simple Class to store Values and Throw an error if a value is retrieved that has not been stored before.
- .. py:method:: __init__(self, default=None)
- .. py:method:: setdefault(self, key, object)
- Call setdefault on the underlying dictionary and return the result
- :param key: the key to call setdefault with
- :param object: the object to call setdefault with
- :return: the return value of setdefault of the dictionary
- .. py:method:: __setattr__(self, key, value)
- .. py:method:: __getattr__(self, item)
- .. py:method:: get_board_specific_storage(board_id)
- Get the storage instance for a specific board
- :param board_id: the board to get the storage for
- :return: the instance of the storage for the given board
- .. py:class:: ThreadStorage(object)
- Wrapper for QThreads
- .. py:method:: __init__(self)
- .. py:method:: register(self, threaded_object)
- Register a class object to run in a QThread
- :param threaded_object: the class object
- .. py:method:: is_registered(self)
- Check if a class for this thread is registered.
- .. py:method:: __start(self)
- This will be registered to the QThread started signal and will call the actual start_method
- .. py:method:: start(self, method_to_run_in_thread)
- Move the class object to a QThread, connect the QThread.started signal to the given method of the
- class object
- :param method_to_run_in_thread: the method to start when starting the QThread
- .. py:method:: quit(self)
- Quit the thread class (if it has a method to quit)
- .. py:method:: stop(self)
- Call quit and wait to the underlying QThread
- .. py:method:: __getattr__(self, item)
- Get Attributes of the registered class object
- :param item: the item to get from the class object
- :return: the attribute of the class object
- .. py:method:: connect(self, signal, slot)
- Connect signals of the class object to the given slots
- :param signal: the signal
- :param slot: the slot
- .. py:method:: disconnect(self, *args)
- Disconnect the given signals
- :param args: the signals to disconnect
- .. py:method:: init(self, *args, **kwargs)
- call the threaded objects init method (not __init__) with the passed arguments
|