Skip to content

Commit

Permalink
Modification du guide de l'utilisateur
Browse files Browse the repository at this point in the history
  • Loading branch information
jtpaquet committed Jun 6, 2018
1 parent 558aabc commit 6d88cec
Show file tree
Hide file tree
Showing 23 changed files with 256 additions and 141 deletions.
Binary file modified docs/build/doctrees/calltipwindow.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/code.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/build/doctrees/exceptionsmodules.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/index.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/install.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/rights.doctree
Binary file not shown.
Binary file modified docs/build/doctrees/userguide.doctree
Binary file not shown.
3 changes: 2 additions & 1 deletion docs/build/html/_sources/calltipwindow.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ et de mettre le widget parent en premier argument et le texte à afficher en deu

from CallTipWindow import createToolTip

note = "Activer un mode d'exposition\nempêche la configuration manuelle\nde l'iso et du shutter speed"
note = "Activer un mode d'exposition\nempêche la configuration manuelle
\nde l'iso et du shutter speed"
createToolTip(self.modeLabel, note)


Expand Down
18 changes: 13 additions & 5 deletions docs/build/html/_sources/code.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ PiCameraGUI.py

Ce fichier contient la classe `PiCameraGUI` qui s'occupe de la création de l'interface ainsi que des fonctionnalités du programme.

.. automodule:: PiCameraGUI.PiCameraGUI


.. _layout:
Expand All @@ -45,13 +46,20 @@ Disposition de l'interface
==========================

Si vous devez ajouter, modifier ou supprimer des fonctionnalités, vous devrez connaitre la disposition des objets dans la fenêtre.
Voici la disposition générale du logiciel. Celle-ci contient les widgets qui servent à l'organisation et à la disposition des boutons.
Voici l'a r c h i t e c t u r e du logiciel. Les `Frames` agissent comme des fenêtres qui contiennent les boutons et autres widgets. Les canvas servent à contenir les images.
Elles servent donc à l'organisation et à la disposition. Les boutons, `scales`, `entry`, `listbox`, `spinbox` servent à utiliser ou changer une fonctionnalité.

.. image:: tooltip.png
.. image:: layout.png
:align: center

La disposition suivante contient plutôt les boutons. Si vous devez modifier des fonctionnalités, cherchez ici.
* 1: self.seqButton
* 2: self.photoButton
* 3: self.videoButton
* 4: self.hflipButton
* 5: self.rotateButton
* 6: self.vflipButton
* 7: self.etatCanvas



.. image:: tooltip.png
:align: center

26 changes: 13 additions & 13 deletions docs/build/html/_sources/exceptionsmodules.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ Ces deux classes sont utilisées dans le fichier "Main.py". Si le logiciel ne d
* Redémarrer le Rasperry Pi avec la caméra branchée

Si le logiciel ne peut importer les packages de la librairie Tkinter, il lèvera une TkinterError. Dans ce cas, il faut s'assurer d'avoir Python 3 sur le Raspberry Pi. Peut-être installer messagebox
La création des deux classes sont basées sur le modèle `suivant`_.


# Exception de Tkinter
class TkinterError(Exception):
def __init__(self, mismatch):
Exception.__init__(self, mismatch)


# Exception de la PiCamera
class PiCameraError(Exception):
def __init__(self, mismatch):
Exception.__init__(self, mismatch)
La création des deux classes sont basées sur le modèle `suivant`_. ::


# Exception de Tkinter
class TkinterError(Exception):
def __init__(self, mismatch):
Exception.__init__(self, mismatch)
# Exception de la PiCamera
class PiCameraError(Exception):
def __init__(self, mismatch):
Exception.__init__(self, mismatch)


.. _Exception: https://docs.python.org/2/tutorial/errors.html
Expand Down
1 change: 1 addition & 0 deletions docs/build/html/_sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Contents:

.. toctree::
:maxdepth: 2
:numbered:


install
Expand Down
32 changes: 24 additions & 8 deletions docs/build/html/calltipwindow.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Call Tip Window &mdash; PiCameraGUI 1.0 documentation</title>
<title>4. Call Tip Window &mdash; PiCameraGUI 1.0 documentation</title>



Expand All @@ -28,7 +28,9 @@
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="5. Modules d’exception" href="exceptionsmodules.html" />
<link rel="prev" title="3. Notes sur le code" href="code.html" />


<script src="_static/js/modernizr.min.js"></script>
Expand Down Expand Up @@ -77,9 +79,13 @@



