7 this file is part of the project scolasync
9 Copyright (C) 2010-2012 Georges Khaznadar <georgesk@ofset.org>
11 This program is free software: you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation, either version3 of the License, or
14 (at your option) any later version.
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with this program. If not, see <http://www.gnu.org/licenses/>.
34 QDialog.__init__(self, parent)
35 from Ui_preferences
import Ui_Dialog
45 self.ui.refreshDelaySlider.setEnabled(bool(state))
53 labelTxt=QApplication.translate(
"Dialog",
"{t} secondes",
None)
55 labelTxt=labelTxt.format(t=val)
56 self.ui.refreshDelayLabel.setText(labelTxt)
64 prefs[
"checkable"] =
True
65 prefs[
"mv"] = bool(self.ui.mvCheck.isChecked())
66 prefs[
"schoolFile"] = self.ui.lineEditSchoolFile.text()
67 prefs[
"workdir"] = self.ui.dirEdit.text()
68 prefs[
"manfile"] = self.ui.manFileEdit.text()
81 self.ui.mvCheck.setCheckState(state)
82 self.ui.lineEditSchoolFile.setText(prefs[
"schoolFile"])
83 self.ui.dirEdit.setText(prefs[
"workdir"])
84 self.ui.manFileEdit.setText(prefs[
"manfile"])
def setValues(self, prefs)
Met en place les préférences dans le dialogue.
def __init__
Le constructeur.
def updateRefreshLabel(self, val)
Met à jour l'affichage de la valeur du délai de rafraichissement.
def enableDelay(self, state)
active ou désactive le glisseur pour modifier le délai de rafraichissement