eric6/Preferences/ConfigurationDialog.py

Tue, 02 Mar 2021 17:17:09 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 02 Mar 2021 17:17:09 +0100
changeset 8143
2c730d5fd177
parent 8069
1176a936efa4
child 8176
31965986ecd1
child 8205
4a0f1f896341
permissions
-rw-r--r--

Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.

0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
7923
91e843545d9a Updated copyright for 2021.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7900
diff changeset
3 # Copyright (c) 2002 - 2021 Detlev Offenbach <detlev@die-offenbachs.de>
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
7960
e8fc383322f7 Harmonized some user visible strings and changed the term 'eric6' to the more generic 'eric'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7923
diff changeset
7 Module implementing a dialog for the configuration of eric.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
10 import os
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
11 import types
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
12
7201
6b42677d7043 Modified sources to be in line with the minimum Qt/PyQt requirement (v 5.9.0).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7196
diff changeset
13 from PyQt5.QtCore import pyqtSignal, pyqtSlot, Qt, QMetaObject, QRect
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
14 from PyQt5.QtGui import QPixmap
7263
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
15 from PyQt5.QtWidgets import (
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
16 QSizePolicy, QSpacerItem, QWidget, QTreeWidget, QStackedWidget, QDialog,
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
17 QSplitter, QScrollArea, QApplication, QDialogButtonBox, QFrame,
7749
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
18 QVBoxLayout, QTreeWidgetItem, QLabel, QAbstractScrollArea
7263
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
19 )
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
20
55
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 53
diff changeset
21 from E5Gui.E5Application import e5App
2223
054c285dab38 Changed a bunch of forms to use the E5ClearableLineEdit and E5ClearableComboBox.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2190
diff changeset
22 from E5Gui.E5LineEdit import E5ClearableLineEdit
537
72b32daeb8d6 Continued replacing QMessageBox methods with own methods.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 501
diff changeset
23 from E5Gui import E5MessageBox
2101
5bac7dee9e1a Introduced the E5MainWindow class allowing to set a style for all the main windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2100
diff changeset
24 from E5Gui.E5MainWindow import E5MainWindow
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
25
7201
6b42677d7043 Modified sources to be in line with the minimum Qt/PyQt requirement (v 5.9.0).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7196
diff changeset
26 from Globals import isMacPlatform, getWebBrowserSupport
2326
7a9c4dafae62 Fixed an issue with the configuration dialog on Mac OS X.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
27
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
28 import Preferences
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
29
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
30 import UI.PixmapCache
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
31
3670
f0cb7579c0b4 Finished renaming eric5 for PyQt5 to eric6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3656
diff changeset
32 from eric6config import getConfig
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
33
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
34
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
35 class ConfigurationPageItem(QTreeWidgetItem):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
36 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
37 Class implementing a QTreeWidgetItem holding the configuration page data.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
38 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
39 def __init__(self, parent, text, pageName, iconFile):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
40 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
41 Constructor
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
42
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
43 @param parent parent widget of the item (QTreeWidget or
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
44 QTreeWidgetItem)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
45 @param text text to be displayed (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
46 @param pageName name of the configuration page (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
47 @param iconFile file name of the icon to be shown (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
48 """
2525
8b507a9a2d40 Script changes: Future import added, super calls modified and unicode behavior for str.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2474
diff changeset
49 super(ConfigurationPageItem, self).__init__(parent, [text])
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
50 self.setIcon(0, UI.PixmapCache.getIcon(iconFile))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
51
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
52 self.__pageName = pageName
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
53
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
54 def getPageName(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
55 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
56 Public method to get the name of the associated configuration page.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
57
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
58 @return name of the configuration page (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
59 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
60 return self.__pageName
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
61
4370
54dbb658f9e6 Corrected some code style issues and regenerated the source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4359
diff changeset
62
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
63 class ConfigurationWidget(QWidget):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
64 """
7960
e8fc383322f7 Harmonized some user visible strings and changed the term 'eric6' to the more generic 'eric'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7923
diff changeset
65 Class implementing a dialog for the configuration of eric.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
66
501
5c615a85241a Finished porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 500
diff changeset
67 @signal preferencesChanged() emitted after settings have been changed
1127
b1802ebe0066 Added capability to encrypt saved passwords with a master password and rearranged some configuration parameters related to security.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
68 @signal masterPasswordChanged(str, str) emitted after the master
b1802ebe0066 Added capability to encrypt saved passwords with a master password and rearranged some configuration parameters related to security.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
69 password has been changed with the old and the new password
1791
3e946bfda98a Added the capability to select the page via the Return button to the config dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1789
diff changeset
70 @signal accepted() emitted to indicate acceptance of the changes
3e946bfda98a Added the capability to select the page via the Return button to the config dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1789
diff changeset
71 @signal rejected() emitted to indicate rejection of the changes
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
72 """
492
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 465
diff changeset
73 preferencesChanged = pyqtSignal()
1127
b1802ebe0066 Added capability to encrypt saved passwords with a master password and rearranged some configuration parameters related to security.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
74 masterPasswordChanged = pyqtSignal(str, str)
1791
3e946bfda98a Added the capability to select the page via the Return button to the config dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1789
diff changeset
75 accepted = pyqtSignal()
3e946bfda98a Added the capability to select the page via the Return button to the config dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1789
diff changeset
76 rejected = pyqtSignal()
492
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 465
diff changeset
77
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
78 DefaultMode = 0
701
fc587a1c2f8b Added an option to configure the icon of the tray starter application.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 537
diff changeset
79 HelpBrowserMode = 1
fc587a1c2f8b Added an option to configure the icon of the tray starter application.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 537
diff changeset
80 TrayStarterMode = 2
4658
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
81 HexEditorMode = 3
4798
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
82 WebBrowserMode = 4
701
fc587a1c2f8b Added an option to configure the icon of the tray starter application.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 537
diff changeset
83
4216
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
84 def __init__(self, parent=None, fromEric=True, displayMode=DefaultMode,
6630
bddd12f27a4c Web Browser (QtWebKit): applied the changes of the new Web Brwoser to the QtWebKit based variant.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6386
diff changeset
85 expandedEntries=None):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
86 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
87 Constructor
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
88
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
89 @param parent The parent widget of this dialog. (QWidget)
7900
72b88fb20261 Corrected the use of '@keyparam' in the source documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7788
diff changeset
90 @param fromEric flag indicating a dialog generation from within the
7960
e8fc383322f7 Harmonized some user visible strings and changed the term 'eric6' to the more generic 'eric'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7923
diff changeset
91 eric ide (boolean)
7900
72b88fb20261 Corrected the use of '@keyparam' in the source documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7788
diff changeset
92 @param displayMode mode of the configuration dialog
4798
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
93 (DefaultMode, HelpBrowserMode, TrayStarterMode, HexEditorMode,
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
94 WebBrowserMode)
2964
84b65fb9e780 Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2907
diff changeset
95 @exception RuntimeError raised to indicate an invalid dialog mode
7900
72b88fb20261 Corrected the use of '@keyparam' in the source documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7788
diff changeset
96 @param expandedEntries list of entries to be shown expanded
4216
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
97 (list of strings)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
98 """
2525
8b507a9a2d40 Script changes: Future import added, super calls modified and unicode behavior for str.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2474
diff changeset
99 super(ConfigurationWidget, self).__init__(parent)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
100 self.fromEric = fromEric
701
fc587a1c2f8b Added an option to configure the icon of the tray starter application.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 537
diff changeset
101 self.displayMode = displayMode
6630
bddd12f27a4c Web Browser (QtWebKit): applied the changes of the new Web Brwoser to the QtWebKit based variant.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6386
diff changeset
102 self.__webEngine = getWebBrowserSupport() == "QtWebEngine"
5651
982465f8389c Fixed a few code style issues related to the usage of mutable types for default arguments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5532
diff changeset
103 expandedEntries = [] if expandedEntries is None else expandedEntries[:]
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
104
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
105 self.__setupUi()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
106
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
107 self.itmDict = {}
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
108
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
109 if not fromEric:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
110 from PluginManager.PluginManager import PluginManager
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
111 try:
53
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 15
diff changeset
112 self.pluginManager = e5App().getObject("PluginManager")
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
113 except KeyError:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
114 self.pluginManager = PluginManager(self)
53
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 15
diff changeset
115 e5App().registerObject("PluginManager", self.pluginManager)
6370
0c2dca290df5 ConfigurationDialog.py: fix to instantiate its own Virtual Environment Manager when it cannot find one.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6346
diff changeset
116
0c2dca290df5 ConfigurationDialog.py: fix to instantiate its own Virtual Environment Manager when it cannot find one.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6346
diff changeset
117 from VirtualEnv.VirtualenvManager import VirtualenvManager
0c2dca290df5 ConfigurationDialog.py: fix to instantiate its own Virtual Environment Manager when it cannot find one.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6346
diff changeset
118 try:
0c2dca290df5 ConfigurationDialog.py: fix to instantiate its own Virtual Environment Manager when it cannot find one.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6346
diff changeset
119 self.virtualenvManager = e5App().getObject("VirtualEnvManager")
0c2dca290df5 ConfigurationDialog.py: fix to instantiate its own Virtual Environment Manager when it cannot find one.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6346
diff changeset
120 except KeyError:
0c2dca290df5 ConfigurationDialog.py: fix to instantiate its own Virtual Environment Manager when it cannot find one.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6346
diff changeset
121 self.virtualenvManager = VirtualenvManager(self)
6386
91dc4fa9bc9c Fixed some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6381
diff changeset
122 e5App().registerObject("VirtualEnvManager",
91dc4fa9bc9c Fixed some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6381
diff changeset
123 self.virtualenvManager)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
124
701
fc587a1c2f8b Added an option to configure the icon of the tray starter application.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 537
diff changeset
125 if displayMode == ConfigurationWidget.DefaultMode:
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
126 self.configItems = {
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
127 # key : [display string, pixmap name, dialog module name or
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
128 # page creation function, parent key,
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
129 # reference to configuration page (must always be last)]
4216
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
130 # The dialog module must have the module function 'create' to
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
131 # create the configuration page. This must have the method
4216
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
132 # 'save' to save the settings.
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
133 "applicationPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
134 [self.tr("Application"), "preferences-application",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
135 "ApplicationPage", None, None],
6672
2af01e538c57 Started implementing support conda virtual environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
136 "condaPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
137 [self.tr("Conda"), "miniconda",
6672
2af01e538c57 Started implementing support conda virtual environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
138 "CondaPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
139 "cooperationPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
140 [self.tr("Cooperation"), "preferences-cooperation",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
141 "CooperationPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
142 "corbaPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
143 [self.tr("CORBA"), "preferences-orbit",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
144 "CorbaPage", None, None],
5765
39d8b26ff557 Made the colors of the diff dialogs configurable.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5736
diff changeset
145 "diffPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
146 [self.tr("Diff"), "diffFiles",
5765
39d8b26ff557 Made the colors of the diff dialogs configurable.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5736
diff changeset
147 "DiffColoursPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
148 "emailPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
149 [self.tr("Email"), "preferences-mail_generic",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
150 "EmailPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
151 "graphicsPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
152 [self.tr("Graphics"), "preferences-graphics",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
153 "GraphicsPage", None, None],
4658
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
154 "hexEditorPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
155 [self.tr("Hex Editor"), "hexEditor",
4658
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
156 "HexEditorPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
157 "iconsPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
158 [self.tr("Icons"), "preferences-icons",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
159 "IconsPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
160 "ircPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
161 [self.tr("IRC"), "irc",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
162 "IrcPage", None, None],
4095
c78cdc1a3c14 Added a configuration page for the log viewer to the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
163 "logViewerPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
164 [self.tr("Log-Viewer"), "preferences-logviewer",
4095
c78cdc1a3c14 Added a configuration page for the log viewer to the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
165 "LogViewerPage", None, None],
7069
a09a30251d4e MicroPythonReplWidget: extended the color support with selectable color schemes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6942
diff changeset
166 "microPythonPage":
a09a30251d4e MicroPythonReplWidget: extended the color support with selectable color schemes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6942
diff changeset
167 [self.tr("MicroPython"), "micropython",
a09a30251d4e MicroPythonReplWidget: extended the color support with selectable color schemes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6942
diff changeset
168 "MicroPythonPage", None, None],
4097
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4095
diff changeset
169 "mimeTypesPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
170 [self.tr("Mimetypes"), "preferences-mimetypes",
4097
ad2a6bd965d9 Added a configuration page to edit the list of mime types to be opened in an eric editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4095
diff changeset
171 "MimeTypesPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
172 "networkPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
173 [self.tr("Network"), "preferences-network",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
174 "NetworkPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
175 "notificationsPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
176 [self.tr("Notifications"),
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
177 "preferences-notifications",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
178 "NotificationsPage", None, None],
6782
390a45748883 PipInterface: started to convert the pip interface from a menu based plug-in to a widget based interface to be placed in the right side tools bar.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6672
diff changeset
179 "pipPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
180 [self.tr("Python Package Management"), "pypi",
6782
390a45748883 PipInterface: started to convert the pip interface from a menu based plug-in to a widget based interface to be placed in the right side tools bar.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6672
diff changeset
181 "PipPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
182 "pluginManagerPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
183 [self.tr("Plugin Manager"),
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
184 "preferences-pluginmanager",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
185 "PluginManagerPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
186 "printerPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
187 [self.tr("Printer"), "preferences-printer",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
188 "PrinterPage", None, None],
5968
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5967
diff changeset
189 "protobufPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
190 [self.tr("Protobuf"), "protobuf",
5968
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5967
diff changeset
191 "ProtobufPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
192 "pythonPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
193 [self.tr("Python"), "preferences-python",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
194 "PythonPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
195 "qtPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
196 [self.tr("Qt"), "preferences-qtlogo",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
197 "QtPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
198 "securityPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
199 [self.tr("Security"), "preferences-security",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
200 "SecurityPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
201 "shellPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
202 [self.tr("Shell"), "preferences-shell",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
203 "ShellPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
204 "tasksPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
205 [self.tr("Tasks"), "task",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
206 "TasksPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
207 "templatesPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
208 [self.tr("Templates"), "preferences-template",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
209 "TemplatesPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
210 "trayStarterPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
211 [self.tr("Tray Starter"), "erict",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
212 "TrayStarterPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
213 "vcsPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
214 [self.tr("Version Control Systems"),
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
215 "preferences-vcs",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
216 "VcsPage", None, None],
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
217
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
218 "0debuggerPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
219 [self.tr("Debugger"), "preferences-debugger",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
220 None, None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
221 "debuggerGeneralPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
222 [self.tr("General"), "preferences-debugger",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
223 "DebuggerGeneralPage", "0debuggerPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
224 "debuggerPython3Page":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
225 [self.tr("Python3"), "preferences-pyDebugger",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
226 "DebuggerPython3Page", "0debuggerPage", None],
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
227
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
228 "0editorPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
229 [self.tr("Editor"), "preferences-editor",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
230 None, None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
231 "editorAPIsPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
232 [self.tr("APIs"), "preferences-api",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
233 "EditorAPIsPage", "0editorPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
234 "editorAutocompletionPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
235 [self.tr("Autocompletion"),
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
236 "preferences-autocompletion",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
237 "EditorAutocompletionPage", "0editorPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
238 "editorAutocompletionQScintillaPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
239 [self.tr("QScintilla"), "qscintilla",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
240 "EditorAutocompletionQScintillaPage",
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
241 "editorAutocompletionPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
242 "editorCalltipsPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
243 [self.tr("Calltips"), "preferences-calltips",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
244 "EditorCalltipsPage", "0editorPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
245 "editorCalltipsQScintillaPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
246 [self.tr("QScintilla"), "qscintilla",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
247 "EditorCalltipsQScintillaPage", "editorCalltipsPage", None],
5912
b6643d36dddd Added the rich text view to the documentation viewer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5765
diff changeset
248 "editorDocViewerPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
249 [self.tr("Documentation Viewer"), "codeDocuViewer",
5912
b6643d36dddd Added the rich text view to the documentation viewer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5765
diff changeset
250 "EditorDocViewerPage", "0editorPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
251 "editorGeneralPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
252 [self.tr("General"), "preferences-general",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
253 "EditorGeneralPage", "0editorPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
254 "editorFilePage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
255 [self.tr("Filehandling"),
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
256 "preferences-filehandling",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
257 "EditorFilePage", "0editorPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
258 "editorSearchPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
259 [self.tr("Searching"), "preferences-search",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
260 "EditorSearchPage", "0editorPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
261 "editorSpellCheckingPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
262 [self.tr("Spell checking"),
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
263 "preferences-spellchecking",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
264 "EditorSpellCheckingPage", "0editorPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
265 "editorStylesPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
266 [self.tr("Style"), "preferences-styles",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
267 "EditorStylesPage", "0editorPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
268 "editorSyntaxPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
269 [self.tr("Code Checkers"), "preferences-debugger",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
270 "EditorSyntaxPage", "0editorPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
271 "editorTypingPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
272 [self.tr("Typing"), "preferences-typing",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
273 "EditorTypingPage", "0editorPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
274 "editorExportersPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
275 [self.tr("Exporters"), "preferences-exporters",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
276 "EditorExportersPage", "0editorPage", None],
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
277
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
278 "1editorLexerPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
279 [self.tr("Highlighters"),
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
280 "preferences-highlighting-styles",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
281 None, "0editorPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
282 "editorHighlightersPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
283 [self.tr("Filetype Associations"),
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
284 "preferences-highlighter-association",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
285 "EditorHighlightersPage", "1editorLexerPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
286 "editorHighlightingStylesPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
287 [self.tr("Styles"),
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
288 "preferences-highlighting-styles",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
289 "EditorHighlightingStylesPage", "1editorLexerPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
290 "editorKeywordsPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
291 [self.tr("Keywords"), "preferences-keywords",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
292 "EditorKeywordsPage", "1editorLexerPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
293 "editorPropertiesPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
294 [self.tr("Properties"), "preferences-properties",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
295 "EditorPropertiesPage", "1editorLexerPage", None],
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
296
4288
1c9c1c12111a Added a configuration page for mouse click handler support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4278
diff changeset
297 "1editorMouseClickHandlers":
1c9c1c12111a Added a configuration page for mouse click handler support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4278
diff changeset
298 [self.tr("Mouse Click Handlers"),
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
299 "preferences-mouse-click-handler",
4288
1c9c1c12111a Added a configuration page for mouse click handler support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4278
diff changeset
300 "EditorMouseClickHandlerPage", "0editorPage", None],
1c9c1c12111a Added a configuration page for mouse click handler support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4278
diff changeset
301
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
302 "0helpPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
303 [self.tr("Help"), "preferences-help",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
304 None, None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
305 "helpDocumentationPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
306 [self.tr("Help Documentation"),
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
307 "preferences-helpdocumentation",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
308 "HelpDocumentationPage", "0helpPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
309 "helpViewersPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
310 [self.tr("Help Viewers"),
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
311 "preferences-helpviewers",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
312 "HelpViewersPage", "0helpPage", None],
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
313
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
314 "0projectPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
315 [self.tr("Project"), "preferences-project",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
316 None, None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
317 "projectBrowserPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
318 [self.tr("Project Viewer"), "preferences-project",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
319 "ProjectBrowserPage", "0projectPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
320 "projectPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
321 [self.tr("Project"), "preferences-project",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
322 "ProjectPage", "0projectPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
323 "multiProjectPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
324 [self.tr("Multiproject"),
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
325 "preferences-multiproject",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
326 "MultiProjectPage", "0projectPage", None],
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
327
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
328 "0interfacePage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
329 [self.tr("Interface"), "preferences-interface",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
330 None, None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
331 "interfacePage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
332 [self.tr("Interface"), "preferences-interface",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
333 "InterfacePage", "0interfacePage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
334 "viewmanagerPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
335 [self.tr("Viewmanager"), "preferences-viewmanager",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
336 "ViewmanagerPage", "0interfacePage", None],
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
337 }
6630
bddd12f27a4c Web Browser (QtWebKit): applied the changes of the new Web Brwoser to the QtWebKit based variant.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6386
diff changeset
338 if self.__webEngine:
4619
aa2319888257 Prepared the code for missing QtWebKit (starting from Qt 5.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4552
diff changeset
339 self.configItems.update({
4806
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
340 "0webBrowserPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
341 [self.tr("Web Browser"), "ericWeb",
4806
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
342 None, None, None],
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
343 "webBrowserAppearancePage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
344 [self.tr("Appearance"), "preferences-styles",
4806
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
345 "WebBrowserAppearancePage", "0webBrowserPage", None],
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
346 "webBrowserPage":
7960
e8fc383322f7 Harmonized some user visible strings and changed the term 'eric6' to the more generic 'eric'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7923
diff changeset
347 [self.tr("eric Web Browser"), "ericWeb",
4806
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
348 "WebBrowserPage", "0webBrowserPage", None],
6041
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5968
diff changeset
349 "webBrowserVirusTotalPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
350 [self.tr("VirusTotal Interface"), "virustotal",
6041
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5968
diff changeset
351 "WebBrowserVirusTotalPage", "0webBrowserPage", None],
7201
6b42677d7043 Modified sources to be in line with the minimum Qt/PyQt requirement (v 5.9.0).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7196
diff changeset
352 "webBrowserSpellCheckingPage":
6b42677d7043 Modified sources to be in line with the minimum Qt/PyQt requirement (v 5.9.0).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7196
diff changeset
353 [self.tr("Spell checking"),
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
354 "preferences-spellchecking",
7201
6b42677d7043 Modified sources to be in line with the minimum Qt/PyQt requirement (v 5.9.0).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7196
diff changeset
355 "WebBrowserSpellCheckingPage", "0webBrowserPage",
6b42677d7043 Modified sources to be in line with the minimum Qt/PyQt requirement (v 5.9.0).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7196
diff changeset
356 None],
4619
aa2319888257 Prepared the code for missing QtWebKit (starting from Qt 5.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4552
diff changeset
357 })
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
358
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
359 self.configItems.update(
53
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 15
diff changeset
360 e5App().getObject("PluginManager").getPluginConfigData())
4216
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
361
4798
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
362 elif displayMode == ConfigurationWidget.WebBrowserMode:
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
363 self.configItems = {
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
364 # key : [display string, pixmap name, dialog module name or
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
365 # page creation function, parent key,
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
366 # reference to configuration page (must always be last)]
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
367 # The dialog module must have the module function 'create' to
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
368 # create the configuration page. This must have the method
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
369 # 'save' to save the settings.
4804
f794ff054d8f Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4798
diff changeset
370 "interfacePage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
371 [self.tr("Interface"), "preferences-interface",
7432
f5488e9ab8c6 WebBrowserInterfacePage: added the missing interface configuration page for the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
372 "WebBrowserInterfacePage", None, None],
4798
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
373 "networkPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
374 [self.tr("Network"), "preferences-network",
4798
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
375 "NetworkPage", None, None],
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
376 "printerPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
377 [self.tr("Printer"), "preferences-printer",
4798
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
378 "PrinterPage", None, None],
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
379 "securityPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
380 [self.tr("Security"), "preferences-security",
4798
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
381 "SecurityPage", None, None],
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
382
4875
4ee26909ac0d Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4807
diff changeset
383 "helpDocumentationPage":
4ee26909ac0d Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4807
diff changeset
384 [self.tr("Help Documentation"),
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
385 "preferences-helpdocumentation",
4875
4ee26909ac0d Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4807
diff changeset
386 "HelpDocumentationPage", None, None],
4804
f794ff054d8f Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4798
diff changeset
387
f794ff054d8f Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4798
diff changeset
388 "webBrowserAppearancePage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
389 [self.tr("Appearance"), "preferences-styles",
4804
f794ff054d8f Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4798
diff changeset
390 "WebBrowserAppearancePage", None, None],
4805
8ef007140046 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4804
diff changeset
391 "webBrowserPage":
7960
e8fc383322f7 Harmonized some user visible strings and changed the term 'eric6' to the more generic 'eric'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7923
diff changeset
392 [self.tr("eric Web Browser"), "ericWeb",
4805
8ef007140046 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4804
diff changeset
393 "WebBrowserPage", None, None],
8ef007140046 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4804
diff changeset
394
6041
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5968
diff changeset
395 "webBrowserVirusTotalPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
396 [self.tr("VirusTotal Interface"), "virustotal",
6041
415d36b1d3a6 Fixed an issue with the VirusTotal configuration page calling a wrong VirusTotal API for the web browser NG case.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5968
diff changeset
397 "WebBrowserVirusTotalPage", None, None],
7201
6b42677d7043 Modified sources to be in line with the minimum Qt/PyQt requirement (v 5.9.0).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7196
diff changeset
398
6b42677d7043 Modified sources to be in line with the minimum Qt/PyQt requirement (v 5.9.0).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7196
diff changeset
399 "webBrowserSpellCheckingPage":
6b42677d7043 Modified sources to be in line with the minimum Qt/PyQt requirement (v 5.9.0).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7196
diff changeset
400 [self.tr("Spell checking"),
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
401 "preferences-spellchecking",
7201
6b42677d7043 Modified sources to be in line with the minimum Qt/PyQt requirement (v 5.9.0).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7196
diff changeset
402 "WebBrowserSpellCheckingPage", None, None],
4798
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
403 }
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
404
701
fc587a1c2f8b Added an option to configure the icon of the tray starter application.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 537
diff changeset
405 elif displayMode == ConfigurationWidget.TrayStarterMode:
fc587a1c2f8b Added an option to configure the icon of the tray starter application.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 537
diff changeset
406 self.configItems = {
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
407 # key : [display string, pixmap name, dialog module name or
701
fc587a1c2f8b Added an option to configure the icon of the tray starter application.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 537
diff changeset
408 # page creation function, parent key,
fc587a1c2f8b Added an option to configure the icon of the tray starter application.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 537
diff changeset
409 # reference to configuration page (must always be last)]
4216
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
410 # The dialog module must have the module function 'create' to
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
411 # create the configuration page. This must have the method
4216
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
412 # 'save' to save the settings.
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
413 "trayStarterPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
414 [self.tr("Tray Starter"), "erict",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
415 "TrayStarterPage", None, None],
701
fc587a1c2f8b Added an option to configure the icon of the tray starter application.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 537
diff changeset
416 }
4216
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
417
4658
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
418 elif displayMode == ConfigurationWidget.HexEditorMode:
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
419 self.configItems = {
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
420 # key : [display string, pixmap name, dialog module name or
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
421 # page creation function, parent key,
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
422 # reference to configuration page (must always be last)]
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
423 # The dialog module must have the module function 'create' to
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
424 # create the configuration page. This must have the method
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
425 # 'save' to save the settings.
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
426 "hexEditorPage":
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7432
diff changeset
427 [self.tr("Hex Editor"), "hexEditor",
4658
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
428 "HexEditorPage", None, None],
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
429 }
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
430
701
fc587a1c2f8b Added an option to configure the icon of the tray starter application.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 537
diff changeset
431 else:
fc587a1c2f8b Added an option to configure the icon of the tray starter application.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 537
diff changeset
432 raise RuntimeError("Illegal mode value: {0}".format(displayMode))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
433
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
434 # generate the list entries
4216
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
435 self.__expandedEntries = []
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
436 for key in sorted(self.configItems.keys()):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
437 pageData = self.configItems[key]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
438 if pageData[3]:
4452
f45e447c950e Fixed an issue in the configuration dialog causing an exception if a configuration item named a non-existing parent.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4370
diff changeset
439 if pageData[3] in self.itmDict:
f45e447c950e Fixed an issue in the configuration dialog causing an exception if a configuration item named a non-existing parent.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4370
diff changeset
440 pitm = self.itmDict[pageData[3]] # get the parent item
f45e447c950e Fixed an issue in the configuration dialog causing an exception if a configuration item named a non-existing parent.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4370
diff changeset
441 else:
f45e447c950e Fixed an issue in the configuration dialog causing an exception if a configuration item named a non-existing parent.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4370
diff changeset
442 continue
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
443 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
444 pitm = self.configList
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
445 self.itmDict[key] = ConfigurationPageItem(pitm, pageData[0], key,
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
446 pageData[1])
8143
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
447 self.itmDict[key].setData(0, Qt.ItemDataRole.UserRole, key)
4216
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
448 if (not self.fromEric or
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
449 displayMode != ConfigurationWidget.DefaultMode or
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
450 key in expandedEntries):
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
451 self.itmDict[key].setExpanded(True)
8143
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
452 self.configList.sortByColumn(0, Qt.SortOrder.AscendingOrder)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
453
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
454 # set the initial size of the splitter
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
455 self.configSplitter.setSizes([200, 600])
7788
604a28a7767b ConfigurationDialog: added a fix for an optical glitch.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7786
diff changeset
456 self.configSplitter.splitterMoved.connect(self.__resizeConfigStack)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
457
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 492
diff changeset
458 self.configList.itemActivated.connect(self.__showConfigurationPage)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 492
diff changeset
459 self.configList.itemClicked.connect(self.__showConfigurationPage)
1791
3e946bfda98a Added the capability to select the page via the Return button to the config dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1789
diff changeset
460 self.buttonBox.accepted.connect(self.accept)
3e946bfda98a Added the capability to select the page via the Return button to the config dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1789
diff changeset
461 self.buttonBox.rejected.connect(self.rejected)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
462
4658
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
463 if displayMode in [ConfigurationWidget.HelpBrowserMode,
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
464 ConfigurationWidget.TrayStarterMode,
4798
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
465 ConfigurationWidget.HexEditorMode,
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
466 ConfigurationWidget.WebBrowserMode]:
4658
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
467 self.configListSearch.hide()
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
468
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
469 if displayMode not in [ConfigurationWidget.TrayStarterMode,
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
470 ConfigurationWidget.HexEditorMode]:
701
fc587a1c2f8b Added an option to configure the icon of the tray starter application.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 537
diff changeset
471 self.__initLexers()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
472
1791
3e946bfda98a Added the capability to select the page via the Return button to the config dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1789
diff changeset
473 def accept(self):
3e946bfda98a Added the capability to select the page via the Return button to the config dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1789
diff changeset
474 """
3e946bfda98a Added the capability to select the page via the Return button to the config dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1789
diff changeset
475 Public slot to accept the buttonBox accept signal.
3e946bfda98a Added the capability to select the page via the Return button to the config dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1789
diff changeset
476 """
2326
7a9c4dafae62 Fixed an issue with the configuration dialog on Mac OS X.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
477 if not isMacPlatform():
7a9c4dafae62 Fixed an issue with the configuration dialog on Mac OS X.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
478 wdg = self.focusWidget()
7a9c4dafae62 Fixed an issue with the configuration dialog on Mac OS X.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
479 if wdg == self.configList:
7a9c4dafae62 Fixed an issue with the configuration dialog on Mac OS X.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
480 return
1791
3e946bfda98a Added the capability to select the page via the Return button to the config dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1789
diff changeset
481
3e946bfda98a Added the capability to select the page via the Return button to the config dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1789
diff changeset
482 self.accepted.emit()
3e946bfda98a Added the capability to select the page via the Return button to the config dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1789
diff changeset
483
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
484 def __setupUi(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
485 """
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
486 Private method to perform the general setup of the configuration
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
487 widget.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
488 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
489 self.setObjectName("ConfigurationDialog")
7749
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
490 self.resize(900, 750)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
491 self.verticalLayout_2 = QVBoxLayout(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
492 self.verticalLayout_2.setSpacing(6)
2824
858412c29c34 Replaced the obsoleted method setMargin() with setContentsMargins().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2474
diff changeset
493 self.verticalLayout_2.setContentsMargins(6, 6, 6, 6)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
494 self.verticalLayout_2.setObjectName("verticalLayout_2")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
495
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
496 self.configSplitter = QSplitter(self)
8143
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
497 self.configSplitter.setOrientation(Qt.Orientation.Horizontal)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
498 self.configSplitter.setObjectName("configSplitter")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
499
1964
6a6a53f2d086 Added a filter edit to filter the configuration tree to the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1791
diff changeset
500 self.configListWidget = QWidget(self.configSplitter)
6a6a53f2d086 Added a filter edit to filter the configuration tree to the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1791
diff changeset
501 self.leftVBoxLayout = QVBoxLayout(self.configListWidget)
2824
858412c29c34 Replaced the obsoleted method setMargin() with setContentsMargins().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2474
diff changeset
502 self.leftVBoxLayout.setContentsMargins(0, 0, 0, 0)
1964
6a6a53f2d086 Added a filter edit to filter the configuration tree to the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1791
diff changeset
503 self.leftVBoxLayout.setSpacing(0)
6a6a53f2d086 Added a filter edit to filter the configuration tree to the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1791
diff changeset
504 self.leftVBoxLayout.setObjectName("leftVBoxLayout")
4213
0bbb56fc9e65 Changed the 'filter' function to a 'search' function disabling all entries, that don't contain the entered string.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4165
diff changeset
505 self.configListSearch = E5ClearableLineEdit(
0bbb56fc9e65 Changed the 'filter' function to a 'search' function disabling all entries, that don't contain the entered string.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4165
diff changeset
506 self, self.tr("Enter search text..."))
0bbb56fc9e65 Changed the 'filter' function to a 'search' function disabling all entries, that don't contain the entered string.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4165
diff changeset
507 self.configListSearch.setObjectName("configListSearch")
0bbb56fc9e65 Changed the 'filter' function to a 'search' function disabling all entries, that don't contain the entered string.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4165
diff changeset
508 self.leftVBoxLayout.addWidget(self.configListSearch)
1964
6a6a53f2d086 Added a filter edit to filter the configuration tree to the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1791
diff changeset
509 self.configList = QTreeWidget()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
510 self.configList.setObjectName("configList")
1964
6a6a53f2d086 Added a filter edit to filter the configuration tree to the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1791
diff changeset
511 self.leftVBoxLayout.addWidget(self.configList)
4213
0bbb56fc9e65 Changed the 'filter' function to a 'search' function disabling all entries, that don't contain the entered string.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4165
diff changeset
512 self.configListSearch.textChanged.connect(self.__searchTextChanged)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
513
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
514 self.scrollArea = QScrollArea(self.configSplitter)
8143
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
515 self.scrollArea.setFrameShape(QFrame.Shape.NoFrame)
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
516 self.scrollArea.setVerticalScrollBarPolicy(
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
517 Qt.ScrollBarPolicy.ScrollBarAlwaysOn)
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
518 self.scrollArea.setHorizontalScrollBarPolicy(
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
519 Qt.ScrollBarPolicy.ScrollBarAlwaysOn)
7749
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
520 self.scrollArea.setWidgetResizable(False)
7765
72ea8b7452a4 Fixed some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7749
diff changeset
521 self.scrollArea.setSizeAdjustPolicy(
8143
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
522 QAbstractScrollArea.SizeAdjustPolicy.AdjustToContents)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
523 self.scrollArea.setObjectName("scrollArea")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
524
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
525 self.configStack = QStackedWidget()
8143
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
526 self.configStack.setFrameShape(QFrame.Shape.Box)
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
527 self.configStack.setFrameShadow(QFrame.Shadow.Sunken)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
528 self.configStack.setObjectName("configStack")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
529 self.scrollArea.setWidget(self.configStack)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
530
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
531 self.emptyPage = QWidget()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
532 self.emptyPage.setGeometry(QRect(0, 0, 372, 591))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
533 self.emptyPage.setObjectName("emptyPage")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
534 self.vboxlayout = QVBoxLayout(self.emptyPage)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
535 self.vboxlayout.setSpacing(6)
2824
858412c29c34 Replaced the obsoleted method setMargin() with setContentsMargins().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2474
diff changeset
536 self.vboxlayout.setContentsMargins(6, 6, 6, 6)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
537 self.vboxlayout.setObjectName("vboxlayout")
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
538 spacerItem = QSpacerItem(
8143
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
539 20, 20, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
540 self.vboxlayout.addItem(spacerItem)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
541 self.emptyPagePixmap = QLabel(self.emptyPage)
8143
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
542 self.emptyPagePixmap.setAlignment(Qt.AlignmentFlag.AlignCenter)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
543 self.emptyPagePixmap.setObjectName("emptyPagePixmap")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
544 self.emptyPagePixmap.setPixmap(
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
545 QPixmap(os.path.join(getConfig('ericPixDir'), 'eric.png')))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
546 self.vboxlayout.addWidget(self.emptyPagePixmap)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
547 self.textLabel1 = QLabel(self.emptyPage)
8143
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
548 self.textLabel1.setAlignment(Qt.AlignmentFlag.AlignCenter)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
549 self.textLabel1.setObjectName("textLabel1")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
550 self.vboxlayout.addWidget(self.textLabel1)
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
551 spacerItem1 = QSpacerItem(
8143
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
552 20, 40, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
553 self.vboxlayout.addItem(spacerItem1)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
554 self.configStack.addWidget(self.emptyPage)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
555
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
556 self.verticalLayout_2.addWidget(self.configSplitter)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
557
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
558 self.buttonBox = QDialogButtonBox(self)
8143
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
559 self.buttonBox.setOrientation(Qt.Orientation.Horizontal)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
560 self.buttonBox.setStandardButtons(
8143
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
561 QDialogButtonBox.StandardButton.Apply |
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
562 QDialogButtonBox.StandardButton.Cancel |
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
563 QDialogButtonBox.StandardButton.Ok |
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
564 QDialogButtonBox.StandardButton.Reset
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
565 )
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
566 self.buttonBox.setObjectName("buttonBox")
7263
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
567 if (
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
568 not self.fromEric and
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
569 self.displayMode == ConfigurationWidget.DefaultMode
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
570 ):
8143
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
571 self.buttonBox.button(QDialogButtonBox.StandardButton.Apply).hide()
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
572 self.buttonBox.button(
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
573 QDialogButtonBox.StandardButton.Apply).setEnabled(False)
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
574 self.buttonBox.button(
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
575 QDialogButtonBox.StandardButton.Reset).setEnabled(False)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
576 self.verticalLayout_2.addWidget(self.buttonBox)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
577
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
578 self.setWindowTitle(self.tr("Preferences"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
579
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
580 self.configList.header().hide()
8143
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
581 self.configList.header().setSortIndicator(
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
582 0, Qt.SortOrder.AscendingOrder)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
583 self.configList.setSortingEnabled(True)
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
584 self.textLabel1.setText(
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
585 self.tr("Please select an entry of the list \n"
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
586 "to display the configuration page."))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
587
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
588 QMetaObject.connectSlotsByName(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
589 self.setTabOrder(self.configList, self.configStack)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
590
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
591 self.configStack.setCurrentWidget(self.emptyPage)
1964
6a6a53f2d086 Added a filter edit to filter the configuration tree to the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1791
diff changeset
592
6a6a53f2d086 Added a filter edit to filter the configuration tree to the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1791
diff changeset
593 self.configList.setFocus()
6a6a53f2d086 Added a filter edit to filter the configuration tree to the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1791
diff changeset
594
4213
0bbb56fc9e65 Changed the 'filter' function to a 'search' function disabling all entries, that don't contain the entered string.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4165
diff changeset
595 def __searchTextChanged(self, text):
1964
6a6a53f2d086 Added a filter edit to filter the configuration tree to the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1791
diff changeset
596 """
4213
0bbb56fc9e65 Changed the 'filter' function to a 'search' function disabling all entries, that don't contain the entered string.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4165
diff changeset
597 Private slot to handle a change of the search text.
1964
6a6a53f2d086 Added a filter edit to filter the configuration tree to the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1791
diff changeset
598
4213
0bbb56fc9e65 Changed the 'filter' function to a 'search' function disabling all entries, that don't contain the entered string.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4165
diff changeset
599 @param text text to search for (string)
1964
6a6a53f2d086 Added a filter edit to filter the configuration tree to the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1791
diff changeset
600 """
4213
0bbb56fc9e65 Changed the 'filter' function to a 'search' function disabling all entries, that don't contain the entered string.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4165
diff changeset
601 self.__searchChildItems(self.configList.invisibleRootItem(), text)
1964
6a6a53f2d086 Added a filter edit to filter the configuration tree to the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1791
diff changeset
602
4213
0bbb56fc9e65 Changed the 'filter' function to a 'search' function disabling all entries, that don't contain the entered string.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4165
diff changeset
603 def __searchChildItems(self, parent, text):
1964
6a6a53f2d086 Added a filter edit to filter the configuration tree to the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1791
diff changeset
604 """
4213
0bbb56fc9e65 Changed the 'filter' function to a 'search' function disabling all entries, that don't contain the entered string.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4165
diff changeset
605 Private method to enable child items based on a search string.
1964
6a6a53f2d086 Added a filter edit to filter the configuration tree to the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1791
diff changeset
606
6a6a53f2d086 Added a filter edit to filter the configuration tree to the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1791
diff changeset
607 @param parent reference to the parent item (QTreeWidgetItem)
4213
0bbb56fc9e65 Changed the 'filter' function to a 'search' function disabling all entries, that don't contain the entered string.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4165
diff changeset
608 @param text text to search for (string)
0bbb56fc9e65 Changed the 'filter' function to a 'search' function disabling all entries, that don't contain the entered string.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4165
diff changeset
609 @return flag indicating an enabled child item (boolean)
1964
6a6a53f2d086 Added a filter edit to filter the configuration tree to the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1791
diff changeset
610 """
4213
0bbb56fc9e65 Changed the 'filter' function to a 'search' function disabling all entries, that don't contain the entered string.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4165
diff changeset
611 childEnabled = False
0bbb56fc9e65 Changed the 'filter' function to a 'search' function disabling all entries, that don't contain the entered string.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4165
diff changeset
612 text = text.lower()
1964
6a6a53f2d086 Added a filter edit to filter the configuration tree to the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1791
diff changeset
613 for index in range(parent.childCount()):
6a6a53f2d086 Added a filter edit to filter the configuration tree to the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1791
diff changeset
614 itm = parent.child(index)
6a6a53f2d086 Added a filter edit to filter the configuration tree to the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1791
diff changeset
615 if itm.childCount() > 0:
7263
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
616 enable = (
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
617 self.__searchChildItems(itm, text) or
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
618 text == "" or
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
619 text in itm.text(0).lower()
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
620 )
1964
6a6a53f2d086 Added a filter edit to filter the configuration tree to the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1791
diff changeset
621 else:
4213
0bbb56fc9e65 Changed the 'filter' function to a 'search' function disabling all entries, that don't contain the entered string.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4165
diff changeset
622 enable = text == "" or text in itm.text(0).lower()
0bbb56fc9e65 Changed the 'filter' function to a 'search' function disabling all entries, that don't contain the entered string.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4165
diff changeset
623 if enable:
0bbb56fc9e65 Changed the 'filter' function to a 'search' function disabling all entries, that don't contain the entered string.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4165
diff changeset
624 childEnabled = True
0bbb56fc9e65 Changed the 'filter' function to a 'search' function disabling all entries, that don't contain the entered string.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4165
diff changeset
625 itm.setDisabled(not enable)
1964
6a6a53f2d086 Added a filter edit to filter the configuration tree to the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1791
diff changeset
626
4213
0bbb56fc9e65 Changed the 'filter' function to a 'search' function disabling all entries, that don't contain the entered string.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4165
diff changeset
627 return childEnabled
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
628
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
629 def __initLexers(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
630 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
631 Private method to initialize the dictionary of preferences lexers.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
632 """
2408
dc3a7c9d8f6e Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2326
diff changeset
633 import QScintilla.Lexers
7263
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
634 from .PreferencesLexer import (
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
635 PreferencesLexer, PreferencesLexerLanguageError
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
636 )
2408
dc3a7c9d8f6e Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2326
diff changeset
637
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
638 self.lexers = {}
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
639 for language in QScintilla.Lexers.getSupportedLanguages():
802
e8882d16384c Added a pyflakes checker function for Python 2 files and made some additional Python 2 related changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
640 if language not in self.lexers:
e8882d16384c Added a pyflakes checker function for Python 2 files and made some additional Python 2 related changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
641 try:
e8882d16384c Added a pyflakes checker function for Python 2 files and made some additional Python 2 related changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
642 self.lexers[language] = PreferencesLexer(language, self)
e8882d16384c Added a pyflakes checker function for Python 2 files and made some additional Python 2 related changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
643 except PreferencesLexerLanguageError:
e8882d16384c Added a pyflakes checker function for Python 2 files and made some additional Python 2 related changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
644 pass
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
645
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
646 def __importConfigurationPage(self, name):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
647 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
648 Private method to import a configuration page module.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
649
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
650 @param name name of the configuration page module (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
651 @return reference to the configuration page module
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
652 """
426
161992758137 Did some more string format conversions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 149
diff changeset
653 modName = "Preferences.ConfigurationPages.{0}".format(name)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
654 try:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
655 mod = __import__(modName)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
656 components = modName.split('.')
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
657 for comp in components[1:]:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
658 mod = getattr(mod, comp)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
659 return mod
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
660 except ImportError:
3020
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3010
diff changeset
661 E5MessageBox.critical(
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3010
diff changeset
662 self,
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
663 self.tr("Configuration Page Error"),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
664 self.tr("""<p>The configuration page <b>{0}</b>"""
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
665 """ could not be loaded.</p>""").format(name))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
666 return None
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
667
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
668 def __showConfigurationPage(self, itm, column):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
669 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
670 Private slot to show a selected configuration page.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
671
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
672 @param itm reference to the selected item (QTreeWidgetItem)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
673 @param column column that was selected (integer) (ignored)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
674 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
675 pageName = itm.getPageName()
990
93253de2ae77 Fixed an issue with the configuration dialog not highlighting the correct list entry, if the name was not unique.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 978
diff changeset
676 self.showConfigurationPageByName(pageName, setCurrent=False)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
677
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
678 def __initPage(self, pageData):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
679 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
680 Private method to initialize a configuration page.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
681
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
682 @param pageData data structure for the page to initialize
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
683 @return reference to the initialized page
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
684 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
685 page = None
12
1d8dd9706f46 First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7
diff changeset
686 if isinstance(pageData[2], types.FunctionType):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
687 page = pageData[2](self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
688 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
689 mod = self.__importConfigurationPage(pageData[2])
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
690 if mod:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
691 page = mod.create(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
692 if page is not None:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
693 self.configStack.addWidget(page)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
694 pageData[-1] = page
1109
9552b5e16a07 Added some more search engines to the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 990
diff changeset
695 try:
9552b5e16a07 Added some more search engines to the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 990
diff changeset
696 page.setMode(self.displayMode)
9552b5e16a07 Added some more search engines to the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 990
diff changeset
697 except AttributeError:
9552b5e16a07 Added some more search engines to the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 990
diff changeset
698 pass
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
699 return page
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
700
990
93253de2ae77 Fixed an issue with the configuration dialog not highlighting the correct list entry, if the name was not unique.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 978
diff changeset
701 def showConfigurationPageByName(self, pageName, setCurrent=True):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
702 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
703 Public slot to show a named configuration page.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
704
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
705 @param pageName name of the configuration page to show (string)
990
93253de2ae77 Fixed an issue with the configuration dialog not highlighting the correct list entry, if the name was not unique.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 978
diff changeset
706 @param setCurrent flag indicating to set the current item (boolean)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
707 """
4143
565002034bdb Fixed a situation in the config dialog that could cause an issue, if a plug-in gets uninstalled after its config page was the last one been shown.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4128
diff changeset
708 if pageName == "empty" or pageName not in self.configItems:
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
709 page = self.emptyPage
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
710 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
711 pageData = self.configItems[pageName]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
712 if pageData[-1] is None and pageData[2] is not None:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
713 # the page was not loaded yet, create it
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
714 page = self.__initPage(pageData)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
715 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
716 page = pageData[-1]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
717 if page is None:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
718 page = self.emptyPage
990
93253de2ae77 Fixed an issue with the configuration dialog not highlighting the correct list entry, if the name was not unique.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 978
diff changeset
719 elif setCurrent:
3025
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
720 items = self.configList.findItems(
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
721 pageData[0],
8143
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
722 Qt.MatchFlag.MatchFixedString |
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
723 Qt.MatchFlag.MatchRecursive)
4214
b8fd47f8b707 Fixed an issue causing a wrong item selected in the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4213
diff changeset
724 for item in items:
8143
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
725 if item.data(0, Qt.ItemDataRole.UserRole) == pageName:
4214
b8fd47f8b707 Fixed an issue causing a wrong item selected in the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4213
diff changeset
726 self.configList.setCurrentItem(item)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
727 self.configStack.setCurrentWidget(page)
7749
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
728 self.__resizeConfigStack()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
729
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
730 if page != self.emptyPage:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
731 page.polishPage()
8143
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
732 self.buttonBox.button(
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
733 QDialogButtonBox.StandardButton.Apply).setEnabled(True)
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
734 self.buttonBox.button(
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
735 QDialogButtonBox.StandardButton.Reset).setEnabled(True)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
736 else:
8143
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
737 self.buttonBox.button(
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
738 QDialogButtonBox.StandardButton.Apply).setEnabled(False)
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
739 self.buttonBox.button(
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
740 QDialogButtonBox.StandardButton.Reset).setEnabled(False)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
741
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
742 # reset scrollbars
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
743 for sb in [self.scrollArea.horizontalScrollBar(),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
744 self.scrollArea.verticalScrollBar()]:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
745 if sb:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
746 sb.setValue(0)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
747
934
657269549914 Changed the configuration dialog to remember the last show page name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 825
diff changeset
748 self.__currentConfigurationPageName = pageName
7749
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
749
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
750 def resizeEvent(self, evt):
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
751 """
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
752 Protected method to handle the resizing of the widget.
934
657269549914 Changed the configuration dialog to remember the last show page name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 825
diff changeset
753
7749
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
754 @param evt reference to the event object
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
755 @type QResizeEvent
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
756 """
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
757 self.__resizeConfigStack()
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
758
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
759 def __resizeConfigStack(self):
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
760 """
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
761 Private method to resize the stack of configuration pages.
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
762 """
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
763 ssize = self.scrollArea.size()
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
764 if self.scrollArea.horizontalScrollBar():
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
765 ssize.setHeight(
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
766 ssize.height() -
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
767 self.scrollArea.horizontalScrollBar().height() - 2)
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
768 if self.scrollArea.verticalScrollBar():
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
769 ssize.setWidth(
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
770 ssize.width() -
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
771 self.scrollArea.verticalScrollBar().width() - 2)
7786
dd4a55fedea9 Configuration Dialog: optimized the visual of the Qt configuration page and fixed an issue setting the right size of the pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7780
diff changeset
772 psize = self.configStack.currentWidget().minimumSizeHint()
7749
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
773 self.configStack.resize(max(ssize.width(), psize.width()),
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
774 max(ssize.height(), psize.height()))
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
775
934
657269549914 Changed the configuration dialog to remember the last show page name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 825
diff changeset
776 def getConfigurationPageName(self):
657269549914 Changed the configuration dialog to remember the last show page name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 825
diff changeset
777 """
657269549914 Changed the configuration dialog to remember the last show page name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 825
diff changeset
778 Public method to get the page name of the current page.
657269549914 Changed the configuration dialog to remember the last show page name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 825
diff changeset
779
2964
84b65fb9e780 Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2907
diff changeset
780 @return page name of the current page (string)
934
657269549914 Changed the configuration dialog to remember the last show page name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 825
diff changeset
781 """
657269549914 Changed the configuration dialog to remember the last show page name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 825
diff changeset
782 return self.__currentConfigurationPageName
657269549914 Changed the configuration dialog to remember the last show page name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 825
diff changeset
783
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
784 def calledFromEric(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
785 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
786 Public method to check, if invoked from within eric.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
787
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
788 @return flag indicating invocation from within eric (boolean)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
789 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
790 return self.fromEric
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
791
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
792 def getPage(self, pageName):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
793 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
794 Public method to get a reference to the named page.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
795
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
796 @param pageName name of the configuration page (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
797 @return reference to the page or None, indicating page was
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
798 not loaded yet
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
799 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
800 return self.configItems[pageName][-1]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
801
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
802 def getLexers(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
803 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
804 Public method to get a reference to the lexers dictionary.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
805
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
806 @return reference to the lexers dictionary
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
807 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
808 return self.lexers
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
809
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
810 def setPreferences(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
811 """
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
812 Public method called to store the selected values into the preferences
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
813 storage.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
814 """
6188
5a6ae3be31e6 Fixed some loop related coding issues detected by the extended code style checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
815 for pageData in self.configItems.values():
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
816 if pageData[-1]:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
817 pageData[-1].save()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
818 # page was loaded (and possibly modified)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
819 QApplication.processEvents() # ensure HMI is responsive
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
820
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
821 def on_buttonBox_clicked(self, button):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
822 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
823 Private slot called by a button of the button box clicked.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
824
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
825 @param button button that was clicked (QAbstractButton)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
826 """
8143
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
827 if button == self.buttonBox.button(
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
828 QDialogButtonBox.StandardButton.Apply
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
829 ):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
830 self.on_applyButton_clicked()
8143
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
831 elif button == self.buttonBox.button(
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
832 QDialogButtonBox.StandardButton.Reset
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
833 ):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
834 self.on_resetButton_clicked()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
835
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
836 @pyqtSlot()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
837 def on_applyButton_clicked(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
838 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
839 Private slot called to apply the settings of the current page.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
840 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
841 if self.configStack.currentWidget() != self.emptyPage:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
842 page = self.configStack.currentWidget()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
843 savedState = page.saveState()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
844 page.save()
492
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 465
diff changeset
845 self.preferencesChanged.emit()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
846 if savedState is not None:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
847 page.setState(savedState)
4658
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
848 page.polishPage()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
849
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
850 @pyqtSlot()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
851 def on_resetButton_clicked(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
852 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
853 Private slot called to reset the settings of the current page.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
854 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
855 if self.configStack.currentWidget() != self.emptyPage:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
856 currentPage = self.configStack.currentWidget()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
857 savedState = currentPage.saveState()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
858 pageName = self.configList.currentItem().getPageName()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
859 self.configStack.removeWidget(currentPage)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
860 if pageName == "editorHighlightingStylesPage":
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
861 self.__initLexers()
97
c4086afea02b Finished cleaning up the code supported by py3flakes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 88
diff changeset
862 self.configItems[pageName][-1] = None
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
863
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
864 self.showConfigurationPageByName(pageName)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
865 if savedState is not None:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
866 self.configStack.currentWidget().setState(savedState)
4216
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
867
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
868 def getExpandedEntries(self):
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
869 """
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
870 Public method to get a list of expanded entries.
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
871
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
872 @return list of expanded entries (list of string)
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
873 """
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
874 return self.__expandedEntries
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
875
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
876 @pyqtSlot(QTreeWidgetItem)
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
877 def on_configList_itemCollapsed(self, item):
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
878 """
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
879 Private slot handling a list entry being collapsed.
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
880
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
881 @param item reference to the collapsed item (QTreeWidgetItem)
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
882 """
8143
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
883 pageName = item.data(0, Qt.ItemDataRole.UserRole)
4216
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
884 if pageName in self.__expandedEntries:
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
885 self.__expandedEntries.remove(pageName)
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
886
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
887 @pyqtSlot(QTreeWidgetItem)
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
888 def on_configList_itemExpanded(self, item):
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
889 """
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
890 Private slot handling a list entry being expanded.
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
891
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
892 @param item reference to the expanded item (QTreeWidgetItem)
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
893 """
8143
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
894 pageName = item.data(0, Qt.ItemDataRole.UserRole)
4216
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
895 if pageName not in self.__expandedEntries:
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
896 self.__expandedEntries.append(pageName)
4806
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
897
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
898 def isUsingWebEngine(self):
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
899 """
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
900 Public method to get an indication, if QtWebEngine is being used.
4917
682750cc7bd5 Corrected some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4875
diff changeset
901
682750cc7bd5 Corrected some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4875
diff changeset
902 @return flag indicating the use of QtWebEngine
682750cc7bd5 Corrected some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4875
diff changeset
903 @rtype bool
4806
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
904 """
7263
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
905 return (
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
906 self.__webEngine or
4806
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
907 self.displayMode == ConfigurationWidget.WebBrowserMode
7263
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
908 )
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
909
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
910
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
911 class ConfigurationDialog(QDialog):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
912 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
913 Class for the dialog variant.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
914
501
5c615a85241a Finished porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 500
diff changeset
915 @signal preferencesChanged() emitted after settings have been changed
1127
b1802ebe0066 Added capability to encrypt saved passwords with a master password and rearranged some configuration parameters related to security.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
916 @signal masterPasswordChanged(str, str) emitted after the master
b1802ebe0066 Added capability to encrypt saved passwords with a master password and rearranged some configuration parameters related to security.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
917 password has been changed with the old and the new password
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
918 """
492
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 465
diff changeset
919 preferencesChanged = pyqtSignal()
1127
b1802ebe0066 Added capability to encrypt saved passwords with a master password and rearranged some configuration parameters related to security.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
920 masterPasswordChanged = pyqtSignal(str, str)
492
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 465
diff changeset
921
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
922 DefaultMode = ConfigurationWidget.DefaultMode
701
fc587a1c2f8b Added an option to configure the icon of the tray starter application.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 537
diff changeset
923 HelpBrowserMode = ConfigurationWidget.HelpBrowserMode
fc587a1c2f8b Added an option to configure the icon of the tray starter application.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 537
diff changeset
924 TrayStarterMode = ConfigurationWidget.TrayStarterMode
4658
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
925 HexEditorMode = ConfigurationWidget.HexEditorMode
4798
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
926 WebBrowserMode = ConfigurationWidget.WebBrowserMode
701
fc587a1c2f8b Added an option to configure the icon of the tray starter application.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 537
diff changeset
927
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
928 def __init__(self, parent=None, name=None, modal=False,
4216
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
929 fromEric=True, displayMode=ConfigurationWidget.DefaultMode,
6630
bddd12f27a4c Web Browser (QtWebKit): applied the changes of the new Web Brwoser to the QtWebKit based variant.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6386
diff changeset
930 expandedEntries=None):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
931 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
932 Constructor
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
933
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
934 @param parent The parent widget of this dialog. (QWidget)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
935 @param name The name of this dialog. string
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
936 @param modal Flag indicating a modal dialog. (boolean)
7900
72b88fb20261 Corrected the use of '@keyparam' in the source documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7788
diff changeset
937 @param fromEric flag indicating a dialog generation from within the
7960
e8fc383322f7 Harmonized some user visible strings and changed the term 'eric6' to the more generic 'eric'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7923
diff changeset
938 eric ide (boolean)
7900
72b88fb20261 Corrected the use of '@keyparam' in the source documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7788
diff changeset
939 @param displayMode mode of the configuration dialog
4798
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
940 (DefaultMode, HelpBrowserMode, TrayStarterMode, HexEditorMode,
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
941 WebBrowserMode)
7900
72b88fb20261 Corrected the use of '@keyparam' in the source documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7788
diff changeset
942 @param expandedEntries list of entries to be shown expanded
4216
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
943 (list of strings)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
944 """
2525
8b507a9a2d40 Script changes: Future import added, super calls modified and unicode behavior for str.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2474
diff changeset
945 super(ConfigurationDialog, self).__init__(parent)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
946 if name:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
947 self.setObjectName(name)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
948 self.setModal(modal)
8143
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8069
diff changeset
949 self.setWindowFlags(Qt.WindowType.Window)
4278
ccd1e13cb9bd Fixed issues where dialogs could not be minimized on some desktop environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4216
diff changeset
950
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
951 self.layout = QVBoxLayout(self)
2824
858412c29c34 Replaced the obsoleted method setMargin() with setContentsMargins().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2474
diff changeset
952 self.layout.setContentsMargins(0, 0, 0, 0)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
953 self.layout.setSpacing(0)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
954
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
955 self.cw = ConfigurationWidget(self, fromEric=fromEric,
4216
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
956 displayMode=displayMode,
6630
bddd12f27a4c Web Browser (QtWebKit): applied the changes of the new Web Brwoser to the QtWebKit based variant.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6386
diff changeset
957 expandedEntries=expandedEntries)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
958 size = self.cw.size()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
959 self.layout.addWidget(self.cw)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
960 self.resize(size)
3189
9a21c547de5f Fixed issues showing the correct window title for some dialogs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
961 self.setWindowTitle(self.cw.windowTitle())
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
962
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3190
diff changeset
963 self.cw.accepted.connect(self.accept)
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3190
diff changeset
964 self.cw.rejected.connect(self.reject)
492
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 465
diff changeset
965 self.cw.preferencesChanged.connect(self.__preferencesChanged)
1127
b1802ebe0066 Added capability to encrypt saved passwords with a master password and rearranged some configuration parameters related to security.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
966 self.cw.masterPasswordChanged.connect(self.__masterPasswordChanged)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
967
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
968 def __preferencesChanged(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
969 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
970 Private slot to handle a change of the preferences.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
971 """
492
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 465
diff changeset
972 self.preferencesChanged.emit()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
973
1127
b1802ebe0066 Added capability to encrypt saved passwords with a master password and rearranged some configuration parameters related to security.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
974 def __masterPasswordChanged(self, oldPassword, newPassword):
b1802ebe0066 Added capability to encrypt saved passwords with a master password and rearranged some configuration parameters related to security.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
975 """
b1802ebe0066 Added capability to encrypt saved passwords with a master password and rearranged some configuration parameters related to security.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
976 Private slot to handle the change of the master password.
b1802ebe0066 Added capability to encrypt saved passwords with a master password and rearranged some configuration parameters related to security.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
977
b1802ebe0066 Added capability to encrypt saved passwords with a master password and rearranged some configuration parameters related to security.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
978 @param oldPassword current master password (string)
b1802ebe0066 Added capability to encrypt saved passwords with a master password and rearranged some configuration parameters related to security.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
979 @param newPassword new master password (string)
b1802ebe0066 Added capability to encrypt saved passwords with a master password and rearranged some configuration parameters related to security.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
980 """
b1802ebe0066 Added capability to encrypt saved passwords with a master password and rearranged some configuration parameters related to security.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
981 self.masterPasswordChanged.emit(oldPassword, newPassword)
b1802ebe0066 Added capability to encrypt saved passwords with a master password and rearranged some configuration parameters related to security.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
982
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
983 def showConfigurationPageByName(self, pageName):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
984 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
985 Public slot to show a named configuration page.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
986
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
987 @param pageName name of the configuration page to show (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
988 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
989 self.cw.showConfigurationPageByName(pageName)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
990
934
657269549914 Changed the configuration dialog to remember the last show page name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 825
diff changeset
991 def getConfigurationPageName(self):
657269549914 Changed the configuration dialog to remember the last show page name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 825
diff changeset
992 """
657269549914 Changed the configuration dialog to remember the last show page name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 825
diff changeset
993 Public method to get the page name of the current page.
657269549914 Changed the configuration dialog to remember the last show page name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 825
diff changeset
994
2964
84b65fb9e780 Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2907
diff changeset
995 @return page name of the current page (string)
934
657269549914 Changed the configuration dialog to remember the last show page name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 825
diff changeset
996 """
657269549914 Changed the configuration dialog to remember the last show page name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 825
diff changeset
997 return self.cw.getConfigurationPageName()
657269549914 Changed the configuration dialog to remember the last show page name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 825
diff changeset
998
4216
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
999 def getExpandedEntries(self):
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
1000 """
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
1001 Public method to get a list of expanded entries.
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
1002
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
1003 @return list of expanded entries (list of string)
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
1004 """
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
1005 return self.cw.getExpandedEntries()
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
1006
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1007 def setPreferences(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1008 """
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
1009 Public method called to store the selected values into the preferences
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
1010 storage.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1011 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1012 self.cw.setPreferences()
1791
3e946bfda98a Added the capability to select the page via the Return button to the config dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1789
diff changeset
1013
3e946bfda98a Added the capab