<ul>
<li class="toctree-l1"><a class="reference internal" href="install.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="code.html">Notes sur le code</a></li>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="install.html">1. Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="userguide.html">2. Guide de l’utilisateur</a></li>
<li class="toctree-l1"><a class="reference internal" href="code.html">3. Notes sur le code</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">4. Call Tip Window</a></li>
<li class="toctree-l1"><a class="reference internal" href="exceptionsmodules.html">5. Modules d’exception</a></li>
<li class="toctree-l1"><a class="reference internal" href="rights.html">6. Droits d’auteurs</a></li>
</ul>


Expand Down Expand Up @@ -125,7 +131,7 @@

<li><a href="index.html">Docs</a> &raquo;</li>

<li>Call Tip Window</li>
<li>4. Call Tip Window</li>


<li class="wy-breadcrumbs-aside">
Expand All @@ -145,13 +151,14 @@
<div itemprop="articleBody">

<div class="section" id="call-tip-window">
<span id="calltipwindow"></span><h1>Call Tip Window<a class="headerlink" href="#call-tip-window" title="Permalink to this headline"></a></h1>
<span id="calltipwindow"></span><h1>4. Call Tip Window<a class="headerlink" href="#call-tip-window" title="Permalink to this headline"></a></h1>
<p>Ce <a class="reference external" href="http://www.voidspace.org.uk/python/weblog/arch_d7_2006_07_01.shtml#e387">package</a> sert à afficher un label en survolant un objet Tkinter.</p>
<p>Par exemple, pour attacher un ToolTip au Label “self.modeLabel”, il suffit d’appeler la fonction “createToolTip” à partir du fichier CallTipWindow.py
et de mettre le widget parent en premier argument et le texte à afficher en deuxième argument.:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">CallTipWindow</span> <span class="k">import</span> <span class="n">createToolTip</span>

<span class="n">note</span> <span class="o">=</span> <span class="s2">&quot;Activer un mode d&#39;exposition</span><span class="se">\n</span><span class="s2">empêche la configuration manuelle</span><span class="se">\n</span><span class="s2">de l&#39;iso et du shutter speed&quot;</span>
<span class="n">note</span> <span class="o">=</span> <span class="s2">&quot;Activer un mode d&#39;exposition</span><span class="se">\n</span><span class="s2">empêche la configuration manuelle</span>
\<span class="n">nde</span> <span class="n">l</span><span class="s1">&#39;iso et du shutter speed&quot;</span>
<span class="n">createToolTip</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">modeLabel</span><span class="p">,</span> <span class="n">note</span><span class="p">)</span>
</pre></div>
</div>
Expand All @@ -165,6 +172,15 @@
</div>
<footer>

<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">

<a href="exceptionsmodules.html" class="btn btn-neutral float-right" title="5. Modules d’exception" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>


<a href="code.html" class="btn btn-neutral" title="3. Notes sur le code" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>

</div>


<hr/>

Expand Down
49 changes: 32 additions & 17 deletions docs/build/html/code.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Notes sur le code &mdash; PiCameraGUI 1.0 documentation</title>
<title>3. Notes sur le code &mdash; PiCameraGUI 1.0 documentation</title>



Expand All @@ -29,7 +29,8 @@
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="prev" title="&lt;no title&gt;" href="quickstart.html" />
<link rel="next" title="4. Call Tip Window" href="calltipwindow.html" />
<link rel="prev" title="2. Guide de l’utilisateur" href="userguide.html" />


<script src="_static/js/modernizr.min.js"></script>
Expand Down Expand Up @@ -79,13 +80,17 @@


<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="install.html">Installation</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Notes sur le code</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#main-py">Main.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="#picameragui-py">PiCameraGUI.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="#disposition-de-l-interface">Disposition de l’interface</a></li>
<li class="toctree-l1"><a class="reference internal" href="install.html">1. Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="userguide.html">2. Guide de l’utilisateur</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">3. Notes sur le code</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#main-py">3.1. Main.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="#picameragui-py">3.2. PiCameraGUI.py</a></li>
<li class="toctree-l2"><a class="reference internal" href="#disposition-de-l-interface">3.3. Disposition de l’interface</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="calltipwindow.html">4. Call Tip Window</a></li>
<li class="toctree-l1"><a class="reference internal" href="exceptionsmodules.html">5. Modules d’exception</a></li>
<li class="toctree-l1"><a class="reference internal" href="rights.html">6. Droits d’auteurs</a></li>
</ul>


