UI/UserInterface.py

Tue, 10 Jul 2018 19:11:06 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 10 Jul 2018 19:11:06 +0200
changeset 6422
1b8bff880c6b
parent 6421
ef33cbc7cc8c
child 6423
a9e6ae68170b
permissions
-rw-r--r--

UserInterface: made the activation of the cooperation and IRC widgets optional.

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
6048
82ad8ec9548c Updated copyright for 2018.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6039
diff changeset
3 # Copyright (c) 2002 - 2018 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
3145
a9de05d4a22f # __IGNORE_WARNING__ added/ removed.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3142
diff changeset
10 from __future__ import unicode_literals
2525
8b507a9a2d40 Script changes: Future import added, super calls modified and unicode behavior for str.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2474
diff changeset
11 try:
5624
cdd346d8858b Removed a bunch of __IGNORE_WARNING_M131__ markers.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5604
diff changeset
12 str = unicode # __IGNORE_EXCEPTION__
3484
645c12de6b0c Merge with default branch.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3456 3446
diff changeset
13 except NameError:
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
14 pass
8b507a9a2d40 Script changes: Future import added, super calls modified and unicode behavior for str.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2474
diff changeset
15
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
16 import os
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
17 import sys
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
18 import logging
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
19
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3649
diff changeset
20 from PyQt5.QtCore import pyqtSlot, QTimer, QFile, QFileInfo, pyqtSignal, \
3012
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
21 PYQT_VERSION_STR, QDate, QIODevice, qVersion, QProcess, QSize, QUrl, \
3776
ccb6eacb50e5 Started adding code to make eric6 usable with PyQt5 and PyQt4.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3721
diff changeset
22 QObject, Qt
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3649
diff changeset
23 from PyQt5.QtGui import QKeySequence, QDesktopServices
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3649
diff changeset
24 from PyQt5.QtWidgets import QSizePolicy, QWidget, QWhatsThis, QToolBar, \
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3649
diff changeset
25 QDialog, QSplitter, QApplication, QMenu, QVBoxLayout, QDockWidget, \
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3649
diff changeset
26 QAction, QLabel
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3649
diff changeset
27 from PyQt5.Qsci import QSCINTILLA_VERSION_STR
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3649
diff changeset
28 from PyQt5.QtNetwork import QNetworkProxyFactory, QNetworkAccessManager, \
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
29 QNetworkRequest, QNetworkReply
5736
000ea446ff4b Prepared the code for Qt > 5.9.99.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5720
diff changeset
30
000ea446ff4b Prepared the code for Qt > 5.9.99.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5720
diff changeset
31 from Globals import qVersionTuple
4619
aa2319888257 Prepared the code for missing QtWebKit (starting from Qt 5.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4414
diff changeset
32 try:
aa2319888257 Prepared the code for missing QtWebKit (starting from Qt 5.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4414
diff changeset
33 from PyQt5 import QtWebKit # __IGNORE_WARNING__
aa2319888257 Prepared the code for missing QtWebKit (starting from Qt 5.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4414
diff changeset
34 WEBKIT_AVAILABLE = True
aa2319888257 Prepared the code for missing QtWebKit (starting from Qt 5.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4414
diff changeset
35 except ImportError:
aa2319888257 Prepared the code for missing QtWebKit (starting from Qt 5.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4414
diff changeset
36 WEBKIT_AVAILABLE = False
5736
000ea446ff4b Prepared the code for Qt > 5.9.99.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5720
diff changeset
37 if qVersionTuple() < (5, 6, 0):
4733
ae291a307ea6 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4665
diff changeset
38 WEBENGINE_AVAILABLE = False
ae291a307ea6 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4665
diff changeset
39 else:
ae291a307ea6 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4665
diff changeset
40 try:
ae291a307ea6 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4665
diff changeset
41 from PyQt5 import QtWebEngineWidgets # __IGNORE_WARNING__
ae291a307ea6 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4665
diff changeset
42 WEBENGINE_AVAILABLE = True
ae291a307ea6 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4665
diff changeset
43 except ImportError:
ae291a307ea6 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4665
diff changeset
44 WEBENGINE_AVAILABLE = False
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
45
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
46 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
47 from . import Config
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
48
55
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 53
diff changeset
49 from E5Gui.E5SingleApplication import E5SingleApplicationServer
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 53
diff changeset
50 from E5Gui.E5Action import E5Action, createActionGroup
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 53
diff changeset
51 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
52 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
53 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
54 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
55 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
56 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
57 from E5Gui.E5ClickableLabel import E5ClickableLabel
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
58
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
59 import Preferences
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
60 import Utilities
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
61
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
62 import UI.PixmapCache
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
63
4629
99aaac59be4f Added a status bar icon to show the online status.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4621
diff changeset
64 from E5Network.E5NetworkIcon import E5NetworkIcon
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
65 from E5Network.E5NetworkProxyFactory import E5NetworkProxyFactory, \
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
66 proxyAuthenticationRequired
2354
c63de4af553d Centralized the SSL error handling in E5SslErrorHandler.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2347
diff changeset
67 try:
c63de4af553d Centralized the SSL error handling in E5SslErrorHandler.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2347
diff changeset
68 from E5Network.E5SslErrorHandler import E5SslErrorHandler
c63de4af553d Centralized the SSL error handling in E5SslErrorHandler.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2347
diff changeset
69 SSL_AVAILABLE = True
c63de4af553d Centralized the SSL error handling in E5SslErrorHandler.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2347
diff changeset
70 except ImportError:
c63de4af553d Centralized the SSL error handling in E5SslErrorHandler.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2347
diff changeset
71 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
72
3670
f0cb7579c0b4 Finished renaming eric5 for PyQt5 to eric6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3659
diff changeset
73 from eric6config import getConfig
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
74
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
75
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
76 class Redirector(QObject):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
77 """
2965
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2933
diff changeset
78 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
79
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
80 @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
81 @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
82 """
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
83 appendStderr = pyqtSignal(str)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
84 appendStdout = pyqtSignal(str)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
85
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
86 def __init__(self, stderr):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
87 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
88 Constructor
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
89
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
90 @param stderr flag indicating stderr is being redirected
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
91 """
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
92 super(Redirector, self).__init__()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
93 self.stderr = stderr
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
94 self.buffer = ''
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
95
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
96 def __nWrite(self, n):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
97 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
98 Private method used to write data.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
99
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
100 @param n max number of bytes to write
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
101 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
102 if n:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
103 line = self.buffer[:n]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
104 if self.stderr:
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
105 self.appendStderr.emit(line)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
106 else:
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
107 self.appendStdout.emit(line)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
108 self.buffer = self.buffer[n:]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
109
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
110 def __bufferedWrite(self):
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 Private method returning number of characters to write.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
113
3012
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
114 @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
115 (integer)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
116 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
117 return self.buffer.rfind('\n') + 1
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
118
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
119 def flush(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
120 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
121 Public method used to flush the buffered data.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
122 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
123 self.__nWrite(len(self.buffer))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
124
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
125 def write(self, s):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
126 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
127 Public method used to write data.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
128
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
129 @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
130 """
12
1d8dd9706f46 First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7
diff changeset
131 self.buffer += str(s)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
132 self.__nWrite(self.__bufferedWrite())
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
133
6422
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
134 # TODO: make "File-Browser", "Symbols" and "Numbers" configurable
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
135 class UserInterface(E5MainWindow):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
136 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
137 Class implementing the main user interface.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
138
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
139 @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
140 @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
141 @signal preferencesChanged() emitted after the preferences were changed
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
142 @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
143 @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
144 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
145 @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
146 password has been changed with the old and the new password
4630
7b0e38956b5c Refined the online state change behaviour.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4629
diff changeset
147 @signal onlineStateChanged(online) emitted to indicate a change of the
7b0e38956b5c Refined the online state change behaviour.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4629
diff changeset
148 network state
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
149 """
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
150 appendStderr = pyqtSignal(str)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
151 appendStdout = pyqtSignal(str)
492
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
152 preferencesChanged = pyqtSignal()
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
153 reloadAPIs = pyqtSignal()
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
154 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
155 masterPasswordChanged = pyqtSignal(str, str)
4630
7b0e38956b5c Refined the online state change behaviour.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4629
diff changeset
156 onlineStateChanged = pyqtSignal(bool)
492
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
157
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
158 maxFilePathLen = 100
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
159 maxMenuFilePathLen = 75
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
160
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
161 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
162 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
163 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
164
3670
f0cb7579c0b4 Finished renaming eric5 for PyQt5 to eric6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3659
diff changeset
165 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
166
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
167 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
168 noOpenAtStartup, noCrashOpenAtStartup, disableCrashSession,
350655a6c85f eric6, PluginManager: added the '--disable-plugin=' option to disable plug-ins via the command line.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6244
diff changeset
169 restartArguments):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
170 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
171 Constructor
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
172
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 @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
174 @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
175 @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
176 @type str
3012
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
177 @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
178 @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
179 @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
180 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
181 @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
182 @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
183 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
184 @type list of str
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
185 @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
186 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
187 @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
188 @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
189 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
190 @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
191 @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
192 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
193 @type bool
3012
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
194 @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
195 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
196 @type list of str
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
197 """
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
198 super(UserInterface, self).__init__()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
199
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
200 self.__restartArgs = restartArguments[:]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
201
3012
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
202 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
203 Preferences.getUI("StyleSheet"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
204
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
205 self.maxEditorPathLen = Preferences.getUI("CaptionFilenameLength")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
206 self.locale = locale
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
207 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
208 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
209 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
210 self.__disabledPlugins = disabledPlugins[:]
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
211
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
212 self.layoutType = Preferences.getUI("LayoutType")
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
213
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
214 self.passiveMode = Preferences.getDebugger("PassiveDbgEnabled")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
215
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
216 g = Preferences.getGeometry("MainGeometry")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
217 if g.isEmpty():
816
53e282890577 Made the toolbars of the initial layout more minimalistic.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 802
diff changeset
218 s = QSize(1280, 1024)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
219 self.resize(s)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
220 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
221 self.restoreGeometry(g)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
222 self.__startup = True
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
223
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
224 self.__proxyFactory = E5NetworkProxyFactory()
41505c92ac31 Added code to enhance the proxy configuration and removed the usage of QHttp.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 266
diff changeset
225 QNetworkProxyFactory.setApplicationProxyFactory(self.__proxyFactory)
5720
fc72c0c81a0f Fixed using the system proxy configuration in the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5654
diff changeset
226 QNetworkProxyFactory.setUseSystemConfiguration(
fc72c0c81a0f Fixed using the system proxy configuration in the web browser NG.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5654
diff changeset
227 Preferences.getUI("UseSystemProxy"))
270
41505c92ac31 Added code to enhance the proxy configuration and removed the usage of QHttp.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 266
diff changeset
228
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
229 self.capProject = ""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
230 self.capEditor = ""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
231 self.captionShowsFilename = Preferences.getUI("CaptionShowsFilename")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
232
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
233 QApplication.setWindowIcon(UI.PixmapCache.getIcon("eric.png"))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
234 self.setWindowIcon(UI.PixmapCache.getIcon("eric.png"))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
235 self.__setWindowCaption()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
236
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
237 # load the view profiles
2548
03c3840f887d Changed handling of the ViewProfiles settings to get rid of obsolete entries and make it suitable for the Python2 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2474
diff changeset
238 self.profiles = Preferences.getUI("ViewProfiles2")
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
239
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
240 # 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
241 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
242 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
243 # 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
244 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
245
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
246 # Generate the debug server object
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
247 from Debugger.DebugServer import DebugServer
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
248 debugServer = DebugServer()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
249
3159
02cb2adb4868 First implementation for the BackgroundService.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3145
diff changeset
250 # Create the background service object
02cb2adb4868 First implementation for the BackgroundService.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3145
diff changeset
251 from Utilities.BackgroundService import BackgroundService
02cb2adb4868 First implementation for the BackgroundService.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3145
diff changeset
252 self.backgroundService = BackgroundService()
02cb2adb4868 First implementation for the BackgroundService.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3145
diff changeset
253
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
254 # 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
255 from Project.Project import Project
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
256 self.project = Project(self)
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
257
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
258 from MultiProject.MultiProject import MultiProject
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
259 self.multiProject = MultiProject(self.project, self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
260
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
261 splash.showMessage(self.tr("Initializing Plugin Manager..."))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
262
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
263 # 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
264 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
265 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
266 develPlugin=plugin)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
267
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
268 splash.showMessage(self.tr("Generating Main User Interface..."))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
269
6421
ef33cbc7cc8c UserInterface, ViewManager: made the activation of the code documentation viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6417
diff changeset
270 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
271 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
272 self.irc = None
6421
ef33cbc7cc8c UserInterface, ViewManager: made the activation of the code documentation viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6417
diff changeset
273
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
274 # 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
275 logging.debug("Creating Layout...")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
276 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
277 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
278 self.__currentBottomWidget = None
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
279
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
280 # Generate the debugger part of the ui
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
281 logging.debug("Creating Debugger UI...")
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
282 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
283 self.debuggerUI = DebugUI(self, self.viewmanager, debugServer,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
284 self.debugViewer, self.project)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
285 self.debugViewer.setDebugger(self.debuggerUI)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
286 self.shell.setDebuggerUI(self.debuggerUI)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
287
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
288 # Generate the redirection helpers
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
289 self.stdout = Redirector(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
290 self.stderr = Redirector(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
291
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
292 # 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
293 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
294 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
295 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
296 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
297 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
298 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
299 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
300 self.replaceFilesDialog = None
2190
abd65b78425e Added a notification system and updated the source documentation.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2184
diff changeset
301 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
302 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
303 self.__versionsDialog = None
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
304
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
305 # 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
306 splash.showMessage(self.tr("Setting up connections..."))
476
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
307 self.browser.sourceFile[str].connect(
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
308 self.viewmanager.openSourceFile)
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
309 self.browser.sourceFile[str, int].connect(
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
310 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
311 self.browser.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
312 self.viewmanager.openSourceFile)
476
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
313 self.browser.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
314 self.viewmanager.openSourceFile)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
315 self.browser.designerFile.connect(self.__designer)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
316 self.browser.linguistFile.connect(self.__linguist4)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
317 self.browser.projectFile.connect(self.project.openProject)
3012
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
318 self.browser.multiProjectFile.connect(
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
319 self.multiProject.openMultiProject)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
320 self.browser.pixmapEditFile.connect(self.__editPixmap)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
321 self.browser.pixmapFile.connect(self.__showPixmap)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
322 self.browser.svgFile.connect(self.__showSvg)
4651
7f3f276d3bf3 Integrated the hex editor into the eric IDE.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
323 self.browser.binaryFile.connect(self.__openHexEditor)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
324 self.browser.unittestOpen.connect(self.__unittestScript)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
325 self.browser.trpreview.connect(self.__TRPreviewer)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
326
476
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
327 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
328 self.viewmanager.openSourceFile)
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
329
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
330 self.debugViewer.sourceFile.connect(self.viewmanager.showDebugSource)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
331
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
332 self.taskViewer.displayFile.connect(self.viewmanager.openSourceFile)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
333
476
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
334 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
335 self.viewmanager.openSourceFile)
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
336 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
337 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
338 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
339 self.viewmanager.openSourceFile)
476
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
340 self.projectBrowser.psBrowser.sourceFile[str, int, str].connect(
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
341 self.viewmanager.openSourceFile)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
342 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
343 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
344 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
345 self.__unittestScript)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
346
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
347 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
348 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
349 self.viewmanager.openSourceFile)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
350 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
351 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
352 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
353 self.viewmanager.closeWindow)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
354 self.projectBrowser.pfBrowser.appendStderr.connect(self.appendToStderr)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
355
476
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
356 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
357 self.viewmanager.openSourceFile)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
358 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
359 self.viewmanager.closeWindow)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
360 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
361
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
362 self.projectBrowser.ptBrowser.linguistFile.connect(self.__linguist4)
476
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
363 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
364 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
365 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
366 self.__TRPreviewer)
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
367 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
368 self.__TRPreviewer)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
369 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
370 self.viewmanager.closeWindow)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
371 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
372 self.projectBrowser.ptBrowser.appendStderr.connect(self.appendToStderr)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
373
476
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
374 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
375 self.viewmanager.openSourceFile)
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
376 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
377 self.viewmanager.openSourceFile)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
378 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
379 self.viewmanager.closeWindow)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
380 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
381 self.projectBrowser.piBrowser.appendStderr.connect(self.appendToStderr)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
382
5968
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5913
diff changeset
383 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
384 self.viewmanager.openSourceFile)
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5913
diff changeset
385 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
386 self.viewmanager.openSourceFile)
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5913
diff changeset
387 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
388 self.viewmanager.closeWindow)
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5913
diff changeset
389 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
390 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
391
476
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 470
diff changeset
392 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
393 self.viewmanager.openSourceFile)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
394 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
395 self.viewmanager.closeWindow)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
396 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
397 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
398 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
399 self.projectBrowser.poBrowser.binaryFile.connect(self.__openHexEditor)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
400
486
e4711a55e482 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 482
diff changeset
401 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
402 self.project.designerFile.connect(self.__designer)
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
403 self.project.linguistFile.connect(self.__linguist4)
486
e4711a55e482 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 482
diff changeset
404 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
405 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
406 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
407 self.viewmanager.projectFileRenamed)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
408 self.project.lexerAssociationsChanged.connect(
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
409 self.viewmanager.projectLexerAssociationsChanged)
486
e4711a55e482 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 482
diff changeset
410 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
411 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
412 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
413 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
414 self.project.projectClosed.connect(
eccd12461319 BackgroundService: Restart of the client in different situations handled.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3515
diff changeset
415 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
416 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
417 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
418 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
419 self.project.appendStderr.connect(self.appendToStderr)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
420
3012
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
421 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
422 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
423 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
424 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
425 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
426 self.__writeCrashSession)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
427
482
4650a72c307a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 481
diff changeset
428 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
429 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
430 self.debuggerUI.resetUI.connect(self.__debuggingDone)
3012
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
431 self.debuggerUI.debuggingStarted.connect(
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
432 self.browser.handleProgramChange)
482
4650a72c307a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 481
diff changeset
433 self.debuggerUI.debuggingStarted.connect(
4650a72c307a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 481
diff changeset
434 self.debugViewer.exceptionLogger.debuggingStarted)
3012
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
435 self.debuggerUI.debuggingStarted.connect(
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
436 self.debugViewer.handleDebuggingStarted)
482
4650a72c307a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 481
diff changeset
437 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
438 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
439 self.debuggerUI.compileForms.connect(
4650a72c307a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 481
diff changeset
440 self.projectBrowser.pfBrowser.compileChangedForms)
4650a72c307a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 481
diff changeset
441 self.debuggerUI.compileResources.connect(
4650a72c307a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 481
diff changeset
442 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
443 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
444 self.debuggerUI.appendStdout.connect(self.appendToStdout)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
445
481
ad71812ba395 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 476
diff changeset
446 debugServer.passiveDebugStarted.connect(
ad71812ba395 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 476
diff changeset
447 self.debugViewer.exceptionLogger.debuggingStarted)
3012
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
448 debugServer.passiveDebugStarted.connect(
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
449 self.debugViewer.handleDebuggingStarted)
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
450 debugServer.clientException.connect(
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
451 self.debugViewer.exceptionLogger.addException)
481
ad71812ba395 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 476
diff changeset
452 debugServer.clientLine.connect(
ad71812ba395 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 476
diff changeset
453 self.debugViewer.breakpointViewer.highlightBreakpoint)
ad71812ba395 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 476
diff changeset
454 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
455 debugServer.clientProcessStderr.connect(self.appendToStderr)
3357
2390df6f42ba Started to change the file browser model such, that the sys.path entry is dependent on the running interpreter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
456 debugServer.clientInterpreterChanged.connect(
2390df6f42ba Started to change the file browser model such, that the sys.path entry is dependent on the running interpreter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
457 self.browser.handleInterpreterChanged)
3649
2456f04f60a8 Changed output of passiv debug connection (open/ close) to logviewer.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3621
diff changeset
458 debugServer.appendStdout.connect(self.appendToStdout)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
459
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
460 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
461 self.stderr.appendStderr.connect(self.appendToStderr)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
462
492
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
463 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
464 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
465 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
466 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
467 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
468 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
469 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
470 self.preferencesChanged.connect(
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
471 self.projectBrowser.handlePreferencesChanged)
492
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
472 self.preferencesChanged.connect(
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
473 self.projectBrowser.psBrowser.handlePreferencesChanged)
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
474 self.preferencesChanged.connect(
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
475 self.projectBrowser.pfBrowser.handlePreferencesChanged)
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
476 self.preferencesChanged.connect(
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
477 self.projectBrowser.prBrowser.handlePreferencesChanged)
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
478 self.preferencesChanged.connect(
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
479 self.projectBrowser.ptBrowser.handlePreferencesChanged)
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
480 self.preferencesChanged.connect(
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
481 self.projectBrowser.piBrowser.handlePreferencesChanged)
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
482 self.preferencesChanged.connect(
5968
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5913
diff changeset
483 self.projectBrowser.ppBrowser.handlePreferencesChanged)
c5112b5cb7a9 Started to add support for Google protobuf protocol files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5913
diff changeset
484 self.preferencesChanged.connect(
492
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
485 self.projectBrowser.poBrowser.handlePreferencesChanged)
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
486 self.preferencesChanged.connect(self.browser.handlePreferencesChanged)
3012
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
487 self.preferencesChanged.connect(
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
488 self.taskViewer.handlePreferencesChanged)
492
01f3384d535a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
489 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
490 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
491 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
492 self.preferencesChanged.connect(
eccd12461319 BackgroundService: Restart of the client in different situations handled.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3515
diff changeset
493 self.backgroundService.preferencesOrProjectChanged)
6421
ef33cbc7cc8c UserInterface, ViewManager: made the activation of the code documentation viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6417
diff changeset
494
6422
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
495 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
496 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
497 self.codeDocumentationViewer.preferencesChanged)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
498
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
499 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
500 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
501 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
502 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
503 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
504 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
505 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
506 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
507 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
508 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
509 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
510 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
511 self.viewmanager.editorChanged.connect(self.__writeCrashSession)
158
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 150
diff changeset
512
6118
da9e08920e7c Continued removing the use of QObject.sender().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
513 self.shell.zoomValueChanged.connect(
da9e08920e7c Continued removing the use of QObject.sender().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
514 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
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.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
517 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
518 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
519 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
520 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
521 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
522 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
523 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
524 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
525 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
526 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
527 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
528 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
529 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
530 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
531 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
532 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
533 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
534 self.cooperation.getClient())
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
535
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
536 self.symbolsViewer.insertSymbol.connect(self.viewmanager.insertSymbol)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
537
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 496
diff changeset
538 self.numbersViewer.insertNumber.connect(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
539
6422
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
540 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
541 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
542
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
543 # create the toolbar manager object
55
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 53
diff changeset
544 self.toolbarManager = E5ToolBarManager(self, self)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
545 self.toolbarManager.setMainWindow(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
546
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
547 # 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
548 splash.showMessage(self.tr("Initializing Tools..."))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
549 self.toolGroups, self.currentToolGroup = Preferences.readToolGroups()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
550 self.toolProcs = []
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
551 self.__initExternalToolsActions()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
552
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
553 # create a dummy help window for shortcuts handling
4733
ae291a307ea6 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4665
diff changeset
554 if WEBENGINE_AVAILABLE:
ae291a307ea6 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4665
diff changeset
555 from WebBrowser.WebBrowserWindow import WebBrowserWindow
ae291a307ea6 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4665
diff changeset
556 self.dummyHelpViewer = \
ae291a307ea6 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4665
diff changeset
557 WebBrowserWindow(None, '.', None, 'web_browser', True, True)
ae291a307ea6 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4665
diff changeset
558 elif WEBKIT_AVAILABLE:
4619
aa2319888257 Prepared the code for missing QtWebKit (starting from Qt 5.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4414
diff changeset
559 from Helpviewer.HelpWindow import HelpWindow
aa2319888257 Prepared the code for missing QtWebKit (starting from Qt 5.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4414
diff changeset
560 self.dummyHelpViewer = \
aa2319888257 Prepared the code for missing QtWebKit (starting from Qt 5.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4414
diff changeset
561 HelpWindow(None, '.', None, 'help viewer', True, True)
4733
ae291a307ea6 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4665
diff changeset
562 else:
ae291a307ea6 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4665
diff changeset
563 self.dummyHelpViewer = None
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
564
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
565 # redirect handling of http and https URLs to ourselves
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
566 if WEBENGINE_AVAILABLE or WEBKIT_AVAILABLE:
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
567 QDesktopServices.setUrlHandler("http", self.handleUrl)
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
568 QDesktopServices.setUrlHandler("https", self.handleUrl)
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
569
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
570 # 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
571 splash.showMessage(self.tr("Registering Objects..."))
53
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 50
diff changeset
572 e5App().registerObject("UserInterface", self)
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 50
diff changeset
573 e5App().registerObject("DebugUI", self.debuggerUI)
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 50
diff changeset
574 e5App().registerObject("DebugServer", debugServer)
3159
02cb2adb4868 First implementation for the BackgroundService.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 3145
diff changeset
575 e5App().registerObject("BackgroundService", self.backgroundService)
53
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 50
diff changeset
576 e5App().registerObject("ViewManager", self.viewmanager)
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 50
diff changeset
577 e5App().registerObject("Project", self.project)
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 50
diff changeset
578 e5App().registerObject("ProjectBrowser", self.projectBrowser)
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 50
diff changeset
579 e5App().registerObject("MultiProject", self.multiProject)
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 50
diff changeset
580 e5App().registerObject("TaskViewer", self.taskViewer)
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 50
diff changeset
581 e5App().registerObject("TemplateViewer", self.templateViewer)
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 50
diff changeset
582 e5App().registerObject("Shell", self.shell)
4733
ae291a307ea6 Continued porting the web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4665
diff changeset
583 if self.dummyHelpViewer is not None:
4619
aa2319888257 Prepared the code for missing QtWebKit (starting from Qt 5.6).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4414
diff changeset
584 e5App().registerObject("DummyHelpViewer", self.dummyHelpViewer)
53
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 50
diff changeset
585 e5App().registerObject("PluginManager", self.pluginManager)
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 50
diff changeset
586 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
587 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
588 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
589 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
590 e5App().registerObject("IRC", self.irc)
365
0686ac00256e Added a symbols viewer with capability to insert the selected symbol by double-clicking it.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 357
diff changeset
591 e5App().registerObject("Symbols", self.symbolsViewer)
372
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
592 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
593 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
594 e5App().registerObject("DocuViewer", self.codeDocumentationViewer)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
595
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
596 # 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
597 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
598 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
599 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
600
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
601 # 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
602 splash.showMessage(self.tr("Initializing Actions..."))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
603 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
604 splash.showMessage(self.tr("Initializing Menus..."))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
605 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
606 splash.showMessage(self.tr("Initializing Toolbars..."))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
607 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
608 splash.showMessage(self.tr("Initializing Statusbar..."))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
609 self.__initStatusbar()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
610
2933
ada56f070ef4 Fixed an issue in the user interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2930
diff changeset
611 # 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
612 app.focusChanged.connect(self.viewmanager.appFocusChanged)
ada56f070ef4 Fixed an issue in the user interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2930
diff changeset
613
ada56f070ef4 Fixed an issue in the user interface.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2930
diff changeset
614 # Initialize the instance variables.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
615 self.currentProg = None
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
616 self.isProg = False
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
617 self.utEditorOpen = False
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
618 self.utProjectOpen = False
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
619
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
620 self.inDragDrop = False
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
621 self.setAcceptDrops(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
622
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
623 self.currentProfile = None
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
624
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
625 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
626 self.inCloseEvent = False
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
627
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
628 # now redirect stdout and stderr
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
629 # TODO: release - reenable redirection
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
630 ## sys.stdout = self.stdout
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
631 ## sys.stderr = self.stderr
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
632
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
633 # now fire up the single application server
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
634 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
635 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
636 self.tr("Initializing Single Application Server..."))
55
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 53
diff changeset
637 self.SAServer = E5SingleApplicationServer()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
638 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
639 self.SAServer = None
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
640
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
641 # 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
642 splash.showMessage(self.tr("Initializing Plugins..."))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
643 self.pluginManager.finalizeSetup()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
644 # 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
645 splash.showMessage(self.tr("Activating Plugins..."))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
646 self.pluginManager.activatePlugins()
4079
a3319822d303 Added possibility for plug-ins to have toolbars.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4078
diff changeset
647 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
648 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
649 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
650 splash.showMessage(self.tr("Cleaning Plugins Download Area..."))
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
651 from PluginManager.PluginRepositoryDialog import \
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
652 PluginRepositoryDownloadCleanup
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
653 PluginRepositoryDownloadCleanup(quiet=True)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
654
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
655 # 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
656 from Preferences import Shortcuts
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
657 Shortcuts.readShortcuts()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
658
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
659 # 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
660 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
661 self.toolbarManager.restoreState(
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
662 Preferences.getUI("ToolbarManagerState"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
663
6422
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
664 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
665 # 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
666 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
667
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
668 # 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
669 splash.showMessage(self.tr("Setting View Profile..."))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
670 self.__setEditProfile()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
671
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
672 # 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
673 splash.showMessage(self.tr("Reading Tasks..."))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
674 self.__readTasks()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
675
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
676 # now read the saved templates
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
677 splash.showMessage(self.tr("Reading Templates..."))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
678 self.templateViewer.readTemplates()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
679
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
680 # now start the debug client
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
681 splash.showMessage(self.tr("Starting Debugger..."))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
682 debugServer.startClient(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
683
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
684 # 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
685 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
686 self.__networkManager.proxyAuthenticationRequired.connect(
286
652f5159f1c3 Prepared to have individual proxies per scheme.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 270
diff changeset
687 proxyAuthenticationRequired)
798
5c1786fad576 Fixed an issue with Qt installations that don't support SSL.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
688 if SSL_AVAILABLE:
2354
c63de4af553d Centralized the SSL error handling in E5SslErrorHandler.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2347
diff changeset
689 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
690 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
691 self.__replies = []
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
692
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
693 # attribute for the help window
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
694 self.helpWindow = None
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
695
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
696 # set spellchecker defaults
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
697 from QScintilla.SpellChecker import SpellChecker
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
698 SpellChecker.setDefaultLanguage(
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
699 Preferences.getEditor("SpellCheckingDefaultLanguage"))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
700
4216
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4197
diff changeset
701 # 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
702 # 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
703 self.__lastConfigurationPageName = ""
4216
bca19a75be32 Changed the handling of the configuration page list entries
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4197
diff changeset
704 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
705
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
706 # 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
707 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
708 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
709 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
710
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
711 def __createLayout(self, debugServer):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
712 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
713 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
714
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
715 @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
716 @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
717 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
718 # Create the view manager depending on the configuration setting
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
719 logging.debug("Creating Viewmanager...")
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
720 import ViewManager
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
721 self.viewmanager = \
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
722 ViewManager.factory(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
723 leftWidget = QWidget()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
724 layout = QVBoxLayout()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
725 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
726 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
727 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
728 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
729 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
730 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
731 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
732 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
733 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
734 self.viewmanager.replaceWidget().hide()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
735
2425
ace8a08028f3 Fixed the main window layout after the previewer change.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2424
diff changeset
736 splitter = QSplitter(Qt.Horizontal)
ace8a08028f3 Fixed the main window layout after the previewer change.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2424
diff changeset
737 splitter.addWidget(leftWidget)
ace8a08028f3 Fixed the main window layout after the previewer change.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2424
diff changeset
738 self.setCentralWidget(splitter)
ace8a08028f3 Fixed the main window layout after the previewer change.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2424
diff changeset
739
2424
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2411
diff changeset
740 # Create previewer
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2411
diff changeset
741 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
742 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
743 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
744 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
745
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
746 # Create layout with toolbox windows embedded in dock windows
4078
0e14bef0b47b Changed code in user interface because a variable covered a method.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
747 if self.layoutType == "Toolboxes":
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
748 logging.debug("Creating toolboxes...")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
749 self.__createToolboxesLayout(debugServer)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
750
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
751 # Create layout with sidebar windows embedded in dock windows
4078
0e14bef0b47b Changed code in user interface because a variable covered a method.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
752 elif self.layoutType == "Sidebars":
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
753 logging.debug("Creating sidebars...")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
754 self.__createSidebarsLayout(debugServer)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
755
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
756 else:
3012
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
757 raise ValueError("Wrong layout type given ({0})".format(
4078
0e14bef0b47b Changed code in user interface because a variable covered a method.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
758 self.layoutType))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
759 logging.debug("Created Layout")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
760
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
761 def __createToolboxesLayout(self, debugServer):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
762 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
763 Private method to create the Toolboxes layout.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
764
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
765 @param debugServer reference to the debug server object
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
766 """
2400
c1726b754f96 Started with delaying the import upon the time it is needed.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2370
diff changeset
767 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
768
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
769 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
770
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
771 # 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
772 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
773 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
774 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
775 self.lToolbox, self.tr("Left Toolbox"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
776
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
777 # Create the horizontal toolbox
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
778 self.hToolboxDock = self.__createDockWindow("hToolboxDock")
55
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 53
diff changeset
779 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
780 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
781 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
782 self.tr("Horizontal Toolbox"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
783
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
784 # 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
785 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
786 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
787 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
788 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
789
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
790 # 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
791 logging.debug("Creating Project Browser...")
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
792 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
793 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
794 self.lToolbox.addItem(self.projectBrowser,
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
795 UI.PixmapCache.getIcon("projectViewer.png"),
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
796 self.tr("Project-Viewer"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
797
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
798 # 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
799 logging.debug("Creating Multiproject Browser...")
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
800 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
801 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
802 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
803 self.lToolbox.addItem(self.multiProjectBrowser,
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
804 UI.PixmapCache.getIcon("multiProjectViewer.png"),
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
805 self.tr("Multiproject-Viewer"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
806
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
807 # Create the template 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
808 logging.debug("Creating Template Viewer...")
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
809 from Templates.TemplateViewer import TemplateViewer
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
810 self.templateViewer = TemplateViewer(None,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
811 self.viewmanager)
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
812 self.lToolbox.addItem(self.templateViewer,
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
813 UI.PixmapCache.getIcon("templateViewer.png"),
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
814 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
815
ef33cbc7cc8c UserInterface, ViewManager: made the activation of the code documentation viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6417
diff changeset
816 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
817 # 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
818 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
819 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
820 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
821 self.rToolbox.addItem(self.codeDocumentationViewer,
ef33cbc7cc8c UserInterface, ViewManager: made the activation of the code documentation viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6417
diff changeset
822 UI.PixmapCache.getIcon("codeDocuViewer.png"),
ef33cbc7cc8c UserInterface, ViewManager: made the activation of the code documentation viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6417
diff changeset
823 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
824
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
825 # Create the debug viewer maybe without the embedded shell
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
826 logging.debug("Creating Debug Viewer...")
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
827 from Debugger.DebugViewer import DebugViewer
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
828 self.debugViewer = DebugViewer(debugServer, True, self.viewmanager)
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
829 self.rToolbox.addItem(self.debugViewer,
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
830 UI.PixmapCache.getIcon("debugViewer.png"),
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
831 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
832
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
833 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
834 # 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
835 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
836 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
837 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
838 self.rToolbox.addItem(self.cooperation,
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
839 UI.PixmapCache.getIcon("cooperation.png"),
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
840 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
841
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
842 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
843 # 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
844 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
845 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
846 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
847 self.rToolbox.addItem(self.irc,
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
848 UI.PixmapCache.getIcon("irc.png"),
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
849 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
850
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
851 # 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
852 logging.debug("Creating Task Viewer...")
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
853 from Tasks.TaskViewer import TaskViewer
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
854 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
855 self.hToolbox.addItem(self.taskViewer,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
856 UI.PixmapCache.getIcon("task.png"),
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
857 self.tr("Task-Viewer"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
858
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
859 # 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
860 logging.debug("Creating Log Viewer...")
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
861 from .LogView import LogViewer
4083
4418377391bc Added a message filter to the log viewer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4079
diff changeset
862 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
863 self.hToolbox.addItem(self.logViewer,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
864 UI.PixmapCache.getIcon("logViewer.png"),
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
865 self.tr("Log-Viewer"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
866
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
867 # Create the shell
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
868 logging.debug("Creating Shell...")
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
869 from QScintilla.Shell import ShellAssembly
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
870 self.shellAssembly = \
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
871 ShellAssembly(debugServer, self.viewmanager, True)
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
872 self.shell = self.shellAssembly.shell()
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
873 self.hToolbox.insertItem(0, self.shellAssembly,
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
874 UI.PixmapCache.getIcon("shell.png"),
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
875 self.tr("Shell"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
876
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
877 # Create the file browser
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
878 logging.debug("Creating File Browser...")
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
879 from .Browser import Browser
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
880 self.browser = Browser()
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
881 self.lToolbox.addItem(self.browser,
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
882 UI.PixmapCache.getIcon("browser.png"),
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
883 self.tr("File-Browser"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
884
365
0686ac00256e Added a symbols viewer with capability to insert the selected symbol by double-clicking it.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 357
diff changeset
885 # Create the symbols 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
886 logging.debug("Creating Symbols Viewer...")
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
887 from .SymbolsWidget import SymbolsWidget
365
0686ac00256e Added a symbols viewer with capability to insert the selected symbol by double-clicking it.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 357
diff changeset
888 self.symbolsViewer = SymbolsWidget()
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
889 self.lToolbox.addItem(self.symbolsViewer,
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
890 UI.PixmapCache.getIcon("symbols.png"),
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
891 self.tr("Symbols"))
365
0686ac00256e Added a symbols viewer with capability to insert the selected symbol by double-clicking it.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 357
diff changeset
892
372
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
893 # Create the numbers 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
894 logging.debug("Creating Numbers Viewer...")
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
895 from .NumbersWidget import NumbersWidget
372
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
896 self.numbersViewer = NumbersWidget()
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
897 self.hToolbox.addItem(self.numbersViewer,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
898 UI.PixmapCache.getIcon("numbers.png"),
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
899 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
900
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
901 self.hToolbox.setCurrentIndex(0)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
902
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
903 def __createSidebarsLayout(self, debugServer):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
904 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
905 Private method to create the Sidebars layout.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
906
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
907 @param debugServer reference to the debug server object
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
908 """
2400
c1726b754f96 Started with delaying the import upon the time it is needed.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2370
diff changeset
909 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
910
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
911 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
912
2624
e04b5d53281e Introduced a configurable delay timer to get smoother sidebars behavior.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2615
diff changeset
913 delay = Preferences.getUI("SidebarDelay")
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
914 # 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
915 self.leftSidebar = E5SideBar(E5SideBar.West, delay)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
916
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
917 # 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
918 self.bottomSidebar = E5SideBar(E5SideBar.South, delay)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
919
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
920 # 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
921 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
922
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
923 # Create the project browser
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
924 logging.debug("Creating Project Browser...")
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
925 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
926 self.projectBrowser = ProjectBrowser(self.project)
3030
4a0a82ddd9d2 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
927 self.leftSidebar.addTab(
4a0a82ddd9d2 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
928 self.projectBrowser,
4a0a82ddd9d2 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
929 UI.PixmapCache.getIcon("projectViewer.png"),
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
930 self.tr("Project-Viewer"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
931
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
932 # Create the multi project browser
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
933 logging.debug("Creating Multiproject Browser...")
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
934 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
935 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
936 self.project)
3030
4a0a82ddd9d2 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
937 self.leftSidebar.addTab(
4a0a82ddd9d2 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
938 self.multiProjectBrowser,
4a0a82ddd9d2 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
939 UI.PixmapCache.getIcon("multiProjectViewer.png"),
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
940 self.tr("Multiproject-Viewer"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
941
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
942 # Create the template viewer part of the user interface
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
943 logging.debug("Creating Template Viewer...")
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
944 from Templates.TemplateViewer import TemplateViewer
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
945 self.templateViewer = TemplateViewer(None,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
946 self.viewmanager)
3030
4a0a82ddd9d2 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
947 self.leftSidebar.addTab(
4a0a82ddd9d2 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
948 self.templateViewer,
4a0a82ddd9d2 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
949 UI.PixmapCache.getIcon("templateViewer.png"),
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
950 self.tr("Template-Viewer"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
951
6421
ef33cbc7cc8c UserInterface, ViewManager: made the activation of the code documentation viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6417
diff changeset
952 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
953 # 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
954 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
955 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
956 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
957 self.rightSidebar.addTab(
ef33cbc7cc8c UserInterface, ViewManager: made the activation of the code documentation viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6417
diff changeset
958 self.codeDocumentationViewer,
ef33cbc7cc8c UserInterface, ViewManager: made the activation of the code documentation viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6417
diff changeset
959 UI.PixmapCache.getIcon("codeDocuViewer.png"),
ef33cbc7cc8c UserInterface, ViewManager: made the activation of the code documentation viewer optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6417
diff changeset
960 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
961
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
962 # Create the debug viewer maybe without the embedded shell
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
963 logging.debug("Creating Debug Viewer...")
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
964 from Debugger.DebugViewer import DebugViewer
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
965 self.debugViewer = DebugViewer(debugServer, True, self.viewmanager)
3012
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
966 self.rightSidebar.addTab(
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
967 self.debugViewer, UI.PixmapCache.getIcon("debugViewer.png"),
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
968 self.tr("Debug-Viewer"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
969
6422
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
970 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
971 # 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
972 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
973 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
974 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
975 self.rightSidebar.addTab(
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
976 self.cooperation, UI.PixmapCache.getIcon("cooperation.png"),
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
977 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
978
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
979 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
980 # 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
981 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
982 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
983 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
984 self.rightSidebar.addTab(
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
985 self.irc, UI.PixmapCache.getIcon("irc.png"),
1b8bff880c6b UserInterface: made the activation of the cooperation and IRC widgets optional.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6421
diff changeset
986 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
987
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
988 # Create the task viewer part of the user interface
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
989 logging.debug("Creating Task Viewer...")
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
990 from Tasks.TaskViewer import TaskViewer
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
991 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
992 self.bottomSidebar.addTab(self.taskViewer,
3012
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
993 UI.PixmapCache.getIcon("task.png"),
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
994 self.tr("Task-Viewer"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
995
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
996 # Create the log viewer part of the user interface
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
997 logging.debug("Creating Log Viewer...")
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
998 from .LogView import LogViewer
4083
4418377391bc Added a message filter to the log viewer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4079
diff changeset
999 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
1000 self.bottomSidebar.addTab(self.logViewer,
3012
d177226027e2 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1001 UI.PixmapCache.getIcon("logViewer.png"),
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
1002 self.tr("Log-Viewer"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1003
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
1004 # Create the shell
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
1005 logging.debug("Creating Shell...")
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
1006 from QScintilla.Shell import ShellAssembly
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
1007 self.shellAssembly = \
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
1008 ShellAssembly(debugServer, self.viewmanager, True)
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
1009 self.shell = self.shellAssembly.shell()
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
1010 self.bottomSidebar.insertTab(0, self.shellAssembly,
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
1011 UI.PixmapCache.getIcon("shell.png"),
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
1012 self.tr("Shell"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1013
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
1014 # Create the file browser
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
1015 logging.debug("Creating File Browser...")
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
1016 from .Browser import Browser
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
1017 self.browser = Browser()
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
1018 self.leftSidebar.addTab(self.browser,
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
1019 UI.PixmapCache.getIcon("browser.png"),
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
1020 self.tr("File-Browser"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1021
365
0686ac00256e Added a symbols viewer with capability to insert the selected symbol by double-clicking it.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 357
diff changeset
1022 # Create the symbols viewer
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
1023 logging.debug("Creating Symbols Viewer...")
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
1024 from .SymbolsWidget import SymbolsWidget
365
0686ac00256e Added a symbols viewer with capability to insert the selected symbol by double-clicking it.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 357
diff changeset
1025 self.symbolsViewer = SymbolsWidget()
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
1026 self.leftSidebar.addTab(self.symbolsViewer,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
1027 UI.PixmapCache.getIcon("symbols.png"),
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
1028 self.tr("Symbols"))
365
0686ac00256e Added a symbols viewer with capability to insert the selected symbol by double-clicking it.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 357
diff changeset
1029
372
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
1030 # Create the numbers viewer
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
1031 logging.debug("Creating Numbers Viewer...")
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
1032 from .NumbersWidget import NumbersWidget
372
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
1033 self.numbersViewer = NumbersWidget()
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
1034 self.bottomSidebar.addTab(self.numbersViewer,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 934
diff changeset
1035 UI.PixmapCache.getIcon("numbers.png"),
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
1036 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
1037
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1038 self.bottomSidebar.setCurrentIndex(0)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1039
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1040 # create the central widget
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1041 logging.debug("Creating central widget...")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1042 cw = self.centralWidget() # save the current central widget
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
1043 self.leftSplitter = QSplitter(Qt.Horizontal)
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
1044 self.rightSplitter = QSplitter(Qt.Horizontal)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1045 self.verticalSplitter = QSplitter(Qt.Vertical)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1046 self.verticalSplitter.addWidget(cw)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1047 self.verticalSplitter.addWidget(self.bottomSidebar)
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
1048 self.rightSplitter.addWidget(self.verticalSplitter)
fc3210851b07 Changed the layout of the