eric6/UI/UserInterface.py

Wed, 27 Jan 2021 15:09:20 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 27 Jan 2021 15:09:20 +0100
branch
jsonfiles
changeset 8009
29818ac4853c
parent 7973
e836d196e888
child 8011
630a173cb137
permissions
-rw-r--r--

Implemented the JSON based session files.

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
7959
44e15eda6506 Improved the Notification system by supporting colored notifications.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7955
diff changeset
36 from .NotificationWidget import NotificationTypes
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
37
55
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 53
diff changeset
38 from E5Gui.E5SingleApplication import E5SingleApplicationServer
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 53
diff changeset
39 from E5Gui.E5Action import E5Action, createActionGroup
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 53
diff changeset
40 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
41 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
42 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
43 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
44 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
45 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
46 from E5Gui.E5ClickableLabel import E5ClickableLabel
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
47
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
48 import Preferences
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
49 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
50 import Globals
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
51
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
52 import UI.PixmapCache
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
53
8009
29818ac4853c Implemented the JSON based session files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7973
diff changeset
54 from Sessions.SessionFile import SessionFile
29818ac4853c Implemented the JSON based session files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7973
diff changeset
55
7264
bedbe458d792 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
56 from E5Network.E5NetworkProxyFactory import (
bedbe458d792 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
57 E5NetworkProxyFactory, proxyAuthenticationRequired
bedbe458d792 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
58 )
2354
c63de4af553d Centralized the SSL error handling in E5SslErrorHandler.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2347
diff changeset
59 try:
c63de4af553d Centralized the SSL error handling in E5SslErrorHandler.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2347
diff changeset
60 from E5Network.E5SslErrorHandler import E5SslErrorHandler
c63de4af553d Centralized the SSL error handling in E5SslErrorHandler.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2347
diff changeset
61 SSL_AVAILABLE = True
c63de4af553d Centralized the SSL error handling in E5SslErrorHandler.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2347
diff changeset
62 except ImportError:
c63de4af553d Centralized the SSL error handling in E5SslErrorHandler.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2347
diff changeset
63 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
64
3670
f0cb7579c0b4 Finished renaming eric5 for PyQt5 to eric6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3659
diff changeset
65 from eric6config import getConfig
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
66
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
67
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
68 class Redirector(QObject):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
69 """
2965
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2933
diff changeset
70 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
71
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
72 @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
73 @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
74 """
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
75 appendStderr = pyqtSignal(str)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
76 appendStdout = pyqtSignal(str)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
77
7300
7622b6330e62 UserInterface: added 'parent' parameter to Redirector to (hopefully) prevent premature deletion.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7264
diff changeset
78 def __init__(self, stderr, parent=None):
0
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 Constructor
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
81
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
82 @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
83 @type bool
7622b6330e62 UserInterface: added 'parent' parameter to Redirector to (hopefully) prevent premature deletion.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7264
diff changeset
84 @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
85 @type QObject
7622b6330e62 UserInterface: added 'parent' parameter to Redirector to (hopefully) prevent premature deletion.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7264
diff changeset
86 """
7622b6330e62 UserInterface: added 'parent' parameter to Redirector to (hopefully) prevent premature deletion.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7264
diff changeset
87 super(Redirector, self).__init__(parent)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
88 self.stderr = stderr
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
89 self.buffer = ''
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 def __nWrite(self, n):
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 Private method used to write data.
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 @param n max number of bytes to write
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
96 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
97 if n:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
98 line = self.buffer[:n]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
99 if self.stderr:
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
100 self.appendStderr.emit(line)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
101 else:
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
102 self.appendStdout.emit(line)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
103 self.buffer = self.buffer[n:]
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 def __bufferedWrite(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
106 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
107 Private method returning number of characters to write.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
108
3012
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
109 @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
110 (integer)
0
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 return self.buffer.rfind('\n') + 1
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 def flush(self):
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 Public method used to flush the buffered data.
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 self.__nWrite(len(self.buffer))
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 def write(self, s):
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 Public method used to write data.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
123
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
124 @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
125 """
12
1d8dd9706f46 First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7
diff changeset
126 self.buffer += str(s)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
127 self.__nWrite(self.__bufferedWrite())
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
128
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
129
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
130 class UserInterface(E5MainWindow):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
131 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
132 Class implementing the main user interface.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
133
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
134 @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
135 @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
136 @signal preferencesChanged() emitted after the preferences were changed
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
137 @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
138 @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
139 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
140 @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
141 password has been changed with the old and the new password
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
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)
492
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
149
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
150 maxFilePathLen = 100
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
151 maxMenuFilePathLen = 75
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
152
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
153 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
154 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
155 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
156
3670
f0cb7579c0b4 Finished renaming eric5 for PyQt5 to eric6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3659
diff changeset
157 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
158
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
159 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
160 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
161 restartArguments, originalPathString):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
162 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
163 Constructor
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
164
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
165 @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
166 @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
167 @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
168 @type str
3012
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
169 @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
170 @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
171 @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
172 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
173 @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
174 @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
175 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
176 @type list of str
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
177 @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
178 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
179 @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
180 @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
181 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
182 @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
183 @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
184 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
185 @type bool
3012
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
186 @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
187 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
188 @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
189 @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
190 @type str
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
191 """
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
192 super(UserInterface, self).__init__()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
193
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
194 self.__restartArgs = restartArguments[:]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
195
3012
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
196 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
197 Preferences.getUI("StyleSheet"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
198
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
199 self.maxEditorPathLen = Preferences.getUI("CaptionFilenameLength")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
200 self.locale = locale
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
201 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
202 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
203 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
204 self.__disabledPlugins = disabledPlugins[:]
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
205
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
206 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
207
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
208 self.__layoutType = Preferences.getUI("LayoutType")
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
209
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
210 self.passiveMode = Preferences.getDebugger("PassiveDbgEnabled")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
211
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
212 g = Preferences.getGeometry("MainGeometry")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
213 if g.isEmpty():
816
53e282890577 Made the toolbars of the initial layout more minimalistic.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 802
diff changeset
214 s = QSize(1280, 1024)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
215 self.resize(s)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
216 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
217 self.restoreGeometry(g)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
218 self.__startup = True
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
219
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
220 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
221 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
222 else:
6783
d8a0d75aaf01 UserInterface: fixed an exception thrown with Qt4 when changing network preferences.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6761
diff changeset
223 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
224 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
225 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
226 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
227
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
228 self.capProject = ""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
229 self.capEditor = ""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
230 self.captionShowsFilename = Preferences.getUI("CaptionShowsFilename")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
231
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
232 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
233 self.setWindowIcon(UI.PixmapCache.getIcon("eric"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
234 self.__setWindowCaption()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
235
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
236 # 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
237 self.profiles = Preferences.getUI("ViewProfiles2")
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
238
6697
2f5c951bdf14 Conda interface: added capability to remove conda environments the conda way.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
239 # 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
240 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
241 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
242 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
243
6828
bb6667ea9ae7 Changed the Google Mail interface to not use obsoleted packages anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6785
diff changeset
244 # 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
245 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
246 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
247 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
248
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
249 # 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
250 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
251 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
252 # 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
253 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
254
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
255 # Generate the debug server object
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
256 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
257 debugServer = DebugServer(self.__originalPathString)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
258
3159
02cb2adb4868 First implementation for the BackgroundService.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3145
diff changeset
259 # Create the background service object
02cb2adb4868 First implementation for the BackgroundService.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3145
diff changeset
260 from Utilities.BackgroundService import BackgroundService
02cb2adb4868 First implementation for the BackgroundService.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3145
diff changeset
261 self.backgroundService = BackgroundService()
02cb2adb4868 First implementation for the BackgroundService.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3145
diff changeset
262
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
263 # 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
264 from Project.Project import Project
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
265 self.project = Project(self)
6785
058d63c537a4 PipInterface: continued with the pip interface widget.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6783
diff changeset
266 e5App().registerObject("Project", self.project)
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
267
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
268 from MultiProject.MultiProject import MultiProject
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
269 self.multiProject = MultiProject(self.project, self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
270
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
271 splash.showMessage(self.tr("Initializing Plugin Manager..."))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
272
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
273 # 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
274 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
275 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
276 develPlugin=plugin)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
277
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
278 splash.showMessage(self.tr("Generating Main User Interface..."))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
279
6421
ef33cbc7cc8c UserInterface, ViewManager: made the activation of the code documentation viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6417
diff changeset
280 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
281 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
282 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
283 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
284 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
285 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
286 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
287 self.pipWidget = None
25317a7b5d40 UserInterface: added the forgotten initialization of pipWidget and condaWidget attributes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6931
diff changeset
288 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
289 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
290
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
291 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
292 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
293 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
294
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
295 # 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
296 logging.debug("Creating Layout...")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
297 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
298 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
299 self.__currentBottomWidget = None
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
300
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
301 # Generate the debugger part of the ui
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
302 logging.debug("Creating Debugger UI...")
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
303 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
304 self.debuggerUI = DebugUI(self, self.viewmanager, debugServer,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
305 self.debugViewer, self.project)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
306 self.debugViewer.setDebugger(self.debuggerUI)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
307 self.shell.setDebuggerUI(self.debuggerUI)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
308
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
309 # 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
310 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
311 self.stderr = Redirector(True, self)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
312
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
313 # 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
314 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
315 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
316 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
317 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
318 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
319 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
320 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
321 self.replaceFilesDialog = None
2190
abd65b78425e Added a notification system and updated the source documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2184
diff changeset
322 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
323 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
324 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
325 self.__configurationDialog = None
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
326
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
327 # 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
328 splash.showMessage(self.tr("Setting up connections..."))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
329
476
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
330 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
331 self.viewmanager.openSourceFile)
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
332
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
333 self.debugViewer.sourceFile.connect(self.viewmanager.showDebugSource)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
334
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
335 self.taskViewer.displayFile.connect(self.viewmanager.openSourceFile)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
336
476
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
337 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
338 self.viewmanager.openSourceFile)
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
339 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
340 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
341 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
342 self.viewmanager.openSourceFile)
476
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
343 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
344 self.viewmanager.openSourceFile)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
345 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
346 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
347 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
348 self.__unittestScript)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
349
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
350 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
351 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
352 self.viewmanager.openSourceFile)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
353 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
354 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
355 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
356 self.viewmanager.closeWindow)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
357 self.projectBrowser.pfBrowser.appendStderr.connect(self.appendToStderr)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
358
476
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
359 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
360 self.viewmanager.openSourceFile)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
361 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
362 self.viewmanager.closeWindow)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
363 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
364
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
365 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
366 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
367 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
368 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
369 self.__TRPreviewer)
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
370 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
371 self.__TRPreviewer)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
372 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
373 self.viewmanager.closeWindow)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
374 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
375 self.projectBrowser.ptBrowser.appendStderr.connect(self.appendToStderr)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
376
476
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
377 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
378 self.viewmanager.openSourceFile)
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
379 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
380 self.viewmanager.openSourceFile)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
381 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
382 self.viewmanager.closeWindow)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
383 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
384 self.projectBrowser.piBrowser.appendStderr.connect(self.appendToStderr)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
385
5968
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5913
diff changeset
386 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
387 self.viewmanager.openSourceFile)
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5913
diff changeset
388 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
389 self.viewmanager.openSourceFile)
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5913
diff changeset
390 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
391 self.viewmanager.closeWindow)
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5913
diff changeset
392 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
393 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
394
476
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
395 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
396 self.viewmanager.openSourceFile)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
397 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
398 self.viewmanager.closeWindow)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
399 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
400 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
401 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
402 self.projectBrowser.poBrowser.binaryFile.connect(self.__openHexEditor)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
403
486
e4711a55e482 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 482
diff changeset
404 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
405 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
406 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
407 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
408 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
409 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
410 self.viewmanager.projectFileRenamed)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
411 self.project.lexerAssociationsChanged.connect(
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
412 self.viewmanager.projectLexerAssociationsChanged)
486
e4711a55e482 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 482
diff changeset
413 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
414 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
415 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
416 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
417 self.project.projectClosed.connect(
eccd12461319 BackgroundService: Restart of the client in different situations handled.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3515
diff changeset
418 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
419 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
420 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
421 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
422 self.project.appendStderr.connect(self.appendToStderr)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
423
3012
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
424 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
425 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
426 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
427 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
428 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
429 self.__writeCrashSession)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
430
482
4650a72c307a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 481
diff changeset
431 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
432 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
433 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
434 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
435 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
436 self.debuggerUI.compileForms.connect(
4650a72c307a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 481
diff changeset
437 self.projectBrowser.pfBrowser.compileChangedForms)
4650a72c307a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 481
diff changeset
438 self.debuggerUI.compileResources.connect(
4650a72c307a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 481
diff changeset
439 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
440 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
441 self.debuggerUI.appendStdout.connect(self.appendToStdout)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
442
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
443 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
444 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
445 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
446 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
447 debugServer.appendStdout.connect(self.appendToStdout)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
448
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
449 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
450 self.stderr.appendStderr.connect(self.appendToStderr)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
451
492
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
452 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
453 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
454 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
455 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
456 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
457 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
458 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
459 self.preferencesChanged.connect(
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
460 self.projectBrowser.handlePreferencesChanged)
492
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
461 self.preferencesChanged.connect(
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
462 self.projectBrowser.psBrowser.handlePreferencesChanged)
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
463 self.preferencesChanged.connect(
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
464 self.projectBrowser.pfBrowser.handlePreferencesChanged)
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
465 self.preferencesChanged.connect(
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
466 self.projectBrowser.prBrowser.handlePreferencesChanged)
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
467 self.preferencesChanged.connect(
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
468 self.projectBrowser.ptBrowser.handlePreferencesChanged)
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
469 self.preferencesChanged.connect(
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
470 self.projectBrowser.piBrowser.handlePreferencesChanged)
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
471 self.preferencesChanged.connect(
5968
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5913
diff changeset
472 self.projectBrowser.ppBrowser.handlePreferencesChanged)
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5913
diff changeset
473 self.preferencesChanged.connect(
492
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
474 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
475 self.preferencesChanged.connect(
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
476 self.taskViewer.handlePreferencesChanged)
492
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
477 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
478 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
479 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
480 self.preferencesChanged.connect(
eccd12461319 BackgroundService: Restart of the client in different situations handled.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3515
diff changeset
481 self.backgroundService.preferencesOrProjectChanged)
7318
5d39cd2d7960 Editor, Previewer:
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7300
diff changeset
482 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
483 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
484 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
485
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
486 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
487 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
488 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
489 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
490 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
491 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
492 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
493 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
494 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
495 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
496 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
497 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
498 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
499 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
500 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
501 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
502 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
503 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
504 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
505 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
506
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 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
508 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
509
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 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
511 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
512
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 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
514 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
515
6422
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
516 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
517 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
518 self.codeDocumentationViewer.preferencesChanged)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
519
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
520 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
521 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
522 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
523 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
524 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
525 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
526 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
527 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
528 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
529 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
530 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
531 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
532 self.viewmanager.editorChanged.connect(self.__writeCrashSession)
158
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 150
diff changeset
533
6118
da9e08920e7c Continued removing the use of QObject.sender().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
534 self.shell.zoomValueChanged.connect(
da9e08920e7c Continued removing the use of QObject.sender().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
535 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
536
6422
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
537 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
538 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
539 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
540 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
541 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
542 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
543 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
544 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
545 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
546 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
547 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
548 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
549 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
550 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
551 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
552 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
553 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
554 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
555 self.cooperation.getClient())
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
556
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
557 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
558 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
559 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
560
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 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
562 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
563 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
564
6422
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
565 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
566 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
567
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
568 # create the toolbar manager object
55
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 53
diff changeset
569 self.toolbarManager = E5ToolBarManager(self, self)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
570 self.toolbarManager.setMainWindow(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
571
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
572 # 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
573 splash.showMessage(self.tr("Initializing Tools..."))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
574 self.toolGroups, self.currentToolGroup = Preferences.readToolGroups()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
575 self.toolProcs = []
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
576 self.__initExternalToolsActions()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
577
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
578 # 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
579 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
580 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
581
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
582 # 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
583 splash.showMessage(self.tr("Registering Objects..."))
53
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 50
diff changeset
584 e5App().registerObject("UserInterface", self)
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 50
diff changeset
585 e5App().registerObject("DebugUI", self.debuggerUI)
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 50
diff changeset
586 e5App().registerObject("DebugServer", debugServer)
3159
02cb2adb4868 First implementation for the BackgroundService.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3145
diff changeset
587 e5App().registerObject("BackgroundService", self.backgroundService)
53
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 50
diff changeset
588 e5App().registerObject("ViewManager", self.viewmanager)
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 50
diff changeset
589 e5App().registerObject("ProjectBrowser", self.projectBrowser)
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 50
diff changeset
590 e5App().registerObject("MultiProject", self.multiProject)
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 50
diff changeset
591 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
592 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
593 e5App().registerObject("TemplateViewer", self.templateViewer)
53
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 50
diff changeset
594 e5App().registerObject("Shell", self.shell)
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 50
diff changeset
595 e5App().registerObject("PluginManager", self.pluginManager)
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 50
diff changeset
596 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
597 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
598 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
599 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
600 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
601 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
602 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
603 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
604 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
605 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
606 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
607 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
608 e5App().registerObject("MicroPython", self.microPythonWidget)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
609
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
610 # 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
611 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
612 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
613 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
614
8009
29818ac4853c Implemented the JSON based session files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7973
diff changeset
615 # create the various JSON file interfaces
29818ac4853c Implemented the JSON based session files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7973
diff changeset
616 self.__sessionFile = SessionFile(True)
29818ac4853c Implemented the JSON based session files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7973
diff changeset
617
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
618 # 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
619 splash.showMessage(self.tr("Initializing Actions..."))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
620 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
621 splash.showMessage(self.tr("Initializing Menus..."))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
622 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
623 splash.showMessage(self.tr("Initializing Toolbars..."))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
624 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
625 splash.showMessage(self.tr("Initializing Statusbar..."))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
626 self.__initStatusbar()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
627
2933
ada56f070ef4 Fixed an issue in the user interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2930
diff changeset
628 # 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
629 app.focusChanged.connect(self.viewmanager.appFocusChanged)
ada56f070ef4 Fixed an issue in the user interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2930
diff changeset
630
ada56f070ef4 Fixed an issue in the user interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2930
diff changeset
631 # Initialize the instance variables.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
632 self.currentProg = None
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
633 self.isProg = False
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
634 self.utEditorOpen = False
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
635 self.utProjectOpen = False
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
636
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
637 self.inDragDrop = False
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
638 self.setAcceptDrops(True)
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.currentProfile = None
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
641
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
642 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
643 self.inCloseEvent = False
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
644
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
645 # now redirect stdout and stderr
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
646 # TODO: release - reenable redirection
7973
e836d196e888 Fixed some code style issues detected by the upgraded eradicate.py.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7960
diff changeset
647 ## sys.stdout = self.stdout # __IGNORE_WARNING_M891__
e836d196e888 Fixed some code style issues detected by the upgraded eradicate.py.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7960
diff changeset
648 ## sys.stderr = self.stderr # __IGNORE_WARNING_M891__
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
649
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
650 # now fire up the single application server
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
651 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
652 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
653 self.tr("Initializing Single Application Server..."))
55
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 53
diff changeset
654 self.SAServer = E5SingleApplicationServer()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
655 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
656 self.SAServer = None
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
657
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
658 # 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
659 splash.showMessage(self.tr("Initializing Plugins..."))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
660 self.pluginManager.finalizeSetup()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
661 # 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
662 splash.showMessage(self.tr("Activating Plugins..."))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
663 self.pluginManager.activatePlugins()
4079
a3319822d303 Added possibility for plug-ins to have toolbars.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4078
diff changeset
664 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
665 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
666 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
667 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
668 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
669 PluginRepositoryDownloadCleanup
7264
bedbe458d792 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
670 )
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
671 PluginRepositoryDownloadCleanup(quiet=True)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
672
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
673 # 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
674 from Preferences import Shortcuts
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
675 Shortcuts.readShortcuts()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
676
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
677 # 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
678 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
679 self.toolbarManager.restoreState(
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
680 Preferences.getUI("ToolbarManagerState"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
681
6422
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
682 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
683 # 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
684 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
685
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
686 # 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
687 splash.showMessage(self.tr("Setting View Profile..."))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
688 self.__setEditProfile()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
689
7667
cd2e9a5ee187 VCS Interfaces: added a configuration option to disable the VCS toolbars
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7635
diff changeset
690 # 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
691 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
692 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
693 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
694 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
695 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
696 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
697 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
698
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
699 # 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
700 splash.showMessage(self.tr("Reading Tasks..."))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
701 self.__readTasks()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
702
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
703 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
704 # 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
705 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
706 self.templateViewer.readTemplates()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
707
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
708 # 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
709 # environment
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
710 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
711 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
712 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
713 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
714 )
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
715 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
716 debugServer.startClient(False)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
717
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
718 # 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
719 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
720 self.__networkManager.proxyAuthenticationRequired.connect(
286
652f5159f1c3 Prepared to have individual proxies per scheme.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 270
diff changeset
721 proxyAuthenticationRequired)
798
5c1786fad576 Fixed an issue with Qt installations that don't support SSL.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
722 if SSL_AVAILABLE:
2354
c63de4af553d Centralized the SSL error handling in E5SslErrorHandler.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2347
diff changeset
723 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
724 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
725 self.__replies = []
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
726
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
727 # set spellchecker defaults
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
728 from QScintilla.SpellChecker import SpellChecker
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
729 SpellChecker.setDefaultLanguage(
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
730 Preferences.getEditor("SpellCheckingDefaultLanguage"))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
731
4216
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4197
diff changeset
732 # 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
733 # 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
734 self.__lastConfigurationPageName = ""
4216
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4197
diff changeset
735 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
736
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
737 # 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
738 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
739 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
740 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
741
7005
342819f05839 setup.py Wizard:
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6998
diff changeset
742 def networkAccessManager(self):
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 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
745
342819f05839 setup.py Wizard:
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6998
diff changeset
746 @return reference to the network access manager object
342819f05839 setup.py Wizard:
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6998
diff changeset
747 @rtype QNetworkAccessManager
342819f05839 setup.py Wizard:
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6998
diff changeset
748 """
342819f05839 setup.py Wizard:
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6998
diff changeset
749 return self.__networkManager
342819f05839 setup.py Wizard:
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6998
diff changeset
750
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
751 def __createLayout(self, debugServer):
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 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
754
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
755 @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
756 @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
757 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
758 # Create the view manager depending on the configuration setting
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
759 logging.debug("Creating Viewmanager...")
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
760 import ViewManager
7264
bedbe458d792 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
761 self.viewmanager = ViewManager.factory(
bedbe458d792 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
762 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
763 leftWidget = QWidget()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
764 layout = QVBoxLayout()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
765 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
766 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
767 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
768 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
769 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
770 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
771 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
772 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
773 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
774 self.viewmanager.replaceWidget().hide()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
775
2425
ace8a08028f3 Fixed the main window layout after the previewer change.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2424
diff changeset
776 splitter = QSplitter(Qt.Horizontal)
ace8a08028f3 Fixed the main window layout after the previewer change.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2424
diff changeset
777 splitter.addWidget(leftWidget)
ace8a08028f3 Fixed the main window layout after the previewer change.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2424
diff changeset
778 self.setCentralWidget(splitter)
ace8a08028f3 Fixed the main window layout after the previewer change.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2424
diff changeset
779
2424
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2411
diff changeset
780 # Create previewer
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2411
diff changeset
781 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
782 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
783 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
784 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
785
6931
faac36ec9d76 Started implementing the Python AST Viewer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6896
diff changeset
786 # Create AST viewer
faac36ec9d76 Started implementing the Python AST Viewer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6896
diff changeset
787 logging.debug("Creating Python AST Viewer")
faac36ec9d76 Started implementing the Python AST Viewer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6896
diff changeset
788 from .PythonAstViewer import PythonAstViewer
faac36ec9d76 Started implementing the Python AST Viewer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6896
diff changeset
789 self.__astViewer = PythonAstViewer(self.viewmanager, splitter)
faac36ec9d76 Started implementing the Python AST Viewer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6896
diff changeset
790 splitter.addWidget(self.__astViewer)
faac36ec9d76 Started implementing the Python AST Viewer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6896
diff changeset
791
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
792 # 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
793 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
794 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
795 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
796 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
797
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
798 # 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
799 if self.__layoutType == "Toolboxes":
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
800 logging.debug("Creating toolboxes...")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
801 self.__createToolboxesLayout(debugServer)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
802
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
803 # 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
804 elif self.__layoutType == "Sidebars":
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
805 logging.debug("Creating sidebars...")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
806 self.__createSidebarsLayout(debugServer)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
807
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
808 else:
3012
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
809 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
810 self.__layoutType))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
811 logging.debug("Created Layout")
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 def __createToolboxesLayout(self, debugServer):
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 Private method to create the Toolboxes layout.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
816
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
817 @param debugServer reference to the debug server object
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
818 """
2400
c1726b754f96 Started with delaying the import upon the time it is needed.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2370
diff changeset
819 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
820
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
821 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
822
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
823 # 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
824 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
825 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
826 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
827 self.lToolbox, self.tr("Left Toolbox"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
828
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
829 # Create the horizontal toolbox
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
830 self.hToolboxDock = self.__createDockWindow("hToolboxDock")
55
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 53
diff changeset
831 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
832 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
833 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
834 self.tr("Horizontal Toolbox"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
835
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
836 # 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
837 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
838 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
839 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
840 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
841
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
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 ## 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
844 ####################################################
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
845
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
846 # 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
847 logging.debug("Creating Project Browser...")
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
848 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
849 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
850 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
851 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
852 self.tr("Project-Viewer"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
853
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
854 # 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
855 logging.debug("Creating Multiproject Browser...")
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
856 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
857 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
858 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
859 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
860 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
861 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
862
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 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
864 # 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
865 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
866 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
867 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
868 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
869 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
870 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
871 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
872
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
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 ## 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
875 ####################################################
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
876
6421
ef33cbc7cc8c UserInterface, ViewManager: made the activation of the code documentation viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6417
diff changeset
877 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
878 # 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
879 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
880 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
881 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
882 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
883 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
884 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
885
6987
3371a03ed0a7 Performed some interface cleanups.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6942
diff changeset
886 # 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
887 logging.debug("Creating Debug Viewer...")
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
888 from Debugger.DebugViewer import DebugViewer
6987
3371a03ed0a7 Performed some interface cleanups.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6942
diff changeset
889 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
890 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
891 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
892 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
893
6785
058d63c537a4 PipInterface: continued with the pip interface widget.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6783
diff changeset
894 if Preferences.getUI("ShowPyPIPackageManager"):
058d63c537a4 PipInterface: continued with the pip interface widget.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6783
diff changeset
895 # Create the PyPI package manager
058d63c537a4 PipInterface: continued with the pip interface widget.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6783
diff changeset
896 logging.debug("Creating PyPI Package Manager...")
058d63c537a4 PipInterface: continued with the pip interface widget.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6783
diff changeset
897 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
898 self.pipWidget = PipPackagesWidget(self.pipInterface)
6785
058d63c537a4 PipInterface: continued with the pip interface widget.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6783
diff changeset
899 self.rToolbox.addItem(self.pipWidget,
058d63c537a4 PipInterface: continued with the pip interface widget.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6783
diff changeset
900 UI.PixmapCache.getIcon("pypi"),
058d63c537a4 PipInterface: continued with the pip interface widget.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6783
diff changeset
901 self.tr("PyPI"))
058d63c537a4 PipInterface: continued with the pip interface widget.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6783
diff changeset
902
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
903 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
904 # 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
905 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
906 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
907 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
908 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
909 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
910 self.tr("Conda"))
6785
058d63c537a4 PipInterface: continued with the pip interface widget.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6783
diff changeset
911
6422
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
912 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
913 # 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
914 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
915 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
916 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
917 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
918 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
919 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
920
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
921 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
922 # 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
923 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
924 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
925 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
926 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
927 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
928 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
929
7054
fb84d8489bc1 Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7038
diff changeset
930 if Preferences.getUI("ShowMicroPython"):
fb84d8489bc1 Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7038
diff changeset
931 # Create the MicroPython part of the user interface
fb84d8489bc1 Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7038
diff changeset
932 logging.debug("Creating MicroPython Widget...")
7134
21d23ca51680 Renamed "MicroPythonReplWidget" to "MicroPythonWidget".
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7119
diff changeset
933 from MicroPython.MicroPythonWidget import MicroPythonWidget
21d23ca51680 Renamed "MicroPythonReplWidget" to "MicroPythonWidget".
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7119
diff changeset
934 self.microPythonWidget = MicroPythonWidget(self)
21d23ca51680 Renamed "MicroPythonReplWidget" to "MicroPythonWidget".
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7119
diff changeset
935 self.rToolbox.addItem(self.microPythonWidget,
7054
fb84d8489bc1 Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7038
diff changeset
936 UI.PixmapCache.getIcon("micropython"),
fb84d8489bc1 Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7038
diff changeset
937 self.tr("MicroPython"))
fb84d8489bc1 Started implementing the MicroPython support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7038
diff changeset
938
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
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 ## 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
941 ####################################################
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
942
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
943 # 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
944 logging.debug("Creating Task Viewer...")
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
945 from Tasks.TaskViewer import TaskViewer
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
946 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
947 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
948 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
949 self.tr("Task-Viewer"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
950
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
951 # 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
952 logging.debug("Creating Log Viewer...")
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
953 from .LogView import LogViewer
4083
4418377391bc Added a message filter to the log viewer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4079
diff changeset
954 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
955 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
956 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
957 self.tr("Log-Viewer"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
958
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
959 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
960 # 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
961 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
962 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
963 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
964 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
965 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
966 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
967
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 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
969 # 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
970 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
971 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
972 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
973 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
974 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
975 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
976
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 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
978 # 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
979 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
980 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
981 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
982 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
983 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
984 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
985
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
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 ## 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
988 ####################################################
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
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 # 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
991 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
992 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
993 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
994 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
995 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
996 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
997 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
998 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
999 from QScintilla.Shell import ShellAssembly
7264
bedbe458d792 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
1000 self.shellAssembly = ShellAssembly(
bedbe458d792 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
1001 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
1002 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
1003 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
1004 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
1005 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
1006
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 ## 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
1009 ####################################################
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
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
1011 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
1012 self.rToolbox.setCurrentIndex(0)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1013 self.hToolbox.setCurrentIndex(0)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1014
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1015 def __createSidebarsLayout(self, debugServer):
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 Private method to create the Sidebars layout.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1018
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1019 @param debugServer reference to the debug server object
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1020 """
2400
c1726b754f96 Started with delaying the import upon the time it is needed.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2370
diff changeset
1021 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
1022
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
1023 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
1024
2624
e04b5d53281e Introduced a configurable delay timer to get smoother sidebars behavior.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2615
diff changeset
1025 delay = Preferences.getUI("SidebarDelay")
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1026 # 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
1027 self.leftSidebar = E5SideBar(E5SideBar.West, delay)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1028
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1029 # 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
1030 self.bottomSidebar = E5SideBar(E5SideBar.South, delay)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1031
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 # 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
1033 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
1034
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
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 ## 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
1037 ####################################################
a63ca2373f44 Shell: added capability to place the Shell window in the left or right side