Mon, 26 Dec 2011 19:32:02 +0100
Updated copyright for 2012.
88
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
1 | # -*- coding: utf-8 -*- |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
2 | |
1510
e75ecf2bd9dd
Updated copyright for 2012.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
791
diff
changeset
|
3 | # Copyright (c) 2010 - 2012 Detlev Offenbach <detlev@die-offenbachs.de> |
88
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
4 | # |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
5 | |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
6 | """ |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
7 | Module implementing the Py3Flakes configuration page. |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
8 | """ |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
9 | |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
10 | from .ConfigurationPageBase import ConfigurationPageBase |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
11 | from .Ui_Py3FlakesPage import Ui_Py3FlakesPage |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
12 | |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
13 | import Preferences |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
14 | |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
15 | class Py3FlakesPage(ConfigurationPageBase, Ui_Py3FlakesPage): |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
16 | """ |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
17 | Class implementing the Python configuration page. |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
18 | """ |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
19 | def __init__(self): |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
20 | """ |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
21 | Constructor |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
22 | """ |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
23 | ConfigurationPageBase.__init__(self) |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
24 | self.setupUi(self) |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
25 | self.setObjectName("Py3FlakesPage") |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
26 | |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
27 | # set initial values |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
28 | self.includeCheckBox.setChecked( |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
29 | Preferences.getFlakes("IncludeInSyntaxCheck")) |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
30 | self.ignoreStarImportCheckBox.setChecked( |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
31 | Preferences.getFlakes("IgnoreStarImportWarnings")) |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
32 | |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
33 | def save(self): |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
34 | """ |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
35 | Public slot to save the Python configuration. |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
36 | """ |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
37 | Preferences.setFlakes("IncludeInSyntaxCheck", |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
38 | self.includeCheckBox.isChecked()) |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
39 | Preferences.setFlakes("IgnoreStarImportWarnings", |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
40 | self.ignoreStarImportCheckBox.isChecked()) |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
41 | |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
42 | def create(dlg): |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
43 | """ |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
44 | Module function to create the configuration page. |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
45 | |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
46 | @param dlg reference to the configuration dialog |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
47 | """ |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
48 | page = Py3FlakesPage() |
3701923bccf2
Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
49 | return page |