Debian Codegraph @

wxgeometrie/modules/exercice_equations_droites/barre_outils_ex_eq_dte.py

raw symbols SCIP
1 # -*- coding: utf-8 -*-
2
3 ##--------------------------------------##
4 # Barre d'outils pour la géométrie #
5 ##--------------------------------------##
6 # WxGeometrie
7 # Dynamic geometry, graph plotter, and more for french mathematic teachers.
8 # Copyright (C) 2005-2013 Nicolas Pourcelot
9 #
10 # This program is free software; you can redistribute it and/or modify
11 # it under the terms of the GNU General Public License as published by
12 # the Free Software Foundation; either version 2 of the License, or
13 # (at your option) any later version.
14 #
15 # This program is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU General Public License for more details.
19 #
20 # You should have received a copy of the GNU General Public License
21 # along with this program; if not, write to the Free Software
22 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23
24 from PyQt5.QtWidgets import (QWidget, QLabel, QHBoxLayout)
25
26 from ...GUI.barre_outils import BarreOutils
27 from ...geolib import Arc_oriente, Arc_points, Point_generique
28
29
30 class BarreOutilsExEqDte(BarreOutils):
31 def __init__(self, parent):
32 self.parent = parent
33 QWidget.__init__(self, parent)
34 self._selected_button = None
35
36 self.sizer = QHBoxLayout()
37
38 if self.parent.param('afficher_boutons'):
39 self.creer_boutons()
40
41 self.sizer.addStretch()
42
43 self.sizer.addWidget(QLabel("Utilisez cette barre d'outils pour construire les droites (dans le bon ordre).<br>"
44 "<i>Remarque :</i> pour créer une droite, il vous faudra deux points à coordonnées <i>entières</i>."))
45
46 self.sizer.addStretch()
47 self.setLayout(self.sizer)
48 self.adjustSize()
49
50
51 def creer_boutons(self):
52 self.add("F1", ("Pointeur", "fleche4", "Déplacer ou modifier un objet.", self.curseur)).select()
53 self.add("F3", ("Droite", "droite2", "Créer une droite.", self.droite))
54 self.add("F4", ("Gommer", "gomme", "Supprimer des objets.", self.gomme))
55
56
57 def rafraichir(self):
58 pass