eric6/Preferences/ConfigurationDialog.py

Fri, 16 Oct 2020 17:26:50 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Fri, 16 Oct 2020 17:26:50 +0200
changeset 7788
604a28a7767b
parent 7786
dd4a55fedea9
child 7824
096b3ebc1409
child 7900
72b88fb20261
permissions
-rw-r--r--

ConfigurationDialog: added a fix for an optical glitch.

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
7360
9190402e4505 Updated copyright for 2020.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7263
diff changeset
3 # Copyright (c) 2002 - 2020 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 """
3670
f0cb7579c0b4 Finished renaming eric5 for PyQt5 to eric6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3656
diff changeset
7 Module implementing a dialog for the configuration of eric6.
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 """
3670
f0cb7579c0b4 Finished renaming eric5 for PyQt5 to eric6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3656
diff changeset
65 Class implementing a dialog for the configuration of eric6.
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)
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
90 @keyparam fromEric flag indicating a dialog generation from within the
3670
f0cb7579c0b4 Finished renaming eric5 for PyQt5 to eric6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3656
diff changeset
91 eric6 ide (boolean)
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
92 @keyparam 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
4216
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
96 @keyparam expandedEntries list of entries to be shown expanded
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":
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
347 [self.tr("eric6 Web Browser"), "ericWeb",
4806
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
348 "WebBrowserPage", "0webBrowserPage", None],
7196
ab0a91b82b37 Removed support for QtWebKit and the old web rowser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7069
diff changeset
349 "webBrowserFlashCookieManagerPage":
4619
aa2319888257 Prepared the code for missing QtWebKit (starting from Qt 5.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4552
diff changeset
350 [self.tr("Flash Cookie 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
351 "flashCookie16",
7196
ab0a91b82b37 Removed support for QtWebKit and the old web rowser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7069
diff changeset
352 "WebBrowserFlashCookieManagerPage", "0webBrowserPage",
ab0a91b82b37 Removed support for QtWebKit and the old web rowser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7069
diff changeset
353 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
354 "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
355 [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
356 "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
357 "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
358 [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
359 "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
360 "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
361 None],
4619
aa2319888257 Prepared the code for missing QtWebKit (starting from Qt 5.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4552
diff changeset
362 })
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
363
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
364 self.configItems.update(
53
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 15
diff changeset
365 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
366
4798
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
367 elif displayMode == ConfigurationWidget.WebBrowserMode:
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
368 self.configItems = {
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
369 # 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
370 # page creation function, parent key,
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
371 # reference to configuration page (must always be last)]
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
372 # 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
373 # 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
374 # 'save' to save the settings.
4804
f794ff054d8f Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4798
diff changeset
375 "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
376 [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
377 "WebBrowserInterfacePage", None, None],
4798
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
378 "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
379 [self.tr("Network"), "preferences-network",
4798
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
380 "NetworkPage", None, None],
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
381 "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
382 [self.tr("Printer"), "preferences-printer",
4798
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
383 "PrinterPage", None, None],
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
384 "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
385 [self.tr("Security"), "preferences-security",
4798
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
386 "SecurityPage", None, None],
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
387
4875
4ee26909ac0d Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4807
diff changeset
388 "helpDocumentationPage":
4ee26909ac0d Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4807
diff changeset
389 [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
390 "preferences-helpdocumentation",
4875
4ee26909ac0d Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4807
diff changeset
391 "HelpDocumentationPage", None, None],
4804
f794ff054d8f Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4798
diff changeset
392
f794ff054d8f Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4798
diff changeset
393 "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
394 [self.tr("Appearance"), "preferences-styles",
4804
f794ff054d8f Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4798
diff changeset
395 "WebBrowserAppearancePage", None, None],
4805
8ef007140046 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4804
diff changeset
396 "webBrowserPage":
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
397 [self.tr("eric6 Web Browser"), "ericWeb",
4805
8ef007140046 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4804
diff changeset
398 "WebBrowserPage", None, None],
8ef007140046 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4804
diff changeset
399
7196
ab0a91b82b37 Removed support for QtWebKit and the old web rowser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7069
diff changeset
400 "webBrowserFlashCookieManagerPage":
4798
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
401 [self.tr("Flash Cookie 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
402 "flashCookie16",
7196
ab0a91b82b37 Removed support for QtWebKit and the old web rowser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7069
diff changeset
403 "WebBrowserFlashCookieManagerPage", None, 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
404 "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
405 [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
406 "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
407
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
408 "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
409 [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
410 "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
411 "WebBrowserSpellCheckingPage", None, None],
4798
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
412 }
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
413
701
fc587a1c2f8b Added an option to configure the icon of the tray starter application.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 537
diff changeset
414 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
415 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
416 # 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
417 # 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
418 # 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
419 # 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
420 # 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
421 # 'save' to save the settings.
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
422 "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
423 [self.tr("Tray Starter"), "erict",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
424 "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
425 }
4216
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
426
4658
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
427 elif displayMode == ConfigurationWidget.HexEditorMode:
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
428 self.configItems = {
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
429 # 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
430 # page creation function, parent key,
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
431 # 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
432 # 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
433 # 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
434 # 'save' to save the settings.
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
435 "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
436 [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
437 "HexEditorPage", None, None],
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
438 }
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
439
701
fc587a1c2f8b Added an option to configure the icon of the tray starter application.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 537
diff changeset
440 else:
fc587a1c2f8b Added an option to configure the icon of the tray starter application.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 537
diff changeset
441 raise RuntimeError("Illegal mode value: {0}".format(displayMode))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
442
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
443 # 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
444 self.__expandedEntries = []
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
445 for key in sorted(self.configItems.keys()):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
446 pageData = self.configItems[key]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
447 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
448 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
449 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
450 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
451 continue
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
452 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
453 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
454 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
455 pageData[1])
4214
b8fd47f8b707 Fixed an issue causing a wrong item selected in the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4213
diff changeset
456 self.itmDict[key].setData(0, Qt.UserRole, key)
4216
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
457 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
458 displayMode != ConfigurationWidget.DefaultMode or
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
459 key in expandedEntries):
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
460 self.itmDict[key].setExpanded(True)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
461 self.configList.sortByColumn(0, Qt.AscendingOrder)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
462
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
463 # set the initial size of the splitter
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
464 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
465 self.configSplitter.splitterMoved.connect(self.__resizeConfigStack)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
466
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 492
diff changeset
467 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
468 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
469 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
470 self.buttonBox.rejected.connect(self.rejected)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
471
4658
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
472 if displayMode in [ConfigurationWidget.HelpBrowserMode,
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
473 ConfigurationWidget.TrayStarterMode,
4798
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
474 ConfigurationWidget.HexEditorMode,
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
475 ConfigurationWidget.WebBrowserMode]:
4658
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
476 self.configListSearch.hide()
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
477
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
478 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
479 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
480 self.__initLexers()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
481
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
482 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
483 """
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
484 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
485 """
2326
7a9c4dafae62 Fixed an issue with the configuration dialog on Mac OS X.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
486 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
487 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
488 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
489 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
490
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
491 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
492
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
493 def __setupUi(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
494 """
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
495 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
496 widget.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
497 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
498 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
499 self.resize(900, 750)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
500 self.verticalLayout_2 = QVBoxLayout(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
501 self.verticalLayout_2.setSpacing(6)
2824
858412c29c34 Replaced the obsoleted method setMargin() with setContentsMargins().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2474
diff changeset
502 self.verticalLayout_2.setContentsMargins(6, 6, 6, 6)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
503 self.verticalLayout_2.setObjectName("verticalLayout_2")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
504
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
505 self.configSplitter = QSplitter(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
506 self.configSplitter.setOrientation(Qt.Horizontal)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
507 self.configSplitter.setObjectName("configSplitter")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
508
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.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
510 self.leftVBoxLayout = QVBoxLayout(self.configListWidget)
2824
858412c29c34 Replaced the obsoleted method setMargin() with setContentsMargins().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2474
diff changeset
511 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
512 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
513 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
514 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
515 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
516 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
517 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
518 self.configList = QTreeWidget()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
519 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
520 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
521 self.configListSearch.textChanged.connect(self.__searchTextChanged)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
522
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
523 self.scrollArea = QScrollArea(self.configSplitter)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
524 self.scrollArea.setFrameShape(QFrame.NoFrame)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
525 self.scrollArea.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOn)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
526 self.scrollArea.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOn)
7749
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
527 self.scrollArea.setWidgetResizable(False)
7765
72ea8b7452a4 Fixed some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7749
diff changeset
528 self.scrollArea.setSizeAdjustPolicy(
72ea8b7452a4 Fixed some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7749
diff changeset
529 QAbstractScrollArea.AdjustToContents)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
530 self.scrollArea.setObjectName("scrollArea")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
531
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
532 self.configStack = QStackedWidget()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
533 self.configStack.setFrameShape(QFrame.Box)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
534 self.configStack.setFrameShadow(QFrame.Sunken)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
535 self.configStack.setObjectName("configStack")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
536 self.scrollArea.setWidget(self.configStack)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
537
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
538 self.emptyPage = QWidget()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
539 self.emptyPage.setGeometry(QRect(0, 0, 372, 591))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
540 self.emptyPage.setObjectName("emptyPage")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
541 self.vboxlayout = QVBoxLayout(self.emptyPage)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
542 self.vboxlayout.setSpacing(6)
2824
858412c29c34 Replaced the obsoleted method setMargin() with setContentsMargins().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2474
diff changeset
543 self.vboxlayout.setContentsMargins(6, 6, 6, 6)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
544 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
545 spacerItem = QSpacerItem(
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
546 20, 20, QSizePolicy.Minimum, QSizePolicy.Expanding)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
547 self.vboxlayout.addItem(spacerItem)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
548 self.emptyPagePixmap = QLabel(self.emptyPage)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
549 self.emptyPagePixmap.setAlignment(Qt.AlignCenter)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
550 self.emptyPagePixmap.setObjectName("emptyPagePixmap")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
551 self.emptyPagePixmap.setPixmap(
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
552 QPixmap(os.path.join(getConfig('ericPixDir'), 'eric.png')))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
553 self.vboxlayout.addWidget(self.emptyPagePixmap)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
554 self.textLabel1 = QLabel(self.emptyPage)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
555 self.textLabel1.setAlignment(Qt.AlignCenter)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
556 self.textLabel1.setObjectName("textLabel1")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
557 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
558 spacerItem1 = QSpacerItem(
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
559 20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
560 self.vboxlayout.addItem(spacerItem1)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
561 self.configStack.addWidget(self.emptyPage)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
562
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
563 self.verticalLayout_2.addWidget(self.configSplitter)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
564
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
565 self.buttonBox = QDialogButtonBox(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
566 self.buttonBox.setOrientation(Qt.Horizontal)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
567 self.buttonBox.setStandardButtons(
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
568 QDialogButtonBox.Apply | QDialogButtonBox.Cancel |
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
569 QDialogButtonBox.Ok | QDialogButtonBox.Reset)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
570 self.buttonBox.setObjectName("buttonBox")
7263
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
571 if (
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
572 not self.fromEric and
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
573 self.displayMode == ConfigurationWidget.DefaultMode
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
574 ):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
575 self.buttonBox.button(QDialogButtonBox.Apply).hide()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
576 self.buttonBox.button(QDialogButtonBox.Apply).setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
577 self.buttonBox.button(QDialogButtonBox.Reset).setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
578 self.verticalLayout_2.addWidget(self.buttonBox)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
579
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
580 self.setWindowTitle(self.tr("Preferences"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
581
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
582 self.configList.header().hide()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
583 self.configList.header().setSortIndicator(0, Qt.AscendingOrder)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
584 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
585 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
586 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
587 "to display the configuration page."))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
588
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
589 QMetaObject.connectSlotsByName(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
590 self.setTabOrder(self.configList, self.configStack)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
591
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
592 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
593
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 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
595
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
596 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
597 """
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
598 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
599
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
600 @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
601 """
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
602 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
603
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
604 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
605 """
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
606 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
607
6a6a53f2d086 Added a filter edit to filter the configuration tree to the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1791
diff changeset
608 @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
609 @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
610 @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
611 """
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
612 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
613 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
614 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
615 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
616 if itm.childCount() > 0:
7263
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
617 enable = (
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
618 self.__searchChildItems(itm, text) or
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
619 text == "" or
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
620 text in itm.text(0).lower()
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
621 )
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
622 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
623 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
624 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
625 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
626 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
627
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
628 return childEnabled
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
629
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
630 def __initLexers(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
631 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
632 Private method to initialize the dictionary of preferences lexers.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
633 """
2408
dc3a7c9d8f6e Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2326
diff changeset
634 import QScintilla.Lexers
7263
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
635 from .PreferencesLexer import (
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
636 PreferencesLexer, PreferencesLexerLanguageError
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
637 )
2408
dc3a7c9d8f6e Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2326
diff changeset
638
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
639 self.lexers = {}
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
640 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
641 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
642 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
643 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
644 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
645 pass
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
646
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
647 def __importConfigurationPage(self, name):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
648 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
649 Private method to import a configuration page module.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
650
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
651 @param name name of the configuration page module (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
652 @return reference to the configuration page module
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
653 """
426
161992758137 Did some more string format conversions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 149
diff changeset
654 modName = "Preferences.ConfigurationPages.{0}".format(name)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
655 try:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
656 mod = __import__(modName)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
657 components = modName.split('.')
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
658 for comp in components[1:]:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
659 mod = getattr(mod, comp)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
660 return mod
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
661 except ImportError:
3020
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3010
diff changeset
662 E5MessageBox.critical(
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3010
diff changeset
663 self,
3190
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("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
665 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
666 """ could not be loaded.</p>""").format(name))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
667 return None
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
668
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
669 def __showConfigurationPage(self, itm, column):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
670 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
671 Private slot to show a selected configuration page.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
672
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
673 @param itm reference to the selected item (QTreeWidgetItem)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
674 @param column column that was selected (integer) (ignored)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
675 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
676 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
677 self.showConfigurationPageByName(pageName, setCurrent=False)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
678
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
679 def __initPage(self, pageData):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
680 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
681 Private method to initialize a configuration page.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
682
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
683 @param pageData data structure for the page to initialize
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
684 @return reference to the initialized page
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
685 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
686 page = None
12
1d8dd9706f46 First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7
diff changeset
687 if isinstance(pageData[2], types.FunctionType):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
688 page = pageData[2](self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
689 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
690 mod = self.__importConfigurationPage(pageData[2])
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
691 if mod:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
692 page = mod.create(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
693 if page is not None:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
694 self.configStack.addWidget(page)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
695 pageData[-1] = page
1109
9552b5e16a07 Added some more search engines to the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 990
diff changeset
696 try:
9552b5e16a07 Added some more search engines to the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 990
diff changeset
697 page.setMode(self.displayMode)
9552b5e16a07 Added some more search engines to the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 990
diff changeset
698 except AttributeError:
9552b5e16a07 Added some more search engines to the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 990
diff changeset
699 pass
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
700 return page
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
701
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
702 def showConfigurationPageByName(self, pageName, setCurrent=True):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
703 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
704 Public slot to show a named configuration page.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
705
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
706 @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
707 @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
708 """
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
709 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
710 page = self.emptyPage
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
711 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
712 pageData = self.configItems[pageName]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
713 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
714 # the page was not loaded yet, create it
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
715 page = self.__initPage(pageData)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
716 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
717 page = pageData[-1]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
718 if page is None:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
719 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
720 elif setCurrent:
3025
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
721 items = self.configList.findItems(
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
722 pageData[0],
934
657269549914 Changed the configuration dialog to remember the last show page name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 825
diff changeset
723 Qt.MatchFixedString | Qt.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:
b8fd47f8b707 Fixed an issue causing a wrong item selected in the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4213
diff changeset
725 if item.data(0, Qt.UserRole) == pageName:
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()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
732 self.buttonBox.button(QDialogButtonBox.Apply).setEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
733 self.buttonBox.button(QDialogButtonBox.Reset).setEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
734 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
735 self.buttonBox.button(QDialogButtonBox.Apply).setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
736 self.buttonBox.button(QDialogButtonBox.Reset).setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
737
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
738 # 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
739 for sb in [self.scrollArea.horizontalScrollBar(),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
740 self.scrollArea.verticalScrollBar()]:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
741 if sb:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
742 sb.setValue(0)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
743
934
657269549914 Changed the configuration dialog to remember the last show page name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 825
diff changeset
744 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
745
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
746 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
747 """
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
748 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
749
7749
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
750 @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
751 @type QResizeEvent
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
752 """
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
753 self.__resizeConfigStack()
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
754
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
755 def __resizeConfigStack(self):
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 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
758 """
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
759 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
760 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
761 ssize.setHeight(
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
762 ssize.height() -
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
763 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
764 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
765 ssize.setWidth(
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
766 ssize.width() -
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
767 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
768 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
769 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
770 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
771
934
657269549914 Changed the configuration dialog to remember the last show page name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 825
diff changeset
772 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
773 """
657269549914 Changed the configuration dialog to remember the last show page name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 825
diff changeset
774 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
775
2964
84b65fb9e780 Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2907
diff changeset
776 @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
777 """
657269549914 Changed the configuration dialog to remember the last show page name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 825
diff changeset
778 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
779
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
780 def calledFromEric(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
781 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
782 Public method to check, if invoked from within eric.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
783
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
784 @return flag indicating invocation from within eric (boolean)
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 return self.fromEric
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 def getPage(self, pageName):
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 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
791
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
792 @param pageName name of the configuration page (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
793 @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
794 not loaded yet
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 return self.configItems[pageName][-1]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
797
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
798 def getLexers(self):
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 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
801
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
802 @return reference to the lexers dictionary
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 return self.lexers
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 def setPreferences(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
807 """
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
808 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
809 storage.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
810 """
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
811 for pageData in self.configItems.values():
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
812 if pageData[-1]:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
813 pageData[-1].save()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
814 # page was loaded (and possibly modified)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
815 QApplication.processEvents() # ensure HMI is responsive
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
816
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
817 def on_buttonBox_clicked(self, button):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
818 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
819 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
820
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
821 @param button button that was clicked (QAbstractButton)
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 if button == self.buttonBox.button(QDialogButtonBox.Apply):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
824 self.on_applyButton_clicked()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
825 elif button == self.buttonBox.button(QDialogButtonBox.Reset):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
826 self.on_resetButton_clicked()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
827
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
828 @pyqtSlot()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
829 def on_applyButton_clicked(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
830 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
831 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
832 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
833 if self.configStack.currentWidget() != self.emptyPage:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
834 page = self.configStack.currentWidget()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
835 savedState = page.saveState()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
836 page.save()
492
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 465
diff changeset
837 self.preferencesChanged.emit()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
838 if savedState is not None:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
839 page.setState(savedState)
4658
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
840 page.polishPage()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
841
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
842 @pyqtSlot()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
843 def on_resetButton_clicked(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
844 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
845 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
846 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
847 if self.configStack.currentWidget() != self.emptyPage:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
848 currentPage = self.configStack.currentWidget()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
849 savedState = currentPage.saveState()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
850 pageName = self.configList.currentItem().getPageName()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
851 self.configStack.removeWidget(currentPage)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
852 if pageName == "editorHighlightingStylesPage":
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
853 self.__initLexers()
97
c4086afea02b Finished cleaning up the code supported by py3flakes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 88
diff changeset
854 self.configItems[pageName][-1] = None
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
855
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
856 self.showConfigurationPageByName(pageName)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
857 if savedState is not None:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
858 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
859
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
860 def getExpandedEntries(self):
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
861 """
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
862 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
863
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
864 @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
865 """
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
866 return self.__expandedEntries
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 @pyqtSlot(QTreeWidgetItem)
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
869 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
870 """
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
871 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
872
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
873 @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
874 """
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
875 pageName = item.data(0, Qt.UserRole)
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
876 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
877 self.__expandedEntries.remove(pageName)
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 @pyqtSlot(QTreeWidgetItem)
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
880 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
881 """
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
882 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
883
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
884 @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
885 """
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
886 pageName = item.data(0, Qt.UserRole)
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
887 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
888 self.__expandedEntries.append(pageName)
4806
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
889
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
890 def isUsingWebEngine(self):
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
891 """
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
892 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
893
682750cc7bd5 Corrected some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4875
diff changeset
894 @return flag indicating the use of QtWebEngine
682750cc7bd5 Corrected some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4875
diff changeset
895 @rtype bool
4806
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
896 """
7263
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
897 return (
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
898 self.__webEngine or
4806
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
899 self.displayMode == ConfigurationWidget.WebBrowserMode
7263
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
900 )
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
901
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
902
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
903 class ConfigurationDialog(QDialog):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
904 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
905 Class for the dialog variant.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
906
501
5c615a85241a Finished porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 500
diff changeset
907 @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
908 @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
909 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
910 """
492
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 465
diff changeset
911 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
912 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
913
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
914 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
915 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
916 TrayStarterMode = ConfigurationWidget.TrayStarterMode
4658
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
917 HexEditorMode = ConfigurationWidget.HexEditorMode
4798
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
918 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
919
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
920 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
921 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
922 expandedEntries=None):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
923 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
924 Constructor
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
925
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
926 @param parent The parent widget of this dialog. (QWidget)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
927 @param name The name of this dialog. string
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
928 @param modal Flag indicating a modal dialog. (boolean)
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
929 @keyparam fromEric flag indicating a dialog generation from within the
3670
f0cb7579c0b4 Finished renaming eric5 for PyQt5 to eric6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3656
diff changeset
930 eric6 ide (boolean)
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
931 @keyparam displayMode mode of the configuration dialog
4798
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
932 (DefaultMode, HelpBrowserMode, TrayStarterMode, HexEditorMode,
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
933 WebBrowserMode)
4216
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
934 @keyparam expandedEntries list of entries to be shown expanded
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
935 (list of strings)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
936 """
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
937 super(ConfigurationDialog, self).__init__(parent)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
938 if name:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
939 self.setObjectName(name)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
940 self.setModal(modal)
4278
ccd1e13cb9bd Fixed issues where dialogs could not be minimized on some desktop environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4216
diff changeset
941 self.setWindowFlags(Qt.Window)
ccd1e13cb9bd Fixed issues where dialogs could not be minimized on some desktop environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4216
diff changeset
942
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
943 self.layout = QVBoxLayout(self)
2824
858412c29c34 Replaced the obsoleted method setMargin() with setContentsMargins().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2474
diff changeset
944 self.layout.setContentsMargins(0, 0, 0, 0)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
945 self.layout.setSpacing(0)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
946
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
947 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
948 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
949 expandedEntries=expandedEntries)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
950 size = self.cw.size()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
951 self.layout.addWidget(self.cw)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
952 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
953 self.setWindowTitle(self.cw.windowTitle())
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
954
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3190
diff changeset
955 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
956 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
957 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
958 self.cw.masterPasswordChanged.connect(self.__masterPasswordChanged)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
959
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
960 def __preferencesChanged(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
961 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
962 Private slot to handle a change of the preferences.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
963 """
492
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 465
diff changeset
964 self.preferencesChanged.emit()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
965
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 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
967 """
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
968 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
969
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
970 @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
971 @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
972 """
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
973 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
974
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
975 def showConfigurationPageByName(self, pageName):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
976 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
977 Public slot to show a named configuration page.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
978
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
979 @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
980 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
981 self.cw.showConfigurationPageByName(pageName)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
982
934
657269549914 Changed the configuration dialog to remember the last show page name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 825
diff changeset
983 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
984 """
657269549914 Changed the configuration dialog to remember the last show page name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 825
diff changeset
985 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
986
2964
84b65fb9e780 Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2907
diff changeset
987 @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
988 """
657269549914 Changed the configuration dialog to remember the last show page name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 825
diff changeset
989 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
990
4216
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
991 def getExpandedEntries(self):
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
992 """
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
993 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
994
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
995 @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
996 """
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
997 return self.cw.getExpandedEntries()
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
998
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
999 def setPreferences(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1000 """
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
1001 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
1002 storage.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1003 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1004 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
1005
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
1006 def accept(self):
2964
84b65fb9e780 Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2907
diff changeset
1007 """
84b65fb9e780 Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2907
diff changeset
1008 Public method to accept the dialog.
84b65fb9e780 Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2907
diff changeset
1009 """
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
1010 super(ConfigurationDialog, self).accept()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1011
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
1012
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
1013 class ConfigurationWindow(E5MainWindow):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1014 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1015 Main window class for the standalone dialog.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1016 """
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
1017 def __init__(self, parent=None):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1018 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1019 Constructor
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1020
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1021 @param parent reference to the parent widget (QWidget)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1022 """
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
1023 super(ConfigurationWindow, self).__init__(parent)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1024
6630