Preferences/ConfigurationPages/Py3FlakesPage.py

changeset 88
3701923bccf2
child 791
9ec2ac20e54e
equal deleted inserted replaced
87:4cc5c8d1184d 88:3701923bccf2
1 # -*- coding: utf-8 -*-
2
3 # Copyright (c) 2010 Detlev Offenbach <detlev@die-offenbachs.de>
4 #
5
6 """
7 Module implementing the Py3Flakes configuration page.
8 """
9
10 from .ConfigurationPageBase import ConfigurationPageBase
11 from .Ui_Py3FlakesPage import Ui_Py3FlakesPage
12
13 import Preferences
14
15 class Py3FlakesPage(ConfigurationPageBase, Ui_Py3FlakesPage):
16 """
17 Class implementing the Python configuration page.
18 """
19 def __init__(self):
20 """
21 Constructor
22 """
23 ConfigurationPageBase.__init__(self)
24 self.setupUi(self)
25 self.setObjectName("Py3FlakesPage")
26
27 # set initial values
28 self.includeCheckBox.setChecked(
29 Preferences.getFlakes("IncludeInSyntaxCheck"))
30 self.ignoreStarImportCheckBox.setChecked(
31 Preferences.getFlakes("IgnoreStarImportWarnings"))
32
33 def save(self):
34 """
35 Public slot to save the Python configuration.
36 """
37 Preferences.setFlakes("IncludeInSyntaxCheck",
38 self.includeCheckBox.isChecked())
39 Preferences.setFlakes("IgnoreStarImportWarnings",
40 self.ignoreStarImportCheckBox.isChecked())
41
42 def create(dlg):
43 """
44 Module function to create the configuration page.
45
46 @param dlg reference to the configuration dialog
47 """
48 page = Py3FlakesPage()
49 return page

eric ide

mercurial