Expand Down Expand Up @@ -131,7 +136,7 @@

<li><a href="index.html">Docs</a> &raquo;</li>

<li>Notes sur le code</li>
<li>3. Notes sur le code</li>


<li class="wy-breadcrumbs-aside">
Expand All @@ -151,10 +156,10 @@
<div itemprop="articleBody">

<div class="section" id="notes-sur-le-code">
<span id="code"></span><h1>Notes sur le code<a class="headerlink" href="#notes-sur-le-code" title="Permalink to this headline"></a></h1>
<span id="code"></span><h1>3. Notes sur le code<a class="headerlink" href="#notes-sur-le-code" title="Permalink to this headline"></a></h1>
<p>Voici un résumé de ce que fait le code. La plupart des commentaires sont déjà présents dans les fichiers, n’hésitez pas à les consulter au besoin.</p>
<div class="section" id="main-py">
<span id="main"></span><h2>Main.py<a class="headerlink" href="#main-py" title="Permalink to this headline"></a></h2>
<span id="main"></span><h2>3.1. Main.py<a class="headerlink" href="#main-py" title="Permalink to this headline"></a></h2>
<p>En premier lieu, le programme essaie de détecter s’il y a des problèmes d’initialisation.
D’abord, il détecte si Python peut bel et bien initialiser la fenêtre et, ensuite, si il peut initialiser l’objet <a class="reference external" href="https://picamera.readthedocs.io/en/release-1.10/index.html">PiCamera</a>.
S’il ne peut pas, il lèves deux types d’erreurs et propose des solutions exposées <span class="xref std std-ref">exceptionsmodules:ici</span>.</p>
Expand All @@ -167,16 +172,24 @@
mais si c’est le cas, il se doit d’effacer l’instance <cite>camera</cite> pour éviter les problèmes de mémoire.</p>
</div>
<div class="section" id="picameragui-py">
<span id="gui"></span><h2>PiCameraGUI.py<a class="headerlink" href="#picameragui-py" title="Permalink to this headline"></a></h2>
<span id="gui"></span><h2>3.2. PiCameraGUI.py<a class="headerlink" href="#picameragui-py" title="Permalink to this headline"></a></h2>
<p>Ce fichier contient la classe <cite>PiCameraGUI</cite> qui s’occupe de la création de l’interface ainsi que des fonctionnalités du programme.</p>
</div>
<div class="section" id="disposition-de-l-interface">
<span id="layout"></span><h2>Disposition de l’interface<a class="headerlink" href="#disposition-de-l-interface" title="Permalink to this headline"></a></h2>
<span id="layout"></span><h2>3.3. Disposition de l’interface<a class="headerlink" href="#disposition-de-l-interface" title="Permalink to this headline"></a></h2>
<p>Si vous devez ajouter, modifier ou supprimer des fonctionnalités, vous devrez connaitre la disposition des objets dans la fenêtre.
Voici la disposition générale du logiciel. Celle-ci contient les widgets qui servent à l’organisation et à la disposition des boutons.</p>
<img alt="_images/tooltip.png" class="align-center" src="_images/tooltip.png" />
<p>La disposition suivante contient plutôt les boutons. Si vous devez modifier des fonctionnalités, cherchez ici.</p>
<img alt="_images/tooltip.png" class="align-center" src="_images/tooltip.png" />
Voici l’a r c h i t e c t u r e du logiciel. Les <cite>Frames</cite> agissent comme des fenêtres qui contiennent les boutons et autres widgets. Les canvas servent à contenir les images.
Elles servent donc à l’organisation et à la disposition. Les boutons, <cite>scales</cite>, <cite>entry</cite>, <cite>listbox</cite>, <cite>spinbox</cite> servent à utiliser ou changer une fonctionnalité.</p>
<img alt="_images/layout.png" class="align-center" src="_images/layout.png" />
<ul class="simple">
<li>1: self.seqButton</li>
<li>2: self.photoButton</li>
<li>3: self.videoButton</li>
<li>4: self.hflipButton</li>
<li>5: self.rotateButton</li>
<li>6: self.vflipButton</li>
<li>7: self.etatCanvas</li>
</ul>
</div>
</div>

Expand All @@ -188,8 +201,10 @@

<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">

<a href="calltipwindow.html" class="btn btn-neutral float-right" title="4. Call Tip Window" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>


<a href="quickstart.html" class="btn btn-neutral" title="&lt;no title&gt;" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
<a href="userguide.html" class="btn btn-neutral" title="2. Guide de l’utilisateur" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>

