Debian Codegraph @

wxgeometrie/modules/bienvenue/__init__.py

raw symbols SCIP
1 # -*- coding: utf-8 -*-
2
3 ##--------------------------------------#######
4 # Geometre #
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 QVBoxLayout, QLabel, QWidget
25
26 from ...pylib import path2
27 from ...GUI.menu import MenuBar
28 from ...GUI.panel import Panel_simple
29
30
31 class AccueilMenuBar(MenuBar):
32 def __init__(self, panel):
33 MenuBar.__init__(self, panel)
34 self.ajouter("Fichier", ["ouvrir"], ['session'], None, ["quitter"])
35 self.ajouter("Affichage", ["onglet"], ["plein_ecran"])
36 self.ajouter("Outils", ["options"])
37 self.ajouter("?")
38
39
40 class Accueil(Panel_simple):
41
42 titre = "Bienvenue !" # Donner un titre à chaque module
43
44 def __init__(self, *args, **kw):
45 Panel_simple.__init__(self, *args, **kw)
46 sizer = QVBoxLayout()
47
48 newtab = path2("%/wxgeometrie/images/newtab3.png")
49 closetab = path2("%/wxgeometrie/images/closetab.png")
50 texte = """
51 <html><head/>
52 <body style='font-size:12pt;'>
53 <table bgcolor='#FFFCD6' style='border-color:#FFCF8C;border-style:solid;'>
54 <tr><td style='padding:15px;margin:15px;'>
55 <p><h2 align='center'>Bienvenue dans Géophar !</h2></p>
56 <br/>
57 <p><i>Voici quelques indications pour bien commencer.</i></p>
58 <p>En haut de la fenêtre, vous apercevez deux boutons.</p>
59 <p></p>
60 <ul><li style="margin-top:10px;">
61 Le bouton <img src="%(newtab)s"/> a deux usages :
62 <ul>
63 <li style="margin-top:10px;">
64 <b>activer les différents modules</b> : calculatrice, traceur de
65 courbes, géométrie dynamique...
66 <br/>
67 Les modules que vous activez le resteront au prochain démarrage.
68 </li>
69 <li style="margin-top:10px;">
70 <b>restaurer la session précédente</b>.<br/>
71 Vous pouvez ainsi reprendre vos calculs interrompus, votre figure
72 à moitié achevée... bref, tout votre travail en cours avant la fermeture du
73 logiciel.
74 </li>
75 </ul>
76 </li>
77 <li style="margin-top:10px;">
78 Le bouton <img src="%(closetab)s"/> sert, à l'inverse,
79 à <b>fermer un module</b>.
80 <br/>
81 Fermer les modules que vous n'utilisez pas permet un démarrage plus
82 rapide de Géophar.
83 </li>
84 </ul>
85 <br/>
86 </td></tr></table>
87 </body></html>""" % locals()
88
89 label = QLabel(texte)
90 label.setWordWrap(True)
91 sizer.addWidget(label)
92 sizer.addStretch()
93 self.setLayout(sizer)