doc: added image for adapter.py

This commit is contained in:
Zen-CODE 2014-08-31 07:13:27 +02:00
parent 915fe2ac3f
commit bbaaf2ca45
2 changed files with 13 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

View File

@ -11,6 +11,9 @@ presented by views. Views are top-level widgets, such as a
:class:`~kivy.uix.listview.ListView`, that allow users to scroll through :class:`~kivy.uix.listview.ListView`, that allow users to scroll through
and (optionally) interact with your data. and (optionally) interact with your data.
The Concept
-----------
Kivy adapters are modelled on the Kivy adapters are modelled on the
`Adapter design pattern <http://en.wikipedia.org/wiki/Adapter_pattern>`_. `Adapter design pattern <http://en.wikipedia.org/wiki/Adapter_pattern>`_.
Conceptually, they play the role of a 'controller' between you data and views Conceptually, they play the role of a 'controller' between you data and views
@ -18,6 +21,16 @@ in a `Model-View-Controller
<https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller>`_ <https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller>`_
type architecture. type architecture.
The role of an adapter can be depicted as follows:
.. image:: images/adapters.png
The Components
--------------
The components involved in this process are:
- **Adapters**: The base :class:`Adapter` is subclassed by the - **Adapters**: The base :class:`Adapter` is subclassed by the
:class:`SimpleListAdapter` and :class:`ListAdapter`. The :class:`DictAdapter` :class:`SimpleListAdapter` and :class:`ListAdapter`. The :class:`DictAdapter`
is a more advanced and flexible subclass of :class:`ListAdapter`. is a more advanced and flexible subclass of :class:`ListAdapter`.