Preferences/ConfigurationDialog.py

changeset 3670
f0cb7579c0b4
parent 3656
441956d8fce5
child 4021
195a471c327b
equal deleted inserted replaced
3669:ac84ac3c0f05 3670:f0cb7579c0b4
2 2
3 # Copyright (c) 2002 - 2014 Detlev Offenbach <detlev@die-offenbachs.de> 3 # Copyright (c) 2002 - 2014 Detlev Offenbach <detlev@die-offenbachs.de>
4 # 4 #
5 5
6 """ 6 """
7 Module implementing a dialog for the configuration of eric5. 7 Module implementing a dialog for the configuration of eric6.
8 """ 8 """
9 9
10 from __future__ import unicode_literals 10 from __future__ import unicode_literals
11 11
12 import os 12 import os
27 27
28 import Preferences 28 import Preferences
29 29
30 import UI.PixmapCache 30 import UI.PixmapCache
31 31
32 from eric5config import getConfig 32 from eric6config import getConfig
33 33
34 34
35 class ConfigurationPageItem(QTreeWidgetItem): 35 class ConfigurationPageItem(QTreeWidgetItem):
36 """ 36 """
37 Class implementing a QTreeWidgetItem holding the configuration page data. 37 Class implementing a QTreeWidgetItem holding the configuration page data.
60 return self.__pageName 60 return self.__pageName
61 61
62 62
63 class ConfigurationWidget(QWidget): 63 class ConfigurationWidget(QWidget):
64 """ 64 """
65 Class implementing a dialog for the configuration of eric5. 65 Class implementing a dialog for the configuration of eric6.
66 66
67 @signal preferencesChanged() emitted after settings have been changed 67 @signal preferencesChanged() emitted after settings have been changed
68 @signal masterPasswordChanged(str, str) emitted after the master 68 @signal masterPasswordChanged(str, str) emitted after the master
69 password has been changed with the old and the new password 69 password has been changed with the old and the new password
70 @signal accepted() emitted to indicate acceptance of the changes 70 @signal accepted() emitted to indicate acceptance of the changes
83 """ 83 """
84 Constructor 84 Constructor
85 85
86 @param parent The parent widget of this dialog. (QWidget) 86 @param parent The parent widget of this dialog. (QWidget)
87 @keyparam fromEric flag indicating a dialog generation from within the 87 @keyparam fromEric flag indicating a dialog generation from within the
88 eric5 ide (boolean) 88 eric6 ide (boolean)
89 @keyparam displayMode mode of the configuration dialog 89 @keyparam displayMode mode of the configuration dialog
90 (DefaultMode, HelpBrowserMode, TrayStarterMode) 90 (DefaultMode, HelpBrowserMode, TrayStarterMode)
91 @exception RuntimeError raised to indicate an invalid dialog mode 91 @exception RuntimeError raised to indicate an invalid dialog mode
92 """ 92 """
93 assert displayMode in ( 93 assert displayMode in (
279 "HelpViewersPage", "0helpPage", None], 279 "HelpViewersPage", "0helpPage", None],
280 "helpVirusTotalPage": 280 "helpVirusTotalPage":
281 [self.tr("VirusTotal Interface"), "virustotal.png", 281 [self.tr("VirusTotal Interface"), "virustotal.png",
282 "HelpVirusTotalPage", "0helpPage", None], 282 "HelpVirusTotalPage", "0helpPage", None],
283 "helpWebBrowserPage": 283 "helpWebBrowserPage":
284 [self.tr("eric5 Web Browser"), "ericWeb.png", 284 [self.tr("eric6 Web Browser"), "ericWeb.png",
285 "HelpWebBrowserPage", "0helpPage", None], 285 "HelpWebBrowserPage", "0helpPage", None],
286 286
287 "0projectPage": 287 "0projectPage":
288 [self.tr("Project"), "preferences-project.png", 288 [self.tr("Project"), "preferences-project.png",
289 None, None, None], 289 None, None, None],
344 "HelpDocumentationPage", "0helpPage", None], 344 "HelpDocumentationPage", "0helpPage", None],
345 "helpVirusTotalPage": 345 "helpVirusTotalPage":
346 [self.tr("VirusTotal Interface"), "virustotal.png", 346 [self.tr("VirusTotal Interface"), "virustotal.png",
347 "HelpVirusTotalPage", "0helpPage", None], 347 "HelpVirusTotalPage", "0helpPage", None],
348 "helpWebBrowserPage": 348 "helpWebBrowserPage":
349 [self.tr("eric5 Web Browser"), "ericWeb.png", 349 [self.tr("eric6 Web Browser"), "ericWeb.png",
350 "HelpWebBrowserPage", "0helpPage", None], 350 "HelpWebBrowserPage", "0helpPage", None],
351 } 351 }
352 elif displayMode == ConfigurationWidget.TrayStarterMode: 352 elif displayMode == ConfigurationWidget.TrayStarterMode:
353 self.configItems = { 353 self.configItems = {
354 # key : [display string, pixmap name, dialog module name or 354 # key : [display string, pixmap name, dialog module name or
762 762
763 @param parent The parent widget of this dialog. (QWidget) 763 @param parent The parent widget of this dialog. (QWidget)
764 @param name The name of this dialog. string 764 @param name The name of this dialog. string
765 @param modal Flag indicating a modal dialog. (boolean) 765 @param modal Flag indicating a modal dialog. (boolean)
766 @keyparam fromEric flag indicating a dialog generation from within the 766 @keyparam fromEric flag indicating a dialog generation from within the
767 eric5 ide (boolean) 767 eric6 ide (boolean)
768 @keyparam displayMode mode of the configuration dialog 768 @keyparam displayMode mode of the configuration dialog
769 (DefaultMode, HelpBrowserMode, TrayStarterMode) 769 (DefaultMode, HelpBrowserMode, TrayStarterMode)
770 """ 770 """
771 super(ConfigurationDialog, self).__init__(parent) 771 super(ConfigurationDialog, self).__init__(parent)
772 if name: 772 if name:

eric ide

mercurial