-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
75 changed files
with
21,109 additions
and
1 deletion.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: d09eff6518c7fd0fd32756c7f016bed3 | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
Empty file.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,211 @@ | ||
|
||
|
||
<!DOCTYPE html> | ||
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]--> | ||
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]--> | ||
<head> | ||
<meta charset="utf-8"> | ||
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
|
||
<title>Overview: module code — PiCameraGUI 1.0 documentation</title> | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<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" /> | ||
|
||
|
||
<script src="../_static/js/modernizr.min.js"></script> | ||
|
||
</head> | ||
|
||
<body class="wy-body-for-nav"> | ||
|
||
|
||
<div class="wy-grid-for-nav"> | ||
|
||
|
||
<nav data-toggle="wy-nav-shift" class="wy-nav-side"> | ||
<div class="wy-side-scroll"> | ||
<div class="wy-side-nav-search"> | ||
|
||
|
||
|
||
<a href="../index.html" class="icon icon-home"> PiCameraGUI | ||
|
||
|
||
|
||
</a> | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div role="search"> | ||
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get"> | ||
<input type="text" name="q" placeholder="Search docs" /> | ||
<input type="hidden" name="check_keywords" value="yes" /> | ||
<input type="hidden" name="area" value="default" /> | ||
</form> | ||
</div> | ||
|
||
|
||
</div> | ||
|
||
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation"> | ||
|
||
|
||
|
||
|
||
|
||
|
||
<ul> | ||
<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"><a class="reference internal" href="../exceptionsmodules.html">5. Modules d’exception</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../bibliography.html">6. Bibliographie</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../rights.html">7. Droits d’auteurs</a></li> | ||
</ul> | ||
|
||
|
||
|
||
</div> | ||
</div> | ||
</nav> | ||
|
||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"> | ||
|
||
|
||
<nav class="wy-nav-top" aria-label="top navigation"> | ||
|
||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i> | ||
<a href="../index.html">PiCameraGUI</a> | ||
|
||
</nav> | ||
|
||
|
||
<div class="wy-nav-content"> | ||
|
||
<div class="rst-content"> | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div role="navigation" aria-label="breadcrumbs navigation"> | ||
|
||
<ul class="wy-breadcrumbs"> | ||
|
||
<li><a href="../index.html">Docs</a> »</li> | ||
|
||
<li>Overview: module code</li> | ||
|
||
|
||
<li class="wy-breadcrumbs-aside"> | ||
|
||
</li> | ||
|
||
</ul> | ||
|
||
|
||
<hr/> | ||
</div> | ||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> | ||
<div itemprop="articleBody"> | ||
|
||
<h1>All modules for which code is available</h1> | ||
<ul><li><a href="PiCameraGUI.html">PiCameraGUI</a></li> | ||
</ul> | ||
|
||
</div> | ||
|
||
</div> | ||
<footer> | ||
|
||
|
||
<hr/> | ||
|
||
<div role="contentinfo"> | ||
<p> | ||
© Copyright 2018, Jérémy Talbot-Pâquet. | ||
|
||
</p> | ||
</div> | ||
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. | ||
|
||
</footer> | ||
|
||
</div> | ||
</div> | ||
|
||
</section> | ||
|
||
</div> | ||
|
||
|
||
|
||
|
||
|
||
<script type="text/javascript"> | ||
var DOCUMENTATION_OPTIONS = { | ||
URL_ROOT:'../', | ||
VERSION:'1.0', | ||
LANGUAGE:'en', | ||
COLLAPSE_INDEX:false, | ||
FILE_SUFFIX:'.html', | ||
HAS_SOURCE: true, | ||
SOURCELINK_SUFFIX: '.txt' | ||
}; | ||
</script> | ||
<script type="text/javascript" src="../_static/jquery.js"></script> | ||
<script type="text/javascript" src="../_static/underscore.js"></script> | ||
<script type="text/javascript" src="../_static/doctools.js"></script> | ||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> | ||
|
||
|
||
|
||
|
||
|
||
<script type="text/javascript" src="../_static/js/theme.js"></script> | ||
|
||
|
||
<script type="text/javascript"> | ||
jQuery(function () { | ||
SphinxRtdTheme.Navigation.enable(true); | ||
}); | ||
</script> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
.. _bibliography: | ||
|
||
|
||
============= | ||
Bibliographie | ||
============= | ||
|
||
Vous trouverez ici toutes les documentations utilisées pour créer le logiciel. | ||
|
||
|
||
.. rubric:: Références | ||
|
||
.. [#Pi1] PiCamera `<https://picamera.readthedocs.io/en/release-1.10/index.html/>`_ | ||
.. [#Tk1] Tkinter `<http://effbot.org/tkinterbook/>`_ | ||
.. [#Tk2] Tkinter `<http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/index.html/>`_ | ||
.. [#ToolTip1] ToolTip `<http://www.voidspace.org.uk/python/weblog/arch_d7_2006_07_01.shtml#e387/>`_ | ||
.. [#Py1] Python `<http://www.python.org/>`_ | ||
.. [#Excp1] Exceptions `<https://docs.python.org/2/tutorial/errors.html/>`_ | ||
.. [#Rst1] ReStructuredText `<https://thomas-cokelaer.info/tutorials/sphinx/rest_syntax.html#internal-and-external-links/>`_ | ||
.. [#Rst2] ReStructuredText `<https://opensource.org/licenses/BSD-3-Clause/>`_ | ||
.. [#Rtd1] Read The Docs `<https://docs.readthedocs.io/en/latest/>`_ | ||
.. [#BSD1] Licence BSD `<https://thomas-cokelaer.info/tutorials/sphinx/rest_syntax.html#internal-and-external-links/>`_ | ||
.. [#Dsktp1] Desktop Entry `<https://www.raspberrypi.org/forums/viewtopic.php?t=193860/>`_ | ||
.. [#Frac1] Fractions `<https://docs.python.org/2/library/fractions.html/>`_ | ||
.. [#App1] Autre application `<https://github.com/Billwilliams1952/PiCameraApp/>`_ | ||
.. [#App2] Autre application `<http://idlelogiclabs.com/2016/10/10/raspberry-pi-3-camera-windowed-preview/>`_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
.. _calltipwindow: | ||
|
||
=============== | ||
Call Tip Window | ||
=============== | ||
|
||
Ce `package`_ sert à afficher un label en survolant un objet Tkinter. | ||
|
||
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.:: | ||
|
||
from CallTipWindow import createToolTip | ||
|
||
note = "Activer un mode d'exposition\nempêche la configuration manuelle | ||
\nde l'iso et du shutter speed" | ||
createToolTip(self.modeLabel, note) | ||
|
||
|
||
.. image:: tooltip.png | ||
:align: center | ||
|
||
Note: L'auteur du programme PiCamera GUI ne détient pas les droits sur ce package et la license ne s'applique pas sur celui-ci. Les droits de ce package reviennent à Michael Foord. | ||
|
||
.. _package: http://www.voidspace.org.uk/python/weblog/arch_d7_2006_07_01.shtml#e387 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
.. _code: | ||
|
||
================= | ||
Notes sur le code | ||
================= | ||
|
||
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. | ||
|
||
|
||
.. _main: | ||
|
||
Main.py | ||
======= | ||
|
||
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 `PiCamera`_. | ||
S'il ne peut pas, il lèves deux types d'erreurs et propose des solutions exposées :ref:`exceptionsmodules`. | ||
|
||
L'instance `app` de la classe :ref:`gui` est crée avec `win` comme `root` et `camera` comme objet `PiCamera`. Le programme exécute ensuite la ligne:: | ||
|
||
win.mainloop() | ||
|
||
Essentiellement, il s'agit d'une boucle infinie dans laquelle la fenêtre réagit aux divers événements (cliques, touches, déplacements de la souris, etc.). | ||
Pour mieux comprendre la fonction `mainloop()`_ de Tkinter, consulter le sujet `suivant`_ sur **Stack Overflow**. Techniquement, le programme n'est pas supposé quitter la boucle `mainloop`, | ||
mais si c'est le cas, il se doit d'effacer l'instance `camera` pour éviter les problèmes de mémoire. | ||
|
||
|
||
.. _PiCamera: https://picamera.readthedocs.io/en/release-1.10/index.html | ||
.. _mainloop(): http://wiki.tcl.tk/2029 | ||
.. _suivant: https://stackoverflow.com/questions/29158220/tkinter-understanding-mainloop?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa | ||
|
||
|
||
.. _gui: | ||
|
||
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. | ||
|
||
.. currentmodule:: PiCameraGUI | ||
.. autoclass:: PiCameraGUI | ||
|
||
|
||
.. _layout: | ||
|
||
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 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:: layout.png | ||
:align: center | ||
|
||
* 1: self.seqButton | ||
* 2: self.photoButton | ||
* 3: self.videoButton | ||
* 4: self.hflipButton | ||
* 5: self.rotateButton | ||
* 6: self.vflipButton | ||
* 7: self.etatCanvas | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
.. _exceptionsmodules: | ||
|
||
=================== | ||
Modules d'exception | ||
=================== | ||
|
||
|
||
Deux classes d'exceptions qui héritent de la classe `Exception`_ 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: | ||
|
||
* Débrancher et rebrancher la caméra | ||
* 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) | ||
|
||
|
||
.. _Exception: https://docs.python.org/2/tutorial/errors.html | ||
.. _suivant: https://docs.python.org/2/tutorial/errors.html#user-defined-exceptions |
Oops, something went wrong.