ScolaSync  5.1
checkBoxDialog.py
Aller à la documentation de ce fichier.
1 licenceEn="""
2  file checkBoxDialog.py
3  this file is part of the project scolasync
4 
5  Copyright (C) 2010 Georges Khaznadar <georgesk@ofset.org>
6 
7  This program is free software: you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation, either version3 of the License, or
10  (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program. If not, see <http://www.gnu.org/licenses/>.
19 """
20 
21 from PyQt5.QtCore import *
22 from PyQt5.QtWidgets import *
23 
24 import Ui_checkBoxDialog
25 
26 ##
27 #
28 # Un dialogue pour gérer les cases à cocher de l'application
29 #
31  ##
32  #
33  # Le constructeur
34  # @param parent un mainWindow, qui est censé contenir des données
35  #
36  def __init__(self,parent = None):
37  QDialog.__init__(self,parent)
38  self.mainWindow=parent
39  self.ui=Ui_checkBoxDialog.Ui_checkBoxDialog()
40  self.ui.setupUi(self)
41  self.ui.allButton.clicked.connect(self.all)
42  self.ui.ToggleButton.clicked.connect(self.toggle)
43  self.ui.NoneButton.clicked.connect(self.none)
44  self.ui.escButton.clicked.connect(self.esc)
45 
46  ##
47  #
48  # Fait cocher tous les baladeurs
49  #
50  def all(self):
51  self.mainWindow.checkAllSignal.emit()
52  self.close()
53 
54  ##
55  #
56  # Fait inverser tous les boutons
57  #
58  def toggle(self):
59  self.mainWindow.checkToggleSignal.emit()
60  self.close()
61 
62  ##
63  #
64  # Fait décocher tous les boutons
65  #
66  def none(self):
67  self.mainWindow.checkNoneSignal.emit()
68  self.close()
69 
70  ##
71  #
72  # termine le dialogue sans rien faire
73  #
74  def esc(self):
75  self.close()
76 
def toggle(self)
Fait inverser tous les boutons.
def all(self)
Fait cocher tous les baladeurs.
def none(self)
Fait décocher tous les boutons.
Un dialogue pour gérer les cases à cocher de l'application.
def esc(self)
termine le dialogue sans rien faire