eric6/Preferences/ConfigurationDialog.py

Sun, 04 Oct 2020 15:25:17 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 04 Oct 2020 15:25:17 +0200
changeset 7749
285855999b4e
parent 7734
983d90b76cff
child 7765
72ea8b7452a4
permissions
-rw-r--r--

Configuration Dialog: optimized the display of the various configuration pages.

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
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
10
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
11 import os
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
12 import types
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
13
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
14 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
15 from PyQt5.QtGui import QPixmap
7263
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
16 from PyQt5.QtWidgets import (
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
17 QSizePolicy, QSpacerItem, QWidget, QTreeWidget, QStackedWidget, QDialog,
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
18 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
19 QVBoxLayout, QTreeWidgetItem, QLabel, QAbstractScrollArea
7263
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
20 )
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
21
55
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 53
diff changeset
22 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
23 from E5Gui.E5LineEdit import E5ClearableLineEdit
537
72b32daeb8d6 Continued replacing QMessageBox methods with own methods.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 501
diff changeset
24 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
25 from E5Gui.E5MainWindow import E5MainWindow
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
26
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
27 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
28
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
29 import Preferences
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
30
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
31 import UI.PixmapCache
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
32
3670
f0cb7579c0b4 Finished renaming eric5 for PyQt5 to eric6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3656
diff changeset
33 from eric6config import getConfig
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
34
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
35
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
36 class ConfigurationPageItem(QTreeWidgetItem):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
37 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
38 Class implementing a QTreeWidgetItem holding the configuration page data.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
39 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
40 def __init__(self, parent, text, pageName, iconFile):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
41 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
42 Constructor
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
43
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
44 @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
45 QTreeWidgetItem)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
46 @param text text to be displayed (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
47 @param pageName name of the configuration page (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
48 @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
49 """
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
50 super(ConfigurationPageItem, self).__init__(parent, [text])
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
51 self.setIcon(0, UI.PixmapCache.getIcon(iconFile))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
52
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
53 self.__pageName = pageName
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
54
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
55 def getPageName(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
56 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
57 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
58
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
59 @return name of the configuration page (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
60 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
61 return self.__pageName
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
62
4370
54dbb658f9e6 Corrected some code style issues and regenerated the source docu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4359
diff changeset
63
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
64 class ConfigurationWidget(QWidget):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
65 """
3670
f0cb7579c0b4 Finished renaming eric5 for PyQt5 to eric6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3656
diff changeset
66 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
67
501
5c615a85241a Finished porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 500
diff changeset
68 @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
69 @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
70 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
71 @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
72 @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
73 """
492
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 465
diff changeset
74 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
75 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
76 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
77 rejected = pyqtSignal()
492
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 465
diff changeset
78
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
79 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
80 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
81 TrayStarterMode = 2
4658
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
82 HexEditorMode = 3
4798
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
83 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
84
4216
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
85 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
86 expandedEntries=None):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
87 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
88 Constructor
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
89
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
90 @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
91 @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
92 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
93 @keyparam displayMode mode of the configuration dialog
4798
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
94 (DefaultMode, HelpBrowserMode, TrayStarterMode, HexEditorMode,
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
95 WebBrowserMode)
2964
84b65fb9e780 Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2907
diff changeset
96 @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
97 @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
98 (list of strings)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
99 """
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
100 super(ConfigurationWidget, self).__init__(parent)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
101 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
102 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
103 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
104 expandedEntries = [] if expandedEntries is None else expandedEntries[:]
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
105
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
106 self.__setupUi()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
107
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
108 self.itmDict = {}
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
109
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
110 if not fromEric:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
111 from PluginManager.PluginManager import PluginManager
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
112 try:
53
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 15
diff changeset
113 self.pluginManager = e5App().getObject("PluginManager")
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
114 except KeyError:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
115 self.pluginManager = PluginManager(self)
53
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 15
diff changeset
116 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
117
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 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
119 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
120 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
121 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
122 self.virtualenvManager = VirtualenvManager(self)
6386
91dc4fa9bc9c Fixed some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6381
diff changeset
123 e5App().registerObject("VirtualEnvManager",
91dc4fa9bc9c Fixed some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6381
diff changeset
124 self.virtualenvManager)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
125
701
fc587a1c2f8b Added an option to configure the icon of the tray starter application.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 537
diff changeset
126 if displayMode == ConfigurationWidget.DefaultMode:
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
127 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
128 # 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
129 # page creation function, parent key,
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
130 # 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
131 # 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
132 # 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
133 # 'save' to save the settings.
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
134 "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
135 [self.tr("Application"), "preferences-application",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
136 "ApplicationPage", None, None],
6672
2af01e538c57 Started implementing support conda virtual environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
137 "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
138 [self.tr("Conda"), "miniconda",
6672
2af01e538c57 Started implementing support conda virtual environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
139 "CondaPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
140 "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
141 [self.tr("Cooperation"), "preferences-cooperation",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
142 "CooperationPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
143 "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
144 [self.tr("CORBA"), "preferences-orbit",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
145 "CorbaPage", None, None],
5765
39d8b26ff557 Made the colors of the diff dialogs configurable.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5736
diff changeset
146 "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
147 [self.tr("Diff"), "diffFiles",
5765
39d8b26ff557 Made the colors of the diff dialogs configurable.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5736
diff changeset
148 "DiffColoursPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
149 "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
150 [self.tr("Email"), "preferences-mail_generic",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
151 "EmailPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
152 "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
153 [self.tr("Graphics"), "preferences-graphics",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
154 "GraphicsPage", None, None],
4658
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
155 "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
156 [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
157 "HexEditorPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
158 "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
159 [self.tr("Icons"), "preferences-icons",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
160 "IconsPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
161 "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
162 [self.tr("IRC"), "irc",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
163 "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
164 "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
165 [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
166 "LogViewerPage", None, None],
7069
a09a30251d4e MicroPythonReplWidget: extended the color support with selectable color schemes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6942
diff changeset
167 "microPythonPage":
a09a30251d4e MicroPythonReplWidget: extended the color support with selectable color schemes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6942
diff changeset
168 [self.tr("MicroPython"), "micropython",
a09a30251d4e MicroPythonReplWidget: extended the color support with selectable color schemes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6942
diff changeset
169 "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
170 "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
171 [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
172 "MimeTypesPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
173 "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
174 [self.tr("Network"), "preferences-network",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
175 "NetworkPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
176 "notificationsPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
177 [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
178 "preferences-notifications",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
179 "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
180 "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
181 [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
182 "PipPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
183 "pluginManagerPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
184 [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
185 "preferences-pluginmanager",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
186 "PluginManagerPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
187 "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
188 [self.tr("Printer"), "preferences-printer",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
189 "PrinterPage", None, None],
5968
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5967
diff changeset
190 "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
191 [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
192 "ProtobufPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
193 "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
194 [self.tr("Python"), "preferences-python",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
195 "PythonPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
196 "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
197 [self.tr("Qt"), "preferences-qtlogo",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
198 "QtPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
199 "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
200 [self.tr("Security"), "preferences-security",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
201 "SecurityPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
202 "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
203 [self.tr("Shell"), "preferences-shell",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
204 "ShellPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
205 "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
206 [self.tr("Tasks"), "task",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
207 "TasksPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
208 "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
209 [self.tr("Templates"), "preferences-template",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
210 "TemplatesPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
211 "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
212 [self.tr("Tray Starter"), "erict",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
213 "TrayStarterPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
214 "vcsPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
215 [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
216 "preferences-vcs",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
217 "VcsPage", None, None],
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
218
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
219 "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
220 [self.tr("Debugger"), "preferences-debugger",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
221 None, None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
222 "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
223 [self.tr("General"), "preferences-debugger",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
224 "DebuggerGeneralPage", "0debuggerPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
225 "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
226 [self.tr("Python3"), "preferences-pyDebugger",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
227 "DebuggerPython3Page", "0debuggerPage", None],
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
228
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
229 "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
230 [self.tr("Editor"), "preferences-editor",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
231 None, None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
232 "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
233 [self.tr("APIs"), "preferences-api",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
234 "EditorAPIsPage", "0editorPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
235 "editorAutocompletionPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
236 [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
237 "preferences-autocompletion",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
238 "EditorAutocompletionPage", "0editorPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
239 "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
240 [self.tr("QScintilla"), "qscintilla",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
241 "EditorAutocompletionQScintillaPage",
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
242 "editorAutocompletionPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
243 "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
244 [self.tr("Calltips"), "preferences-calltips",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
245 "EditorCalltipsPage", "0editorPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
246 "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
247 [self.tr("QScintilla"), "qscintilla",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
248 "EditorCalltipsQScintillaPage", "editorCalltipsPage", None],
5912
b6643d36dddd Added the rich text view to the documentation viewer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5765
diff changeset
249 "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
250 [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
251 "EditorDocViewerPage", "0editorPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
252 "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
253 [self.tr("General"), "preferences-general",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
254 "EditorGeneralPage", "0editorPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
255 "editorFilePage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
256 [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
257 "preferences-filehandling",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
258 "EditorFilePage", "0editorPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
259 "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
260 [self.tr("Searching"), "preferences-search",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
261 "EditorSearchPage", "0editorPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
262 "editorSpellCheckingPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
263 [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
264 "preferences-spellchecking",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
265 "EditorSpellCheckingPage", "0editorPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
266 "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
267 [self.tr("Style"), "preferences-styles",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
268 "EditorStylesPage", "0editorPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
269 "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
270 [self.tr("Code Checkers"), "preferences-debugger",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
271 "EditorSyntaxPage", "0editorPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
272 "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
273 [self.tr("Typing"), "preferences-typing",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
274 "EditorTypingPage", "0editorPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
275 "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
276 [self.tr("Exporters"), "preferences-exporters",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
277 "EditorExportersPage", "0editorPage", None],
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
278
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
279 "1editorLexerPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
280 [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
281 "preferences-highlighting-styles",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
282 None, "0editorPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
283 "editorHighlightersPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
284 [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
285 "preferences-highlighter-association",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
286 "EditorHighlightersPage", "1editorLexerPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
287 "editorHighlightingStylesPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
288 [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
289 "preferences-highlighting-styles",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
290 "EditorHighlightingStylesPage", "1editorLexerPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
291 "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
292 [self.tr("Keywords"), "preferences-keywords",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
293 "EditorKeywordsPage", "1editorLexerPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
294 "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
295 [self.tr("Properties"), "preferences-properties",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
296 "EditorPropertiesPage", "1editorLexerPage", None],
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
297
4288
1c9c1c12111a Added a configuration page for mouse click handler support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4278
diff changeset
298 "1editorMouseClickHandlers":
1c9c1c12111a Added a configuration page for mouse click handler support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4278
diff changeset
299 [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
300 "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
301 "EditorMouseClickHandlerPage", "0editorPage", None],
1c9c1c12111a Added a configuration page for mouse click handler support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4278
diff changeset
302
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
303 "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
304 [self.tr("Help"), "preferences-help",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
305 None, None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
306 "helpDocumentationPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
307 [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
308 "preferences-helpdocumentation",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
309 "HelpDocumentationPage", "0helpPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
310 "helpViewersPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
311 [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
312 "preferences-helpviewers",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
313 "HelpViewersPage", "0helpPage", None],
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
314
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
315 "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
316 [self.tr("Project"), "preferences-project",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
317 None, None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
318 "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
319 [self.tr("Project Viewer"), "preferences-project",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
320 "ProjectBrowserPage", "0projectPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
321 "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
322 [self.tr("Project"), "preferences-project",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
323 "ProjectPage", "0projectPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
324 "multiProjectPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
325 [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
326 "preferences-multiproject",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
327 "MultiProjectPage", "0projectPage", None],
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
328
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
329 "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
330 [self.tr("Interface"), "preferences-interface",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
331 None, None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
332 "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
333 [self.tr("Interface"), "preferences-interface",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
334 "InterfacePage", "0interfacePage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
335 "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
336 [self.tr("Viewmanager"), "preferences-viewmanager",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
337 "ViewmanagerPage", "0interfacePage", None],
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
338 }
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
339 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
340 self.configItems.update({
4806
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
341 "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
342 [self.tr("Web Browser"), "ericWeb",
4806
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
343 None, None, None],
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
344 "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
345 [self.tr("Appearance"), "preferences-styles",
4806
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
346 "WebBrowserAppearancePage", "0webBrowserPage", None],
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
347 "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
348 [self.tr("eric6 Web Browser"), "ericWeb",
4806
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
349 "WebBrowserPage", "0webBrowserPage", None],
7196
ab0a91b82b37 Removed support for QtWebKit and the old web rowser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7069
diff changeset
350 "webBrowserFlashCookieManagerPage":
4619
aa2319888257 Prepared the code for missing QtWebKit (starting from Qt 5.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4552
diff changeset
351 [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
352 "flashCookie16",
7196
ab0a91b82b37 Removed support for QtWebKit and the old web rowser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7069
diff changeset
353 "WebBrowserFlashCookieManagerPage", "0webBrowserPage",
ab0a91b82b37 Removed support for QtWebKit and the old web rowser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7069
diff changeset
354 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
355 "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
356 [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
357 "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
358 "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
359 [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
360 "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
361 "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
362 None],
4619
aa2319888257 Prepared the code for missing QtWebKit (starting from Qt 5.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4552
diff changeset
363 })
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
364
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
365 self.configItems.update(
53
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 15
diff changeset
366 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
367
4798
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
368 elif displayMode == ConfigurationWidget.WebBrowserMode:
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
369 self.configItems = {
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
370 # 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
371 # page creation function, parent key,
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
372 # reference to configuration page (must always be last)]
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
373 # 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
374 # 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
375 # 'save' to save the settings.
4804
f794ff054d8f Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4798
diff changeset
376 "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
377 [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
378 "WebBrowserInterfacePage", None, None],
4798
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
379 "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
380 [self.tr("Network"), "preferences-network",
4798
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
381 "NetworkPage", None, None],
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
382 "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
383 [self.tr("Printer"), "preferences-printer",
4798
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
384 "PrinterPage", None, None],
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
385 "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
386 [self.tr("Security"), "preferences-security",
4798
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
387 "SecurityPage", None, None],
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
388
4875
4ee26909ac0d Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4807
diff changeset
389 "helpDocumentationPage":
4ee26909ac0d Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4807
diff changeset
390 [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
391 "preferences-helpdocumentation",
4875
4ee26909ac0d Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4807
diff changeset
392 "HelpDocumentationPage", None, None],
4804
f794ff054d8f Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4798
diff changeset
393
f794ff054d8f Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4798
diff changeset
394 "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
395 [self.tr("Appearance"), "preferences-styles",
4804
f794ff054d8f Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4798
diff changeset
396 "WebBrowserAppearancePage", None, None],
4805
8ef007140046 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4804
diff changeset
397 "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
398 [self.tr("eric6 Web Browser"), "ericWeb",
4805
8ef007140046 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4804
diff changeset
399 "WebBrowserPage", None, None],
8ef007140046 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4804
diff changeset
400
7196
ab0a91b82b37 Removed support for QtWebKit and the old web rowser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7069
diff changeset
401 "webBrowserFlashCookieManagerPage":
4798
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
402 [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
403 "flashCookie16",
7196
ab0a91b82b37 Removed support for QtWebKit and the old web rowser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7069
diff changeset
404 "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
405 "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
406 [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
407 "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
408
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 "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
410 [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
411 "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
412 "WebBrowserSpellCheckingPage", None, None],
4798
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
413 }
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
414
701
fc587a1c2f8b Added an option to configure the icon of the tray starter application.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 537
diff changeset
415 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
416 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
417 # 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
418 # 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
419 # 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
420 # 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
421 # 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
422 # 'save' to save the settings.
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
423 "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
424 [self.tr("Tray Starter"), "erict",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
425 "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
426 }
4216
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
427
4658
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
428 elif displayMode == ConfigurationWidget.HexEditorMode:
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
429 self.configItems = {
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
430 # 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
431 # page creation function, parent key,
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
432 # 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
433 # 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
434 # 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
435 # 'save' to save the settings.
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
436 "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
437 [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
438 "HexEditorPage", None, None],
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
439 }
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
440
701
fc587a1c2f8b Added an option to configure the icon of the tray starter application.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 537
diff changeset
441 else:
fc587a1c2f8b Added an option to configure the icon of the tray starter application.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 537
diff changeset
442 raise RuntimeError("Illegal mode value: {0}".format(displayMode))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
443
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
444 # 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
445 self.__expandedEntries = []
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
446 for key in sorted(self.configItems.keys()):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
447 pageData = self.configItems[key]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
448 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
449 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
450 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
451 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
452 continue
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
453 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
454 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
455 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
456 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
457 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
458 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
459 displayMode != ConfigurationWidget.DefaultMode or
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
460 key in expandedEntries):
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
461 self.itmDict[key].setExpanded(True)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
462 self.configList.sortByColumn(0, Qt.AscendingOrder)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
463
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
464 # set the initial size of the splitter
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
465 self.configSplitter.setSizes([200, 600])
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)
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
528 self.scrollArea.setSizeAdjustPolicy(QAbstractScrollArea.AdjustToContents)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
529 self.scrollArea.setObjectName("scrollArea")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
530
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
531 self.configStack = QStackedWidget()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
532 self.configStack.setFrameShape(QFrame.Box)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
533 self.configStack.setFrameShadow(QFrame.Sunken)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
534 self.configStack.setObjectName("configStack")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
535 self.scrollArea.setWidget(self.configStack)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
536
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
537 self.emptyPage = QWidget()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
538 self.emptyPage.setGeometry(QRect(0, 0, 372, 591))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
539 self.emptyPage.setObjectName("emptyPage")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
540 self.vboxlayout = QVBoxLayout(self.emptyPage)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
541 self.vboxlayout.setSpacing(6)
2824
858412c29c34 Replaced the obsoleted method setMargin() with setContentsMargins().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2474
diff changeset
542 self.vboxlayout.setContentsMargins(6, 6, 6, 6)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
543 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
544 spacerItem = QSpacerItem(
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
545 20, 20, QSizePolicy.Minimum, QSizePolicy.Expanding)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
546 self.vboxlayout.addItem(spacerItem)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
547 self.emptyPagePixmap = QLabel(self.emptyPage)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
548 self.emptyPagePixmap.setAlignment(Qt.AlignCenter)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
549 self.emptyPagePixmap.setObjectName("emptyPagePixmap")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
550 self.emptyPagePixmap.setPixmap(
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
551 QPixmap(os.path.join(getConfig('ericPixDir'), 'eric.png')))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
552 self.vboxlayout.addWidget(self.emptyPagePixmap)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
553 self.textLabel1 = QLabel(self.emptyPage)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
554 self.textLabel1.setAlignment(Qt.AlignCenter)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
555 self.textLabel1.setObjectName("textLabel1")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
556 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
557 spacerItem1 = QSpacerItem(
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
558 20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
559 self.vboxlayout.addItem(spacerItem1)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
560 self.configStack.addWidget(self.emptyPage)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
561
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
562 self.verticalLayout_2.addWidget(self.configSplitter)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
563
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
564 self.buttonBox = QDialogButtonBox(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
565 self.buttonBox.setOrientation(Qt.Horizontal)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
566 self.buttonBox.setStandardButtons(
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
567 QDialogButtonBox.Apply | QDialogButtonBox.Cancel |
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
568 QDialogButtonBox.Ok | QDialogButtonBox.Reset)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
569 self.buttonBox.setObjectName("buttonBox")
7263
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
570 if (
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
571 not self.fromEric and
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
572 self.displayMode == ConfigurationWidget.DefaultMode
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
573 ):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
574 self.buttonBox.button(QDialogButtonBox.Apply).hide()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
575 self.buttonBox.button(QDialogButtonBox.Apply).setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
576 self.buttonBox.button(QDialogButtonBox.Reset).setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
577 self.verticalLayout_2.addWidget(self.buttonBox)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
578
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
579 self.setWindowTitle(self.tr("Preferences"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
580
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
581 self.configList.header().hide()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
582 self.configList.header().setSortIndicator(0, Qt.AscendingOrder)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
583 self.configList.setSortingEnabled(True)
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
584 self.textLabel1.setText(
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
585 self.tr("Please select an entry of the list \n"
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
586 "to display the configuration page."))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
587
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
588 QMetaObject.connectSlotsByName(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
589 self.setTabOrder(self.configList, self.configStack)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
590
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
591 self.configStack.setCurrentWidget(self.emptyPage)
1964
6a6a53f2d086 Added a filter edit to filter the configuration tree to the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1791
diff changeset
592
6a6a53f2d086 Added a filter edit to filter the configuration tree to the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1791
diff changeset
593 self.configList.setFocus()
6a6a53f2d086 Added a filter edit to filter the configuration tree to the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1791
diff changeset
594
4213
0bbb56fc9e65 Changed the 'filter' function to a 'search' function disabling all entries, that don't contain the entered string.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4165
diff changeset
595 def __searchTextChanged(self, text):
1964
6a6a53f2d086 Added a filter edit to filter the configuration tree to the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1791
diff changeset
596 """
4213
0bbb56fc9e65 Changed the 'filter' function to a 'search' function disabling all entries, that don't contain the entered string.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4165
diff changeset
597 Private slot to handle a change of the search text.
1964
6a6a53f2d086 Added a filter edit to filter the configuration tree to the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1791
diff changeset
598
4213
0bbb56fc9e65 Changed the 'filter' function to a 'search' function disabling all entries, that don't contain the entered string.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4165
diff changeset
599 @param text text to search for (string)
1964
6a6a53f2d086 Added a filter edit to filter the configuration tree to the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1791
diff changeset
600 """
4213
0bbb56fc9e65 Changed the 'filter' function to a 'search' function disabling all entries, that don't contain the entered string.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4165
diff changeset
601 self.__searchChildItems(self.configList.invisibleRootItem(), text)
1964
6a6a53f2d086 Added a filter edit to filter the configuration tree to the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1791
diff changeset
602
4213
0bbb56fc9e65 Changed the 'filter' function to a 'search' function disabling all entries, that don't contain the entered string.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4165
diff changeset
603 def __searchChildItems(self, parent, text):
1964
6a6a53f2d086 Added a filter edit to filter the configuration tree to the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1791
diff changeset
604 """
4213
0bbb56fc9e65 Changed the 'filter' function to a 'search' function disabling all entries, that don't contain the entered string.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4165
diff changeset
605 Private method to enable child items based on a search string.
1964
6a6a53f2d086 Added a filter edit to filter the configuration tree to the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1791
diff changeset
606
6a6a53f2d086 Added a filter edit to filter the configuration tree to the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1791
diff changeset
607 @param parent reference to the parent item (QTreeWidgetItem)
4213
0bbb56fc9e65 Changed the 'filter' function to a 'search' function disabling all entries, that don't contain the entered string.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4165
diff changeset
608 @param text text to search for (string)
0bbb56fc9e65 Changed the 'filter' function to a 'search' function disabling all entries, that don't contain the entered string.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4165
diff changeset
609 @return flag indicating an enabled child item (boolean)
1964
6a6a53f2d086 Added a filter edit to filter the configuration tree to the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1791
diff changeset
610 """
4213
0bbb56fc9e65 Changed the 'filter' function to a 'search' function disabling all entries, that don't contain the entered string.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4165
diff changeset
611 childEnabled = False
0bbb56fc9e65 Changed the 'filter' function to a 'search' function disabling all entries, that don't contain the entered string.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4165
diff changeset
612 text = text.lower()
1964
6a6a53f2d086 Added a filter edit to filter the configuration tree to the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1791
diff changeset
613 for index in range(parent.childCount()):
6a6a53f2d086 Added a filter edit to filter the configuration tree to the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1791
diff changeset
614 itm = parent.child(index)
6a6a53f2d086 Added a filter edit to filter the configuration tree to the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1791
diff changeset
615 if itm.childCount() > 0:
7263
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
616 enable = (
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
617 self.__searchChildItems(itm, text) or
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
618 text == "" or
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
619 text in itm.text(0).lower()
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
620 )
1964
6a6a53f2d086 Added a filter edit to filter the configuration tree to the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1791
diff changeset
621 else:
4213
0bbb56fc9e65 Changed the 'filter' function to a 'search' function disabling all entries, that don't contain the entered string.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4165
diff changeset
622 enable = text == "" or text in itm.text(0).lower()
0bbb56fc9e65 Changed the 'filter' function to a 'search' function disabling all entries, that don't contain the entered string.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4165
diff changeset
623 if enable:
0bbb56fc9e65 Changed the 'filter' function to a 'search' function disabling all entries, that don't contain the entered string.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4165
diff changeset
624 childEnabled = True
0bbb56fc9e65 Changed the 'filter' function to a 'search' function disabling all entries, that don't contain the entered string.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4165
diff changeset
625 itm.setDisabled(not enable)
1964
6a6a53f2d086 Added a filter edit to filter the configuration tree to the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1791
diff changeset
626
4213
0bbb56fc9e65 Changed the 'filter' function to a 'search' function disabling all entries, that don't contain the entered string.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4165
diff changeset
627 return childEnabled
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
628
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
629 def __initLexers(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
630 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
631 Private method to initialize the dictionary of preferences lexers.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
632 """
2408
dc3a7c9d8f6e Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2326
diff changeset
633 import QScintilla.Lexers
7263
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
634 from .PreferencesLexer import (
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
635 PreferencesLexer, PreferencesLexerLanguageError
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
636 )
2408
dc3a7c9d8f6e Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2326
diff changeset
637
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
638 self.lexers = {}
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
639 for language in QScintilla.Lexers.getSupportedLanguages():
802
e8882d16384c Added a pyflakes checker function for Python 2 files and made some additional Python 2 related changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
640 if language not in self.lexers:
e8882d16384c Added a pyflakes checker function for Python 2 files and made some additional Python 2 related changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
641 try:
e8882d16384c Added a pyflakes checker function for Python 2 files and made some additional Python 2 related changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
642 self.lexers[language] = PreferencesLexer(language, self)
e8882d16384c Added a pyflakes checker function for Python 2 files and made some additional Python 2 related changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
643 except PreferencesLexerLanguageError:
e8882d16384c Added a pyflakes checker function for Python 2 files and made some additional Python 2 related changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
644 pass
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
645
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
646 def __importConfigurationPage(self, name):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
647 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
648 Private method to import a configuration page module.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
649
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
650 @param name name of the configuration page module (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
651 @return reference to the configuration page module
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
652 """
426
161992758137 Did some more string format conversions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 149
diff changeset
653 modName = "Preferences.ConfigurationPages.{0}".format(name)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
654 try:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
655 mod = __import__(modName)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
656 components = modName.split('.')
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
657 for comp in components[1:]:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
658 mod = getattr(mod, comp)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
659 return mod
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
660 except ImportError:
3020
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3010
diff changeset
661 E5MessageBox.critical(
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3010
diff changeset
662 self,
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
663 self.tr("Configuration Page Error"),
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
664 self.tr("""<p>The configuration page <b>{0}</b>"""
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
665 """ could not be loaded.</p>""").format(name))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
666 return None
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
667
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
668 def __showConfigurationPage(self, itm, column):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
669 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
670 Private slot to show a selected configuration page.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
671
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
672 @param itm reference to the selected item (QTreeWidgetItem)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
673 @param column column that was selected (integer) (ignored)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
674 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
675 pageName = itm.getPageName()
990
93253de2ae77 Fixed an issue with the configuration dialog not highlighting the correct list entry, if the name was not unique.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 978
diff changeset
676 self.showConfigurationPageByName(pageName, setCurrent=False)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
677
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
678 def __initPage(self, pageData):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
679 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
680 Private method to initialize a configuration page.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
681
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
682 @param pageData data structure for the page to initialize
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
683 @return reference to the initialized page
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
684 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
685 page = None
12
1d8dd9706f46 First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7
diff changeset
686 if isinstance(pageData[2], types.FunctionType):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
687 page = pageData[2](self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
688 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
689 mod = self.__importConfigurationPage(pageData[2])
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
690 if mod:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
691 page = mod.create(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
692 if page is not None:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
693 self.configStack.addWidget(page)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
694 pageData[-1] = page
1109
9552b5e16a07 Added some more search engines to the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 990
diff changeset
695 try:
9552b5e16a07 Added some more search engines to the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 990
diff changeset
696 page.setMode(self.displayMode)
9552b5e16a07 Added some more search engines to the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 990
diff changeset
697 except AttributeError:
9552b5e16a07 Added some more search engines to the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 990
diff changeset
698 pass
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
699 return page
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
700
990
93253de2ae77 Fixed an issue with the configuration dialog not highlighting the correct list entry, if the name was not unique.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 978
diff changeset
701 def showConfigurationPageByName(self, pageName, setCurrent=True):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
702 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
703 Public slot to show a named configuration page.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
704
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
705 @param pageName name of the configuration page to show (string)
990
93253de2ae77 Fixed an issue with the configuration dialog not highlighting the correct list entry, if the name was not unique.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 978
diff changeset
706 @param setCurrent flag indicating to set the current item (boolean)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
707 """
4143
565002034bdb Fixed a situation in the config dialog that could cause an issue, if a plug-in gets uninstalled after its config page was the last one been shown.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4128
diff changeset
708 if pageName == "empty" or pageName not in self.configItems:
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
709 page = self.emptyPage
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
710 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
711 pageData = self.configItems[pageName]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
712 if pageData[-1] is None and pageData[2] is not None:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
713 # the page was not loaded yet, create it
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
714 page = self.__initPage(pageData)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
715 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
716 page = pageData[-1]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
717 if page is None:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
718 page = self.emptyPage
990
93253de2ae77 Fixed an issue with the configuration dialog not highlighting the correct list entry, if the name was not unique.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 978
diff changeset
719 elif setCurrent:
3025
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
720 items = self.configList.findItems(
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
721 pageData[0],
934
657269549914 Changed the configuration dialog to remember the last show page name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 825
diff changeset
722 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
723 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
724 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
725 self.configList.setCurrentItem(item)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
726 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
727 self.__resizeConfigStack()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
728
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
729 if page != self.emptyPage:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
730 page.polishPage()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
731 self.buttonBox.button(QDialogButtonBox.Apply).setEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
732 self.buttonBox.button(QDialogButtonBox.Reset).setEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
733 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
734 self.buttonBox.button(QDialogButtonBox.Apply).setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
735 self.buttonBox.button(QDialogButtonBox.Reset).setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
736
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
737 # 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
738 for sb in [self.scrollArea.horizontalScrollBar(),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
739 self.scrollArea.verticalScrollBar()]:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
740 if sb:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
741 sb.setValue(0)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
742
934
657269549914 Changed the configuration dialog to remember the last show page name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 825
diff changeset
743 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
744
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
745 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
746 """
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
747 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
748
7749
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
749 @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
750 @type QResizeEvent
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
751 """
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
752 self.__resizeConfigStack()
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
753
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
754 def __resizeConfigStack(self):
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
755 """
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
756 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
757 """
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
758 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
759 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
760 ssize.setHeight(
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
761 ssize.height() -
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
762 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
763 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
764 ssize.setWidth(
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
765 ssize.width() -
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
766 self.scrollArea.verticalScrollBar().width() - 2)
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
767 psize = self.configStack.currentWidget().sizeHint()
285855999b4e Configuration Dialog: optimized the display of the various configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7734
diff changeset
768 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
769 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
770
934
657269549914 Changed the configuration dialog to remember the last show page name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 825
diff changeset
771 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
772 """
657269549914 Changed the configuration dialog to remember the last show page name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 825
diff changeset
773 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
774
2964
84b65fb9e780 Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2907
diff changeset
775 @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
776 """
657269549914 Changed the configuration dialog to remember the last show page name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 825
diff changeset
777 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
778
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
779 def calledFromEric(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
780 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
781 Public method to check, if invoked from within eric.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
782
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
783 @return flag indicating invocation from within eric (boolean)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
784 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
785 return self.fromEric
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
786
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
787 def getPage(self, pageName):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
788 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
789 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
790
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
791 @param pageName name of the configuration page (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
792 @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
793 not loaded yet
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
794 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
795 return self.configItems[pageName][-1]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
796
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
797 def getLexers(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
798 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
799 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
800
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
801 @return reference to the lexers dictionary
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
802 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
803 return self.lexers
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
804
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
805 def setPreferences(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
806 """
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
807 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
808 storage.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
809 """
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
810 for pageData in self.configItems.values():
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
811 if pageData[-1]:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
812 pageData[-1].save()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
813 # page was loaded (and possibly modified)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
814 QApplication.processEvents() # ensure HMI is responsive
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
815
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
816 def on_buttonBox_clicked(self, button):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
817 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
818 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
819
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
820 @param button button that was clicked (QAbstractButton)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
821 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
822 if button == self.buttonBox.button(QDialogButtonBox.Apply):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
823 self.on_applyButton_clicked()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
824 elif button == self.buttonBox.button(QDialogButtonBox.Reset):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
825 self.on_resetButton_clicked()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
826
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
827 @pyqtSlot()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
828 def on_applyButton_clicked(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
829 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
830 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
831 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
832 if self.configStack.currentWidget() != self.emptyPage:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
833 page = self.configStack.currentWidget()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
834 savedState = page.saveState()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
835 page.save()
492
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 465
diff changeset
836 self.preferencesChanged.emit()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
837 if savedState is not None:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
838 page.setState(savedState)
4658
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
839 page.polishPage()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
840
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
841 @pyqtSlot()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
842 def on_resetButton_clicked(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
843 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
844 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
845 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
846 if self.configStack.currentWidget() != self.emptyPage:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
847 currentPage = self.configStack.currentWidget()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
848 savedState = currentPage.saveState()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
849 pageName = self.configList.currentItem().getPageName()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
850 self.configStack.removeWidget(currentPage)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
851 if pageName == "editorHighlightingStylesPage":
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
852 self.__initLexers()
97
c4086afea02b Finished cleaning up the code supported by py3flakes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 88
diff changeset
853 self.configItems[pageName][-1] = None
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
854
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
855 self.showConfigurationPageByName(pageName)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
856 if savedState is not None:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
857 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
858
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
859 def getExpandedEntries(self):
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
860 """
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
861 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
862
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
863 @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
864 """
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
865 return self.__expandedEntries
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
866
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
867 @pyqtSlot(QTreeWidgetItem)
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
868 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
869 """
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
870 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
871
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
872 @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
873 """
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
874 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
875 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
876 self.__expandedEntries.remove(pageName)
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
877
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
878 @pyqtSlot(QTreeWidgetItem)
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
879 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
880 """
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
881 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
882
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
883 @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
884 """
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
885 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
886 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
887 self.__expandedEntries.append(pageName)
4806
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
888
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
889 def isUsingWebEngine(self):
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
890 """
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
891 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
892
682750cc7bd5 Corrected some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4875
diff changeset
893 @return flag indicating the use of QtWebEngine
682750cc7bd5 Corrected some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4875
diff changeset
894 @rtype bool
4806
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
895 """
7263
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
896 return (
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
897 self.__webEngine or
4806
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
898 self.displayMode == ConfigurationWidget.WebBrowserMode
7263
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
899 )
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
900
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
901
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
902 class ConfigurationDialog(QDialog):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
903 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
904 Class for the dialog variant.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
905
501
5c615a85241a Finished porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 500
diff changeset
906 @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
907 @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
908 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
909 """
492
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 465
diff changeset
910 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
911 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
912
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
913 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
914 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
915 TrayStarterMode = ConfigurationWidget.TrayStarterMode
4658
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
916 HexEditorMode = ConfigurationWidget.HexEditorMode
4798
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
917 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
918
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
919 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
920 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
921 expandedEntries=None):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
922 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
923 Constructor
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
924
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
925 @param parent The parent widget of this dialog. (QWidget)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
926 @param name The name of this dialog. string
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
927 @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
928 @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
929 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
930 @keyparam displayMode mode of the configuration dialog
4798
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
931 (DefaultMode, HelpBrowserMode, TrayStarterMode, HexEditorMode,
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
932 WebBrowserMode)
4216
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
933 @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
934 (list of strings)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
935 """
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
936 super(ConfigurationDialog, self).__init__(parent)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
937 if name:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
938 self.setObjectName(name)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
939 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
940 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
941
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
942 self.layout = QVBoxLayout(self)
2824
858412c29c34 Replaced the obsoleted method setMargin() with setContentsMargins().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2474
diff changeset
943 self.layout.setContentsMargins(0, 0, 0, 0)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
944 self.layout.setSpacing(0)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
945
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
946 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
947 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
948 expandedEntries=expandedEntries)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
949 size = self.cw.size()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
950 self.layout.addWidget(self.cw)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
951 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
952 self.setWindowTitle(self.cw.windowTitle())
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
953
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3190
diff changeset
954 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
955 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
956 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
957 self.cw.masterPasswordChanged.connect(self.__masterPasswordChanged)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
958
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
959 def __preferencesChanged(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
960 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
961 Private slot to handle a change of the preferences.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
962 """
492
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 465
diff changeset
963 self.preferencesChanged.emit()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
964
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
965 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
966 """
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 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
968
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 @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
970 @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
971 """
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 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
973
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
974 def showConfigurationPageByName(self, pageName):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
975 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
976 Public slot to show a named configuration page.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
977
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
978 @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
979 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
980 self.cw.showConfigurationPageByName(pageName)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
981
934
657269549914 Changed the configuration dialog to remember the last show page name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 825
diff changeset
982 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
983 """
657269549914 Changed the configuration dialog to remember the last show page name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 825
diff changeset
984 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
985
2964
84b65fb9e780 Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2907
diff changeset
986 @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
987 """
657269549914 Changed the configuration dialog to remember the last show page name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 825
diff changeset
988 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
989
4216
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
990 def getExpandedEntries(self):
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
991 """
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
992 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
993
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
994 @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
995 """
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
996 return self.cw.getExpandedEntries()
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
997
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
998 def setPreferences(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
999 """
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
1000 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
1001 storage.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1002 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1003 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
1004
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 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
1006 """
84b65fb9e780 Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2907
diff changeset
1007 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
1008 """
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
1009 super(ConfigurationDialog, self).accept()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1010
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
1011
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
1012 class ConfigurationWindow(E5MainWindow):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1013 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1014 Main window class for the standalone dialog.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1015 """
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
1016 def __init__(self, parent=None):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1017 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1018 Constructor
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1019
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1020 @param parent reference to the parent widget (QWidget)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1021 """
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
1022 super(ConfigurationWindow, self).__init__(parent)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1023
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
1024 self.cw = ConfigurationWidget(self, fromEric=False)
0
de9c2efb9d02 Started porting eric4 to Python3
D&