eric6/UI/UserInterface.py

Sat, 02 Jan 2021 15:18:36 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 02 Jan 2021 15:18:36 +0100
changeset 7937
181d1160f617
parent 7923
91e843545d9a
child 7946
6901746220fc
permissions
-rw-r--r--

Fixed some 'lambda' related issues by converting them to 'functools.partial'.

0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
7923
91e843545d9a Updated copyright for 2021.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7911
diff changeset
3 # Copyright (c) 2002 - 2021 Detlev Offenbach <detlev@die-offenbachs.de>
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 Module implementing the main user interface.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
10 import os
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
11 import sys
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
12 import logging
7804
1cbc27e34ec6 Implementing code to record and/or guess some information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7785
diff changeset
13 import shutil
1cbc27e34ec6 Implementing code to record and/or guess some information about the installation process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7785
diff changeset
14 import json
7807
5514ca6a62ca Install Info: added the installation date and time to the install info structure.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7806
diff changeset
15 import datetime
7814
6fa40642ed7c Replaced os.getlogin() by getpass.getuser().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7813
diff changeset
16 import getpass
7937
181d1160f617 Fixed some 'lambda' related issues by converting them to 'functools.partial'.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7923
diff changeset
17 import functools
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
18
7264
bedbe458d792 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
19 from PyQt5.QtCore import (
bedbe458d792 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
20 pyqtSlot, QTimer, QFile, QFileInfo, pyqtSignal, PYQT_VERSION_STR, QDate,
bedbe458d792 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
21 QIODevice, qVersion, QProcess, QSize, QUrl, QObject, Qt, QUuid, QThread,
bedbe458d792 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
22 QUrlQuery
bedbe458d792 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
23 )
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3649
diff changeset
24 from PyQt5.QtGui import QKeySequence, QDesktopServices
7264
bedbe458d792 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
25 from PyQt5.QtWidgets import (
bedbe458d792 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
26 QSizePolicy, QWidget, QWhatsThis, QToolBar, QDialog, QSplitter,
bedbe458d792 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
27 QApplication, QMenu, QVBoxLayout, QDockWidget, QAction, QLabel
bedbe458d792 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
28 )
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3649
diff changeset
29 from PyQt5.Qsci import QSCINTILLA_VERSION_STR
7264
bedbe458d792 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
30 from PyQt5.QtNetwork import (
bedbe458d792 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
31 QNetworkProxyFactory, QNetworkAccessManager, QNetworkRequest, QNetworkReply
bedbe458d792 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
32 )
5736
000ea446ff4b Prepared the code for Qt > 5.9.99.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5720
diff changeset
33
5429
bb3bebb6d6bb Fixed an issue in the versionIsNewer() method of UserInterface caused by the new versioning scheme.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5400
diff changeset
34 from .Info import Version, VersionOnly, BugAddress, Program, FeatureAddress
12
1d8dd9706f46 First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7
diff changeset
35 from . import Config
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
36
55
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 53
diff changeset
37 from E5Gui.E5SingleApplication import E5SingleApplicationServer
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 53
diff changeset
38 from E5Gui.E5Action import E5Action, createActionGroup
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 53
diff changeset
39 from E5Gui.E5ToolBarManager import E5ToolBarManager
2697
1cd7fa670b05 Added a dialog to edit the list of unwanted error messages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2632
diff changeset
40 from E5Gui import E5MessageBox, E5FileDialog, E5ErrorMessage
537
72b32daeb8d6 Continued replacing QMessageBox methods with own methods.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 536
diff changeset
41 from E5Gui.E5Application import e5App
2101
5bac7dee9e1a Introduced the E5MainWindow class allowing to set a style for all the main windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2094
diff changeset
42 from E5Gui.E5MainWindow import E5MainWindow
2334
fc69ad77e18a Introduced a zoom widget in the status bar of several windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2331
diff changeset
43 from E5Gui.E5ZoomWidget import E5ZoomWidget
3071
83d066710d60 Added an extended progress dialog to make the progress bar label more descriptive.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3039
diff changeset
44 from E5Gui.E5ProgressDialog import E5ProgressDialog
3321
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3202
diff changeset
45 from E5Gui.E5ClickableLabel import E5ClickableLabel
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
46
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
47 import Preferences
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
48 import Utilities
7808
da107cd00f63 Install Information: added the installation date to the list of data.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7807
diff changeset
49 import Globals
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
50
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
51 import UI.PixmapCache
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
52
4629
99aaac59be4f Added a status bar icon to show the online status.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4621
diff changeset
53 from E5Network.E5NetworkIcon import E5NetworkIcon
7264
bedbe458d792 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
54 from E5Network.E5NetworkProxyFactory import (
bedbe458d792 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
55 E5NetworkProxyFactory, proxyAuthenticationRequired
bedbe458d792 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
56 )
2354
c63de4af553d Centralized the SSL error handling in E5SslErrorHandler.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2347
diff changeset
57 try:
c63de4af553d Centralized the SSL error handling in E5SslErrorHandler.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2347
diff changeset
58 from E5Network.E5SslErrorHandler import E5SslErrorHandler
c63de4af553d Centralized the SSL error handling in E5SslErrorHandler.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2347
diff changeset
59 SSL_AVAILABLE = True
c63de4af553d Centralized the SSL error handling in E5SslErrorHandler.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2347
diff changeset
60 except ImportError:
c63de4af553d Centralized the SSL error handling in E5SslErrorHandler.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2347
diff changeset
61 SSL_AVAILABLE = False
270
41505c92ac31 Added code to enhance the proxy configuration and removed the usage of QHttp.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 266
diff changeset
62
3670
f0cb7579c0b4 Finished renaming eric5 for PyQt5 to eric6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3659
diff changeset
63 from eric6config import getConfig
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
64
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
65
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
66 class Redirector(QObject):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
67 """
2965
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2933
diff changeset
68 Helper class used to redirect stdout and stderr to the log window.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
69
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
70 @signal appendStderr(str) emitted to write data to stderr logger
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
71 @signal appendStdout(str) emitted to write data to stdout logger
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
72 """
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
73 appendStderr = pyqtSignal(str)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
74 appendStdout = pyqtSignal(str)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
75
7300
7622b6330e62 UserInterface: added 'parent' parameter to Redirector to (hopefully) prevent premature deletion.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7264
diff changeset
76 def __init__(self, stderr, parent=None):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
77 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
78 Constructor
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
79
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
80 @param stderr flag indicating stderr is being redirected
7300
7622b6330e62 UserInterface: added 'parent' parameter to Redirector to (hopefully) prevent premature deletion.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7264
diff changeset
81 @type bool
7622b6330e62 UserInterface: added 'parent' parameter to Redirector to (hopefully) prevent premature deletion.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7264
diff changeset
82 @param parent reference to the parent object
7622b6330e62 UserInterface: added 'parent' parameter to Redirector to (hopefully) prevent premature deletion.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7264
diff changeset
83 @type QObject
7622b6330e62 UserInterface: added 'parent' parameter to Redirector to (hopefully) prevent premature deletion.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7264
diff changeset
84 """
7622b6330e62 UserInterface: added 'parent' parameter to Redirector to (hopefully) prevent premature deletion.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7264
diff changeset
85 super(Redirector, self).__init__(parent)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
86 self.stderr = stderr
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
87 self.buffer = ''
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
88
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
89 def __nWrite(self, n):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
90 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
91 Private method used to write data.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
92
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
93 @param n max number of bytes to write
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
94 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
95 if n:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
96 line = self.buffer[:n]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
97 if self.stderr:
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
98 self.appendStderr.emit(line)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
99 else:
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
100 self.appendStdout.emit(line)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
101 self.buffer = self.buffer[n:]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
102
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
103 def __bufferedWrite(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
104 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
105 Private method returning number of characters to write.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
106
3012
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
107 @return number of characters buffered or length of buffered line
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
108 (integer)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
109 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
110 return self.buffer.rfind('\n') + 1
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
111
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
112 def flush(self):
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 Public method used to flush the buffered data.
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.__nWrite(len(self.buffer))
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 def write(self, s):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
119 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
120 Public method used to write data.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
121
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
122 @param s data to be written (it must support the str-method)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
123 """
12
1d8dd9706f46 First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7
diff changeset
124 self.buffer += str(s)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
125 self.__nWrite(self.__bufferedWrite())
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
126
6424
5e74c4e22e9a Preferences, InterfacePage: introduced configuration options to make the activation of the Template-Viewer, File-Browser, Symbols widget and Numbers widget optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6423
diff changeset
127
2101
5bac7dee9e1a Introduced the E5MainWindow class allowing to set a style for all the main windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2094
diff changeset
128 class UserInterface(E5MainWindow):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
129 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
130 Class implementing the main user interface.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
131
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
132 @signal appendStderr(str) emitted to write data to stderr logger
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
133 @signal appendStdout(str) emitted to write data to stdout logger
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
134 @signal preferencesChanged() emitted after the preferences were changed
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
135 @signal reloadAPIs() emitted to reload the api information
3012
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
136 @signal showMenu(str, QMenu) emitted when a menu is about to be shown. The
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
137 name of the menu and a reference to the menu are given.
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: 1117
diff changeset
138 @signal masterPasswordChanged(str, str) emitted after the master
3012
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
139 password has been changed with the old and the new password
4630
7b0e38956b5c Refined the online state change behaviour.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4629
diff changeset
140 @signal onlineStateChanged(online) emitted to indicate a change of the
7b0e38956b5c Refined the online state change behaviour.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4629
diff changeset
141 network state
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
142 """
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
143 appendStderr = pyqtSignal(str)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
144 appendStdout = pyqtSignal(str)
492
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
145 preferencesChanged = pyqtSignal()
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
146 reloadAPIs = pyqtSignal()
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
147 showMenu = pyqtSignal(str, QMenu)
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: 1117
diff changeset
148 masterPasswordChanged = pyqtSignal(str, str)
4630
7b0e38956b5c Refined the online state change behaviour.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4629
diff changeset
149 onlineStateChanged = pyqtSignal(bool)
492
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
150
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
151 maxFilePathLen = 100
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
152 maxMenuFilePathLen = 75
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
153
2137
5a9bdcb8c934 Added the 'addSideWidget()' and 'removeSideWidget()' methods to the UserInterface class to allow plug-in developers to add a plug-in widget to the left or bottom side containers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2114
diff changeset
154 LeftSide = 1
5a9bdcb8c934 Added the 'addSideWidget()' and 'removeSideWidget()' methods to the UserInterface class to allow plug-in developers to add a plug-in widget to the left or bottom side containers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2114
diff changeset
155 BottomSide = 2
5a9bdcb8c934 Added the 'addSideWidget()' and 'removeSideWidget()' methods to the UserInterface class to allow plug-in developers to add a plug-in widget to the left or bottom side containers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2114
diff changeset
156 RightSide = 3
5a9bdcb8c934 Added the 'addSideWidget()' and 'removeSideWidget()' methods to the UserInterface class to allow plug-in developers to add a plug-in widget to the left or bottom side containers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2114
diff changeset
157
3670
f0cb7579c0b4 Finished renaming eric5 for PyQt5 to eric6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3659
diff changeset
158 ErrorLogFileName = "eric6_error.log"
3092
f7ec7a3e7270 Added a dialog to show the most recent error log.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3071
diff changeset
159
6267
350655a6c85f eric6, PluginManager: added the '--disable-plugin=' option to disable plug-ins via the command line.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6244
diff changeset
160 def __init__(self, app, locale, splash, plugin, disabledPlugins,
350655a6c85f eric6, PluginManager: added the '--disable-plugin=' option to disable plug-ins via the command line.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6244
diff changeset
161 noOpenAtStartup, noCrashOpenAtStartup, disableCrashSession,
6581
8eb6220f2bb7 Shell: changed code to start the shell/debugger backend with an unmodified PATH setting and added some more special commands (see what's this help of the shell).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6576
diff changeset
162 restartArguments, originalPathString):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
163 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
164 Constructor
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
165
6267
350655a6c85f eric6, PluginManager: added the '--disable-plugin=' option to disable plug-ins via the command line.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6244
diff changeset
166 @param app reference to the application object
350655a6c85f eric6, PluginManager: added the '--disable-plugin=' option to disable plug-ins via the command line.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6244
diff changeset
167 @type E5Application
350655a6c85f eric6, PluginManager: added the '--disable-plugin=' option to disable plug-ins via the command line.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6244
diff changeset
168 @param locale locale to be used by the UI
350655a6c85f eric6, PluginManager: added the '--disable-plugin=' option to disable plug-ins via the command line.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6244
diff changeset
169 @type str
3012
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
170 @param splash reference to the splashscreen
6267
350655a6c85f eric6, PluginManager: added the '--disable-plugin=' option to disable plug-ins via the command line.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6244
diff changeset
171 @type UI.SplashScreen.SplashScreen
350655a6c85f eric6, PluginManager: added the '--disable-plugin=' option to disable plug-ins via the command line.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6244
diff changeset
172 @param plugin filename of a plug-in to be loaded (used for plugin
3012
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
173 development)
6267
350655a6c85f eric6, PluginManager: added the '--disable-plugin=' option to disable plug-ins via the command line.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6244
diff changeset
174 @type str
350655a6c85f eric6, PluginManager: added the '--disable-plugin=' option to disable plug-ins via the command line.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6244
diff changeset
175 @param disabledPlugins list of plug-ins that have been disabled via
350655a6c85f eric6, PluginManager: added the '--disable-plugin=' option to disable plug-ins via the command line.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6244
diff changeset
176 the command line parameters '--disable-plugin='
350655a6c85f eric6, PluginManager: added the '--disable-plugin=' option to disable plug-ins via the command line.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6244
diff changeset
177 @type list of str
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
178 @param noOpenAtStartup flag indicating that the open at startup option
6267
350655a6c85f eric6, PluginManager: added the '--disable-plugin=' option to disable plug-ins via the command line.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6244
diff changeset
179 should not be executed
350655a6c85f eric6, PluginManager: added the '--disable-plugin=' option to disable plug-ins via the command line.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6244
diff changeset
180 @type bool
5371
01c4c059142b Added an option to configure the crash session startup behavior, added the '--no-crash' option to suppress looking for a crash session and changed some command line options:
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5362
diff changeset
181 @param noCrashOpenAtStartup flag indicating to ignore any crash session
6267
350655a6c85f eric6, PluginManager: added the '--disable-plugin=' option to disable plug-ins via the command line.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6244
diff changeset
182 file found at statup
350655a6c85f eric6, PluginManager: added the '--disable-plugin=' option to disable plug-ins via the command line.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6244
diff changeset
183 @type bool
5379
0f14e170a803 Added the '--disable-crash' option to temporarily disable the crash session support through the command line.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5371
diff changeset
184 @param disableCrashSession flag indicating to disable the crash session
6267
350655a6c85f eric6, PluginManager: added the '--disable-plugin=' option to disable plug-ins via the command line.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6244
diff changeset
185 support
350655a6c85f eric6, PluginManager: added the '--disable-plugin=' option to disable plug-ins via the command line.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6244
diff changeset
186 @type bool
3012
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
187 @param restartArguments list of command line parameters to be used for
6267
350655a6c85f eric6, PluginManager: added the '--disable-plugin=' option to disable plug-ins via the command line.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6244
diff changeset
188 a restart
350655a6c85f eric6, PluginManager: added the '--disable-plugin=' option to disable plug-ins via the command line.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6244
diff changeset
189 @type list of str
6581
8eb6220f2bb7 Shell: changed code to start the shell/debugger backend with an unmodified PATH setting and added some more special commands (see what's this help of the shell).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6576
diff changeset
190 @param originalPathString original PATH environment variable
8eb6220f2bb7 Shell: changed code to start the shell/debugger backend with an unmodified PATH setting and added some more special commands (see what's this help of the shell).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6576
diff changeset
191 @type str
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
192 """
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
193 super(UserInterface, self).__init__()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
194
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
195 self.__restartArgs = restartArguments[:]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
196
3012
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
197 self.setStyle(Preferences.getUI("Style"),
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
198 Preferences.getUI("StyleSheet"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
199
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
200 self.maxEditorPathLen = Preferences.getUI("CaptionFilenameLength")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
201 self.locale = locale
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
202 self.__noOpenAtStartup = noOpenAtStartup
5371
01c4c059142b Added an option to configure the crash session startup behavior, added the '--no-crash' option to suppress looking for a crash session and changed some command line options:
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5362
diff changeset
203 self.__noCrashOpenAtStartup = noCrashOpenAtStartup
5379
0f14e170a803 Added the '--disable-crash' option to temporarily disable the crash session support through the command line.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5371
diff changeset
204 self.__disableCrashSession = disableCrashSession
6267
350655a6c85f eric6, PluginManager: added the '--disable-plugin=' option to disable plug-ins via the command line.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6244
diff changeset
205 self.__disabledPlugins = disabledPlugins[:]
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
206
6581
8eb6220f2bb7 Shell: changed code to start the shell/debugger backend with an unmodified PATH setting and added some more special commands (see what's this help of the shell).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6576
diff changeset
207 self.__originalPathString = originalPathString
8eb6220f2bb7 Shell: changed code to start the shell/debugger backend with an unmodified PATH setting and added some more special commands (see what's this help of the shell).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6576
diff changeset
208
6434
872d10fa686a UserInterface, Translator: fixed an issue switching to the translator via the keyboard shortcut.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6433
diff changeset
209 self.__layoutType = Preferences.getUI("LayoutType")
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
210
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
211 self.passiveMode = Preferences.getDebugger("PassiveDbgEnabled")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
212
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
213 g = Preferences.getGeometry("MainGeometry")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
214 if g.isEmpty():
816
53e282890577 Made the toolbars of the initial layout more minimalistic.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 802
diff changeset
215 s = QSize(1280, 1024)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
216 self.resize(s)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
217 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
218 self.restoreGeometry(g)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
219 self.__startup = True
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
220
6554
5f1f2fcd9dee UserInterface, NetworkManager, E5NetworkProxyFactory: some code changes to (hopefully) fix a network proxy related issue.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6529
diff changeset
221 if Preferences.getUI("UseSystemProxy"):
5f1f2fcd9dee UserInterface, NetworkManager, E5NetworkProxyFactory: some code changes to (hopefully) fix a network proxy related issue.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6529
diff changeset
222 QNetworkProxyFactory.setUseSystemConfiguration(True)
5f1f2fcd9dee UserInterface, NetworkManager, E5NetworkProxyFactory: some code changes to (hopefully) fix a network proxy related issue.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6529
diff changeset
223 else:
6783
d8a0d75aaf01 UserInterface: fixed an exception thrown with Qt4 when changing network preferences.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6761
diff changeset
224 self.__proxyFactory = E5NetworkProxyFactory()
6554
5f1f2fcd9dee UserInterface, NetworkManager, E5NetworkProxyFactory: some code changes to (hopefully) fix a network proxy related issue.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6529
diff changeset
225 QNetworkProxyFactory.setApplicationProxyFactory(
5f1f2fcd9dee UserInterface, NetworkManager, E5NetworkProxyFactory: some code changes to (hopefully) fix a network proxy related issue.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6529
diff changeset
226 self.__proxyFactory)
5f1f2fcd9dee UserInterface, NetworkManager, E5NetworkProxyFactory: some code changes to (hopefully) fix a network proxy related issue.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6529
diff changeset
227 QNetworkProxyFactory.setUseSystemConfiguration(False)
270
41505c92ac31 Added code to enhance the proxy configuration and removed the usage of QHttp.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 266
diff changeset
228
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
229 self.capProject = ""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
230 self.capEditor = ""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
231 self.captionShowsFilename = Preferences.getUI("CaptionShowsFilename")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
232
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7456
diff changeset
233 QApplication.setWindowIcon(UI.PixmapCache.getIcon("eric"))
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7456
diff changeset
234 self.setWindowIcon(UI.PixmapCache.getIcon("eric"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
235 self.__setWindowCaption()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
236
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
237 # load the view profiles
2548
03c3840f887d Changed handling of the ViewProfiles settings to get rid of obsolete entries and make it suitable for the Python2 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2474
diff changeset
238 self.profiles = Preferences.getUI("ViewProfiles2")
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
239
6697
2f5c951bdf14 Conda interface: added capability to remove conda environments the conda way.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
240 # Generate the conda interface
2f5c951bdf14 Conda interface: added capability to remove conda environments the conda way.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
241 from CondaInterface.Conda import Conda
2f5c951bdf14 Conda interface: added capability to remove conda environments the conda way.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
242 self.condaInterface = Conda(self)
2f5c951bdf14 Conda interface: added capability to remove conda environments the conda way.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
243 e5App().registerObject("Conda", self.condaInterface)
2f5c951bdf14 Conda interface: added capability to remove conda environments the conda way.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
244
6828
bb6667ea9ae7 Changed the Google Mail interface to not use obsoleted packages anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6785
diff changeset
245 # Generate the pip interface
bb6667ea9ae7 Changed the Google Mail interface to not use obsoleted packages anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6785
diff changeset
246 from PipInterface.Pip import Pip
bb6667ea9ae7 Changed the Google Mail interface to not use obsoleted packages anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6785
diff changeset
247 self.pipInterface = Pip(self)
bb6667ea9ae7 Changed the Google Mail interface to not use obsoleted packages anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6785
diff changeset
248 e5App().registerObject("Pip", self.pipInterface)
bb6667ea9ae7 Changed the Google Mail interface to not use obsoleted packages anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6785
diff changeset
249
6348
d6c0b8ab1fc6 Continued to remove all explicit references to Python interpreters and replace them by references to virtual environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6338
diff changeset
250 # Generate the virtual environment manager
d6c0b8ab1fc6 Continued to remove all explicit references to Python interpreters and replace them by references to virtual environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6338
diff changeset
251 from VirtualEnv.VirtualenvManager import VirtualenvManager
d6c0b8ab1fc6 Continued to remove all explicit references to Python interpreters and replace them by references to virtual environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6338
diff changeset
252 self.virtualenvManager = VirtualenvManager(self)
d6c0b8ab1fc6 Continued to remove all explicit references to Python interpreters and replace them by references to virtual environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6338
diff changeset
253 # register it early because it is needed very soon
d6c0b8ab1fc6 Continued to remove all explicit references to Python interpreters and replace them by references to virtual environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6338
diff changeset
254 e5App().registerObject("VirtualEnvManager", self.virtualenvManager)
d6c0b8ab1fc6 Continued to remove all explicit references to Python interpreters and replace them by references to virtual environments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6338
diff changeset
255
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
256 # Generate the debug server object
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
257 from Debugger.DebugServer import DebugServer
6581
8eb6220f2bb7 Shell: changed code to start the shell/debugger backend with an unmodified PATH setting and added some more special commands (see what's this help of the shell).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6576
diff changeset
258 debugServer = DebugServer(self.__originalPathString)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
259
3159
02cb2adb4868 First implementation for the BackgroundService.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3145
diff changeset
260 # Create the background service object
02cb2adb4868 First implementation for the BackgroundService.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3145
diff changeset
261 from Utilities.BackgroundService import BackgroundService
02cb2adb4868 First implementation for the BackgroundService.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3145
diff changeset
262 self.backgroundService = BackgroundService()
02cb2adb4868 First implementation for the BackgroundService.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3145
diff changeset
263
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
264 # Generate an empty project object and multi project object
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
265 from Project.Project import Project
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
266 self.project = Project(self)
6785
058d63c537a4 PipInterface: continued with the pip interface widget.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6783
diff changeset
267 e5App().registerObject("Project", self.project)
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
268
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
269 from MultiProject.MultiProject import MultiProject
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
270 self.multiProject = MultiProject(self.project, self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
271
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
272 splash.showMessage(self.tr("Initializing Plugin Manager..."))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
273
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
274 # Initialize the Plugin Manager (Plugins are initialized later
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
275 from PluginManager.PluginManager import PluginManager
6267
350655a6c85f eric6, PluginManager: added the '--disable-plugin=' option to disable plug-ins via the command line.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6244
diff changeset
276 self.pluginManager = PluginManager(self, self.__disabledPlugins,
350655a6c85f eric6, PluginManager: added the '--disable-plugin=' option to disable plug-ins via the command line.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6244
diff changeset
277 develPlugin=plugin)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
278
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
279 splash.showMessage(self.tr("Generating Main User Interface..."))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
280
6421
ef33cbc7cc8c UserInterface, ViewManager: made the activation of the code documentation viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6417
diff changeset
281 self.codeDocumentationViewer = None
6422
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
282 self.cooperation = None
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
283 self.irc = None
6426
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
284 self.symbolsViewer = None
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
285 self.browser = None
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
286 self.templateViewer = None
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
287 self.numbersViewer = None
6937
25317a7b5d40 UserInterface: added the forgotten initialization of pipWidget and condaWidget attributes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6931
diff changeset
288 self.pipWidget = None
25317a7b5d40 UserInterface: added the forgotten initialization of pipWidget and condaWidget attributes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6931
diff changeset
289 self.condaWidget = None
7149
6a9d4a241962 UserInterface: added some forgotten window activation actions and corresponding methods.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7134
diff changeset
290 self.microPythonWidget = None
6421
ef33cbc7cc8c UserInterface, ViewManager: made the activation of the code documentation viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6417
diff changeset
291
6625
a67fee7bc09c Web Browser: changed the web browser logic inside eric to use a remote controlled web browser process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6599
diff changeset
292 self.__webBrowserProcess = None
a67fee7bc09c Web Browser: changed the web browser logic inside eric to use a remote controlled web browser process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6599
diff changeset
293 self.__webBrowserClient = None
a67fee7bc09c Web Browser: changed the web browser logic inside eric to use a remote controlled web browser process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6599
diff changeset
294 self.__webBrowserSAName = QUuid.createUuid().toString()[1:-1]
a67fee7bc09c Web Browser: changed the web browser logic inside eric to use a remote controlled web browser process.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6599
diff changeset
295
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
296 # Create the main window now so that we can connect QActions to it.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
297 logging.debug("Creating Layout...")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
298 self.__createLayout(debugServer)
2182
fc3210851b07 Changed the layout of the right side widgets and added a sub menu for the switching between the 'inner' windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2155
diff changeset
299 self.__currentRightWidget = None
fc3210851b07 Changed the layout of the right side widgets and added a sub menu for the switching between the 'inner' windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2155
diff changeset
300 self.__currentBottomWidget = None
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
301
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
302 # Generate the debugger part of the ui
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
303 logging.debug("Creating Debugger UI...")
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
304 from Debugger.DebugUI import DebugUI
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
305 self.debuggerUI = DebugUI(self, self.viewmanager, debugServer,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
306 self.debugViewer, self.project)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
307 self.debugViewer.setDebugger(self.debuggerUI)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
308 self.shell.setDebuggerUI(self.debuggerUI)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
309
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
310 # Generate the redirection helpers
7300
7622b6330e62 UserInterface: added 'parent' parameter to Redirector to (hopefully) prevent premature deletion.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7264
diff changeset
311 self.stdout = Redirector(False, self)
7622b6330e62 UserInterface: added 'parent' parameter to Redirector to (hopefully) prevent premature deletion.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7264
diff changeset
312 self.stderr = Redirector(True, self)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
313
6287
9a193ff6d24a URL handling: redirected the URL handling for 'http' and 'https' URLs to the main user interface and the man web browser interface (for standalone web browsers).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6267
diff changeset
314 # set a few dialog members for non-modal dialogs created on demand
1490
ed6f2208297d Changes to speed up the start-up phase by creating some dialog on demand.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1486
diff changeset
315 self.programsDialog = None
ed6f2208297d Changes to speed up the start-up phase by creating some dialog on demand.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1486
diff changeset
316 self.shortcutsDialog = None
ed6f2208297d Changes to speed up the start-up phase by creating some dialog on demand.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1486
diff changeset
317 self.unittestDialog = None
ed6f2208297d Changes to speed up the start-up phase by creating some dialog on demand.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1486
diff changeset
318 self.findFileNameDialog = None
ed6f2208297d Changes to speed up the start-up phase by creating some dialog on demand.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1486
diff changeset
319 self.diffDlg = None
ed6f2208297d Changes to speed up the start-up phase by creating some dialog on demand.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1486
diff changeset
320 self.compareDlg = None
ed6f2208297d Changes to speed up the start-up phase by creating some dialog on demand.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1486
diff changeset
321 self.findFilesDialog = None
ed6f2208297d Changes to speed up the start-up phase by creating some dialog on demand.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1486
diff changeset
322 self.replaceFilesDialog = None
2190
abd65b78425e Added a notification system and updated the source documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2184
diff changeset
323 self.__notification = None
5362
e9b8797923da Added the capability to save a global session to disk and restore it and added the capability to save a crash session in order to restore the current state in case of a crash.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5314
diff changeset
324 self.__readingSession = False
6287
9a193ff6d24a URL handling: redirected the URL handling for 'http' and 'https' URLs to the main user interface and the man web browser interface (for standalone web browsers).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6267
diff changeset
325 self.__versionsDialog = None
6998
a63ca2373f44 Shell: added capability to place the Shell window in the left or right side container.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6987
diff changeset
326 self.__configurationDialog = None
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
327
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
328 # now setup the connections
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
329 splash.showMessage(self.tr("Setting up connections..."))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
330
476
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
331 self.debugViewer.exceptionLogger.sourceFile.connect(
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
332 self.viewmanager.openSourceFile)
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
333
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
334 self.debugViewer.sourceFile.connect(self.viewmanager.showDebugSource)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
335
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
336 self.taskViewer.displayFile.connect(self.viewmanager.openSourceFile)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
337
476
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
338 self.projectBrowser.psBrowser.sourceFile[str].connect(
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
339 self.viewmanager.openSourceFile)
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
340 self.projectBrowser.psBrowser.sourceFile[str, int].connect(
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
341 self.viewmanager.openSourceFile)
4186
e2bf1c32272b Improved the 'import' change to move the cursor to the next occurence for each double-click on an import item in the project source browser and the file browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4139
diff changeset
342 self.projectBrowser.psBrowser.sourceFile[str, list].connect(
e2bf1c32272b Improved the 'import' change to move the cursor to the next occurence for each double-click on an import item in the project source browser and the file browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4139
diff changeset
343 self.viewmanager.openSourceFile)
476
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
344 self.projectBrowser.psBrowser.sourceFile[str, int, str].connect(
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
345 self.viewmanager.openSourceFile)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
346 self.projectBrowser.psBrowser.closeSourceWindow.connect(
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
347 self.viewmanager.closeWindow)
3012
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
348 self.projectBrowser.psBrowser.unittestOpen.connect(
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
349 self.__unittestScript)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
350
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
351 self.projectBrowser.pfBrowser.designerFile.connect(self.__designer)
476
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
352 self.projectBrowser.pfBrowser.sourceFile.connect(
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
353 self.viewmanager.openSourceFile)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
354 self.projectBrowser.pfBrowser.uipreview.connect(self.__UIPreviewer)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
355 self.projectBrowser.pfBrowser.trpreview.connect(self.__TRPreviewer)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
356 self.projectBrowser.pfBrowser.closeSourceWindow.connect(
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
357 self.viewmanager.closeWindow)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
358 self.projectBrowser.pfBrowser.appendStderr.connect(self.appendToStderr)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
359
476
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
360 self.projectBrowser.prBrowser.sourceFile.connect(
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
361 self.viewmanager.openSourceFile)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
362 self.projectBrowser.prBrowser.closeSourceWindow.connect(
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
363 self.viewmanager.closeWindow)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
364 self.projectBrowser.prBrowser.appendStderr.connect(self.appendToStderr)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
365
7586
9ca5907d5ed3 UserInterface: Removed some obsolete code and enhanced error message for the case, where the Qt applications (designer, linguist, assistant) cannot be found.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7533
diff changeset
366 self.projectBrowser.ptBrowser.linguistFile.connect(self.__linguist)
476
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
367 self.projectBrowser.ptBrowser.sourceFile.connect(
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
368 self.viewmanager.openSourceFile)
3012
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
369 self.projectBrowser.ptBrowser.trpreview[list].connect(
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
370 self.__TRPreviewer)
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
371 self.projectBrowser.ptBrowser.trpreview[list, bool].connect(
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
372 self.__TRPreviewer)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
373 self.projectBrowser.ptBrowser.closeSourceWindow.connect(
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
374 self.viewmanager.closeWindow)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
375 self.projectBrowser.ptBrowser.appendStdout.connect(self.appendToStdout)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
376 self.projectBrowser.ptBrowser.appendStderr.connect(self.appendToStderr)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
377
476
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
378 self.projectBrowser.piBrowser.sourceFile[str].connect(
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
379 self.viewmanager.openSourceFile)
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
380 self.projectBrowser.piBrowser.sourceFile[str, int].connect(
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
381 self.viewmanager.openSourceFile)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
382 self.projectBrowser.piBrowser.closeSourceWindow.connect(
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
383 self.viewmanager.closeWindow)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
384 self.projectBrowser.piBrowser.appendStdout.connect(self.appendToStdout)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
385 self.projectBrowser.piBrowser.appendStderr.connect(self.appendToStderr)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
386
5968
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5913
diff changeset
387 self.projectBrowser.ppBrowser.sourceFile[str].connect(
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5913
diff changeset
388 self.viewmanager.openSourceFile)
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5913
diff changeset
389 self.projectBrowser.ppBrowser.sourceFile[str, int].connect(
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5913
diff changeset
390 self.viewmanager.openSourceFile)
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5913
diff changeset
391 self.projectBrowser.ppBrowser.closeSourceWindow.connect(
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5913
diff changeset
392 self.viewmanager.closeWindow)
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5913
diff changeset
393 self.projectBrowser.ppBrowser.appendStdout.connect(self.appendToStdout)
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5913
diff changeset
394 self.projectBrowser.ppBrowser.appendStderr.connect(self.appendToStderr)
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5913
diff changeset
395
476
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
396 self.projectBrowser.poBrowser.sourceFile.connect(
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
397 self.viewmanager.openSourceFile)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
398 self.projectBrowser.poBrowser.closeSourceWindow.connect(
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
399 self.viewmanager.closeWindow)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
400 self.projectBrowser.poBrowser.pixmapEditFile.connect(self.__editPixmap)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
401 self.projectBrowser.poBrowser.pixmapFile.connect(self.__showPixmap)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
402 self.projectBrowser.poBrowser.svgFile.connect(self.__showSvg)
4651
7f3f276d3bf3 Integrated the hex editor into the eric IDE.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
403 self.projectBrowser.poBrowser.binaryFile.connect(self.__openHexEditor)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
404
486
e4711a55e482 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 482
diff changeset
405 self.project.sourceFile.connect(self.viewmanager.openSourceFile)
4985
03ac1a030529 Added a dialog to quickly search for files in the list of project files (thanks to Mike C. Fletcher for contributing the majority of this code).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4979
diff changeset
406 self.project.designerFile.connect(self.__designer)
7586
9ca5907d5ed3 UserInterface: Removed some obsolete code and enhanced error message for the case, where the Qt applications (designer, linguist, assistant) cannot be found.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7533
diff changeset
407 self.project.linguistFile.connect(self.__linguist)
486
e4711a55e482 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 482
diff changeset
408 self.project.projectOpened.connect(self.viewmanager.projectOpened)
1754
4e2f87d03546 Fixed an issue in the editor caused by double connecting to a signal.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1726
diff changeset
409 self.project.projectClosed.connect(self.viewmanager.projectClosed)
3012
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
410 self.project.projectFileRenamed.connect(
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
411 self.viewmanager.projectFileRenamed)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
412 self.project.lexerAssociationsChanged.connect(
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
413 self.viewmanager.projectLexerAssociationsChanged)
486
e4711a55e482 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 482
diff changeset
414 self.project.newProject.connect(self.__newProject)
e4711a55e482 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 482
diff changeset
415 self.project.projectOpened.connect(self.__projectOpened)
e4711a55e482 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 482
diff changeset
416 self.project.projectOpened.connect(self.__activateProjectBrowser)
e4711a55e482 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 482
diff changeset
417 self.project.projectClosed.connect(self.__projectClosed)
3579
eccd12461319 BackgroundService: Restart of the client in different situations handled.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3515
diff changeset
418 self.project.projectClosed.connect(
eccd12461319 BackgroundService: Restart of the client in different situations handled.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3515
diff changeset
419 self.backgroundService.preferencesOrProjectChanged)
5362
e9b8797923da Added the capability to save a global session to disk and restore it and added the capability to save a crash session in order to restore the current state in case of a crash.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5314
diff changeset
420 self.project.projectOpened.connect(self.__writeCrashSession)
e9b8797923da Added the capability to save a global session to disk and restore it and added the capability to save a crash session in order to restore the current state in case of a crash.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5314
diff changeset
421 self.project.projectClosed.connect(self.__writeCrashSession)
6244
233eea858c32 Project: added dummy methods for make related private methods
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6239
diff changeset
422 self.project.appendStdout.connect(self.appendToStdout)
233eea858c32 Project: added dummy methods for make related private methods
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6239
diff changeset
423 self.project.appendStderr.connect(self.appendToStderr)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
424
3012
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
425 self.multiProject.multiProjectOpened.connect(
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
426 self.__activateMultiProjectBrowser)
5362
e9b8797923da Added the capability to save a global session to disk and restore it and added the capability to save a crash session in order to restore the current state in case of a crash.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5314
diff changeset
427 self.multiProject.multiProjectOpened.connect(
e9b8797923da Added the capability to save a global session to disk and restore it and added the capability to save a crash session in order to restore the current state in case of a crash.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5314
diff changeset
428 self.__writeCrashSession)
e9b8797923da Added the capability to save a global session to disk and restore it and added the capability to save a crash session in order to restore the current state in case of a crash.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5314
diff changeset
429 self.multiProject.multiProjectClosed.connect(
e9b8797923da Added the capability to save a global session to disk and restore it and added the capability to save a crash session in order to restore the current state in case of a crash.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5314
diff changeset
430 self.__writeCrashSession)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
431
482
4650a72c307a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 481
diff changeset
432 self.debuggerUI.resetUI.connect(self.viewmanager.handleResetUI)
4650a72c307a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 481
diff changeset
433 self.debuggerUI.resetUI.connect(self.debugViewer.handleResetUI)
2182
fc3210851b07 Changed the layout of the right side widgets and added a sub menu for the switching between the 'inner' windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2155
diff changeset
434 self.debuggerUI.resetUI.connect(self.__debuggingDone)
482
4650a72c307a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 481
diff changeset
435 self.debuggerUI.debuggingStarted.connect(self.__programChange)
4650a72c307a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 481
diff changeset
436 self.debuggerUI.debuggingStarted.connect(self.__debuggingStarted)
4650a72c307a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 481
diff changeset
437 self.debuggerUI.compileForms.connect(
4650a72c307a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 481
diff changeset
438 self.projectBrowser.pfBrowser.compileChangedForms)
4650a72c307a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 481
diff changeset
439 self.debuggerUI.compileResources.connect(
4650a72c307a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 481
diff changeset
440 self.projectBrowser.prBrowser.compileChangedResources)
6239
a03acd98c6c8 DebugUI, UserInterface: added a signal emitted to execute 'make' and connect it to a slot
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6212
diff changeset
441 self.debuggerUI.executeMake.connect(self.project.executeMake)
755
e81e1f8d7874 Added display of suppressed client termination messages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 733
diff changeset
442 self.debuggerUI.appendStdout.connect(self.appendToStdout)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
443
7707
6abcf4275d0e Added a viewer to visualize Python byte code generated from a Python traceback of an exception as an additional tab of the debug viewer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7705
diff changeset
444 debugServer.clientDisassembly.connect(
6abcf4275d0e Added a viewer to visualize Python byte code generated from a Python traceback of an exception as an additional tab of the debug viewer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7705
diff changeset
445 self.debugViewer.disassemblyViewer.showDisassembly)
481
ad71812ba395 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 476
diff changeset
446 debugServer.clientProcessStdout.connect(self.appendToStdout)
ad71812ba395 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 476
diff changeset
447 debugServer.clientProcessStderr.connect(self.appendToStderr)
3649
2456f04f60a8 Changed output of passiv debug connection (open/ close) to logviewer.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3621
diff changeset
448 debugServer.appendStdout.connect(self.appendToStdout)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
449
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
450 self.stdout.appendStdout.connect(self.appendToStdout)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
451 self.stderr.appendStderr.connect(self.appendToStderr)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
452
492
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
453 self.preferencesChanged.connect(self.viewmanager.preferencesChanged)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
454 self.reloadAPIs.connect(self.viewmanager.getAPIsManager().reloadAPIs)
492
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
455 self.preferencesChanged.connect(self.logViewer.preferencesChanged)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
456 self.appendStdout.connect(self.logViewer.appendToStdout)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
457 self.appendStderr.connect(self.logViewer.appendToStderr)
492
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
458 self.preferencesChanged.connect(self.shell.handlePreferencesChanged)
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
459 self.preferencesChanged.connect(self.project.handlePreferencesChanged)
3012
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
460 self.preferencesChanged.connect(
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
461 self.projectBrowser.handlePreferencesChanged)
492
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
462 self.preferencesChanged.connect(
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
463 self.projectBrowser.psBrowser.handlePreferencesChanged)
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
464 self.preferencesChanged.connect(
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
465 self.projectBrowser.pfBrowser.handlePreferencesChanged)
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
466 self.preferencesChanged.connect(
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
467 self.projectBrowser.prBrowser.handlePreferencesChanged)
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
468 self.preferencesChanged.connect(
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
469 self.projectBrowser.ptBrowser.handlePreferencesChanged)
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
470 self.preferencesChanged.connect(
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
471 self.projectBrowser.piBrowser.handlePreferencesChanged)
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
472 self.preferencesChanged.connect(
5968
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5913
diff changeset
473 self.projectBrowser.ppBrowser.handlePreferencesChanged)
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5913
diff changeset
474 self.preferencesChanged.connect(
492
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
475 self.projectBrowser.poBrowser.handlePreferencesChanged)
3012
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
476 self.preferencesChanged.connect(
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
477 self.taskViewer.handlePreferencesChanged)
492
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
478 self.preferencesChanged.connect(self.pluginManager.preferencesChanged)
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
479 self.preferencesChanged.connect(debugServer.preferencesChanged)
1926
474057fbefe0 Added the configurable capability to automatically show the source, when the call frame is changed in the callstack viewer of the local variables viewer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1852
diff changeset
480 self.preferencesChanged.connect(self.debugViewer.preferencesChanged)
3579
eccd12461319 BackgroundService: Restart of the client in different situations handled.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3515
diff changeset
481 self.preferencesChanged.connect(
eccd12461319 BackgroundService: Restart of the client in different situations handled.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3515
diff changeset
482 self.backgroundService.preferencesOrProjectChanged)
7318
5d39cd2d7960 Editor, Previewer:
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7300
diff changeset
483 self.preferencesChanged.connect(self.__previewer.preferencesChanged)
7705
90a9aefd4253 Finished to implement a Python Disassembly Viewer showing the byte code generated from a Python source file loaded in an editor pane.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7704
diff changeset
484 self.preferencesChanged.connect(self.__astViewer.preferencesChanged)
90a9aefd4253 Finished to implement a Python Disassembly Viewer showing the byte code generated from a Python source file loaded in an editor pane.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7704
diff changeset
485 self.preferencesChanged.connect(self.__disViewer.preferencesChanged)
6421
ef33cbc7cc8c UserInterface, ViewManager: made the activation of the code documentation viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6417
diff changeset
486
6426
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
487 if self.browser is not None:
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
488 self.browser.sourceFile[str].connect(
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
489 self.viewmanager.openSourceFile)
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
490 self.browser.sourceFile[str, int].connect(
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
491 self.viewmanager.openSourceFile)
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
492 self.browser.sourceFile[str, list].connect(
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
493 self.viewmanager.openSourceFile)
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
494 self.browser.sourceFile[str, int, str].connect(
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
495 self.viewmanager.openSourceFile)
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
496 self.browser.designerFile.connect(self.__designer)
7586
9ca5907d5ed3 UserInterface: Removed some obsolete code and enhanced error message for the case, where the Qt applications (designer, linguist, assistant) cannot be found.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7533
diff changeset
497 self.browser.linguistFile.connect(self.__linguist)
6426
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
498 self.browser.projectFile.connect(self.project.openProject)
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
499 self.browser.multiProjectFile.connect(
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
500 self.multiProject.openMultiProject)
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
501 self.browser.pixmapEditFile.connect(self.__editPixmap)
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
502 self.browser.pixmapFile.connect(self.__showPixmap)
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
503 self.browser.svgFile.connect(self.__showSvg)
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
504 self.browser.binaryFile.connect(self.__openHexEditor)
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
505 self.browser.unittestOpen.connect(self.__unittestScript)
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
506 self.browser.trpreview.connect(self.__TRPreviewer)
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
507
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
508 self.debuggerUI.debuggingStarted.connect(
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
509 self.browser.handleProgramChange)
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
510
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
511 debugServer.clientInterpreterChanged.connect(
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
512 self.browser.handleInterpreterChanged)
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
513
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
514 self.preferencesChanged.connect(
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
515 self.browser.handlePreferencesChanged)
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
516
6422
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
517 if self.codeDocumentationViewer is not None:
6421
ef33cbc7cc8c UserInterface, ViewManager: made the activation of the code documentation viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6417
diff changeset
518 self.preferencesChanged.connect(
ef33cbc7cc8c UserInterface, ViewManager: made the activation of the code documentation viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6417
diff changeset
519 self.codeDocumentationViewer.preferencesChanged)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
520
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
521 self.viewmanager.editorSaved.connect(self.project.repopulateItem)
486
e4711a55e482 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 482
diff changeset
522 self.viewmanager.lastEditorClosed.connect(self.__lastEditorClosed)
e4711a55e482 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 482
diff changeset
523 self.viewmanager.editorOpened.connect(self.__editorOpened)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
524 self.viewmanager.changeCaption.connect(self.__setWindowCaption)
486
e4711a55e482 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 482
diff changeset
525 self.viewmanager.checkActions.connect(self.__checkActions)
3012
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
526 self.viewmanager.editorChanged.connect(
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
527 self.projectBrowser.handleEditorChanged)
2769
8cbebde7a984 Added support to highlight the current class/method name of the current editor to the project sources viewer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2763
diff changeset
528 self.viewmanager.editorLineChanged.connect(
8cbebde7a984 Added support to highlight the current class/method name of the current editor to the project sources viewer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2763
diff changeset
529 self.projectBrowser.handleEditorLineChanged)
5362
e9b8797923da Added the capability to save a global session to disk and restore it and added the capability to save a crash session in order to restore the current state in case of a crash.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5314
diff changeset
530 self.viewmanager.editorOpened.connect(self.__writeCrashSession)
e9b8797923da Added the capability to save a global session to disk and restore it and added the capability to save a crash session in order to restore the current state in case of a crash.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5314
diff changeset
531 self.viewmanager.editorClosed.connect(self.__writeCrashSession)
e9b8797923da Added the capability to save a global session to disk and restore it and added the capability to save a crash session in order to restore the current state in case of a crash.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5314
diff changeset
532 self.viewmanager.editorRenamed.connect(self.__writeCrashSession)
e9b8797923da Added the capability to save a global session to disk and restore it and added the capability to save a crash session in order to restore the current state in case of a crash.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5314
diff changeset
533 self.viewmanager.editorChanged.connect(self.__writeCrashSession)
158
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 150
diff changeset
534
6118
da9e08920e7c Continued removing the use of QObject.sender().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
535 self.shell.zoomValueChanged.connect(
da9e08920e7c Continued removing the use of QObject.sender().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
536 lambda v: self.viewmanager.zoomValueChanged(v, self.shell))
2347
a4a4d710ebe8 Fixed the feedback of a changed zoom value from the editors, shell or terminal to the view manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2334
diff changeset
537
6422
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
538 if self.cooperation is not None:
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
539 self.viewmanager.checkActions.connect(
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
540 self.cooperation.checkEditorActions)
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
541 self.preferencesChanged.connect(
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
542 self.cooperation.preferencesChanged)
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
543 self.cooperation.shareEditor.connect(
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
544 self.viewmanager.shareEditor)
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
545 self.cooperation.startEdit.connect(
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
546 self.viewmanager.startSharedEdit)
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
547 self.cooperation.sendEdit.connect(
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
548 self.viewmanager.sendSharedEdit)
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
549 self.cooperation.cancelEdit.connect(
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
550 self.viewmanager.cancelSharedEdit)
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
551 self.cooperation.connected.connect(
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
552 self.viewmanager.shareConnected)
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
553 self.cooperation.editorCommand.connect(
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
554 self.viewmanager.receive)
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
555 self.viewmanager.setCooperationClient(
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
556 self.cooperation.getClient())
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
557
6426
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
558 if self.symbolsViewer is not None:
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
559 self.symbolsViewer.insertSymbol.connect(
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
560 self.viewmanager.insertSymbol)
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
561
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
562 if self.numbersViewer is not None:
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
563 self.numbersViewer.insertNumber.connect(
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
564 self.viewmanager.insertNumber)
372
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
565
6422
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
566 if self.irc is not None:
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
567 self.irc.autoConnected.connect(self.__ircAutoConnected)
2258
9ca42fd3ecc0 Added a signal to the IRC widget fired after the autoconnect was initiated. This will make the IRC pane the current one on the right side.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2237
diff changeset
568
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
569 # create the toolbar manager object
55
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 53
diff changeset
570 self.toolbarManager = E5ToolBarManager(self, self)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
571 self.toolbarManager.setMainWindow(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
572
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
573 # Initialize the tool groups and list of started tools
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
574 splash.showMessage(self.tr("Initializing Tools..."))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
575 self.toolGroups, self.currentToolGroup = Preferences.readToolGroups()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
576 self.toolProcs = []
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
577 self.__initExternalToolsActions()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
578
6287
9a193ff6d24a URL handling: redirected the URL handling for 'http' and 'https' URLs to the main user interface and the man web browser interface (for standalone web browsers).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6267
diff changeset
579 # redirect handling of http and https URLs to ourselves
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: 6625
diff changeset
580 QDesktopServices.setUrlHandler("http", self.handleUrl)
bddd12f27a4c Web Browser (QtWebKit): applied the changes of the new Web Brwoser to the QtWebKit based variant.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6625
diff changeset
581 QDesktopServices.setUrlHandler("https", self.handleUrl)
6287
9a193ff6d24a URL handling: redirected the URL handling for 'http' and 'https' URLs to the main user interface and the man web browser interface (for standalone web browsers).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6267
diff changeset
582
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
583 # register all relevant objects
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
584 splash.showMessage(self.tr("Registering Objects..."))
53
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 50
diff changeset
585 e5App().registerObject("UserInterface", self)
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 50
diff changeset
586 e5App().registerObject("DebugUI", self.debuggerUI)
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 50
diff changeset
587 e5App().registerObject("DebugServer", debugServer)
3159
02cb2adb4868 First implementation for the BackgroundService.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3145
diff changeset
588 e5App().registerObject("BackgroundService", self.backgroundService)
53
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 50
diff changeset
589 e5App().registerObject("ViewManager", self.viewmanager)
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 50
diff changeset
590 e5App().registerObject("ProjectBrowser", self.projectBrowser)
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 50
diff changeset
591 e5App().registerObject("MultiProject", self.multiProject)
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 50
diff changeset
592 e5App().registerObject("TaskViewer", self.taskViewer)
6426
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
593 if self.templateViewer is not None:
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
594 e5App().registerObject("TemplateViewer", self.templateViewer)
53
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 50
diff changeset
595 e5App().registerObject("Shell", self.shell)
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 50
diff changeset
596 e5App().registerObject("PluginManager", self.pluginManager)
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 50
diff changeset
597 e5App().registerObject("ToolbarManager", self.toolbarManager)
6422
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
598 if self.cooperation is not None:
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
599 e5App().registerObject("Cooperation", self.cooperation)
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
600 if self.irc is not None:
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
601 e5App().registerObject("IRC", self.irc)
6426
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
602 if self.symbolsViewer is not None:
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
603 e5App().registerObject("Symbols", self.symbolsViewer)
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
604 if self.numbersViewer is not None:
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
605 e5App().registerObject("Numbers", self.numbersViewer)
6422
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
606 if self.codeDocumentationViewer is not None:
6421
ef33cbc7cc8c UserInterface, ViewManager: made the activation of the code documentation viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6417
diff changeset
607 e5App().registerObject("DocuViewer", self.codeDocumentationViewer)
7149
6a9d4a241962 UserInterface: added some forgotten window activation actions and corresponding methods.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7134
diff changeset
608 if self.microPythonWidget is not None:
6a9d4a241962 UserInterface: added some forgotten window activation actions and corresponding methods.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7134
diff changeset
609 e5App().registerObject("MicroPython", self.microPythonWidget)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
610
5504
ba1134308a7b Fixed an issue in the main window that could cause a traceback when changing the online state before the main window is fully initialized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5498
diff changeset
611 # list of web addresses serving the versions file
ba1134308a7b Fixed an issue in the main window that could cause a traceback when changing the online state before the main window is fully initialized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5498
diff changeset
612 self.__httpAlternatives = Preferences.getUI("VersionsUrls6")
ba1134308a7b Fixed an issue in the main window that could cause a traceback when changing the online state before the main window is fully initialized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5498
diff changeset
613 self.__inVersionCheck = False
ba1134308a7b Fixed an issue in the main window that could cause a traceback when changing the online state before the main window is fully initialized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5498
diff changeset
614 self.__versionCheckProgress = None
ba1134308a7b Fixed an issue in the main window that could cause a traceback when changing the online state before the main window is fully initialized.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5498
diff changeset
615
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
616 # Initialize the actions, menus, toolbars and statusbar
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
617 splash.showMessage(self.tr("Initializing Actions..."))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
618 self.__initActions()
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
619 splash.showMessage(self.tr("Initializing Menus..."))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
620 self.__initMenus()
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
621 splash.showMessage(self.tr("Initializing Toolbars..."))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
622 self.__initToolbars()
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
623 splash.showMessage(self.tr("Initializing Statusbar..."))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
624 self.__initStatusbar()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
625
2933
ada56f070ef4 Fixed an issue in the user interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2930
diff changeset
626 # connect the appFocusChanged signal after all actions are ready
ada56f070ef4 Fixed an issue in the user interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2930
diff changeset
627 app.focusChanged.connect(self.viewmanager.appFocusChanged)
ada56f070ef4 Fixed an issue in the user interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2930
diff changeset
628
ada56f070ef4 Fixed an issue in the user interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2930
diff changeset
629 # Initialize the instance variables.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
630 self.currentProg = None
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
631 self.isProg = False
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
632 self.utEditorOpen = False
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
633 self.utProjectOpen = False
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
634
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
635 self.inDragDrop = False
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
636 self.setAcceptDrops(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
637
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
638 self.currentProfile = None
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 self.shutdownCalled = False
5362
e9b8797923da Added the capability to save a global session to disk and restore it and added the capability to save a crash session in order to restore the current state in case of a crash.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5314
diff changeset
641 self.inCloseEvent = False
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
642
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
643 # now redirect stdout and stderr
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
644 # TODO: release - reenable redirection
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
645 ## sys.stdout = self.stdout
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
646 ## sys.stderr = self.stderr
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
647
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
648 # now fire up the single application server
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
649 if Preferences.getUI("SingleApplicationMode"):
3012
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
650 splash.showMessage(
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
651 self.tr("Initializing Single Application Server..."))
55
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 53
diff changeset
652 self.SAServer = E5SingleApplicationServer()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
653 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
654 self.SAServer = None
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 # now finalize the plugin manager setup
5739
a870f5f03baa Added an option to the plug-in manager to cleanup the plug-ins download area during startup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5736
diff changeset
657 splash.showMessage(self.tr("Initializing Plugins..."))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
658 self.pluginManager.finalizeSetup()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
659 # now activate plugins having autoload set to True
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
660 splash.showMessage(self.tr("Activating Plugins..."))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
661 self.pluginManager.activatePlugins()
4079
a3319822d303 Added possibility for plug-ins to have toolbars.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4078
diff changeset
662 splash.showMessage(self.tr("Generating Plugins Toolbars..."))
4113
feac3108a780 Some small modifications to the plug-in manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4107
diff changeset
663 self.pluginManager.initPluginToolbars(self.toolbarManager)
5739
a870f5f03baa Added an option to the plug-in manager to cleanup the plug-ins download area during startup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5736
diff changeset
664 if Preferences.getPluginManager("StartupCleanup"):
a870f5f03baa Added an option to the plug-in manager to cleanup the plug-ins download area during startup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5736
diff changeset
665 splash.showMessage(self.tr("Cleaning Plugins Download Area..."))
7264
bedbe458d792 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
666 from PluginManager.PluginRepositoryDialog import (
5739
a870f5f03baa Added an option to the plug-in manager to cleanup the plug-ins download area during startup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5736
diff changeset
667 PluginRepositoryDownloadCleanup
7264
bedbe458d792 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
668 )
5739
a870f5f03baa Added an option to the plug-in manager to cleanup the plug-ins download area during startup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5736
diff changeset
669 PluginRepositoryDownloadCleanup(quiet=True)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
670
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
671 # now read the keyboard shortcuts for all the actions
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
672 from Preferences import Shortcuts
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
673 Shortcuts.readShortcuts()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
674
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
675 # restore toolbar manager state
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
676 splash.showMessage(self.tr("Restoring Toolbarmanager..."))
3012
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
677 self.toolbarManager.restoreState(
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
678 Preferences.getUI("ToolbarManagerState"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
679
6422
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
680 if self.codeDocumentationViewer is not None:
6421
ef33cbc7cc8c UserInterface, ViewManager: made the activation of the code documentation viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6417
diff changeset
681 # finalize the initialization of the code documentation viewer
ef33cbc7cc8c UserInterface, ViewManager: made the activation of the code documentation viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6417
diff changeset
682 self.codeDocumentationViewer.finalizeSetup()
6300
cfb21ace8d09 Fixed an issue causing the visibility settings of the right side bar being overwritten.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6296
diff changeset
683
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
684 # now activate the initial view profile
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
685 splash.showMessage(self.tr("Setting View Profile..."))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
686 self.__setEditProfile()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
687
7667
cd2e9a5ee187 VCS Interfaces: added a configuration option to disable the VCS toolbars
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7635
diff changeset
688 # special treatment for the VCS toolbars
cd2e9a5ee187 VCS Interfaces: added a configuration option to disable the VCS toolbars
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7635
diff changeset
689 for tb in self.getToolbarsByCategory("vcs"):
cd2e9a5ee187 VCS Interfaces: added a configuration option to disable the VCS toolbars
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7635
diff changeset
690 tb.setVisible(False)
cd2e9a5ee187 VCS Interfaces: added a configuration option to disable the VCS toolbars
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7635
diff changeset
691 tb.setEnabled(False)
cd2e9a5ee187 VCS Interfaces: added a configuration option to disable the VCS toolbars
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7635
diff changeset
692 tb = self.getToolbar("vcs")[1]
cd2e9a5ee187 VCS Interfaces: added a configuration option to disable the VCS toolbars
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7635
diff changeset
693 tb.setEnabled(True)
cd2e9a5ee187 VCS Interfaces: added a configuration option to disable the VCS toolbars
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7635
diff changeset
694 if Preferences.getVCS("ShowVcsToolbar"):
cd2e9a5ee187 VCS Interfaces: added a configuration option to disable the VCS toolbars
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7635
diff changeset
695 tb.setVisible(True)
cd2e9a5ee187 VCS Interfaces: added a configuration option to disable the VCS toolbars
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7635
diff changeset
696
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
697 # now read the saved tasks
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
698 splash.showMessage(self.tr("Reading Tasks..."))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
699 self.__readTasks()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
700
6426
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
701 if self.templateViewer is not None:
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
702 # now read the saved templates
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
703 splash.showMessage(self.tr("Reading Templates..."))
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
704 self.templateViewer.readTemplates()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
705
6581
8eb6220f2bb7 Shell: changed code to start the shell/debugger backend with an unmodified PATH setting and added some more special commands (see what's this help of the shell).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6576
diff changeset
706 # now start the debug client with the most recently used virtual
8eb6220f2bb7 Shell: changed code to start the shell/debugger backend with an unmodified PATH setting and added some more special commands (see what's this help of the shell).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6576
diff changeset
707 # environment
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
708 splash.showMessage(self.tr("Starting Debugger..."))
6581
8eb6220f2bb7 Shell: changed code to start the shell/debugger backend with an unmodified PATH setting and added some more special commands (see what's this help of the shell).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6576
diff changeset
709 if Preferences.getShell("StartWithMostRecentlyUsedEnvironment"):
8eb6220f2bb7 Shell: changed code to start the shell/debugger backend with an unmodified PATH setting and added some more special commands (see what's this help of the shell).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6576
diff changeset
710 debugServer.startClient(
8eb6220f2bb7 Shell: changed code to start the shell/debugger backend with an unmodified PATH setting and added some more special commands (see what's this help of the shell).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6576
diff changeset
711 False, venvName=Preferences.getShell("LastVirtualEnvironment")
8eb6220f2bb7 Shell: changed code to start the shell/debugger backend with an unmodified PATH setting and added some more special commands (see what's this help of the shell).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6576
diff changeset
712 )
8eb6220f2bb7 Shell: changed code to start the shell/debugger backend with an unmodified PATH setting and added some more special commands (see what's this help of the shell).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6576
diff changeset
713 else:
8eb6220f2bb7 Shell: changed code to start the shell/debugger backend with an unmodified PATH setting and added some more special commands (see what's this help of the shell).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6576
diff changeset
714 debugServer.startClient(False)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
715
270
41505c92ac31 Added code to enhance the proxy configuration and removed the usage of QHttp.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 266
diff changeset
716 # attributes for the network objects
41505c92ac31 Added code to enhance the proxy configuration and removed the usage of QHttp.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 266
diff changeset
717 self.__networkManager = QNetworkAccessManager(self)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
718 self.__networkManager.proxyAuthenticationRequired.connect(
286
652f5159f1c3 Prepared to have individual proxies per scheme.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 270
diff changeset
719 proxyAuthenticationRequired)
798
5c1786fad576 Fixed an issue with Qt installations that don't support SSL.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
720 if SSL_AVAILABLE:
2354
c63de4af553d Centralized the SSL error handling in E5SslErrorHandler.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2347
diff changeset
721 self.__sslErrorHandler = E5SslErrorHandler(self)
798
5c1786fad576 Fixed an issue with Qt installations that don't support SSL.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
722 self.__networkManager.sslErrors.connect(self.__sslErrors)
270
41505c92ac31 Added code to enhance the proxy configuration and removed the usage of QHttp.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 266
diff changeset
723 self.__replies = []
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
724
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
725 # set spellchecker defaults
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
726 from QScintilla.SpellChecker import SpellChecker
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
727 SpellChecker.setDefaultLanguage(
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
728 Preferences.getEditor("SpellCheckingDefaultLanguage"))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
729
4216
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4197
diff changeset
730 # attributes for the last shown configuration page and the
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4197
diff changeset
731 # extended configuration entries
934
657269549914 Changed the configuration dialog to remember the last show page name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 927
diff changeset
732 self.__lastConfigurationPageName = ""
4216
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4197
diff changeset
733 self.__expandedConfigurationEntries = []
934
657269549914 Changed the configuration dialog to remember the last show page name.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 927
diff changeset
734
5011
4085e2348621 Added capability to search the file tree via the keyboard (directories and files only) to the file browser and the project browsers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4985
diff changeset
735 # set the keyboard input interval
4085e2348621 Added capability to search the file tree via the keyboard (directories and files only) to the file browser and the project browsers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4985
diff changeset
736 interval = Preferences.getUI("KeyboardInputInterval")
4085e2348621 Added capability to search the file tree via the keyboard (directories and files only) to the file browser and the project browsers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4985
diff changeset
737 if interval > 0:
4085e2348621 Added capability to search the file tree via the keyboard (directories and files only) to the file browser and the project browsers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4985
diff changeset
738 QApplication.setKeyboardInputInterval(interval)
4085e2348621 Added capability to search the file tree via the keyboard (directories and files only) to the file browser and the project browsers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4985
diff changeset
739
7005
342819f05839 setup.py Wizard:
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6998
diff changeset
740 def networkAccessManager(self):
342819f05839 setup.py Wizard:
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6998
diff changeset
741 """
342819f05839 setup.py Wizard:
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6998
diff changeset
742 Public method to get a reference to the network access manager object.
342819f05839 setup.py Wizard:
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6998
diff changeset
743
342819f05839 setup.py Wizard:
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6998
diff changeset
744 @return reference to the network access manager object
342819f05839 setup.py Wizard:
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6998
diff changeset
745 @rtype QNetworkAccessManager
342819f05839 setup.py Wizard:
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6998
diff changeset
746 """
342819f05839 setup.py Wizard:
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6998
diff changeset
747 return self.__networkManager
342819f05839 setup.py Wizard:
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6998
diff changeset
748
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
749 def __createLayout(self, debugServer):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
750 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
751 Private method to create the layout of the various windows.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
752
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
753 @param debugServer reference to the debug server object
2965
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2933
diff changeset
754 @exception ValueError raised to indicate an invalid layout type
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
755 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
756 # Create the view manager depending on the configuration setting
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
757 logging.debug("Creating Viewmanager...")
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
758 import ViewManager
7264
bedbe458d792 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
759 self.viewmanager = ViewManager.factory(
bedbe458d792 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
760 self, self, debugServer, self.pluginManager)
2425
ace8a08028f3 Fixed the main window layout after the previewer change.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2424
diff changeset
761 leftWidget = QWidget()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
762 layout = QVBoxLayout()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
763 layout.setContentsMargins(1, 1, 1, 1)
2362
68a92d01c1cc Made the search and replace widgets scrollable (customisation for smaller screens).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2361
diff changeset
764 layout.setSpacing(1)
4896
5ace700023de Changed code to get rid of multiple inheritance in the viewmanager subclasses.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4665
diff changeset
765 layout.addWidget(self.viewmanager.mainWidget())
2362
68a92d01c1cc Made the search and replace widgets scrollable (customisation for smaller screens).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2361
diff changeset
766 layout.addWidget(self.viewmanager.searchWidget())
68a92d01c1cc Made the search and replace widgets scrollable (customisation for smaller screens).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2361
diff changeset
767 layout.addWidget(self.viewmanager.replaceWidget())
4896
5ace700023de Changed code to get rid of multiple inheritance in the viewmanager subclasses.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4665
diff changeset
768 self.viewmanager.mainWidget().setSizePolicy(
3012
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
769 QSizePolicy.Preferred, QSizePolicy.Expanding)
2425
ace8a08028f3 Fixed the main window layout after the previewer change.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2424
diff changeset
770 leftWidget.setLayout(layout)
2362
68a92d01c1cc Made the search and replace widgets scrollable (customisation for smaller screens).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2361
diff changeset
771 self.viewmanager.searchWidget().hide()
68a92d01c1cc Made the search and replace widgets scrollable (customisation for smaller screens).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2361
diff changeset
772 self.viewmanager.replaceWidget().hide()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
773
2425
ace8a08028f3 Fixed the main window layout after the previewer change.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2424
diff changeset
774 splitter = QSplitter(Qt.Horizontal)
ace8a08028f3 Fixed the main window layout after the previewer change.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2424
diff changeset
775 splitter.addWidget(leftWidget)
ace8a08028f3 Fixed the main window layout after the previewer change.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2424
diff changeset
776 self.setCentralWidget(splitter)
ace8a08028f3 Fixed the main window layout after the previewer change.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2424
diff changeset
777
2424
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2411
diff changeset
778 # Create previewer
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2411
diff changeset
779 logging.debug("Creating Previewer...")
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2411
diff changeset
780 from .Previewer import Previewer
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2411
diff changeset
781 self.__previewer = Previewer(self.viewmanager, splitter)
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2411
diff changeset
782 splitter.addWidget(self.__previewer)
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2411
diff changeset
783
6931
faac36ec9d76 Started implementing the Python AST Viewer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6896
diff changeset
784 # Create AST viewer
faac36ec9d76 Started implementing the Python AST Viewer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6896
diff changeset
785 logging.debug("Creating Python AST Viewer")
faac36ec9d76 Started implementing the Python AST Viewer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6896
diff changeset
786 from .PythonAstViewer import PythonAstViewer
faac36ec9d76 Started implementing the Python AST Viewer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6896
diff changeset
787 self.__astViewer = PythonAstViewer(self.viewmanager, splitter)
faac36ec9d76 Started implementing the Python AST Viewer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6896
diff changeset
788 splitter.addWidget(self.__astViewer)
faac36ec9d76 Started implementing the Python AST Viewer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6896
diff changeset
789
7704
9251c4dc4f7a Started to implement a Python Disassembly Viewer showing the byte code generated from a Python source file loaded in an editor pane.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7689
diff changeset
790 # Create DIS viewer
9251c4dc4f7a Started to implement a Python Disassembly Viewer showing the byte code generated from a Python source file loaded in an editor pane.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7689
diff changeset
791 logging.debug("Creating Python Disassembly Viewer")
9251c4dc4f7a Started to implement a Python Disassembly Viewer showing the byte code generated from a Python source file loaded in an editor pane.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7689
diff changeset
792 from .PythonDisViewer import PythonDisViewer
7707
6abcf4275d0e Added a viewer to visualize Python byte code generated from a Python traceback of an exception as an additional tab of the debug viewer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7705
diff changeset
793 self.__disViewer = PythonDisViewer(self.viewmanager, parent=splitter)
7704
9251c4dc4f7a Started to implement a Python Disassembly Viewer showing the byte code generated from a Python source file loaded in an editor pane.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7689
diff changeset
794 splitter.addWidget(self.__disViewer)
9251c4dc4f7a Started to implement a Python Disassembly Viewer showing the byte code generated from a Python source file loaded in an editor pane.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7689
diff changeset
795
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
796 # Create layout with toolbox windows embedded in dock windows
6434
872d10fa686a UserInterface, Translator: fixed an issue switching to the translator via the keyboard shortcut.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6433
diff changeset
797 if self.__layoutType == "Toolboxes":
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
798 logging.debug("Creating toolboxes...")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
799 self.__createToolboxesLayout(debugServer)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
800
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
801 # Create layout with sidebar windows embedded in dock windows
6434
872d10fa686a UserInterface, Translator: fixed an issue switching to the translator via the keyboard shortcut.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6433
diff changeset
802 elif self.__layoutType == "Sidebars":
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
803 logging.debug("Creating sidebars...")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
804 self.__createSidebarsLayout(debugServer)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
805
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
806 else:
3012
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
807 raise ValueError("Wrong layout type given ({0})".format(
6434
872d10fa686a UserInterface, Translator: fixed an issue switching to the translator via the keyboard shortcut.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6433
diff changeset
808 self.__layoutType))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
809 logging.debug("Created Layout")
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 __createToolboxesLayout(self, debugServer):
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 method to create the Toolboxes layout.
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 debugServer reference to the debug server object
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
816 """
2400
c1726b754f96 Started with delaying the import upon the time it is needed.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2370
diff changeset
817 from E5Gui.E5ToolBox import E5VerticalToolBox, E5HorizontalToolBox
c1726b754f96 Started with delaying the import upon the time it is needed.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2370
diff changeset
818
5900
cd90bfdc1247 Started to implement a viewer for source code documentation extracted by providers to be implemented by plug-ins (like rope and jedi).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5899
diff changeset
819 logging.debug("Creating Toolboxes Layout...")
cd90bfdc1247 Started to implement a viewer for source code documentation extracted by providers to be implemented by plug-ins (like rope and jedi).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5899
diff changeset
820
2182
fc3210851b07 Changed the layout of the right side widgets and added a sub menu for the switching between the 'inner' windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2155
diff changeset
821 # Create the left toolbox
fc3210851b07 Changed the layout of the right side widgets and added a sub menu for the switching between the 'inner' windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2155
diff changeset
822 self.lToolboxDock = self.__createDockWindow("lToolboxDock")
fc3210851b07 Changed the layout of the right side widgets and added a sub menu for the switching between the 'inner' windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2155
diff changeset
823 self.lToolbox = E5VerticalToolBox(self.lToolboxDock)
fc3210851b07 Changed the layout of the right side widgets and added a sub menu for the switching between the 'inner' windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2155
diff changeset
824 self.__setupDockWindow(self.lToolboxDock, Qt.LeftDockWidgetArea,
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
825 self.lToolbox, self.tr("Left Toolbox"))
0
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 # Create the horizontal toolbox
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
828 self.hToolboxDock = self.__createDockWindow("hToolboxDock")
55
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 53
diff changeset
829 self.hToolbox = E5HorizontalToolBox(self.hToolboxDock)
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
830 self.__setupDockWindow(self.hToolboxDock, Qt.BottomDockWidgetArea,
3012
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
831 self.hToolbox,
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
832 self.tr("Horizontal Toolbox"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
833
2182
fc3210851b07 Changed the layout of the right side widgets and added a sub menu for the switching between the 'inner' windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2155
diff changeset
834 # Create the right toolbox
fc3210851b07 Changed the layout of the right side widgets and added a sub menu for the switching between the 'inner' windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2155
diff changeset
835 self.rToolboxDock = self.__createDockWindow("rToolboxDock")
fc3210851b07 Changed the layout of the right side widgets and added a sub menu for the switching between the 'inner' windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2155
diff changeset
836 self.rToolbox = E5VerticalToolBox(self.rToolboxDock)
fc3210851b07 Changed the layout of the right side widgets and added a sub menu for the switching between the 'inner' windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2155
diff changeset
837 self.__setupDockWindow(self.rToolboxDock, Qt.RightDockWidgetArea,
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
838 self.rToolbox, self.tr("Right Toolbox"))
2182
fc3210851b07 Changed the layout of the right side widgets and added a sub menu for the switching between the 'inner' windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2155
diff changeset
839
6998
a63ca2373f44 Shell: added capability to place the Shell window in the left or right side container.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6987
diff changeset
840 ####################################################
a63ca2373f44 Shell: added capability to place the Shell window in the left or right side container.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6987
diff changeset
841 ## Populate the left toolbox
a63ca2373f44 Shell: added capability to place the Shell window in the left or right side container.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6987
diff changeset
842 ####################################################
a63ca2373f44 Shell: added capability to place the Shell window in the left or right side container.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6987
diff changeset
843
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
844 # Create the project browser
5900
cd90bfdc1247 Started to implement a viewer for source code documentation extracted by providers to be implemented by plug-ins (like rope and jedi).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5899
diff changeset
845 logging.debug("Creating Project Browser...")
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
846 from Project.ProjectBrowser import ProjectBrowser
6416
a915f8dd1ca6 File-Browser, Shell: changed code so file-browser and shell are always a standalone windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6365
diff changeset
847 self.projectBrowser = ProjectBrowser(self.project)
2182
fc3210851b07 Changed the layout of the right side widgets and added a sub menu for the switching between the 'inner' windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2155
diff changeset
848 self.lToolbox.addItem(self.projectBrowser,
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7456
diff changeset
849 UI.PixmapCache.getIcon("projectViewer"),
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
850 self.tr("Project-Viewer"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
851
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
852 # Create the multi project browser
5900
cd90bfdc1247 Started to implement a viewer for source code documentation extracted by providers to be implemented by plug-ins (like rope and jedi).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5899
diff changeset
853 logging.debug("Creating Multiproject Browser...")
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
854 from MultiProject.MultiProjectBrowser import MultiProjectBrowser
5314
76013775e623 Changed the way the currently opened project is highlighted in the multi project browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5248
diff changeset
855 self.multiProjectBrowser = MultiProjectBrowser(self.multiProject,
76013775e623 Changed the way the currently opened project is highlighted in the multi project browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5248
diff changeset
856 self.project)
2182
fc3210851b07 Changed the layout of the right side widgets and added a sub menu for the switching between the 'inner' windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2155
diff changeset
857 self.lToolbox.addItem(self.multiProjectBrowser,
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7456
diff changeset
858 UI.PixmapCache.getIcon("multiProjectViewer"),
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
859 self.tr("Multiproject-Viewer"))
6426
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
860
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
861 if Preferences.getUI("ShowTemplateViewer"):
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
862 # Create the template viewer part of the user interface
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
863 logging.debug("Creating Template Viewer...")
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
864 from Templates.TemplateViewer import TemplateViewer
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
865 self.templateViewer = TemplateViewer(None,
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
866 self.viewmanager)
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
867 self.lToolbox.addItem(self.templateViewer,
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7456
diff changeset
868 UI.PixmapCache.getIcon("templateViewer"),
6426
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
869 self.tr("Template-Viewer"))
6421
ef33cbc7cc8c UserInterface, ViewManager: made the activation of the code documentation viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6417
diff changeset
870
6998
a63ca2373f44 Shell: added capability to place the Shell window in the left or right side container.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6987
diff changeset
871 ####################################################
a63ca2373f44 Shell: added capability to place the Shell window in the left or right side container.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6987
diff changeset
872 ## Populate the right toolbox
a63ca2373f44 Shell: added capability to place the Shell window in the left or right side container.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6987
diff changeset
873 ####################################################
a63ca2373f44 Shell: added capability to place the Shell window in the left or right side container.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6987
diff changeset
874
6421
ef33cbc7cc8c UserInterface, ViewManager: made the activation of the code documentation viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6417
diff changeset
875 if Preferences.getUI("ShowCodeDocumentationViewer"):
ef33cbc7cc8c UserInterface, ViewManager: made the activation of the code documentation viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6417
diff changeset
876 # Create the code documentation viewer
ef33cbc7cc8c UserInterface, ViewManager: made the activation of the code documentation viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6417
diff changeset
877 logging.debug("Creating Code Documentation Viewer...")
ef33cbc7cc8c UserInterface, ViewManager: made the activation of the code documentation viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6417
diff changeset
878 from .CodeDocumentationViewer import CodeDocumentationViewer
ef33cbc7cc8c UserInterface, ViewManager: made the activation of the code documentation viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6417
diff changeset
879 self.codeDocumentationViewer = CodeDocumentationViewer(self)
ef33cbc7cc8c UserInterface, ViewManager: made the activation of the code documentation viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6417
diff changeset
880 self.rToolbox.addItem(self.codeDocumentationViewer,
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7456
diff changeset
881 UI.PixmapCache.getIcon("codeDocuViewer"),
6421
ef33cbc7cc8c UserInterface, ViewManager: made the activation of the code documentation viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6417
diff changeset
882 self.tr("Code Documentation Viewer"))
5900
cd90bfdc1247 Started to implement a viewer for source code documentation extracted by providers to be implemented by plug-ins (like rope and jedi).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5899
diff changeset
883
6987
3371a03ed0a7 Performed some interface cleanups.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6942
diff changeset
884 # Create the debug viewer
5900
cd90bfdc1247 Started to implement a viewer for source code documentation extracted by providers to be implemented by plug-ins (like rope and jedi).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5899
diff changeset
885 logging.debug("Creating Debug Viewer...")
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
886 from Debugger.DebugViewer import DebugViewer
6987
3371a03ed0a7 Performed some interface cleanups.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6942
diff changeset
887 self.debugViewer = DebugViewer(debugServer)
2182
fc3210851b07 Changed the layout of the right side widgets and added a sub menu for the switching between the 'inner' windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2155
diff changeset
888 self.rToolbox.addItem(self.debugViewer,
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7456
diff changeset
889 UI.PixmapCache.getIcon("debugViewer"),
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
890 self.tr("Debug-Viewer"))
6422
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
891
6785
058d63c537a4 PipInterface: continued with the pip interface widget.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6783
diff changeset
892 if Preferences.getUI("ShowPyPIPackageManager"):
058d63c537a4 PipInterface: continued with the pip interface widget.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6783
diff changeset
893 # Create the PyPI package manager
058d63c537a4 PipInterface: continued with the pip interface widget.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6783
diff changeset
894 logging.debug("Creating PyPI Package Manager...")
058d63c537a4 PipInterface: continued with the pip interface widget.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6783
diff changeset
895 from PipInterface.PipPackagesWidget import PipPackagesWidget
6828
bb6667ea9ae7 Changed the Google Mail interface to not use obsoleted packages anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6785
diff changeset
896 self.pipWidget = PipPackagesWidget(self.pipInterface)
6785
058d63c537a4 PipInterface: continued with the pip interface widget.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6783
diff changeset
897 self.rToolbox.addItem(self.pipWidget,
058d63c537a4 PipInterface: continued with the pip interface widget.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6783
diff changeset
898 UI.PixmapCache.getIcon("pypi"),
058d63c537a4 PipInterface: continued with the pip interface widget.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6783
diff changeset
899 self.tr("PyPI"))
058d63c537a4 PipInterface: continued with the pip interface widget.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6783
diff changeset
900
6761
0b69fe8314e3 UserInterface, Preferences, InterfacePage: added an option to configure the presence of the conda package manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6740
diff changeset
901 if Preferences.getUI("ShowCondaPackageManager"):
0b69fe8314e3 UserInterface, Preferences, InterfacePage: added an option to configure the presence of the conda package manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6740
diff changeset
902 # Create the conda package manager
0b69fe8314e3 UserInterface, Preferences, InterfacePage: added an option to configure the presence of the conda package manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6740
diff changeset
903 logging.debug("Creating Conda Package Manager...")
0b69fe8314e3 UserInterface, Preferences, InterfacePage: added an option to configure the presence of the conda package manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6740
diff changeset
904 from CondaInterface.CondaPackagesWidget import CondaPackagesWidget
0b69fe8314e3 UserInterface, Preferences, InterfacePage: added an option to configure the presence of the conda package manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6740
diff changeset
905 self.condaWidget = CondaPackagesWidget(self.condaInterface)
0b69fe8314e3 UserInterface, Preferences, InterfacePage: added an option to configure the presence of the conda package manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6740
diff changeset
906 self.rToolbox.addItem(self.condaWidget,
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7456
diff changeset
907 UI.PixmapCache.getIcon("miniconda"),
6761
0b69fe8314e3 UserInterface, Preferences, InterfacePage: added an option to configure the presence of the conda package manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6740
diff changeset
908 self.tr("Conda"))
6785
058d63c537a4 PipInterface: continued with the pip interface widget.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6783
diff changeset
909
6422
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
910 if Preferences.getUI("ShowCooperation"):
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
911 # Create the chat part of the user interface
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
912 logging.debug("Creating Chat Widget...")
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
913 from Cooperation.ChatWidget import ChatWidget
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
914 self.cooperation = ChatWidget(self)
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
915 self.rToolbox.addItem(self.cooperation,
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7456
diff changeset
916 UI.PixmapCache.getIcon("cooperation"),
6422
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
917 self.tr("Cooperation"))
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
918
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
919 if Preferences.getUI("ShowIrc"):
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
920 # Create the IRC part of the user interface
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
921 logging.debug("Creating IRC Widget...")
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
922 from Network.IRC.IrcWidget import IrcWidget
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
923 self.irc = IrcWidget(self)
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
924 self.rToolbox.addItem(self.irc,
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7456
diff changeset
925 UI.PixmapCache.getIcon("irc"),
6422
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
926 self.tr("IRC"))
2227
b7aceb255831 First commit of the simple IRC client for eric. It is usable but not yet complete.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2214
diff changeset
927
7054
fb84d8489bc1 Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7038
diff changeset
928 if Preferences.getUI("ShowMicroPython"):
fb84d8489bc1 Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7038
diff changeset
929 # Create the MicroPython part of the user interface
fb84d8489bc1 Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7038
diff changeset
930 logging.debug("Creating MicroPython Widget...")
7134
21d23ca51680 Renamed "MicroPythonReplWidget" to "MicroPythonWidget".
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7119
diff changeset
931 from MicroPython.MicroPythonWidget import MicroPythonWidget
21d23ca51680 Renamed "MicroPythonReplWidget" to "MicroPythonWidget".
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7119
diff changeset
932 self.microPythonWidget = MicroPythonWidget(self)
21d23ca51680 Renamed "MicroPythonReplWidget" to "MicroPythonWidget".
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7119
diff changeset
933 self.rToolbox.addItem(self.microPythonWidget,
7054
fb84d8489bc1 Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7038
diff changeset
934 UI.PixmapCache.getIcon("micropython"),
fb84d8489bc1 Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7038
diff changeset
935 self.tr("MicroPython"))
fb84d8489bc1 Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7038
diff changeset
936
6998
a63ca2373f44 Shell: added capability to place the Shell window in the left or right side container.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6987
diff changeset
937 ####################################################
a63ca2373f44 Shell: added capability to place the Shell window in the left or right side container.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6987
diff changeset
938 ## Populate the bottom toolbox
a63ca2373f44 Shell: added capability to place the Shell window in the left or right side container.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6987
diff changeset
939 ####################################################
a63ca2373f44 Shell: added capability to place the Shell window in the left or right side container.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6987
diff changeset
940
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
941 # Create the task viewer part of the user interface
5900
cd90bfdc1247 Started to implement a viewer for source code documentation extracted by providers to be implemented by plug-ins (like rope and jedi).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5899
diff changeset
942 logging.debug("Creating Task Viewer...")
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
943 from Tasks.TaskViewer import TaskViewer
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
944 self.taskViewer = TaskViewer(None, self.project)
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
945 self.hToolbox.addItem(self.taskViewer,
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7456
diff changeset
946 UI.PixmapCache.getIcon("task"),
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
947 self.tr("Task-Viewer"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
948
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
949 # Create the log viewer part of the user interface
5900
cd90bfdc1247 Started to implement a viewer for source code documentation extracted by providers to be implemented by plug-ins (like rope and jedi).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5899
diff changeset
950 logging.debug("Creating Log Viewer...")
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
951 from .LogView import LogViewer
4083
4418377391bc Added a message filter to the log viewer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4079
diff changeset
952 self.logViewer = LogViewer(self)
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
953 self.hToolbox.addItem(self.logViewer,
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7456
diff changeset
954 UI.PixmapCache.getIcon("logViewer"),
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
955 self.tr("Log-Viewer"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
956
6426
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
957 if Preferences.getUI("ShowFileBrowser"):
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
958 # Create the file browser
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
959 logging.debug("Creating File Browser...")
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
960 from .Browser import Browser
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
961 self.browser = Browser()
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
962 self.lToolbox.addItem(self.browser,
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7456
diff changeset
963 UI.PixmapCache.getIcon("browser"),
6426
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
964 self.tr("File-Browser"))
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
965
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
966 if Preferences.getUI("ShowSymbolsViewer"):
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
967 # Create the symbols viewer
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
968 logging.debug("Creating Symbols Viewer...")
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
969 from .SymbolsWidget import SymbolsWidget
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
970 self.symbolsViewer = SymbolsWidget()
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
971 self.lToolbox.addItem(self.symbolsViewer,
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7456
diff changeset
972 UI.PixmapCache.getIcon("symbols"),
6426
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
973 self.tr("Symbols"))
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
974
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
975 if Preferences.getUI("ShowNumbersViewer"):
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
976 # Create the numbers viewer
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
977 logging.debug("Creating Numbers Viewer...")
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
978 from .NumbersWidget import NumbersWidget
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
979 self.numbersViewer = NumbersWidget()
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
980 self.hToolbox.addItem(self.numbersViewer,
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7456
diff changeset
981 UI.PixmapCache.getIcon("numbers"),
6426
f072dd2edb0f UserInterface, Editor: made the activation of the symbols viewer, file browser, template viewer and numbers viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6424
diff changeset
982 self.tr("Numbers"))
372
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
983
6998
a63ca2373f44 Shell: added capability to place the Shell window in the left or right side container.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6987
diff changeset
984 ####################################################
a63ca2373f44 Shell: added capability to place the Shell window in the left or right side container.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6987
diff changeset
985 ## Populate the configurable widgets
a63ca2373f44 Shell: added capability to place the Shell window in the left or right side container.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6987
diff changeset
986 ####################################################
a63ca2373f44 Shell: added capability to place the Shell window in the left or right side container.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6987
diff changeset
987
a63ca2373f44 Shell: added capability to place the Shell window in the left or right side container.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6987
diff changeset
988 # Create the shell
a63ca2373f44 Shell: added capability to place the Shell window in the left or right side container.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6987
diff changeset
989 logging.debug("Creating Shell...")
a63ca2373f44 Shell: added capability to place the Shell window in the left or right side container.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6987
diff changeset
990 self.__shellPosition = Preferences.getUI("ShellPosition")
a63ca2373f44 Shell: added capability to place the Shell window in the left or right side container.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6987
diff changeset
991 if self.__shellPosition == "left":
a63ca2373f44 Shell: added capability to place the Shell window in the left or right side container.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6987
diff changeset
992 self.__shellParent = self.lToolboxDock
a63ca2373f44 Shell: added capability to place the Shell window in the left or right side container.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6987
diff changeset
993 elif self.__shellPosition == "right":
a63ca2373f44 Shell: added capability to place the Shell window in the left or right side container.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6987
diff changeset
994 self.__shellParent = self.rToolboxDock
a63ca2373f44 Shell: added capability to place the Shell window in the left or right side container.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6987
diff changeset
995 else:
a63ca2373f44 Shell: added capability to place the Shell window in the left or right side container.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6987
diff changeset
996 self.__shellParent = self.hToolboxDock
a63ca2373f44 Shell: added capability to place the Shell window in the left or right side container.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6987
diff changeset
997 from QScintilla.Shell import ShellAssembly
7264
bedbe458d792 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
998 self.shellAssembly = ShellAssembly(
bedbe458d792 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
999 debugServer, self.viewmanager, self.project, True)
6998
a63ca2373f44 Shell: added capability to place the Shell window in the left or right side container.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6987
diff changeset
1000 self.shell = self.shellAssembly.shell()
a63ca2373f44 Shell: added capability to place the Shell window in the left or right side container.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6987
diff changeset
1001 self.__shellParent.widget().insertItem(
7533
88261c96484b Removed the '.png' extension from all call to get an icon or a pixmap from the PixmapCache because this is not needed anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7456
diff changeset
1002 0, self.shellAssembly, UI.PixmapCache.getIcon("shell"),
6998
a63ca2373f44 Shell: added capability to place the Shell window in the left or right side container.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6987
diff changeset
1003 self.tr("Shell"))
a63ca2373f44 Shell: added capability to place the Shell window in the left or right side container.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6987
diff changeset
1004
a63ca2373f44 Shell: added capability to place the Shell window in the left or right side container.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6987
diff changeset
1005 ####################################################
a63ca2373f44 Shell: added capability to place the Shell window in the left or right side container.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6987
diff changeset
1006 ## Set the start index of each toolbox
a63ca2373f44 Shell: added capability to place the Shell window in the left or right side container.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6987
diff changeset
1007 ####################################################
a63ca2373f44 Shell: added capability to place the Shell window in the left or right side container.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6987
diff changeset
1008
a63ca2373f44 Shell: added capability to place the Shell window in the left or right side container.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6987
diff changeset
1009 self.lToolbox.setCurrentIndex(0)
a63ca2373f44 Shell: added capability to place the Shell window in the left or right side container.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6987
diff changeset
1010 self.rToolbox.setCurrentIndex(0)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1011 self.hToolbox.setCurrentIndex(0)
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 def __createSidebarsLayout(self, debugServer):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1014 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1015 Private method to create the Sidebars layout.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1016
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1017 @param debugServer reference to the debug server object
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1018 """
2400
c1726b754f96 Started with delaying the import upon the time it is needed.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2370
diff changeset
1019 from E5Gui.E5SideBar import E5SideBar
c1726b754f96 Started with delaying the import upon the time it is needed.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2370
diff changeset
1020
5900
cd90bfdc1247 Started to implement a viewer for source code documentation extracted by providers to be implemented by plug-ins (like rope and jedi).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5899
diff changeset
1021 logging.debug("Creating Sidebars Layout...")
cd90bfdc1247 Started to implement a viewer for source code documentation extracted by providers to be implemented by plug-ins (like rope and jedi).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5899
diff changeset
1022
2624
e04b5d53281e Introduced a configurable delay timer to get smoother sidebars behavior.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2615
diff changeset
1023 delay = Preferences.getUI("SidebarDelay")
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1024 # Create the left sidebar
2624
e04b5d53281e Introduced a configurable delay timer to get smoother sidebars behavior.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2615
diff changeset
1025 self.leftSidebar = E5SideBar(E5SideBar.West, delay)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1026
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1027 # Create the bottom sidebar
2624
e04b5d53281e Introduced a configurable delay timer to get smoother sidebars behavior.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2615
diff changeset
1028 self.bottomSidebar = E5SideBar(E5SideBar.South, delay)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1029
2182
fc3210851b07 Changed the layout of the right side widgets and added a sub menu for the switching between the 'inner' windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2155
diff changeset
1030 # Create the right sidebar
2624
e04b5d53281e Introduced a configurable delay timer to get smoother sidebars behavior.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2615
diff changeset
1031 self.rightSidebar = E5SideBar(E5SideBar.East, delay)
2182
fc3210851b07 Changed the layout of the right side widgets and added a sub menu for the switching between the 'inner' windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2155
diff changeset
1032
6998
a63ca2373f44 Shell: added capability to place the Shell window in the left or right side container.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6987
diff changeset
1033 ####################################################
a63ca2373f44 Shell: added capability to place the Shell window in the left or right side container.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6987
diff changeset
1034 ## Populate the left side bar
a63ca2373f44 Shell: added capability to place the Shell window in the left or right side container.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6987
diff changeset
1035 ####################################################
a63ca2373f44 Shell: added capability to place the Shell window in the left or right side container.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6987
diff changeset
1036
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1037 # Create the project browser
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1038 logging.debug("Creating Project Browser..."