eric6/Preferences/ConfigurationDialog.py

Sun, 01 Sep 2019 19:40:53 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 01 Sep 2019 19:40:53 +0200
branch
without_py2_and_pyqt4
changeset 7198
684261ef2165
parent 7196
ab0a91b82b37
child 7201
6b42677d7043
permissions
-rw-r--r--

Removed the Qt4 runtime stuff.

0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
6645
ad476851d7e0 Updated copyright for 2019.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6630
diff changeset
3 # Copyright (c) 2002 - 2019 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
3145
a9de05d4a22f # __IGNORE_WARNING__ added/ removed.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3060
diff changeset
10 from __future__ import unicode_literals
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
11
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
12 import os
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
13 import types
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
14
5967
da72832f7c22 Fixed a few code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5920
diff changeset
15 from PyQt5.QtCore import pyqtSignal, pyqtSlot, PYQT_VERSION, Qt, QMetaObject, \
da72832f7c22 Fixed a few code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5920
diff changeset
16 QRect
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
17 from PyQt5.QtGui import QPixmap
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
18 from PyQt5.QtWidgets import QSizePolicy, QSpacerItem, QWidget, QTreeWidget, \
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
19 QStackedWidget, QDialog, QSplitter, QScrollArea, QApplication, \
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
20 QDialogButtonBox, QFrame, QVBoxLayout, QTreeWidgetItem, QLabel
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
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
27 from Globals import isMacPlatform, qVersionTuple, 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 """
701
fc587a1c2f8b Added an option to configure the icon of the tray starter application.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 537
diff changeset
100 assert displayMode in (
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
101 ConfigurationWidget.DefaultMode,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
102 ConfigurationWidget.HelpBrowserMode,
4658
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
103 ConfigurationWidget.TrayStarterMode,
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
104 ConfigurationWidget.HexEditorMode,
4798
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
105 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
106 )
fc587a1c2f8b Added an option to configure the icon of the tray starter application.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 537
diff changeset
107
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
108 super(ConfigurationWidget, self).__init__(parent)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
109 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
110 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
111 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
112 expandedEntries = [] if expandedEntries is None else expandedEntries[:]
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
113
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
114 self.__setupUi()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
115
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
116 self.itmDict = {}
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
117
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
118 if not fromEric:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
119 from PluginManager.PluginManager import PluginManager
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
120 try:
53
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 15
diff changeset
121 self.pluginManager = e5App().getObject("PluginManager")
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
122 except KeyError:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
123 self.pluginManager = PluginManager(self)
53
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 15
diff changeset
124 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
125
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
126 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
127 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
128 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
129 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
130 self.virtualenvManager = VirtualenvManager(self)
6386
91dc4fa9bc9c Fixed some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6381
diff changeset
131 e5App().registerObject("VirtualEnvManager",
91dc4fa9bc9c Fixed some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6381
diff changeset
132 self.virtualenvManager)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
133
701
fc587a1c2f8b Added an option to configure the icon of the tray starter application.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 537
diff changeset
134 if displayMode == ConfigurationWidget.DefaultMode:
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
135 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
136 # 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
137 # page creation function, parent key,
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
138 # 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
139 # 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
140 # 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
141 # 'save' to save the settings.
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
142 "applicationPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
143 [self.tr("Application"), "preferences-application.png",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
144 "ApplicationPage", None, None],
6672
2af01e538c57 Started implementing support conda virtual environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
145 "condaPage":
2af01e538c57 Started implementing support conda virtual environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
146 [self.tr("Conda"), "miniconda.png",
2af01e538c57 Started implementing support conda virtual environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
147 "CondaPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
148 "cooperationPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
149 [self.tr("Cooperation"), "preferences-cooperation.png",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
150 "CooperationPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
151 "corbaPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
152 [self.tr("CORBA"), "preferences-orbit.png",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
153 "CorbaPage", None, None],
5765
39d8b26ff557 Made the colors of the diff dialogs configurable.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5736
diff changeset
154 "diffPage":
39d8b26ff557 Made the colors of the diff dialogs configurable.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5736
diff changeset
155 [self.tr("Diff"), "diffFiles.png",
39d8b26ff557 Made the colors of the diff dialogs configurable.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5736
diff changeset
156 "DiffColoursPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
157 "emailPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
158 [self.tr("Email"), "preferences-mail_generic.png",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
159 "EmailPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
160 "graphicsPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
161 [self.tr("Graphics"), "preferences-graphics.png",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
162 "GraphicsPage", None, None],
4658
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
163 "hexEditorPage":
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
164 [self.tr("Hex Editor"), "hexEditor.png",
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
165 "HexEditorPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
166 "iconsPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
167 [self.tr("Icons"), "preferences-icons.png",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
168 "IconsPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
169 "ircPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
170 [self.tr("IRC"), "irc.png",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
171 "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
172 "logViewerPage":
4110
5a106c734527 Added diff syntax highlighters to the various VCS interfaces.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4097
diff changeset
173 [self.tr("Log-Viewer"), "preferences-logviewer.png",
4095
c78cdc1a3c14 Added a configuration page for the log viewer to the configuration dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
174 "LogViewerPage", None, None],
7069
a09a30251d4e MicroPythonReplWidget: extended the color support with selectable color schemes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6942
diff changeset
175 "microPythonPage":
a09a30251d4e MicroPythonReplWidget: extended the color support with selectable color schemes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6942
diff changeset
176 [self.tr("MicroPython"), "micropython",
a09a30251d4e MicroPythonReplWidget: extended the color support with selectable color schemes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6942
diff changeset
177 "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
178 "mimeTypesPage":
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
179 [self.tr("Mimetypes"), "preferences-mimetypes.png",
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
180 "MimeTypesPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
181 "networkPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
182 [self.tr("Network"), "preferences-network.png",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
183 "NetworkPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
184 "notificationsPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
185 [self.tr("Notifications"),
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
186 "preferences-notifications.png",
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
187 "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
188 "pipPage":
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
189 [self.tr("Python Package Management"), "pypi.png",
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
190 "PipPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
191 "pluginManagerPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
192 [self.tr("Plugin Manager"),
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
193 "preferences-pluginmanager.png",
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
194 "PluginManagerPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
195 "printerPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
196 [self.tr("Printer"), "preferences-printer.png",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
197 "PrinterPage", None, None],
5968
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5967
diff changeset
198 "protobufPage":
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5967
diff changeset
199 [self.tr("Protobuf"), "protobuf.png",
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5967
diff changeset
200 "ProtobufPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
201 "pythonPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
202 [self.tr("Python"), "preferences-python.png",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
203 "PythonPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
204 "qtPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
205 [self.tr("Qt"), "preferences-qtlogo.png",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
206 "QtPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
207 "securityPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
208 [self.tr("Security"), "preferences-security.png",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
209 "SecurityPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
210 "shellPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
211 [self.tr("Shell"), "preferences-shell.png",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
212 "ShellPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
213 "tasksPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
214 [self.tr("Tasks"), "task.png",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
215 "TasksPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
216 "templatesPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
217 [self.tr("Templates"), "preferences-template.png",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
218 "TemplatesPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
219 "trayStarterPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
220 [self.tr("Tray Starter"), "erict.png",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
221 "TrayStarterPage", None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
222 "vcsPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
223 [self.tr("Version Control Systems"),
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
224 "preferences-vcs.png",
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
225 "VcsPage", None, None],
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
226
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
227 "0debuggerPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
228 [self.tr("Debugger"), "preferences-debugger.png",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
229 None, None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
230 "debuggerGeneralPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
231 [self.tr("General"), "preferences-debugger.png",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
232 "DebuggerGeneralPage", "0debuggerPage", None],
6381
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6370
diff changeset
233 "debuggerPython2Page":
6346
92ed63434dce Started to remove all explicit references to Python interpreters and replace them by references to virtuak environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6188
diff changeset
234 [self.tr("Python2"), "preferences-pyDebugger.png",
6381
37f23590dbbc Configuration pages for Python: harmonized the Python debugger pages and the Python page and added a button to show the virtual environment manager dialog to the Python configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6370
diff changeset
235 "DebuggerPython2Page", "0debuggerPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
236 "debuggerPython3Page":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
237 [self.tr("Python3"), "preferences-pyDebugger.png",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
238 "DebuggerPython3Page", "0debuggerPage", None],
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
239
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
240 "0editorPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
241 [self.tr("Editor"), "preferences-editor.png",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
242 None, None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
243 "editorAPIsPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
244 [self.tr("APIs"), "preferences-api.png",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
245 "EditorAPIsPage", "0editorPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
246 "editorAutocompletionPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
247 [self.tr("Autocompletion"),
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
248 "preferences-autocompletion.png",
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
249 "EditorAutocompletionPage", "0editorPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
250 "editorAutocompletionQScintillaPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
251 [self.tr("QScintilla"), "qscintilla.png",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
252 "EditorAutocompletionQScintillaPage",
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
253 "editorAutocompletionPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
254 "editorCalltipsPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
255 [self.tr("Calltips"), "preferences-calltips.png",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
256 "EditorCalltipsPage", "0editorPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
257 "editorCalltipsQScintillaPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
258 [self.tr("QScintilla"), "qscintilla.png",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
259 "EditorCalltipsQScintillaPage", "editorCalltipsPage", None],
5912
b6643d36dddd Added the rich text view to the documentation viewer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5765
diff changeset
260 "editorDocViewerPage":
b6643d36dddd Added the rich text view to the documentation viewer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5765
diff changeset
261 [self.tr("Documentation Viewer"), "codeDocuViewer.png",
b6643d36dddd Added the rich text view to the documentation viewer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5765
diff changeset
262 "EditorDocViewerPage", "0editorPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
263 "editorGeneralPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
264 [self.tr("General"), "preferences-general.png",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
265 "EditorGeneralPage", "0editorPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
266 "editorFilePage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
267 [self.tr("Filehandling"),
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
268 "preferences-filehandling.png",
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
269 "EditorFilePage", "0editorPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
270 "editorSearchPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
271 [self.tr("Searching"), "preferences-search.png",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
272 "EditorSearchPage", "0editorPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
273 "editorSpellCheckingPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
274 [self.tr("Spell checking"),
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
275 "preferences-spellchecking.png",
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
276 "EditorSpellCheckingPage", "0editorPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
277 "editorStylesPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
278 [self.tr("Style"), "preferences-styles.png",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
279 "EditorStylesPage", "0editorPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
280 "editorSyntaxPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
281 [self.tr("Code Checkers"), "preferences-debugger.png",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
282 "EditorSyntaxPage", "0editorPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
283 "editorTypingPage":
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("Typing"), "preferences-typing.png",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
285 "EditorTypingPage", "0editorPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
286 "editorExportersPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
287 [self.tr("Exporters"), "preferences-exporters.png",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
288 "EditorExportersPage", "0editorPage", None],
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
289
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
290 "1editorLexerPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
291 [self.tr("Highlighters"),
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
292 "preferences-highlighting-styles.png",
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
293 None, "0editorPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
294 "editorHighlightersPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
295 [self.tr("Filetype Associations"),
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
296 "preferences-highlighter-association.png",
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
297 "EditorHighlightersPage", "1editorLexerPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
298 "editorHighlightingStylesPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
299 [self.tr("Styles"),
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
300 "preferences-highlighting-styles.png",
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
301 "EditorHighlightingStylesPage", "1editorLexerPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
302 "editorKeywordsPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
303 [self.tr("Keywords"), "preferences-keywords.png",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
304 "EditorKeywordsPage", "1editorLexerPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
305 "editorPropertiesPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
306 [self.tr("Properties"), "preferences-properties.png",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
307 "EditorPropertiesPage", "1editorLexerPage", None],
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
308
4288
1c9c1c12111a Added a configuration page for mouse click handler support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4278
diff changeset
309 "1editorMouseClickHandlers":
1c9c1c12111a Added a configuration page for mouse click handler support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4278
diff changeset
310 [self.tr("Mouse Click Handlers"),
1c9c1c12111a Added a configuration page for mouse click handler support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4278
diff changeset
311 "preferences-mouse-click-handler.png",
1c9c1c12111a Added a configuration page for mouse click handler support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4278
diff changeset
312 "EditorMouseClickHandlerPage", "0editorPage", None],
1c9c1c12111a Added a configuration page for mouse click handler support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4278
diff changeset
313
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
314 "0helpPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
315 [self.tr("Help"), "preferences-help.png",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
316 None, None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
317 "helpDocumentationPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
318 [self.tr("Help Documentation"),
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
319 "preferences-helpdocumentation.png",
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
320 "HelpDocumentationPage", "0helpPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
321 "helpViewersPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
322 [self.tr("Help Viewers"),
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
323 "preferences-helpviewers.png",
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
324 "HelpViewersPage", "0helpPage", None],
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
325
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
326 "0projectPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
327 [self.tr("Project"), "preferences-project.png",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
328 None, None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
329 "projectBrowserPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
330 [self.tr("Project Viewer"), "preferences-project.png",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
331 "ProjectBrowserPage", "0projectPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
332 "projectPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
333 [self.tr("Project"), "preferences-project.png",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
334 "ProjectPage", "0projectPage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
335 "multiProjectPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
336 [self.tr("Multiproject"),
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
337 "preferences-multiproject.png",
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
338 "MultiProjectPage", "0projectPage", None],
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
339
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
340 "0interfacePage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
341 [self.tr("Interface"), "preferences-interface.png",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
342 None, None, None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
343 "interfacePage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
344 [self.tr("Interface"), "preferences-interface.png",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
345 "InterfacePage", "0interfacePage", None],
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
346 "viewmanagerPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
347 [self.tr("Viewmanager"), "preferences-viewmanager.png",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
348 "ViewmanagerPage", "0interfacePage", None],
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
349 }
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
350 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
351 self.configItems.update({
4806
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
352 "0webBrowserPage":
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
353 [self.tr("Web Browser"), "ericWeb.png",
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
354 None, None, None],
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
355 "webBrowserAppearancePage":
4619
aa2319888257 Prepared the code for missing QtWebKit (starting from Qt 5.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4552
diff changeset
356 [self.tr("Appearance"), "preferences-styles.png",
4806
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
357 "WebBrowserAppearancePage", "0webBrowserPage", None],
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
358 "webBrowserPage":
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
359 [self.tr("eric6 Web Browser"), "ericWeb.png",
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
360 "WebBrowserPage", "0webBrowserPage", None],
7196
ab0a91b82b37 Removed support for QtWebKit and the old web rowser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7069
diff changeset
361 "webBrowserFlashCookieManagerPage":
4619
aa2319888257 Prepared the code for missing QtWebKit (starting from Qt 5.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4552
diff changeset
362 [self.tr("Flash Cookie Manager"),
aa2319888257 Prepared the code for missing QtWebKit (starting from Qt 5.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4552
diff changeset
363 "flashCookie16.png",
7196
ab0a91b82b37 Removed support for QtWebKit and the old web rowser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7069
diff changeset
364 "WebBrowserFlashCookieManagerPage", "0webBrowserPage",
ab0a91b82b37 Removed support for QtWebKit and the old web rowser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7069
diff changeset
365 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
366 "webBrowserVirusTotalPage":
4619
aa2319888257 Prepared the code for missing QtWebKit (starting from Qt 5.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4552
diff changeset
367 [self.tr("VirusTotal Interface"), "virustotal.png",
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
368 "WebBrowserVirusTotalPage", "0webBrowserPage", None],
4619
aa2319888257 Prepared the code for missing QtWebKit (starting from Qt 5.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4552
diff changeset
369 })
5920
e47dd106c3d6 Fixed a few issues in the QWebEngine based web browser detected on Ubuntu 17.10.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5912
diff changeset
370 if qVersionTuple() >= (5, 8, 0) and PYQT_VERSION >= 0x50800:
5532
3a7c5deab9b7 Added support for new functionality provided by Qt 5.8.0 to the QtWebEngine based web browser (including spell checking).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5389
diff changeset
371 self.configItems.update({
3a7c5deab9b7 Added support for new functionality provided by Qt 5.8.0 to the QtWebEngine based web browser (including spell checking).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5389
diff changeset
372 "webBrowserSpellCheckingPage":
3a7c5deab9b7 Added support for new functionality provided by Qt 5.8.0 to the QtWebEngine based web browser (including spell checking).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5389
diff changeset
373 [self.tr("Spell checking"),
3a7c5deab9b7 Added support for new functionality provided by Qt 5.8.0 to the QtWebEngine based web browser (including spell checking).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5389
diff changeset
374 "preferences-spellchecking.png",
3a7c5deab9b7 Added support for new functionality provided by Qt 5.8.0 to the QtWebEngine based web browser (including spell checking).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5389
diff changeset
375 "WebBrowserSpellCheckingPage", "0webBrowserPage",
3a7c5deab9b7 Added support for new functionality provided by Qt 5.8.0 to the QtWebEngine based web browser (including spell checking).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5389
diff changeset
376 None],
3a7c5deab9b7 Added support for new functionality provided by Qt 5.8.0 to the QtWebEngine based web browser (including spell checking).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5389
diff changeset
377 })
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
378
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
379 self.configItems.update(
53
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 15
diff changeset
380 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
381
4798
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
382 elif displayMode == ConfigurationWidget.WebBrowserMode:
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
383 self.configItems = {
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
384 # 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
385 # page creation function, parent key,
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
386 # reference to configuration page (must always be last)]
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
387 # 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
388 # 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
389 # 'save' to save the settings.
4804
f794ff054d8f Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4798
diff changeset
390 "interfacePage":
f794ff054d8f Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4798
diff changeset
391 [self.tr("Interface"), "preferences-interface.png",
f794ff054d8f Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4798
diff changeset
392 "HelpInterfacePage", None, None],
4798
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
393 "networkPage":
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
394 [self.tr("Network"), "preferences-network.png",
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
395 "NetworkPage", None, None],
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
396 "printerPage":
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
397 [self.tr("Printer"), "preferences-printer.png",
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
398 "PrinterPage", None, None],
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
399 "securityPage":
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
400 [self.tr("Security"), "preferences-security.png",
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
401 "SecurityPage", None, None],
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
402
4875
4ee26909ac0d Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4807
diff changeset
403 "helpDocumentationPage":
4ee26909ac0d Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4807
diff changeset
404 [self.tr("Help Documentation"),
4ee26909ac0d Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4807
diff changeset
405 "preferences-helpdocumentation.png",
4ee26909ac0d Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4807
diff changeset
406 "HelpDocumentationPage", None, None],
4804
f794ff054d8f Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4798
diff changeset
407
f794ff054d8f Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4798
diff changeset
408 "webBrowserAppearancePage":
f794ff054d8f Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4798
diff changeset
409 [self.tr("Appearance"), "preferences-styles.png",
f794ff054d8f Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4798
diff changeset
410 "WebBrowserAppearancePage", None, None],
4805
8ef007140046 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4804
diff changeset
411 "webBrowserPage":
8ef007140046 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4804
diff changeset
412 [self.tr("eric6 Web Browser"), "ericWeb.png",
8ef007140046 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4804
diff changeset
413 "WebBrowserPage", None, None],
8ef007140046 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4804
diff changeset
414
7196
ab0a91b82b37 Removed support for QtWebKit and the old web rowser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7069
diff changeset
415 "webBrowserFlashCookieManagerPage":
4798
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
416 [self.tr("Flash Cookie Manager"),
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
417 "flashCookie16.png",
7196
ab0a91b82b37 Removed support for QtWebKit and the old web rowser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7069
diff changeset
418 "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
419 "webBrowserVirusTotalPage":
4798
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
420 [self.tr("VirusTotal Interface"), "virustotal.png",
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
421 "WebBrowserVirusTotalPage", None, None],
4798
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
422 }
5532
3a7c5deab9b7 Added support for new functionality provided by Qt 5.8.0 to the QtWebEngine based web browser (including spell checking).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5389
diff changeset
423
5920
e47dd106c3d6 Fixed a few issues in the QWebEngine based web browser detected on Ubuntu 17.10.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5912
diff changeset
424 if qVersionTuple() >= (5, 8, 0) and PYQT_VERSION >= 0x50800:
5532
3a7c5deab9b7 Added support for new functionality provided by Qt 5.8.0 to the QtWebEngine based web browser (including spell checking).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5389
diff changeset
425 self.configItems.update({
3a7c5deab9b7 Added support for new functionality provided by Qt 5.8.0 to the QtWebEngine based web browser (including spell checking).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5389
diff changeset
426 "webBrowserSpellCheckingPage":
3a7c5deab9b7 Added support for new functionality provided by Qt 5.8.0 to the QtWebEngine based web browser (including spell checking).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5389
diff changeset
427 [self.tr("Spell checking"),
3a7c5deab9b7 Added support for new functionality provided by Qt 5.8.0 to the QtWebEngine based web browser (including spell checking).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5389
diff changeset
428 "preferences-spellchecking.png",
3a7c5deab9b7 Added support for new functionality provided by Qt 5.8.0 to the QtWebEngine based web browser (including spell checking).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5389
diff changeset
429 "WebBrowserSpellCheckingPage", None, None],
3a7c5deab9b7 Added support for new functionality provided by Qt 5.8.0 to the QtWebEngine based web browser (including spell checking).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5389
diff changeset
430 })
4798
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
431
701
fc587a1c2f8b Added an option to configure the icon of the tray starter application.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 537
diff changeset
432 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
433 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
434 # 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
435 # 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
436 # 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
437 # 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
438 # 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
439 # 'save' to save the settings.
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
440 "trayStarterPage":
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
441 [self.tr("Tray Starter"), "erict.png",
3038
7fe9a53280bd Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
442 "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
443 }
4216
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
444
4658
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
445 elif displayMode == ConfigurationWidget.HexEditorMode:
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
446 self.configItems = {
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
447 # 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
448 # page creation function, parent key,
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
449 # 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
450 # 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
451 # 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
452 # 'save' to save the settings.
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
453 "hexEditorPage":
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
454 [self.tr("Hex Editor"), "hexEditor.png",
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
455 "HexEditorPage", None, None],
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
456 }
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
457
701
fc587a1c2f8b Added an option to configure the icon of the tray starter application.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 537
diff changeset
458 else:
fc587a1c2f8b Added an option to configure the icon of the tray starter application.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 537
diff changeset
459 raise RuntimeError("Illegal mode value: {0}".format(displayMode))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
460
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
461 # 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
462 self.__expandedEntries = []
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
463 for key in sorted(self.configItems.keys()):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
464 pageData = self.configItems[key]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
465 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
466 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
467 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
468 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
469 continue
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
470 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
471 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
472 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
473 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
474 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
475 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
476 displayMode != ConfigurationWidget.DefaultMode or
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
477 key in expandedEntries):
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
478 self.itmDict[key].setExpanded(True)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
479 self.configList.sortByColumn(0, Qt.AscendingOrder)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
480
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
481 # set the initial size of the splitter
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
482 self.configSplitter.setSizes([200, 600])
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
483
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 492
diff changeset
484 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
485 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
486 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
487 self.buttonBox.rejected.connect(self.rejected)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
488
4658
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
489 if displayMode in [ConfigurationWidget.HelpBrowserMode,
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
490 ConfigurationWidget.TrayStarterMode,
4798
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
491 ConfigurationWidget.HexEditorMode,
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
492 ConfigurationWidget.WebBrowserMode]:
4658
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
493 self.configListSearch.hide()
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
494
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
495 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
496 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
497 self.__initLexers()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
498
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
499 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
500 """
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
501 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
502 """
2326
7a9c4dafae62 Fixed an issue with the configuration dialog on Mac OS X.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
503 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
504 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
505 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
506 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
507
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
508 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
509
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
510 def __setupUi(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
511 """
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
512 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
513 widget.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
514 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
515 self.setObjectName("ConfigurationDialog")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
516 self.resize(900, 650)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
517 self.verticalLayout_2 = QVBoxLayout(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
518 self.verticalLayout_2.setSpacing(6)
2824
858412c29c34 Replaced the obsoleted method setMargin() with setContentsMargins().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2474
diff changeset
519 self.verticalLayout_2.setContentsMargins(6, 6, 6, 6)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
520 self.verticalLayout_2.setObjectName("verticalLayout_2")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
521
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
522 self.configSplitter = QSplitter(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
523 self.configSplitter.setOrientation(Qt.Horizontal)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
524 self.configSplitter.setObjectName("configSplitter")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
525
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
526 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
527 self.leftVBoxLayout = QVBoxLayout(self.configListWidget)
2824
858412c29c34 Replaced the obsoleted method setMargin() with setContentsMargins().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2474
diff changeset
528 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
529 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
530 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
531 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
532 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
533 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
534 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
535 self.configList = QTreeWidget()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
536 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
537 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
538 self.configListSearch.textChanged.connect(self.__searchTextChanged)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
539
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
540 self.scrollArea = QScrollArea(self.configSplitter)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
541 self.scrollArea.setFrameShape(QFrame.NoFrame)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
542 self.scrollArea.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOn)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
543 self.scrollArea.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOn)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
544 self.scrollArea.setWidgetResizable(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
545 self.scrollArea.setObjectName("scrollArea")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
546
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
547 self.configStack = QStackedWidget()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
548 self.configStack.setFrameShape(QFrame.Box)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
549 self.configStack.setFrameShadow(QFrame.Sunken)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
550 self.configStack.setObjectName("configStack")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
551 self.scrollArea.setWidget(self.configStack)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
552
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
553 self.emptyPage = QWidget()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
554 self.emptyPage.setGeometry(QRect(0, 0, 372, 591))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
555 self.emptyPage.setObjectName("emptyPage")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
556 self.vboxlayout = QVBoxLayout(self.emptyPage)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
557 self.vboxlayout.setSpacing(6)
2824
858412c29c34 Replaced the obsoleted method setMargin() with setContentsMargins().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2474
diff changeset
558 self.vboxlayout.setContentsMargins(6, 6, 6, 6)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
559 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
560 spacerItem = QSpacerItem(
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
561 20, 20, QSizePolicy.Minimum, QSizePolicy.Expanding)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
562 self.vboxlayout.addItem(spacerItem)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
563 self.emptyPagePixmap = QLabel(self.emptyPage)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
564 self.emptyPagePixmap.setAlignment(Qt.AlignCenter)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
565 self.emptyPagePixmap.setObjectName("emptyPagePixmap")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
566 self.emptyPagePixmap.setPixmap(
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
567 QPixmap(os.path.join(getConfig('ericPixDir'), 'eric.png')))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
568 self.vboxlayout.addWidget(self.emptyPagePixmap)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
569 self.textLabel1 = QLabel(self.emptyPage)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
570 self.textLabel1.setAlignment(Qt.AlignCenter)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
571 self.textLabel1.setObjectName("textLabel1")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
572 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
573 spacerItem1 = QSpacerItem(
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
574 20, 40, QSizePolicy.Minimum, QSizePolicy.Expanding)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
575 self.vboxlayout.addItem(spacerItem1)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
576 self.configStack.addWidget(self.emptyPage)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
577
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
578 self.verticalLayout_2.addWidget(self.configSplitter)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
579
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
580 self.buttonBox = QDialogButtonBox(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
581 self.buttonBox.setOrientation(Qt.Horizontal)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
582 self.buttonBox.setStandardButtons(
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
583 QDialogButtonBox.Apply | QDialogButtonBox.Cancel |
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
584 QDialogButtonBox.Ok | QDialogButtonBox.Reset)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
585 self.buttonBox.setObjectName("buttonBox")
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
586 if not self.fromEric and \
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
587 self.displayMode == ConfigurationWidget.DefaultMode:
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
588 self.buttonBox.button(QDialogButtonBox.Apply).hide()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
589 self.buttonBox.button(QDialogButtonBox.Apply).setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
590 self.buttonBox.button(QDialogButtonBox.Reset).setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
591 self.verticalLayout_2.addWidget(self.buttonBox)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
592
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
593 self.setWindowTitle(self.tr("Preferences"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
594
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
595 self.configList.header().hide()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
596 self.configList.header().setSortIndicator(0, Qt.AscendingOrder)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
597 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
598 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
599 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
600 "to display the configuration page."))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
601
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
602 QMetaObject.connectSlotsByName(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
603 self.setTabOrder(self.configList, self.configStack)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
604
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
605 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
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 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
608
4213
0bbb56fc9e65 Changed the 'filter' function to a 'search' function disabling all entries, that don't contain the entered string.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4165
diff changeset
609 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
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 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
612
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
613 @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
614 """
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
615 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
616
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
617 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
618 """
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
619 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
620
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 @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
622 @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
623 @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
624 """
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
625 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
626 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
627 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
628 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
629 if itm.childCount() > 0:
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
630 enable = self.__searchChildItems(itm, text) or \
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
631 text == "" or text in itm.text(0).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
632 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
633 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
634 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
635 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
636 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
637
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
638 return childEnabled
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
639
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
640 def __initLexers(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
641 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
642 Private method to initialize the dictionary of preferences lexers.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
643 """
2408
dc3a7c9d8f6e Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2326
diff changeset
644 import QScintilla.Lexers
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
645 from .PreferencesLexer import PreferencesLexer, \
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
646 PreferencesLexerLanguageError
2408
dc3a7c9d8f6e Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2326
diff changeset
647
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
648 self.lexers = {}
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
649 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
650 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
651 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
652 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
653 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
654 pass
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
655
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
656 def __importConfigurationPage(self, name):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
657 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
658 Private method to import a configuration page module.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
659
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
660 @param name name of the configuration page module (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
661 @return reference to the configuration page module
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
662 """
426
161992758137 Did some more string format conversions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 149
diff changeset
663 modName = "Preferences.ConfigurationPages.{0}".format(name)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
664 try:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
665 mod = __import__(modName)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
666 components = modName.split('.')
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
667 for comp in components[1:]:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
668 mod = getattr(mod, comp)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
669 return mod
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
670 except ImportError:
3020
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3010
diff changeset
671 E5MessageBox.critical(
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3010
diff changeset
672 self,
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3189
diff changeset
673 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
674 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
675 """ could not be loaded.</p>""").format(name))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
676 return None
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 __showConfigurationPage(self, itm, column):
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 slot to show a selected 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 itm reference to the selected item (QTreeWidgetItem)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
683 @param column column that was selected (integer) (ignored)
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 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
686 self.showConfigurationPageByName(pageName, setCurrent=False)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
687
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
688 def __initPage(self, pageData):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
689 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
690 Private method to initialize a configuration page.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
691
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
692 @param pageData data structure for the page to initialize
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
693 @return reference to the initialized page
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
694 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
695 page = None
12
1d8dd9706f46 First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7
diff changeset
696 if isinstance(pageData[2], types.FunctionType):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
697 page = pageData[2](self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
698 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
699 mod = self.__importConfigurationPage(pageData[2])
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
700 if mod:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
701 page = mod.create(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
702 if page is not None:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
703 self.configStack.addWidget(page)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
704 pageData[-1] = page
1109
9552b5e16a07 Added some more search engines to the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 990
diff changeset
705 try:
9552b5e16a07 Added some more search engines to the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 990
diff changeset
706 page.setMode(self.displayMode)
9552b5e16a07 Added some more search engines to the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 990
diff changeset
707 except AttributeError:
9552b5e16a07 Added some more search engines to the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 990
diff changeset
708 pass
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
709 return page
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
710
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
711 def showConfigurationPageByName(self, pageName, setCurrent=True):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
712 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
713 Public slot to show a named configuration page.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
714
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
715 @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
716 @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
717 """
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
718 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
719 page = self.emptyPage
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
720 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
721 pageData = self.configItems[pageName]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
722 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
723 # the page was not loaded yet, create it
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
724 page = self.__initPage(pageData)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
725 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
726 page = pageData[-1]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
727 if page is None:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
728 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
729 elif setCurrent:
3025
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
730 items = self.configList.findItems(
67064c71df21 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
731 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
732 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
733 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
734 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
735 self.configList.setCurrentItem(item)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
736 self.configStack.setCurrentWidget(page)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
737 ssize = self.scrollArea.size()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
738 if self.scrollArea.horizontalScrollBar():
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
739 ssize.setHeight(
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
740 ssize.height() -
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
741 self.scrollArea.horizontalScrollBar().height() - 2)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
742 if self.scrollArea.verticalScrollBar():
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
743 ssize.setWidth(
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3025
diff changeset
744 ssize.width() -
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
745 self.scrollArea.verticalScrollBar().width() - 2)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
746 psize = page.minimumSizeHint()
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
747 self.configStack.resize(max(ssize.width(), psize.width()),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
748 max(ssize.height(), psize.height()))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
749
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
750 if page != self.emptyPage:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
751 page.polishPage()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
752 self.buttonBox.button(QDialogButtonBox.Apply).setEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
753 self.buttonBox.button(QDialogButtonBox.Reset).setEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
754 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
755 self.buttonBox.button(QDialogButtonBox.Apply).setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
756 self.buttonBox.button(QDialogButtonBox.Reset).setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
757
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
758 # 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
759 for sb in [self.scrollArea.horizontalScrollBar(),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
760 self.scrollArea.verticalScrollBar()]:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
761 if sb:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
762 sb.setValue(0)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
763
934
657269549914 Changed the configuration dialog to remember the last show page name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 825
diff changeset
764 self.__currentConfigurationPageName = pageName
657269549914 Changed the configuration dialog to remember the last show page name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 825
diff changeset
765
657269549914 Changed the configuration dialog to remember the last show page name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 825
diff changeset
766 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
767 """
657269549914 Changed the configuration dialog to remember the last show page name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 825
diff changeset
768 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
769
2964
84b65fb9e780 Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2907
diff changeset
770 @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
771 """
657269549914 Changed the configuration dialog to remember the last show page name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 825
diff changeset
772 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
773
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
774 def calledFromEric(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
775 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
776 Public method to check, if invoked from within eric.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
777
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
778 @return flag indicating invocation from within eric (boolean)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
779 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
780 return self.fromEric
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
781
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
782 def getPage(self, pageName):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
783 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
784 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
785
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
786 @param pageName name of the configuration page (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
787 @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
788 not loaded yet
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
789 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
790 return self.configItems[pageName][-1]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
791
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
792 def getLexers(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
793 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
794 Public method to get a reference to the lexers dictionary.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
795
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
796 @return reference to the lexers dictionary
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
797 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
798 return self.lexers
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
799
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
800 def setPreferences(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
801 """
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
802 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
803 storage.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
804 """
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
805 for pageData in self.configItems.values():
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
806 if pageData[-1]:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
807 pageData[-1].save()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
808 # page was loaded (and possibly modified)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
809 QApplication.processEvents() # ensure HMI is responsive
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
810
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
811 def on_buttonBox_clicked(self, button):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
812 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
813 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
814
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
815 @param button button that was clicked (QAbstractButton)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
816 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
817 if button == self.buttonBox.button(QDialogButtonBox.Apply):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
818 self.on_applyButton_clicked()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
819 elif button == self.buttonBox.button(QDialogButtonBox.Reset):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
820 self.on_resetButton_clicked()
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 @pyqtSlot()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
823 def on_applyButton_clicked(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
824 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
825 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
826 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
827 if self.configStack.currentWidget() != self.emptyPage:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
828 page = self.configStack.currentWidget()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
829 savedState = page.saveState()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
830 page.save()
492
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 465
diff changeset
831 self.preferencesChanged.emit()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
832 if savedState is not None:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
833 page.setState(savedState)
4658
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
834 page.polishPage()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
835
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
836 @pyqtSlot()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
837 def on_resetButton_clicked(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
838 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
839 Private slot called to reset the settings of the current page.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
840 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
841 if self.configStack.currentWidget() != self.emptyPage:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
842 currentPage = self.configStack.currentWidget()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
843 savedState = currentPage.saveState()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
844 pageName = self.configList.currentItem().getPageName()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
845 self.configStack.removeWidget(currentPage)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
846 if pageName == "editorHighlightingStylesPage":
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
847 self.__initLexers()
97
c4086afea02b Finished cleaning up the code supported by py3flakes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 88
diff changeset
848 self.configItems[pageName][-1] = None
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
849
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
850 self.showConfigurationPageByName(pageName)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
851 if savedState is not None:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
852 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
853
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
854 def getExpandedEntries(self):
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
855 """
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
856 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
857
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
858 @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
859 """
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
860 return self.__expandedEntries
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
861
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
862 @pyqtSlot(QTreeWidgetItem)
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
863 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
864 """
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
865 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
866
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
867 @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
868 """
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
869 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
870 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
871 self.__expandedEntries.remove(pageName)
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
872
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
873 @pyqtSlot(QTreeWidgetItem)
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
874 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
875 """
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
876 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
877
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
878 @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
879 """
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
880 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
881 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
882 self.__expandedEntries.append(pageName)
4806
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
883
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
884 def isUsingWebEngine(self):
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
885 """
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
886 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
887
682750cc7bd5 Corrected some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4875
diff changeset
888 @return flag indicating the use of QtWebEngine
682750cc7bd5 Corrected some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4875
diff changeset
889 @rtype bool
4806
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 return self.__webEngine or \
5c0745cb26ea Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4805
diff changeset
892 self.displayMode == ConfigurationWidget.WebBrowserMode
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
893
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
894
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
895 class ConfigurationDialog(QDialog):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
896 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
897 Class for the dialog variant.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
898
501
5c615a85241a Finished porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 500
diff changeset
899 @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
900 @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
901 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
902 """
492
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 465
diff changeset
903 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
904 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
905
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
906 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
907 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
908 TrayStarterMode = ConfigurationWidget.TrayStarterMode
4658
d760763dcc4a Created a configuration page for the hex editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
909 HexEditorMode = ConfigurationWidget.HexEditorMode
4798
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
910 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
911
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
912 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
913 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
914 expandedEntries=None):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
915 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
916 Constructor
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
917
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
918 @param parent The parent widget of this dialog. (QWidget)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
919 @param name The name of this dialog. string
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
920 @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
921 @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
922 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
923 @keyparam displayMode mode of the configuration dialog
4798
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
924 (DefaultMode, HelpBrowserMode, TrayStarterMode, HexEditorMode,
ee1a24311b03 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4658
diff changeset
925 WebBrowserMode)
4216
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
926 @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
927 (list of strings)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
928 """
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
929 super(ConfigurationDialog, self).__init__(parent)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
930 if name:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
931 self.setObjectName(name)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
932 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
933 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
934
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
935 self.layout = QVBoxLayout(self)
2824
858412c29c34 Replaced the obsoleted method setMargin() with setContentsMargins().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2474
diff changeset
936 self.layout.setContentsMargins(0, 0, 0, 0)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
937 self.layout.setSpacing(0)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
938
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
939 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
940 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
941 expandedEntries=expandedEntries)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
942 size = self.cw.size()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
943 self.layout.addWidget(self.cw)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
944 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
945 self.setWindowTitle(self.cw.windowTitle())
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
946
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3190
diff changeset
947 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
948 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
949 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
950 self.cw.masterPasswordChanged.connect(self.__masterPasswordChanged)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
951
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
952 def __preferencesChanged(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
953 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
954 Private slot to handle a change of the preferences.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
955 """
492
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 465
diff changeset
956 self.preferencesChanged.emit()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
957
1127
b1802ebe0066 Added capability to encrypt saved passwords with a master password and rearranged some configuration parameters related to security.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
958 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
959 """
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
960 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
961
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
962 @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
963 @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
964 """
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 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
966
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
967 def showConfigurationPageByName(self, pageName):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
968 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
969 Public slot to show a named configuration page.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
970
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
971 @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
972 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
973 self.cw.showConfigurationPageByName(pageName)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
974
934
657269549914 Changed the configuration dialog to remember the last show page name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 825
diff changeset
975 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
976 """
657269549914 Changed the configuration dialog to remember the last show page name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 825
diff changeset
977 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
978
2964
84b65fb9e780 Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2907
diff changeset
979 @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
980 """
657269549914 Changed the configuration dialog to remember the last show page name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 825
diff changeset
981 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
982
4216
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
983 def getExpandedEntries(self):
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
984 """
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
985 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
986
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
987 @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
988 """
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
989 return self.cw.getExpandedEntries()
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4214
diff changeset
990
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
991 def setPreferences(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
992 """
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
993 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
994 storage.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
995 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
996 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
997
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
998 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
999 """
84b65fb9e780 Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2907
diff changeset
1000 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
1001 """
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
1002 super(ConfigurationDialog, self).accept()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1003
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
1004
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
1005 class ConfigurationWindow(E5MainWindow):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1006 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1007 Main window class for the standalone dialog.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1008 """
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
1009 def __init__(self, parent=None):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1010 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1011 Constructor
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1012
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1013 @param parent reference to the parent widget (QWidget)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1014 """
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
1015 super(ConfigurationWindow, self).__init__(parent)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1016
6630
bddd12f27a4c Web Browser (QtWebKit): applied the changes of the new Web Brwoser to the QtWebKit based variant.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6386
diff changeset
1017 self.cw = ConfigurationWidget(self, fromEric=False)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1018 size = self.cw.size()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1019 self.setCentralWidget(self.cw)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1020 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
1021 self.setWindowTitle(self.cw.windowTitle())
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1022
3010
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
1023 self.setStyle(Preferences.getUI("Style"),
befeff46ec0f Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
1024 Preferences.getUI("StyleSheet"))
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
1025
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3190
diff changeset
1026 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
1027 self.cw.rejected.connect(self.close)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1028
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1029 def showConfigurationPageByName(self, pageName):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1030 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1031 Public slot to show a named configuration page.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1032
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1033 @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
1034 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1035 self.cw.showConfigurationPageByName(pageName)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1036