</div>

Expand Down
57 changes: 34 additions & 23 deletions docs/build/html/exceptionsmodules.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Modules d’exception &mdash; PiCameraGUI 1.0 documentation</title>
<title>5. Modules d’exception &mdash; PiCameraGUI 1.0 documentation</title>



Expand All @@ -28,7 +28,9 @@
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="6. Droits d’auteurs" href="rights.html" />
<link rel="prev" title="4. Call Tip Window" href="calltipwindow.html" />


<script src="_static/js/modernizr.min.js"></script>
Expand Down Expand Up @@ -77,9 +79,13 @@



<ul>
<li class="toctree-l1"><a class="reference internal" href="install.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="code.html">Notes sur le code</a></li>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="install.html">1. Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="userguide.html">2. Guide de l’utilisateur</a></li>
<li class="toctree-l1"><a class="reference internal" href="code.html">3. Notes sur le code</a></li>
<li class="toctree-l1"><a class="reference internal" href="calltipwindow.html">4. Call Tip Window</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">5. Modules d’exception</a></li>
<li class="toctree-l1"><a class="reference internal" href="rights.html">6. Droits d’auteurs</a></li>
</ul>


Expand Down Expand Up @@ -125,7 +131,7 @@

<li><a href="index.html">Docs</a> &raquo;</li>

<li>Modules d’exception</li>
<li>5. Modules d’exception</li>


<li class="wy-breadcrumbs-aside">
Expand All @@ -145,7 +151,7 @@
<div itemprop="articleBody">

<div class="section" id="modules-d-exception">
<span id="exceptionsmodules"></span><h1>Modules d’exception<a class="headerlink" href="#modules-d-exception" title="Permalink to this headline"></a></h1>
<span id="exceptionsmodules"></span><h1>5. Modules d’exception<a class="headerlink" href="#modules-d-exception" title="Permalink to this headline"></a></h1>
<p>Deux classes d’exceptions qui héritent de la classe <a class="reference external" href="https://docs.python.org/2/tutorial/errors.html">Exception</a> de la librairie standard de Python. Cela permet de créer deux nouveaux types d’erreurs: les PiCameraError TkinterError.
Ces deux classes sont utilisées dans le fichier “Main.py”. Si le logiciel ne détecte pas la PiCamera, il lèvera une PiCameraError et propose deux solutions:</p>
<ul class="simple">
Expand All @@ -154,22 +160,18 @@
</ul>
<p>Si le logiciel ne peut importer les packages de la librairie Tkinter, il lèvera une TkinterError. Dans ce cas, il faut s’assurer d’avoir Python 3 sur le Raspberry Pi. Peut-être installer messagebox
La création des deux classes sont basées sur le modèle <a class="reference external" href="https://docs.python.org/2/tutorial/errors.html#user-defined-exceptions">suivant</a>.</p>
<p># Exception de Tkinter
class TkinterError(Exception):</p>
<blockquote>
<div><dl class="docutils">
<dt>def __init__(self, mismatch):</dt>
<dd>Exception.__init__(self, mismatch)</dd>
</dl>
</div></blockquote>
<p># Exception de la PiCamera
class PiCameraError(Exception):</p>
<blockquote>
<div><dl class="docutils">
<dt>def __init__(self, mismatch):</dt>
<dd>Exception.__init__(self, mismatch)</dd>
</dl>
</div></blockquote>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># Exception de Tkinter</span>
<span class="k">class</span> <span class="nc">TkinterError</span><span class="p">(</span><span class="ne">Exception</span><span class="p">):</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">mismatch</span><span class="p">):</span>
<span class="ne">Exception</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">mismatch</span><span class="p">)</span>


<span class="c1"># Exception de la PiCamera</span>
<span class="k">class</span> <span class="nc">PiCameraError</span><span class="p">(</span><span class="ne">Exception</span><span class="p">):</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">mismatch</span><span class="p">):</span>
<span class="ne">Exception</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">mismatch</span><span class="p">)</span>
</pre></div>
</div>
</div>


Expand All @@ -178,6 +180,15 @@
</div>
<footer>

<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">

<a href="rights.html" class="btn btn-neutral float-right" title="6. Droits d’auteurs" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>


<a href="calltipwindow.html" class="btn btn-neutral" title="4. Call Tip Window" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>

</div>


<hr/>

Expand Down

0 comments on commit 6d88cec

Please sign in to comment.