ViewManager/ViewManager.py

Sun, 06 Mar 2016 13:42:29 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 06 Mar 2016 13:42:29 +0100
changeset 4814
0e3903a7480d
parent 4636
7e57528c43a0
child 4876
686e69aecdb5
permissions
-rw-r--r--

Synchronized the Complete menus of the global Edit menu and the editor context menu.

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
4631
5c1a96925da4 Updated copyright for 2016.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4486
diff changeset
3 # Copyright (c) 2002 - 2016 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 viewmanager base class.
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: 2484
diff changeset
11
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
12 import os
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
13
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
14 from PyQt5.QtCore import pyqtSignal, QSignalMapper, QTimer, \
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
15 QFileInfo, QRegExp, QObject, Qt, QCoreApplication
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
16 from PyQt5.QtGui import QColor, QKeySequence, QPalette, QPixmap
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
17 from PyQt5.QtWidgets import QLineEdit, QToolBar, QWidgetAction, QDialog, \
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
18 QApplication, QMenu, QComboBox
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
19 from PyQt5.Qsci import QsciScintilla
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
20
55
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 53
diff changeset
21 from E5Gui.E5Application import e5App
549
fe99d46d56c8 Continued replacing QMessageBox.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 548
diff changeset
22 from E5Gui import E5FileDialog, E5MessageBox
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
23
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
24 from Globals import recentNameFiles, isMacPlatform
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
25
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
26 import Preferences
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
27
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
28 from QScintilla.Editor import Editor
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
29
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
30 import Utilities
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
31
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
32 import UI.PixmapCache
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
33 import UI.Config
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
34
55
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 53
diff changeset
35 from E5Gui.E5Action import E5Action, createActionGroup
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
36
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
37
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
38 class QuickSearchLineEdit(QLineEdit):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
39 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
40 Class implementing a line edit that reacts to newline and cancel commands.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
41
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
42 @signal escPressed() emitted after the cancel command was activated
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
43 @signal returnPressed() emitted after a newline command was activated
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
44 @signal gotFocus() emitted when the focus is changed to this widget
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
45 """
482
4650a72c307a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 478
diff changeset
46 escPressed = pyqtSignal()
4650a72c307a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 478
diff changeset
47 gotFocus = pyqtSignal()
4650a72c307a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 478
diff changeset
48
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
49 def editorCommand(self, cmd):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
50 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
51 Public method to perform an editor command.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
52
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
53 @param cmd the scintilla command to be performed
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
54 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
55 if cmd == QsciScintilla.SCI_NEWLINE:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
56 cb = self.parent()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
57 hasEntry = cb.findText(self.text()) != -1
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
58 if not hasEntry:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
59 if cb.insertPolicy() == QComboBox.InsertAtTop:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
60 cb.insertItem(0, self.text())
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
61 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
62 cb.addItem(self.text())
482
4650a72c307a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 478
diff changeset
63 self.returnPressed.emit()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
64 elif cmd == QsciScintilla.SCI_CANCEL:
482
4650a72c307a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 478
diff changeset
65 self.escPressed.emit()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
66
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
67 def keyPressEvent(self, evt):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
68 """
3591
2f2a4a76dd22 Corrected a bunch of source docu issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3547
diff changeset
69 Protected method to handle the press of the ESC key.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
70
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
71 @param evt key event (QKeyPressEvent)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
72 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
73 if evt.key() == Qt.Key_Escape:
482
4650a72c307a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 478
diff changeset
74 self.escPressed.emit()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
75 else:
2525
8b507a9a2d40 Script changes: Future import added, super calls modified and unicode behavior for str.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2484
diff changeset
76 super(QuickSearchLineEdit, self).keyPressEvent(evt) # pass it on
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
77
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
78 def focusInEvent(self, evt):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
79 """
3591
2f2a4a76dd22 Corrected a bunch of source docu issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3547
diff changeset
80 Protected method to record the current editor widget.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
81
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
82 @param evt focus event (QFocusEvent)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
83 """
482
4650a72c307a Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 478
diff changeset
84 self.gotFocus.emit()
2525
8b507a9a2d40 Script changes: Future import added, super calls modified and unicode behavior for str.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2484
diff changeset
85 super(QuickSearchLineEdit, self).focusInEvent(evt) # pass it on
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
86
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
87
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
88 class ViewManager(QObject):
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 Base class inherited by all specific viewmanager classes.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
91
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
92 It defines the interface to be implemented by specific
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
93 viewmanager classes and all common methods.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
94
2424
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2415
diff changeset
95 @signal changeCaption(str) emitted if a change of the caption is necessary
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2415
diff changeset
96 @signal editorChanged(str) emitted when the current editor has changed
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2415
diff changeset
97 @signal editorChangedEd(Editor) emitted when the current editor has changed
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
98 @signal lastEditorClosed() emitted after the last editor window was closed
501
5c615a85241a Finished porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 500
diff changeset
99 @signal editorOpened(str) emitted after an editor window was opened
5c615a85241a Finished porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 500
diff changeset
100 @signal editorOpenedEd(Editor) emitted after an editor window was opened
5c615a85241a Finished porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 500
diff changeset
101 @signal editorClosed(str) emitted just before an editor window gets closed
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
102 @signal editorClosedEd(Editor) emitted just before an editor window gets
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
103 closed
4025
ffc69fe3a61d Added three new signals to the viewmanager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
104 @signal editorRenamed(str) emitted after an editor was renamed
ffc69fe3a61d Added three new signals to the viewmanager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
105 @signal editorRenamedEd(Editor) emitted after an editor was renamed
501
5c615a85241a Finished porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 500
diff changeset
106 @signal editorSaved(str) emitted after an editor window was saved
4025
ffc69fe3a61d Added three new signals to the viewmanager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
107 @signal editorSavedEd(Editor) emitted after an editor window was saved
501
5c615a85241a Finished porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 500
diff changeset
108 @signal checkActions(Editor) emitted when some actions should be checked
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
109 for their status
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
110 @signal cursorChanged(Editor) emitted after the cursor position of the
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
111 active window has changed
2424
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2415
diff changeset
112 @signal breakpointToggled(Editor) emitted when a breakpoint is toggled
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2415
diff changeset
113 @signal bookmarkToggled(Editor) emitted when a bookmark is toggled
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2415
diff changeset
114 @signal syntaxerrorToggled(Editor) emitted when a syntax error is toggled
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
115 @signal previewStateChanged(bool) emitted to signal a change in the
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
116 preview state
2424
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2415
diff changeset
117 @signal editorLanguageChanged(Editor) emitted to signal a change of an
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
118 editor's language
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
119 @signal editorTextChanged(Editor) emitted to signal a change of an
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
120 editor's text
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
121 @signal editorLineChanged(str,int) emitted to signal a change of an
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
122 editor's current line (line is given one based)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
123 """
2424
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2415
diff changeset
124 changeCaption = pyqtSignal(str)
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2415
diff changeset
125 editorChanged = pyqtSignal(str)
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2415
diff changeset
126 editorChangedEd = pyqtSignal(Editor)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
127 lastEditorClosed = pyqtSignal()
486
e4711a55e482 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 482
diff changeset
128 editorOpened = pyqtSignal(str)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
129 editorOpenedEd = pyqtSignal(Editor)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
130 editorClosed = pyqtSignal(str)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
131 editorClosedEd = pyqtSignal(Editor)
4025
ffc69fe3a61d Added three new signals to the viewmanager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
132 editorRenamed = pyqtSignal(str)
ffc69fe3a61d Added three new signals to the viewmanager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
133 editorRenamedEd = pyqtSignal(Editor)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
134 editorSaved = pyqtSignal(str)
4025
ffc69fe3a61d Added three new signals to the viewmanager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
135 editorSavedEd = pyqtSignal(Editor)
486
e4711a55e482 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 482
diff changeset
136 checkActions = pyqtSignal(Editor)
e4711a55e482 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 482
diff changeset
137 cursorChanged = pyqtSignal(Editor)
e4711a55e482 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 482
diff changeset
138 breakpointToggled = pyqtSignal(Editor)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
139 bookmarkToggled = pyqtSignal(Editor)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
140 syntaxerrorToggled = pyqtSignal(Editor)
2424
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2415
diff changeset
141 previewStateChanged = pyqtSignal(bool)
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2415
diff changeset
142 editorLanguageChanged = pyqtSignal(Editor)
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2415
diff changeset
143 editorTextChanged = pyqtSignal(Editor)
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: 2673
diff changeset
144 editorLineChanged = pyqtSignal(str, int)
486
e4711a55e482 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 482
diff changeset
145
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
146 def __init__(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
147 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
148 Constructor
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
149 """
2525
8b507a9a2d40 Script changes: Future import added, super calls modified and unicode behavior for str.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2484
diff changeset
150 super(ViewManager, self).__init__()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
151
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
152 # initialize the instance variables
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
153 self.editors = []
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
154 self.currentEditor = None
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
155 self.untitledCount = 0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
156 self.srHistory = {
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
157 "search": [],
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
158 "replace": []
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
159 }
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
160 self.editorsCheckFocusIn = True
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
161
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
162 self.recent = []
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
163 self.__loadRecent()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
164
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
165 self.bookmarked = []
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
166 bs = Preferences.Prefs.settings.value("Bookmarked/Sources")
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
167 if bs is not None:
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
168 self.bookmarked = bs
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
169
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
170 # initialize the autosave timer
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
171 self.autosaveInterval = Preferences.getEditor("AutosaveInterval")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
172 self.autosaveTimer = QTimer(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
173 self.autosaveTimer.setObjectName("AutosaveTimer")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
174 self.autosaveTimer.setSingleShot(True)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
175 self.autosaveTimer.timeout.connect(self.__autosave)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
176
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
177 # initialize the APIs manager
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
178 from QScintilla.APIsManager import APIsManager
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
179 self.apisManager = APIsManager(parent=self)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
180
155
375e3c884874 Added code to transmit selections to remote editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 128
diff changeset
181 self.__cooperationClient = None
375e3c884874 Added code to transmit selections to remote editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 128
diff changeset
182
365
0686ac00256e Added a symbols viewer with capability to insert the selected symbol by double-clicking it.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 335
diff changeset
183 self.__lastFocusWidget = None
0686ac00256e Added a symbols viewer with capability to insert the selected symbol by double-clicking it.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 335
diff changeset
184
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
185 def setReferences(self, ui, dbs):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
186 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
187 Public method to set some references needed later on.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
188
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
189 @param ui reference to the main user interface
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
190 @param dbs reference to the debug server object
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
191 """
2400
c1726b754f96 Started with delaying the import upon the time it is needed.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2391
diff changeset
192 from QScintilla.SearchReplaceWidget import SearchReplaceSlidingWidget
c1726b754f96 Started with delaying the import upon the time it is needed.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2391
diff changeset
193
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
194 self.ui = ui
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
195 self.dbs = dbs
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
196
2362
68a92d01c1cc Made the search and replace widgets scrollable (customisation for smaller screens).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2351
diff changeset
197 self.__searchWidget = SearchReplaceSlidingWidget(False, self, ui)
68a92d01c1cc Made the search and replace widgets scrollable (customisation for smaller screens).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2351
diff changeset
198 self.__replaceWidget = SearchReplaceSlidingWidget(True, self, ui)
68a92d01c1cc Made the search and replace widgets scrollable (customisation for smaller screens).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2351
diff changeset
199
68a92d01c1cc Made the search and replace widgets scrollable (customisation for smaller screens).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2351
diff changeset
200 self.checkActions.connect(self.__searchWidget.updateSelectionCheckBox)
68a92d01c1cc Made the search and replace widgets scrollable (customisation for smaller screens).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2351
diff changeset
201 self.checkActions.connect(self.__replaceWidget.updateSelectionCheckBox)
68a92d01c1cc Made the search and replace widgets scrollable (customisation for smaller screens).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2351
diff changeset
202
68a92d01c1cc Made the search and replace widgets scrollable (customisation for smaller screens).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2351
diff changeset
203 def searchWidget(self):
68a92d01c1cc Made the search and replace widgets scrollable (customisation for smaller screens).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2351
diff changeset
204 """
68a92d01c1cc Made the search and replace widgets scrollable (customisation for smaller screens).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2351
diff changeset
205 Public method to get a reference to the search widget.
68a92d01c1cc Made the search and replace widgets scrollable (customisation for smaller screens).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2351
diff changeset
206
68a92d01c1cc Made the search and replace widgets scrollable (customisation for smaller screens).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2351
diff changeset
207 @return reference to the search widget (SearchReplaceSlidingWidget)
68a92d01c1cc Made the search and replace widgets scrollable (customisation for smaller screens).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2351
diff changeset
208 """
68a92d01c1cc Made the search and replace widgets scrollable (customisation for smaller screens).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2351
diff changeset
209 return self.__searchWidget
68a92d01c1cc Made the search and replace widgets scrollable (customisation for smaller screens).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2351
diff changeset
210
68a92d01c1cc Made the search and replace widgets scrollable (customisation for smaller screens).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2351
diff changeset
211 def replaceWidget(self):
68a92d01c1cc Made the search and replace widgets scrollable (customisation for smaller screens).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2351
diff changeset
212 """
68a92d01c1cc Made the search and replace widgets scrollable (customisation for smaller screens).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2351
diff changeset
213 Public method to get a reference to the replace widget.
68a92d01c1cc Made the search and replace widgets scrollable (customisation for smaller screens).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2351
diff changeset
214
68a92d01c1cc Made the search and replace widgets scrollable (customisation for smaller screens).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2351
diff changeset
215 @return reference to the replace widget (SearchReplaceSlidingWidget)
68a92d01c1cc Made the search and replace widgets scrollable (customisation for smaller screens).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2351
diff changeset
216 """
68a92d01c1cc Made the search and replace widgets scrollable (customisation for smaller screens).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2351
diff changeset
217 return self.__replaceWidget
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
218
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
219 def __loadRecent(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
220 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
221 Private method to load the recently opened filenames.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
222 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
223 self.recent = []
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
224 Preferences.Prefs.rsettings.sync()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
225 rs = Preferences.Prefs.rsettings.value(recentNameFiles)
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
226 if rs is not None:
12
1d8dd9706f46 First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7
diff changeset
227 for f in Preferences.toList(rs):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
228 if QFileInfo(f).exists():
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
229 self.recent.append(f)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
230
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
231 def __saveRecent(self):
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 Private method to save the list of recently opened filenames.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
234 """
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
235 Preferences.Prefs.rsettings.setValue(recentNameFiles, self.recent)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
236 Preferences.Prefs.rsettings.sync()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
237
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
238 def getMostRecent(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
239 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
240 Public method to get the most recently opened file.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
241
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
242 @return path of the most recently opened file (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
243 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
244 if len(self.recent):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
245 return self.recent[0]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
246 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
247 return None
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
248
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
249 def setSbInfo(self, sbLine, sbPos, sbWritable, sbEncoding, sbLanguage,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
250 sbEol, sbZoom):
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
251 """
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
252 Public method to transfer statusbar info from the user interface to
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
253 viewmanager.
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
254
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3031
diff changeset
255 @param sbLine reference to the line number part of the statusbar
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
256 (QLabel)
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
257 @param sbPos reference to the character position part of the statusbar
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
258 (QLabel)
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
259 @param sbWritable reference to the writability indicator part of
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
260 the statusbar (QLabel)
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
261 @param sbEncoding reference to the encoding indicator part of the
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
262 statusbar (QLabel)
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
263 @param sbLanguage reference to the language indicator part of the
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
264 statusbar (QLabel)
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
265 @param sbEol reference to the eol indicator part of the statusbar
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
266 (QLabel)
2334
fc69ad77e18a Introduced a zoom widget in the status bar of several windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2331
diff changeset
267 @param sbZoom reference to the zoom widget (E5ZoomWidget)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
268 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
269 self.sbLine = sbLine
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
270 self.sbPos = sbPos
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
271 self.sbWritable = sbWritable
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
272 self.sbEnc = sbEncoding
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
273 self.sbLang = sbLanguage
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
274 self.sbEol = sbEol
2334
fc69ad77e18a Introduced a zoom widget in the status bar of several windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2331
diff changeset
275 self.sbZoom = sbZoom
3346
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
276 self.sbZoom.valueChanged.connect(self.__zoomTo)
2334
fc69ad77e18a Introduced a zoom widget in the status bar of several windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2331
diff changeset
277 self.__setSbFile(zoom=0)
3321
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3261
diff changeset
278
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3261
diff changeset
279 self.sbLang.clicked.connect(self.__showLanguagesMenu)
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3261
diff changeset
280 self.sbEol.clicked.connect(self.__showEolMenu)
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3261
diff changeset
281 self.sbEnc.clicked.connect(self.__showEncodingsMenu)
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3261
diff changeset
282
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3261
diff changeset
283 ##################################################################
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3261
diff changeset
284 ## Below are menu handling methods for status bar labels
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3261
diff changeset
285 ##################################################################
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3261
diff changeset
286
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3261
diff changeset
287 def __showLanguagesMenu(self, pos):
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3261
diff changeset
288 """
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3261
diff changeset
289 Private slot to show the Languages menu of the current editor.
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3261
diff changeset
290
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3261
diff changeset
291 @param pos position the menu should be shown at (QPoint)
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3261
diff changeset
292 """
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3261
diff changeset
293 aw = self.activeWindow()
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3261
diff changeset
294 if aw is not None:
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3261
diff changeset
295 menu = aw.getMenu("Languages")
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3261
diff changeset
296 if menu is not None:
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3261
diff changeset
297 menu.exec_(pos)
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3261
diff changeset
298
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3261
diff changeset
299 def __showEolMenu(self, pos):
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3261
diff changeset
300 """
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3261
diff changeset
301 Private slot to show the EOL menu of the current editor.
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3261
diff changeset
302
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3261
diff changeset
303 @param pos position the menu should be shown at (QPoint)
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3261
diff changeset
304 """
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3261
diff changeset
305 aw = self.activeWindow()
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3261
diff changeset
306 if aw is not None:
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3261
diff changeset
307 menu = aw.getMenu("Eol")
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3261
diff changeset
308 if menu is not None:
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3261
diff changeset
309 menu.exec_(pos)
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3261
diff changeset
310
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3261
diff changeset
311 def __showEncodingsMenu(self, pos):
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3261
diff changeset
312 """
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3261
diff changeset
313 Private slot to show the Encodings menu of the current editor.
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3261
diff changeset
314
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3261
diff changeset
315 @param pos position the menu should be shown at (QPoint)
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3261
diff changeset
316 """
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3261
diff changeset
317 aw = self.activeWindow()
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3261
diff changeset
318 if aw is not None:
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3261
diff changeset
319 menu = aw.getMenu("Encodings")
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3261
diff changeset
320 if menu is not None:
ad3a75d3d870 Added the encodings, eol and language menus to the respective status bar entries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3261
diff changeset
321 menu.exec_(pos)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
322
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
323 ###########################################################################
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
324 ## methods below need to be implemented by a subclass
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
325 ###########################################################################
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
326
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
327 def canCascade(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
328 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
329 Public method to signal if cascading of managed windows is available.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
330
2965
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2886
diff changeset
331 @ireturn flag indicating cascading of windows is available
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
332 @exception RuntimeError Not implemented
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
333 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
334 raise RuntimeError('Not implemented')
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
335
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
336 def canTile(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
337 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
338 Public method to signal if tiling of managed windows is available.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
339
2965
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2886
diff changeset
340 @ireturn flag indicating tiling of windows is available
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
341 @exception RuntimeError Not implemented
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
342 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
343 raise RuntimeError('Not implemented')
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
344
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
345 def tile(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
346 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
347 Public method to tile the managed windows.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
348
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
349 @exception RuntimeError Not implemented
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
350 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
351 raise RuntimeError('Not implemented')
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
352
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
353 def cascade(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
354 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
355 Public method to cascade the managed windows.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
356
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
357 @exception RuntimeError Not implemented
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
358 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
359 raise RuntimeError('Not implemented')
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
360
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
361 def activeWindow(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
362 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
363 Public method to return the active (i.e. current) window.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
364
2965
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2886
diff changeset
365 @ireturn reference to the active editor
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
366 @exception RuntimeError Not implemented
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
367 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
368 raise RuntimeError('Not implemented')
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
369
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
370 def _removeAllViews(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
371 """
2965
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2886
diff changeset
372 Protected method to remove all views (i.e. windows).
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
373
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
374 @exception RuntimeError Not implemented
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
375 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
376 raise RuntimeError('Not implemented')
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
377
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
378 def _removeView(self, win):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
379 """
2965
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2886
diff changeset
380 Protected method to remove a view (i.e. window).
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
381
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
382 @param win editor window to be removed
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
383 @exception RuntimeError Not implemented
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
384 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
385 raise RuntimeError('Not implemented')
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
386
4298
4e7a0e2c20fc Extended the viewmanager interface to allow to open a new editor next to the current one.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4186
diff changeset
387 def _addView(self, win, fn=None, noName="", next=False):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
388 """
2965
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2886
diff changeset
389 Protected method to add a view (i.e. window).
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
390
1416
c547d0b2e9c6 Fixed a few issues related to the new editor assembly and to drag&drop of tabs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1358
diff changeset
391 @param win editor assembly to be added
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
392 @param fn filename of this editor
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
393 @param noName name to be used for an unnamed editor (string)
4298
4e7a0e2c20fc Extended the viewmanager interface to allow to open a new editor next to the current one.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4186
diff changeset
394 @param next flag indicating to add the view next to the current
4e7a0e2c20fc Extended the viewmanager interface to allow to open a new editor next to the current one.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4186
diff changeset
395 view (bool)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
396 @exception RuntimeError Not implemented
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
397 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
398 raise RuntimeError('Not implemented')
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
399
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
400 def _showView(self, win, fn=None):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
401 """
2965
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2886
diff changeset
402 Protected method to show a view (i.e. window).
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
403
1419
e200f9084c5d Fixed a few more editor assembly related issues and made 'listspace' the default view manager for Mac.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1416
diff changeset
404 @param win editor assembly to be shown
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
405 @param fn filename of this editor
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
406 @exception RuntimeError Not implemented
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
407 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
408 raise RuntimeError('Not implemented')
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
409
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
410 def showWindowMenu(self, windowMenu):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
411 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
412 Public method to set up the viewmanager part of the Window menu.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
413
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
414 @param windowMenu reference to the window menu
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
415 @exception RuntimeError Not implemented
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
416 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
417 raise RuntimeError('Not implemented')
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
418
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
419 def _initWindowActions(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
420 """
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
421 Protected method to define the user interface actions for window
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
422 handling.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
423
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
424 @exception RuntimeError Not implemented
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
425 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
426 raise RuntimeError('Not implemented')
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
427
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
428 def setEditorName(self, editor, newName):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
429 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
430 Public method to change the displayed name of the editor.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
431
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
432 @param editor editor window to be changed
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
433 @param newName new name to be shown (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
434 @exception RuntimeError Not implemented
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
435 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
436 raise RuntimeError('Not implemented')
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
437
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
438 def _modificationStatusChanged(self, m, editor):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
439 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
440 Protected slot to handle the modificationStatusChanged signal.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
441
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
442 @param m flag indicating the modification status (boolean)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
443 @param editor editor window changed
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
444 @exception RuntimeError Not implemented
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
445 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
446 raise RuntimeError('Not implemented')
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
447
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
448 #####################################################################
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
449 ## methods above need to be implemented by a subclass
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
450 #####################################################################
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
451
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
452 def canSplit(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
453 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
454 Public method to signal if splitting of the view is available.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
455
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
456 @return flag indicating splitting of the view is available.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
457 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
458 return False
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
459
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
460 def addSplit(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
461 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
462 Public method used to split the current view.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
463 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
464 pass
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
465
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
466 def removeSplit(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
467 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
468 Public method used to remove the current split view.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
469
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
470 @return Flag indicating successful deletion
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
471 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
472 return False
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
473
3100
1c86bf655433 Added icons to the editor context menu 'New View' entries and gave them better titles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3069
diff changeset
474 def getSplitOrientation(self):
1c86bf655433 Added icons to the editor context menu 'New View' entries and gave them better titles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3069
diff changeset
475 """
1c86bf655433 Added icons to the editor context menu 'New View' entries and gave them better titles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3069
diff changeset
476 Public method to get the orientation of the split view.
1c86bf655433 Added icons to the editor context menu 'New View' entries and gave them better titles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3069
diff changeset
477
1c86bf655433 Added icons to the editor context menu 'New View' entries and gave them better titles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3069
diff changeset
478 @return orientation of the split (Qt.Horizontal or Qt.Vertical)
1c86bf655433 Added icons to the editor context menu 'New View' entries and gave them better titles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3069
diff changeset
479 """
1c86bf655433 Added icons to the editor context menu 'New View' entries and gave them better titles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3069
diff changeset
480 return Qt.Vertical
1c86bf655433 Added icons to the editor context menu 'New View' entries and gave them better titles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3069
diff changeset
481
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
482 def setSplitOrientation(self, orientation):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
483 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
484 Public method used to set the orientation of the split view.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
485
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
486 @param orientation orientation of the split
3100
1c86bf655433 Added icons to the editor context menu 'New View' entries and gave them better titles.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3069
diff changeset
487 (Qt.Horizontal or Qt.Vertical)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
488 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
489 pass
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
490
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
491 def nextSplit(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
492 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
493 Public slot used to move to the next split.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
494 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
495 pass
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
496
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
497 def prevSplit(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
498 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
499 Public slot used to move to the previous split.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
500 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
501 pass
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
502
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
503 def eventFilter(self, object, event):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
504 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
505 Public method called to filter an event.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
506
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
507 @param object object, that generated the event (QObject)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
508 @param event the event, that was generated by object (QEvent)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
509 @return flag indicating if event was filtered out
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
510 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
511 return False
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
512
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
513 #####################################################################
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
514 ## methods above need to be implemented by a subclass, that supports
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
515 ## splitting of the viewmanager area.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
516 #####################################################################
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
517
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
518 def initActions(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
519 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
520 Public method defining the user interface actions.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
521 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
522 # list containing all edit actions
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
523 self.editActions = []
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
524
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
525 # list containing all file actions
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
526 self.fileActions = []
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
527
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
528 # list containing all search actions
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
529 self.searchActions = []
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
530
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
531 # list containing all view actions
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
532 self.viewActions = []
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
533
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
534 # list containing all window actions
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
535 self.windowActions = []
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
536
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
537 # list containing all macro actions
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
538 self.macroActions = []
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
539
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
540 # list containing all bookmark actions
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
541 self.bookmarkActions = []
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
542
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
543 # list containing all spell checking actions
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
544 self.spellingActions = []
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
545
12
1d8dd9706f46 First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7
diff changeset
546 self.__actions = {
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
547 "bookmark": self.bookmarkActions,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
548 "edit": self.editActions,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
549 "file": self.fileActions,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
550 "macro": self.macroActions,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
551 "search": self.searchActions,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
552 "spelling": self.spellingActions,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
553 "view": self.viewActions,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
554 "window": self.windowActions,
12
1d8dd9706f46 First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7
diff changeset
555 }
1d8dd9706f46 First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7
diff changeset
556
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
557 self._initWindowActions()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
558 self.__initFileActions()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
559 self.__initEditActions()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
560 self.__initSearchActions()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
561 self.__initViewActions()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
562 self.__initMacroActions()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
563 self.__initBookmarkActions()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
564 self.__initSpellingActions()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
565
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
566 ##################################################################
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
567 ## Initialize the file related actions, file menu and toolbar
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
568 ##################################################################
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
569
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
570 def __initFileActions(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
571 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
572 Private method defining the user interface actions for file handling.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
573 """
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
574 self.newAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
575 QCoreApplication.translate('ViewManager', 'New'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
576 UI.PixmapCache.getIcon("new.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
577 QCoreApplication.translate('ViewManager', '&New'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
578 QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
579 QCoreApplication.translate('ViewManager', "Ctrl+N",
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
580 "File|New")),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
581 0, self, 'vm_file_new')
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 559
diff changeset
582 self.newAct.setStatusTip(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
583 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
584 'ViewManager', 'Open an empty editor window'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
585 self.newAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
586 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
587 """<b>New</b>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
588 """<p>An empty editor window will be created.</p>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
589 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
590 self.newAct.triggered.connect(self.newEditor)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
591 self.fileActions.append(self.newAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
592
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
593 self.openAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
594 QCoreApplication.translate('ViewManager', 'Open'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
595 UI.PixmapCache.getIcon("open.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
596 QCoreApplication.translate('ViewManager', '&Open...'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
597 QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
598 QCoreApplication.translate('ViewManager', "Ctrl+O",
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
599 "File|Open")),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
600 0, self, 'vm_file_open')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
601 self.openAct.setStatusTip(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
602 'ViewManager', 'Open a file'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
603 self.openAct.setWhatsThis(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
604 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
605 """<b>Open a file</b>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
606 """<p>You will be asked for the name of a file to be opened"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
607 """ in an editor window.</p>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
608 ))
3346
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
609 self.openAct.triggered.connect(self.__openFiles)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
610 self.fileActions.append(self.openAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
611
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
612 self.closeActGrp = createActionGroup(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
613
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
614 self.closeAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
615 QCoreApplication.translate('ViewManager', 'Close'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
616 UI.PixmapCache.getIcon("close.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
617 QCoreApplication.translate('ViewManager', '&Close'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
618 QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
619 QCoreApplication.translate('ViewManager', "Ctrl+W",
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
620 "File|Close")),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
621 0, self.closeActGrp, 'vm_file_close')
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 559
diff changeset
622 self.closeAct.setStatusTip(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
623 QCoreApplication.translate('ViewManager',
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
624 'Close the current window'))
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
625 self.closeAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
626 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
627 """<b>Close Window</b>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
628 """<p>Close the current window.</p>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
629 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
630 self.closeAct.triggered.connect(self.closeCurrentWindow)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
631 self.fileActions.append(self.closeAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
632
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
633 self.closeAllAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
634 QCoreApplication.translate('ViewManager', 'Close All'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
635 QCoreApplication.translate('ViewManager', 'Clos&e All'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
636 0, 0, self.closeActGrp, 'vm_file_close_all')
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 559
diff changeset
637 self.closeAllAct.setStatusTip(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
638 QCoreApplication.translate('ViewManager',
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
639 'Close all editor windows'))
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
640 self.closeAllAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
641 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
642 """<b>Close All Windows</b>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
643 """<p>Close all editor windows.</p>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
644 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
645 self.closeAllAct.triggered.connect(self.closeAllWindows)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
646 self.fileActions.append(self.closeAllAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
647
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
648 self.closeActGrp.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
649
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
650 self.saveActGrp = createActionGroup(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
651
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
652 self.saveAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
653 QCoreApplication.translate('ViewManager', 'Save'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
654 UI.PixmapCache.getIcon("fileSave.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
655 QCoreApplication.translate('ViewManager', '&Save'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
656 QKeySequence(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
657 'ViewManager', "Ctrl+S", "File|Save")),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
658 0, self.saveActGrp, 'vm_file_save')
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 559
diff changeset
659 self.saveAct.setStatusTip(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
660 QCoreApplication.translate('ViewManager', 'Save the current file'))
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
661 self.saveAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
662 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
663 """<b>Save File</b>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
664 """<p>Save the contents of current editor window.</p>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
665 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
666 self.saveAct.triggered.connect(self.saveCurrentEditor)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
667 self.fileActions.append(self.saveAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
668
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
669 self.saveAsAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
670 QCoreApplication.translate('ViewManager', 'Save as'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
671 UI.PixmapCache.getIcon("fileSaveAs.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
672 QCoreApplication.translate('ViewManager', 'Save &as...'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
673 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
674 'ViewManager', "Shift+Ctrl+S", "File|Save As")),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
675 0, self.saveActGrp, 'vm_file_save_as')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
676 self.saveAsAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
677 'ViewManager', 'Save the current file to a new one'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
678 self.saveAsAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
679 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
680 """<b>Save File as</b>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
681 """<p>Save the contents of current editor window to a new file."""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
682 """ The file can be entered in a file selection dialog.</p>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
683 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
684 self.saveAsAct.triggered.connect(self.saveAsCurrentEditor)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
685 self.fileActions.append(self.saveAsAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
686
4402
ad524553e765 Added capability to save a copy of the editor contents.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4298
diff changeset
687 self.saveCopyAct = E5Action(
ad524553e765 Added capability to save a copy of the editor contents.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4298
diff changeset
688 QCoreApplication.translate('ViewManager', 'Save Copy'),
ad524553e765 Added capability to save a copy of the editor contents.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4298
diff changeset
689 UI.PixmapCache.getIcon("fileSaveCopy.png"),
ad524553e765 Added capability to save a copy of the editor contents.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4298
diff changeset
690 QCoreApplication.translate('ViewManager', 'Save &Copy...'),
ad524553e765 Added capability to save a copy of the editor contents.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4298
diff changeset
691 0, 0, self.saveActGrp, 'vm_file_save_copy')
ad524553e765 Added capability to save a copy of the editor contents.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4298
diff changeset
692 self.saveCopyAct.setStatusTip(QCoreApplication.translate(
ad524553e765 Added capability to save a copy of the editor contents.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4298
diff changeset
693 'ViewManager', 'Save a copy of the current file'))
ad524553e765 Added capability to save a copy of the editor contents.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4298
diff changeset
694 self.saveCopyAct.setWhatsThis(QCoreApplication.translate(
ad524553e765 Added capability to save a copy of the editor contents.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4298
diff changeset
695 'ViewManager',
ad524553e765 Added capability to save a copy of the editor contents.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4298
diff changeset
696 """<b>Save Copy</b>"""
ad524553e765 Added capability to save a copy of the editor contents.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4298
diff changeset
697 """<p>Save a copy of the contents of current editor window."""
ad524553e765 Added capability to save a copy of the editor contents.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4298
diff changeset
698 """ The file can be entered in a file selection dialog.</p>"""
ad524553e765 Added capability to save a copy of the editor contents.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4298
diff changeset
699 ))
ad524553e765 Added capability to save a copy of the editor contents.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4298
diff changeset
700 self.saveCopyAct.triggered.connect(self.saveCopyCurrentEditor)
ad524553e765 Added capability to save a copy of the editor contents.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4298
diff changeset
701 self.fileActions.append(self.saveCopyAct)
ad524553e765 Added capability to save a copy of the editor contents.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4298
diff changeset
702
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
703 self.saveAllAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
704 QCoreApplication.translate('ViewManager', 'Save all'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
705 UI.PixmapCache.getIcon("fileSaveAll.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
706 QCoreApplication.translate('ViewManager', 'Save a&ll'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
707 0, 0, self.saveActGrp, 'vm_file_save_all')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
708 self.saveAllAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
709 'ViewManager', 'Save all files'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
710 self.saveAllAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
711 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
712 """<b>Save All Files</b>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
713 """<p>Save the contents of all editor windows.</p>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
714 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
715 self.saveAllAct.triggered.connect(self.saveAllEditors)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
716 self.fileActions.append(self.saveAllAct)
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 self.saveActGrp.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
719
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
720 self.printAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
721 QCoreApplication.translate('ViewManager', 'Print'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
722 UI.PixmapCache.getIcon("print.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
723 QCoreApplication.translate('ViewManager', '&Print'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
724 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
725 'ViewManager', "Ctrl+P", "File|Print")),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
726 0, self, 'vm_file_print')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
727 self.printAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
728 'ViewManager', 'Print the current file'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
729 self.printAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
730 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
731 """<b>Print File</b>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
732 """<p>Print the contents of current editor window.</p>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
733 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
734 self.printAct.triggered.connect(self.printCurrentEditor)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
735 self.printAct.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
736 self.fileActions.append(self.printAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
737
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
738 self.printPreviewAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
739 QCoreApplication.translate('ViewManager', 'Print Preview'),
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
740 UI.PixmapCache.getIcon("printPreview.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
741 QCoreApplication.translate('ViewManager', 'Print Preview'),
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
742 0, 0, self, 'vm_file_print_preview')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
743 self.printPreviewAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
744 'ViewManager', 'Print preview of the current file'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
745 self.printPreviewAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
746 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
747 """<b>Print Preview</b>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
748 """<p>Print preview of the current editor window.</p>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
749 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
750 self.printPreviewAct.triggered.connect(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
751 self.printPreviewCurrentEditor)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
752 self.printPreviewAct.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
753 self.fileActions.append(self.printPreviewAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
754
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
755 self.findFileNameAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
756 QCoreApplication.translate('ViewManager', 'Search File'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
757 QCoreApplication.translate('ViewManager', 'Search &File...'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
758 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
759 'ViewManager', "Alt+Ctrl+F", "File|Search File")),
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
760 0, self, 'vm_file_search_file')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
761 self.findFileNameAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
762 'ViewManager', 'Search for a file'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
763 self.findFileNameAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
764 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
765 """<b>Search File</b>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
766 """<p>Search for a file.</p>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
767 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
768 self.findFileNameAct.triggered.connect(self.__findFileName)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
769 self.fileActions.append(self.findFileNameAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
770
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
771 def initFileMenu(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
772 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
773 Public method to create the File menu.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
774
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
775 @return the generated menu
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
776 """
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
777 menu = QMenu(QCoreApplication.translate('ViewManager', '&File'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
778 self.ui)
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
779 self.recentMenu = QMenu(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
780 QCoreApplication.translate('ViewManager', 'Open &Recent Files'),
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
781 menu)
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
782 self.bookmarkedMenu = QMenu(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
783 QCoreApplication.translate('ViewManager',
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
784 'Open &Bookmarked Files'),
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
785 menu)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
786 self.exportersMenu = self.__initContextMenuExporters()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
787 menu.setTearOffEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
788
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
789 menu.addAction(self.newAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
790 menu.addAction(self.openAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
791 self.menuRecentAct = menu.addMenu(self.recentMenu)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
792 menu.addMenu(self.bookmarkedMenu)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
793 menu.addSeparator()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
794 menu.addAction(self.closeAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
795 menu.addAction(self.closeAllAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
796 menu.addSeparator()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
797 menu.addAction(self.findFileNameAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
798 menu.addSeparator()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
799 menu.addAction(self.saveAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
800 menu.addAction(self.saveAsAct)
4402
ad524553e765 Added capability to save a copy of the editor contents.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4298
diff changeset
801 menu.addAction(self.saveCopyAct)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
802 menu.addAction(self.saveAllAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
803 self.exportersMenuAct = menu.addMenu(self.exportersMenu)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
804 menu.addSeparator()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
805 menu.addAction(self.printPreviewAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
806 menu.addAction(self.printAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
807
461
34528aaedf1c Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 454
diff changeset
808 self.recentMenu.aboutToShow.connect(self.__showRecentMenu)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
809 self.recentMenu.triggered.connect(self.__openSourceFile)
461
34528aaedf1c Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 454
diff changeset
810 self.bookmarkedMenu.aboutToShow.connect(self.__showBookmarkedMenu)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
811 self.bookmarkedMenu.triggered.connect(self.__openSourceFile)
461
34528aaedf1c Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 454
diff changeset
812 menu.aboutToShow.connect(self.__showFileMenu)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
813
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
814 self.exportersMenuAct.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
815
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
816 return menu
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
817
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
818 def initFileToolbar(self, toolbarManager):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
819 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
820 Public method to create the File toolbar.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
821
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
822 @param toolbarManager reference to a toolbar manager object
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
823 (E5ToolBarManager)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
824 @return the generated toolbar
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
825 """
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
826 tb = QToolBar(QCoreApplication.translate('ViewManager', 'File'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
827 self.ui)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
828 tb.setIconSize(UI.Config.ToolBarIconSize)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
829 tb.setObjectName("FileToolbar")
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
830 tb.setToolTip(QCoreApplication.translate('ViewManager', 'File'))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
831
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
832 tb.addAction(self.newAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
833 tb.addAction(self.openAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
834 tb.addAction(self.closeAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
835 tb.addSeparator()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
836 tb.addAction(self.saveAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
837 tb.addAction(self.saveAsAct)
4402
ad524553e765 Added capability to save a copy of the editor contents.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4298
diff changeset
838 tb.addAction(self.saveCopyAct)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
839 tb.addAction(self.saveAllAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
840
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
841 toolbarManager.addToolBar(tb, tb.windowTitle())
816
53e282890577 Made the toolbars of the initial layout more minimalistic.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
842 toolbarManager.addAction(self.printPreviewAct, tb.windowTitle())
53e282890577 Made the toolbars of the initial layout more minimalistic.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
843 toolbarManager.addAction(self.printAct, tb.windowTitle())
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
844
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
845 return tb
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
846
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
847 def __initContextMenuExporters(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
848 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
849 Private method used to setup the Exporters sub menu.
2965
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2886
diff changeset
850
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2886
diff changeset
851 @return reference to the generated menu (QMenu)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
852 """
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
853 menu = QMenu(QCoreApplication.translate('ViewManager', "Export as"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
854
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
855 import QScintilla.Exporters
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
856 supportedExporters = QScintilla.Exporters.getSupportedFormats()
12
1d8dd9706f46 First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7
diff changeset
857 exporters = sorted(list(supportedExporters.keys()))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
858 for exporter in exporters:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
859 act = menu.addAction(supportedExporters[exporter])
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
860 act.setData(exporter)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
861
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
862 menu.triggered.connect(self.__exportMenuTriggered)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
863
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
864 return menu
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
865
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
866 ##################################################################
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
867 ## Initialize the edit related actions, edit menu and toolbar
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
868 ##################################################################
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
869
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
870 def __initEditActions(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
871 """
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
872 Private method defining the user interface actions for the edit
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
873 commands.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
874 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
875 self.editActGrp = createActionGroup(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
876
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
877 self.undoAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
878 QCoreApplication.translate('ViewManager', 'Undo'),
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
879 UI.PixmapCache.getIcon("editUndo.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
880 QCoreApplication.translate('ViewManager', '&Undo'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
881 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
882 'ViewManager', "Ctrl+Z", "Edit|Undo")),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
883 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
884 'ViewManager', "Alt+Backspace", "Edit|Undo")),
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
885 self.editActGrp, 'vm_edit_undo')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
886 self.undoAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
887 'ViewManager', 'Undo the last change'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
888 self.undoAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
889 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
890 """<b>Undo</b>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
891 """<p>Undo the last change done in the current editor.</p>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
892 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
893 self.undoAct.triggered.connect(self.__editUndo)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
894 self.editActions.append(self.undoAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
895
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
896 self.redoAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
897 QCoreApplication.translate('ViewManager', 'Redo'),
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
898 UI.PixmapCache.getIcon("editRedo.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
899 QCoreApplication.translate('ViewManager', '&Redo'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
900 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
901 'ViewManager', "Ctrl+Shift+Z", "Edit|Redo")),
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
902 0,
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
903 self.editActGrp, 'vm_edit_redo')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
904 self.redoAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
905 'ViewManager', 'Redo the last change'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
906 self.redoAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
907 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
908 """<b>Redo</b>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
909 """<p>Redo the last change done in the current editor.</p>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
910 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
911 self.redoAct.triggered.connect(self.__editRedo)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
912 self.editActions.append(self.redoAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
913
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
914 self.revertAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
915 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
916 'ViewManager', 'Revert to last saved state'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
917 QCoreApplication.translate(
3039
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
918 'ViewManager', 'Re&vert to last saved state'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
919 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
920 'ViewManager', "Ctrl+Y", "Edit|Revert")),
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
921 0,
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
922 self.editActGrp, 'vm_edit_revert')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
923 self.revertAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
924 'ViewManager', 'Revert to last saved state'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
925 self.revertAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
926 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
927 """<b>Revert to last saved state</b>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
928 """<p>Undo all changes up to the last saved state"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
929 """ of the current editor.</p>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
930 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
931 self.revertAct.triggered.connect(self.__editRevert)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
932 self.editActions.append(self.revertAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
933
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
934 self.copyActGrp = createActionGroup(self.editActGrp)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
935
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
936 self.cutAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
937 QCoreApplication.translate('ViewManager', 'Cut'),
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
938 UI.PixmapCache.getIcon("editCut.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
939 QCoreApplication.translate('ViewManager', 'Cu&t'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
940 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
941 'ViewManager', "Ctrl+X", "Edit|Cut")),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
942 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
943 'ViewManager', "Shift+Del", "Edit|Cut")),
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
944 self.copyActGrp, 'vm_edit_cut')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
945 self.cutAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
946 'ViewManager', 'Cut the selection'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
947 self.cutAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
948 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
949 """<b>Cut</b>"""
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
950 """<p>Cut the selected text of the current editor to the"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
951 """ clipboard.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
952 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
953 self.cutAct.triggered.connect(self.__editCut)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
954 self.editActions.append(self.cutAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
955
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
956 self.copyAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
957 QCoreApplication.translate('ViewManager', 'Copy'),
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
958 UI.PixmapCache.getIcon("editCopy.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
959 QCoreApplication.translate('ViewManager', '&Copy'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
960 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
961 'ViewManager', "Ctrl+C", "Edit|Copy")),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
962 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
963 'ViewManager', "Ctrl+Ins", "Edit|Copy")),
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
964 self.copyActGrp, 'vm_edit_copy')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
965 self.copyAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
966 'ViewManager', 'Copy the selection'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
967 self.copyAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
968 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
969 """<b>Copy</b>"""
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
970 """<p>Copy the selected text of the current editor to the"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
971 """ clipboard.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
972 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
973 self.copyAct.triggered.connect(self.__editCopy)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
974 self.editActions.append(self.copyAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
975
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
976 self.pasteAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
977 QCoreApplication.translate('ViewManager', 'Paste'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
978 UI.PixmapCache.getIcon("editPaste.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
979 QCoreApplication.translate('ViewManager', '&Paste'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
980 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
981 'ViewManager', "Ctrl+V", "Edit|Paste")),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
982 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
983 'ViewManager', "Shift+Ins", "Edit|Paste")),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
984 self.copyActGrp, 'vm_edit_paste')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
985 self.pasteAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
986 'ViewManager', 'Paste the last cut/copied text'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
987 self.pasteAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
988 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
989 """<b>Paste</b>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
990 """<p>Paste the last cut/copied text from the clipboard to"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
991 """ the current editor.</p>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
992 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
993 self.pasteAct.triggered.connect(self.__editPaste)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
994 self.editActions.append(self.pasteAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
995
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
996 self.deleteAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
997 QCoreApplication.translate('ViewManager', 'Clear'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
998 UI.PixmapCache.getIcon("editDelete.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
999 QCoreApplication.translate('ViewManager', 'Clear'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1000 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1001 'ViewManager', "Alt+Shift+C", "Edit|Clear")),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1002 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1003 self.copyActGrp, 'vm_edit_clear')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1004 self.deleteAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1005 'ViewManager', 'Clear all text'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1006 self.deleteAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1007 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1008 """<b>Clear</b>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1009 """<p>Delete all text of the current editor.</p>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1010 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1011 self.deleteAct.triggered.connect(self.__editDelete)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1012 self.editActions.append(self.deleteAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1013
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1014 self.joinAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1015 QCoreApplication.translate('ViewManager', 'Join Lines'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1016 QCoreApplication.translate('ViewManager', 'Join Lines'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1017 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1018 'ViewManager', "Ctrl+J", "Edit|Join Lines")),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1019 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1020 self.copyActGrp, 'vm_edit_join_lines')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1021 self.joinAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1022 'ViewManager', 'Join Lines'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1023 self.joinAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1024 'ViewManager',
478
e7d778ea21d6 Added an editor action to join the current line with the next one.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 476
diff changeset
1025 """<b>Join Lines</b>"""
e7d778ea21d6 Added an editor action to join the current line with the next one.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 476
diff changeset
1026 """<p>Join the current and the next lines.</p>"""
e7d778ea21d6 Added an editor action to join the current line with the next one.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 476
diff changeset
1027 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1028 self.joinAct.triggered.connect(self.__editJoin)
478
e7d778ea21d6 Added an editor action to join the current line with the next one.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 476
diff changeset
1029 self.editActions.append(self.joinAct)
e7d778ea21d6 Added an editor action to join the current line with the next one.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 476
diff changeset
1030
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1031 self.indentAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1032 QCoreApplication.translate('ViewManager', 'Indent'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1033 UI.PixmapCache.getIcon("editIndent.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1034 QCoreApplication.translate('ViewManager', '&Indent'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1035 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1036 'ViewManager', "Ctrl+I", "Edit|Indent")),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1037 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1038 self.editActGrp, 'vm_edit_indent')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1039 self.indentAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1040 'ViewManager', 'Indent line'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1041 self.indentAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1042 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1043 """<b>Indent</b>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1044 """<p>Indents the current line or the lines of the"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1045 """ selection by one level.</p>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1046 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1047 self.indentAct.triggered.connect(self.__editIndent)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1048 self.editActions.append(self.indentAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1049
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1050 self.unindentAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1051 QCoreApplication.translate('ViewManager', 'Unindent'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1052 UI.PixmapCache.getIcon("editUnindent.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1053 QCoreApplication.translate('ViewManager', 'U&nindent'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1054 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1055 'ViewManager', "Ctrl+Shift+I", "Edit|Unindent")),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1056 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1057 self.editActGrp, 'vm_edit_unindent')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1058 self.unindentAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1059 'ViewManager', 'Unindent line'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1060 self.unindentAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1061 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1062 """<b>Unindent</b>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1063 """<p>Unindents the current line or the lines of the"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1064 """ selection by one level.</p>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1065 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1066 self.unindentAct.triggered.connect(self.__editUnindent)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1067 self.editActions.append(self.unindentAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1068
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1069 self.smartIndentAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1070 QCoreApplication.translate('ViewManager', 'Smart indent'),
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1071 UI.PixmapCache.getIcon("editSmartIndent.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1072 QCoreApplication.translate('ViewManager', 'Smart indent'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1073 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1074 'ViewManager', "Ctrl+Alt+I", "Edit|Smart indent")),
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1075 0,
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1076 self.editActGrp, 'vm_edit_smart_indent')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1077 self.smartIndentAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1078 'ViewManager', 'Smart indent Line or Selection'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1079 self.smartIndentAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1080 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1081 """<b>Smart indent</b>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1082 """<p>Indents the current line or the lines of the"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1083 """ current selection smartly.</p>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1084 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1085 self.smartIndentAct.triggered.connect(self.__editSmartIndent)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1086 self.editActions.append(self.smartIndentAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1087
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1088 self.commentAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1089 QCoreApplication.translate('ViewManager', 'Comment'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1090 UI.PixmapCache.getIcon("editComment.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1091 QCoreApplication.translate('ViewManager', 'C&omment'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1092 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1093 'ViewManager', "Ctrl+M", "Edit|Comment")),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1094 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1095 self.editActGrp, 'vm_edit_comment')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1096 self.commentAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1097 'ViewManager', 'Comment Line or Selection'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1098 self.commentAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1099 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1100 """<b>Comment</b>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1101 """<p>Comments the current line or the lines of the"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1102 """ current selection.</p>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1103 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1104 self.commentAct.triggered.connect(self.__editComment)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1105 self.editActions.append(self.commentAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1106
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1107 self.uncommentAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1108 QCoreApplication.translate('ViewManager', 'Uncomment'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1109 UI.PixmapCache.getIcon("editUncomment.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1110 QCoreApplication.translate('ViewManager', 'Unco&mment'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1111 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1112 'ViewManager', "Alt+Ctrl+M", "Edit|Uncomment")),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1113 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1114 self.editActGrp, 'vm_edit_uncomment')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1115 self.uncommentAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1116 'ViewManager', 'Uncomment Line or Selection'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1117 self.uncommentAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1118 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1119 """<b>Uncomment</b>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1120 """<p>Uncomments the current line or the lines of the"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1121 """ current selection.</p>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1122 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1123 self.uncommentAct.triggered.connect(self.__editUncomment)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1124 self.editActions.append(self.uncommentAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1125
1500
6ce6deb421cf Added an action to the editor to toggle block comments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1490
diff changeset
1126 self.toggleCommentAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1127 QCoreApplication.translate('ViewManager', 'Toggle Comment'),
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1128 UI.PixmapCache.getIcon("editToggleComment.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1129 QCoreApplication.translate('ViewManager', 'Toggle Comment'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1130 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1131 'ViewManager', "Ctrl+Shift+M", "Edit|Toggle Comment")),
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1132 0,
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1133 self.editActGrp, 'vm_edit_toggle_comment')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1134 self.toggleCommentAct.setStatusTip(QCoreApplication.translate(
3039
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
1135 'ViewManager',
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
1136 'Toggle the comment of the current line, selection or'
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
1137 ' comment block'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1138 self.toggleCommentAct.setWhatsThis(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1139 'ViewManager',
1500
6ce6deb421cf Added an action to the editor to toggle block comments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1490
diff changeset
1140 """<b>Toggle Comment</b>"""
6ce6deb421cf Added an action to the editor to toggle block comments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1490
diff changeset
1141 """<p>If the current line does not start with a block comment,"""
6ce6deb421cf Added an action to the editor to toggle block comments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1490
diff changeset
1142 """ the current line or selection is commented. If it is already"""
6ce6deb421cf Added an action to the editor to toggle block comments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1490
diff changeset
1143 """ commented, this comment block is uncommented. </p>"""
6ce6deb421cf Added an action to the editor to toggle block comments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1490
diff changeset
1144 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1145 self.toggleCommentAct.triggered.connect(self.__editToggleComment)
1500
6ce6deb421cf Added an action to the editor to toggle block comments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1490
diff changeset
1146 self.editActions.append(self.toggleCommentAct)
6ce6deb421cf Added an action to the editor to toggle block comments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1490
diff changeset
1147
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1148 self.streamCommentAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1149 QCoreApplication.translate('ViewManager', 'Stream Comment'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1150 QCoreApplication.translate('ViewManager', 'Stream Comment'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1151 0, 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1152 self.editActGrp, 'vm_edit_stream_comment')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1153 self.streamCommentAct.setStatusTip(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1154 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1155 'Stream Comment Line or Selection'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1156 self.streamCommentAct.setWhatsThis(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1157 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1158 """<b>Stream Comment</b>"""
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1159 """<p>Stream comments the current line or the current"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1160 """ selection.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1161 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1162 self.streamCommentAct.triggered.connect(self.__editStreamComment)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1163 self.editActions.append(self.streamCommentAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1164
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1165 self.boxCommentAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1166 QCoreApplication.translate('ViewManager', 'Box Comment'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1167 QCoreApplication.translate('ViewManager', 'Box Comment'),
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1168 0, 0,
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1169 self.editActGrp, 'vm_edit_box_comment')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1170 self.boxCommentAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1171 'ViewManager', 'Box Comment Line or Selection'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1172 self.boxCommentAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1173 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1174 """<b>Box Comment</b>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1175 """<p>Box comments the current line or the lines of the"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1176 """ current selection.</p>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1177 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1178 self.boxCommentAct.triggered.connect(self.__editBoxComment)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1179 self.editActions.append(self.boxCommentAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1180
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1181 self.selectBraceAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1182 QCoreApplication.translate('ViewManager', 'Select to brace'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1183 QCoreApplication.translate('ViewManager', 'Select to &brace'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1184 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1185 'ViewManager', "Ctrl+E", "Edit|Select to brace")),
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1186 0,
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1187 self.editActGrp, 'vm_edit_select_to_brace')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1188 self.selectBraceAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1189 'ViewManager', 'Select text to the matching brace'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1190 self.selectBraceAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1191 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1192 """<b>Select to brace</b>"""
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1193 """<p>Select text of the current editor to the matching"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1194 """ brace.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1195 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1196 self.selectBraceAct.triggered.connect(self.__editSelectBrace)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1197 self.editActions.append(self.selectBraceAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1198
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1199 self.selectAllAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1200 QCoreApplication.translate('ViewManager', 'Select all'),
4067
cdc77314be22 Added an icon for the 'select all' action.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4025
diff changeset
1201 UI.PixmapCache.getIcon("editSelectAll.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1202 QCoreApplication.translate('ViewManager', '&Select all'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1203 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1204 'ViewManager', "Ctrl+A", "Edit|Select all")),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1205 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1206 self.editActGrp, 'vm_edit_select_all')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1207 self.selectAllAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1208 'ViewManager', 'Select all text'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1209 self.selectAllAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1210 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1211 """<b>Select All</b>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1212 """<p>Select all text of the current editor.</p>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1213 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1214 self.selectAllAct.triggered.connect(self.__editSelectAll)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1215 self.editActions.append(self.selectAllAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1216
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1217 self.deselectAllAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1218 QCoreApplication.translate('ViewManager', 'Deselect all'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1219 QCoreApplication.translate('ViewManager', '&Deselect all'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1220 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1221 'ViewManager', "Alt+Ctrl+A", "Edit|Deselect all")),
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1222 0,
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1223 self.editActGrp, 'vm_edit_deselect_all')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1224 self.deselectAllAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1225 'ViewManager', 'Deselect all text'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1226 self.deselectAllAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1227 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1228 """<b>Deselect All</b>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1229 """<p>Deselect all text of the current editor.</p>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1230 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1231 self.deselectAllAct.triggered.connect(self.__editDeselectAll)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1232 self.editActions.append(self.deselectAllAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1233
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1234 self.convertEOLAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1235 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1236 'ViewManager', 'Convert Line End Characters'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1237 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1238 'ViewManager', 'Convert &Line End Characters'),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1239 0, 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1240 self.editActGrp, 'vm_edit_convert_eol')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1241 self.convertEOLAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1242 'ViewManager', 'Convert Line End Characters'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1243 self.convertEOLAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1244 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1245 """<b>Convert Line End Characters</b>"""
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1246 """<p>Convert the line end characters to the currently set"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1247 """ type.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1248 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1249 self.convertEOLAct.triggered.connect(self.__convertEOL)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1250 self.editActions.append(self.convertEOLAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1251
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1252 self.shortenEmptyAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1253 QCoreApplication.translate('ViewManager', 'Shorten empty lines'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1254 QCoreApplication.translate('ViewManager', 'Shorten empty lines'),
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1255 0, 0,
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1256 self.editActGrp, 'vm_edit_shorten_empty_lines')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1257 self.shortenEmptyAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1258 'ViewManager', 'Shorten empty lines'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1259 self.shortenEmptyAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1260 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1261 """<b>Shorten empty lines</b>"""
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1262 """<p>Shorten lines consisting solely of whitespace"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1263 """ characters.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1264 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1265 self.shortenEmptyAct.triggered.connect(self.__shortenEmptyLines)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1266 self.editActions.append(self.shortenEmptyAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1267
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1268 self.autoCompleteAct = E5Action(
4153
95b18307079f Corrected some auto-completion related terms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4133
diff changeset
1269 QCoreApplication.translate('ViewManager', 'Complete'),
95b18307079f Corrected some auto-completion related terms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4133
diff changeset
1270 QCoreApplication.translate('ViewManager', '&Complete'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1271 QKeySequence(QCoreApplication.translate(
4153
95b18307079f Corrected some auto-completion related terms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4133
diff changeset
1272 'ViewManager', "Ctrl+Space", "Edit|Complete")),
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1273 0,
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1274 self.editActGrp, 'vm_edit_autocomplete')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1275 self.autoCompleteAct.setStatusTip(QCoreApplication.translate(
4153
95b18307079f Corrected some auto-completion related terms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4133
diff changeset
1276 'ViewManager', 'Complete current word'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1277 self.autoCompleteAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1278 'ViewManager',
4153
95b18307079f Corrected some auto-completion related terms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4133
diff changeset
1279 """<b>Complete</b>"""
95b18307079f Corrected some auto-completion related terms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4133
diff changeset
1280 """<p>Performs a completion of the word containing"""
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1281 """ the cursor.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1282 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1283 self.autoCompleteAct.triggered.connect(self.__editAutoComplete)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1284 self.editActions.append(self.autoCompleteAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1285
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1286 self.autoCompleteFromDocAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1287 QCoreApplication.translate(
4153
95b18307079f Corrected some auto-completion related terms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4133
diff changeset
1288 'ViewManager', 'Complete from Document'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1289 QCoreApplication.translate(
4153
95b18307079f Corrected some auto-completion related terms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4133
diff changeset
1290 'ViewManager', 'Complete from Document'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1291 QKeySequence(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1292 'ViewManager', "Ctrl+Shift+Space",
4153
95b18307079f Corrected some auto-completion related terms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4133
diff changeset
1293 "Edit|Complete from Document")),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1294 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1295 self.editActGrp, 'vm_edit_autocomplete_from_document')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1296 self.autoCompleteFromDocAct.setStatusTip(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1297 'ViewManager',
4153
95b18307079f Corrected some auto-completion related terms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4133
diff changeset
1298 'Complete current word from Document'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1299 self.autoCompleteFromDocAct.setWhatsThis(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1300 'ViewManager',
4153
95b18307079f Corrected some auto-completion related terms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4133
diff changeset
1301 """<b>Complete from Document</b>"""
95b18307079f Corrected some auto-completion related terms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4133
diff changeset
1302 """<p>Performs a completion from document of the word"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1303 """ containing the cursor.</p>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1304 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1305 self.autoCompleteFromDocAct.triggered.connect(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1306 self.__editAutoCompleteFromDoc)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1307 self.editActions.append(self.autoCompleteFromDocAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1308
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1309 self.autoCompleteFromAPIsAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1310 QCoreApplication.translate('ViewManager',
4153
95b18307079f Corrected some auto-completion related terms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4133
diff changeset
1311 'Complete from APIs'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1312 QCoreApplication.translate('ViewManager',
4153
95b18307079f Corrected some auto-completion related terms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4133
diff changeset
1313 'Complete from APIs'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1314 QKeySequence(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1315 'ViewManager', "Ctrl+Alt+Space",
4153
95b18307079f Corrected some auto-completion related terms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4133
diff changeset
1316 "Edit|Complete from APIs")),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1317 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1318 self.editActGrp, 'vm_edit_autocomplete_from_api')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1319 self.autoCompleteFromAPIsAct.setStatusTip(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1320 'ViewManager',
4153
95b18307079f Corrected some auto-completion related terms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4133
diff changeset
1321 'Complete current word from APIs'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1322 self.autoCompleteFromAPIsAct.setWhatsThis(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1323 'ViewManager',
4153
95b18307079f Corrected some auto-completion related terms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4133
diff changeset
1324 """<b>Complete from APIs</b>"""
95b18307079f Corrected some auto-completion related terms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4133
diff changeset
1325 """<p>Performs a completion from APIs of the word"""
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1326 """ containing the cursor.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1327 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1328 self.autoCompleteFromAPIsAct.triggered.connect(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1329 self.__editAutoCompleteFromAPIs)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1330 self.editActions.append(self.autoCompleteFromAPIsAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1331
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 559
diff changeset
1332 self.autoCompleteFromAllAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1333 QCoreApplication.translate(
4153
95b18307079f Corrected some auto-completion related terms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4133
diff changeset
1334 'ViewManager', 'Complete from Document and APIs'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1335 QCoreApplication.translate(
4153
95b18307079f Corrected some auto-completion related terms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4133
diff changeset
1336 'ViewManager', 'Complete from Document and APIs'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1337 QKeySequence(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1338 'ViewManager', "Alt+Shift+Space",
4153
95b18307079f Corrected some auto-completion related terms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4133
diff changeset
1339 "Edit|Complete from Document and APIs")),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1340 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1341 self.editActGrp, 'vm_edit_autocomplete_from_all')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1342 self.autoCompleteFromAllAct.setStatusTip(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1343 'ViewManager',
4153
95b18307079f Corrected some auto-completion related terms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4133
diff changeset
1344 'Complete current word from Document and APIs'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1345 self.autoCompleteFromAllAct.setWhatsThis(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1346 'ViewManager',
4153
95b18307079f Corrected some auto-completion related terms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4133
diff changeset
1347 """<b>Complete from Document and APIs</b>"""
95b18307079f Corrected some auto-completion related terms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4133
diff changeset
1348 """<p>Performs a completion from document and APIs"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1349 """ of the word containing the cursor.</p>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1350 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1351 self.autoCompleteFromAllAct.triggered.connect(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1352 self.__editAutoCompleteFromAll)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1353 self.editActions.append(self.autoCompleteFromAllAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1354
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1355 self.calltipsAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1356 QCoreApplication.translate('ViewManager', 'Calltip'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1357 QCoreApplication.translate('ViewManager', '&Calltip'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1358 QKeySequence(QCoreApplication.translate(
4155
c74074a883fd Fixed a typo.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4154
diff changeset
1359 'ViewManager', "Meta+Alt+Space", "Edit|Calltip")),
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1360 0,
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1361 self.editActGrp, 'vm_edit_calltip')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1362 self.calltipsAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1363 'ViewManager', 'Show Calltips'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1364 self.calltipsAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1365 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1366 """<b>Calltip</b>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1367 """<p>Show calltips based on the characters immediately to the"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1368 """ left of the cursor.</p>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1369 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1370 self.calltipsAct.triggered.connect(self.__editShowCallTips)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1371 self.editActions.append(self.calltipsAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1372
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1373 self.sortAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1374 QCoreApplication.translate('ViewManager', 'Sort'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1375 QCoreApplication.translate('ViewManager', 'Sort'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1376 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1377 'ViewManager', "Ctrl+Alt+S", "Edit|Sort")),
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1378 0,
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1379 self.editActGrp, 'vm_edit_sort')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1380 self.sortAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1381 'ViewManager',
2589
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2484
diff changeset
1382 'Sort the lines containing the rectangular selection'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1383 self.sortAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1384 'ViewManager',
2589
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2484
diff changeset
1385 """<b>Sort</b>"""
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1386 """<p>Sort the lines spanned by a rectangular selection based on"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1387 """ the selection ignoring leading and trailing whitespace.</p>"""
2589
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2484
diff changeset
1388 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1389 self.sortAct.triggered.connect(self.__editSortSelectedLines)
2589
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2484
diff changeset
1390 self.editActions.append(self.sortAct)
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2484
diff changeset
1391
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1392 self.editActGrp.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1393 self.copyActGrp.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1394
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1395 ####################################################################
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1396 ## Below follow the actions for QScintilla standard commands.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1397 ####################################################################
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1398
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1399 self.esm = QSignalMapper(self)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
1400 self.esm.mapped[int].connect(self.__editorCommand)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1401
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1402 self.editorActGrp = createActionGroup(self.editActGrp)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1403
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1404 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1405 QCoreApplication.translate('ViewManager',
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1406 'Move left one character'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1407 QCoreApplication.translate('ViewManager',
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1408 'Move left one character'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1409 QKeySequence(QCoreApplication.translate('ViewManager', 'Left')), 0,
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1410 self.editorActGrp, 'vm_edit_move_left_char')
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1411 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFT)
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1412 if isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1413 act.setAlternateShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1414 QCoreApplication.translate('ViewManager', 'Meta+B')))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1415 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1416 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1417
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1418 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1419 QCoreApplication.translate('ViewManager',
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1420 'Move right one character'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1421 QCoreApplication.translate('ViewManager',
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1422 'Move right one character'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1423 QKeySequence(QCoreApplication.translate('ViewManager', 'Right')),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1424 0, self.editorActGrp, 'vm_edit_move_right_char')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1425 if isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1426 act.setAlternateShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1427 QCoreApplication.translate('ViewManager', 'Meta+F')))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1428 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHT)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1429 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1430 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1431
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1432 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1433 QCoreApplication.translate('ViewManager', 'Move up one line'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1434 QCoreApplication.translate('ViewManager', 'Move up one line'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1435 QKeySequence(QCoreApplication.translate('ViewManager', 'Up')), 0,
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1436 self.editorActGrp, 'vm_edit_move_up_line')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1437 if isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1438 act.setAlternateShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1439 QCoreApplication.translate('ViewManager', 'Meta+P')))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1440 self.esm.setMapping(act, QsciScintilla.SCI_LINEUP)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1441 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1442 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1443
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1444 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1445 QCoreApplication.translate('ViewManager', 'Move down one line'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1446 QCoreApplication.translate('ViewManager', 'Move down one line'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1447 QKeySequence(QCoreApplication.translate('ViewManager', 'Down')), 0,
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1448 self.editorActGrp, 'vm_edit_move_down_line')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1449 if isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1450 act.setAlternateShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1451 QCoreApplication.translate('ViewManager', 'Meta+N')))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1452 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWN)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1453 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1454 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1455
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1456 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1457 QCoreApplication.translate('ViewManager',
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1458 'Move left one word part'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1459 QCoreApplication.translate('ViewManager',
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1460 'Move left one word part'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1461 0, 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1462 self.editorActGrp, 'vm_edit_move_left_word_part')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1463 if not isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1464 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1465 QCoreApplication.translate('ViewManager', 'Alt+Left')))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1466 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTLEFT)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1467 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1468 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1469
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1470 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1471 QCoreApplication.translate('ViewManager',
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1472 'Move right one word part'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1473 QCoreApplication.translate('ViewManager',
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1474 'Move right one word part'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1475 0, 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1476 self.editorActGrp, 'vm_edit_move_right_word_part')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1477 if not isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1478 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1479 QCoreApplication.translate('ViewManager', 'Alt+Right')))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1480 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTRIGHT)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1481 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1482 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1483
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1484 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1485 QCoreApplication.translate('ViewManager', 'Move left one word'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1486 QCoreApplication.translate('ViewManager', 'Move left one word'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1487 0, 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1488 self.editorActGrp, 'vm_edit_move_left_word')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1489 if isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1490 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1491 QCoreApplication.translate('ViewManager', 'Alt+Left')))
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1492 else:
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1493 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1494 QCoreApplication.translate('ViewManager', 'Ctrl+Left')))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1495 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFT)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1496 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1497 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1498
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1499 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1500 QCoreApplication.translate('ViewManager', 'Move right one word'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1501 QCoreApplication.translate('ViewManager', 'Move right one word'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1502 0, 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1503 self.editorActGrp, 'vm_edit_move_right_word')
1464
e4ec683781e4 Fixed a duplicate keyboard shortcut assignment.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1456
diff changeset
1504 if not isMacPlatform():
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1505 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1506 QCoreApplication.translate('ViewManager', 'Ctrl+Right')))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1507 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHT)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1508 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1509 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1510
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1511 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1512 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1513 'ViewManager',
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1514 'Move to first visible character in document line'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1515 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1516 'ViewManager',
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1517 'Move to first visible character in document line'),
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1518 0, 0,
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1519 self.editorActGrp, 'vm_edit_move_first_visible_char')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1520 if not isMacPlatform():
1474
1eaec11a0078 Fixed a few PEP-8 issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1464
diff changeset
1521 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1522 QCoreApplication.translate('ViewManager', 'Home')))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1523 self.esm.setMapping(act, QsciScintilla.SCI_VCHOME)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1524 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1525 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1526
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1527 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1528 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1529 'ViewManager', 'Move to start of display line'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1530 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1531 'ViewManager', 'Move to start of display line'),
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1532 0, 0,
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1533 self.editorActGrp, 'vm_edit_move_start_line')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1534 if isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1535 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1536 QCoreApplication.translate('ViewManager', 'Ctrl+Left')))
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1537 else:
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1538 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1539 QCoreApplication.translate('ViewManager', 'Alt+Home')))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1540 self.esm.setMapping(act, QsciScintilla.SCI_HOMEDISPLAY)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1541 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1542 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1543
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1544 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1545 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1546 'ViewManager', 'Move to end of document line'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1547 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1548 'ViewManager', 'Move to end of document line'),
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1549 0, 0,
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1550 self.editorActGrp, 'vm_edit_move_end_line')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1551 if isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1552 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1553 QCoreApplication.translate('ViewManager', 'Meta+E')))
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1554 else:
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1555 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1556 QCoreApplication.translate('ViewManager', 'End')))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1557 self.esm.setMapping(act, QsciScintilla.SCI_LINEEND)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1558 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1559 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1560
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1561 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1562 QCoreApplication.translate('ViewManager',
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1563 'Scroll view down one line'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1564 QCoreApplication.translate('ViewManager',
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1565 'Scroll view down one line'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1566 QKeySequence(QCoreApplication.translate('ViewManager',
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1567 'Ctrl+Down')),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1568 0, self.editorActGrp, 'vm_edit_scroll_down_line')
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1569 self.esm.setMapping(act, QsciScintilla.SCI_LINESCROLLDOWN)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1570 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1571 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1572
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1573 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1574 QCoreApplication.translate('ViewManager',
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1575 'Scroll view up one line'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1576 QCoreApplication.translate('ViewManager',
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1577 'Scroll view up one line'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1578 QKeySequence(QCoreApplication.translate('ViewManager', 'Ctrl+Up')),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1579 0, self.editorActGrp, 'vm_edit_scroll_up_line')
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1580 self.esm.setMapping(act, QsciScintilla.SCI_LINESCROLLUP)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1581 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1582 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1583
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1584 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1585 QCoreApplication.translate('ViewManager', 'Move up one paragraph'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1586 QCoreApplication.translate('ViewManager', 'Move up one paragraph'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1587 QKeySequence(QCoreApplication.translate('ViewManager', 'Alt+Up')),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1588 0, self.editorActGrp, 'vm_edit_move_up_para')
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1589 self.esm.setMapping(act, QsciScintilla.SCI_PARAUP)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1590 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1591 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1592
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1593 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1594 QCoreApplication.translate('ViewManager',
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1595 'Move down one paragraph'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1596 QCoreApplication.translate('ViewManager',
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1597 'Move down one paragraph'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1598 QKeySequence(QCoreApplication.translate('ViewManager',
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1599 'Alt+Down')),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1600 0, self.editorActGrp, 'vm_edit_move_down_para')
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1601 self.esm.setMapping(act, QsciScintilla.SCI_PARADOWN)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1602 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1603 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1604
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1605 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1606 QCoreApplication.translate('ViewManager', 'Move up one page'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1607 QCoreApplication.translate('ViewManager', 'Move up one page'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1608 QKeySequence(QCoreApplication.translate('ViewManager', 'PgUp')), 0,
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1609 self.editorActGrp, 'vm_edit_move_up_page')
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1610 self.esm.setMapping(act, QsciScintilla.SCI_PAGEUP)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1611 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1612 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1613
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1614 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1615 QCoreApplication.translate('ViewManager', 'Move down one page'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1616 QCoreApplication.translate('ViewManager', 'Move down one page'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1617 QKeySequence(QCoreApplication.translate('ViewManager', 'PgDown')),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1618 0, self.editorActGrp, 'vm_edit_move_down_page')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1619 if isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1620 act.setAlternateShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1621 QCoreApplication.translate('ViewManager', 'Meta+V')))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1622 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWN)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1623 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1624 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1625
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1626 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1627 QCoreApplication.translate('ViewManager',
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1628 'Move to start of document'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1629 QCoreApplication.translate('ViewManager',
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1630 'Move to start of document'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1631 0, 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1632 self.editorActGrp, 'vm_edit_move_start_text')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1633 if isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1634 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1635 QCoreApplication.translate('ViewManager', 'Ctrl+Up')))
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1636 else:
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1637 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1638 QCoreApplication.translate('ViewManager', 'Ctrl+Home')))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1639 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTSTART)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1640 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1641 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1642
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1643 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1644 QCoreApplication.translate('ViewManager',
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1645 'Move to end of document'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1646 QCoreApplication.translate('ViewManager',
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1647 'Move to end of document'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1648 0, 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1649 self.editorActGrp, 'vm_edit_move_end_text')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1650 if isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1651 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1652 QCoreApplication.translate('ViewManager', 'Ctrl+Down')))
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1653 else:
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1654 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1655 QCoreApplication.translate('ViewManager', 'Ctrl+End')))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1656 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTEND)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1657 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1658 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1659
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1660 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1661 QCoreApplication.translate('ViewManager', 'Indent one level'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1662 QCoreApplication.translate('ViewManager', 'Indent one level'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1663 QKeySequence(QCoreApplication.translate('ViewManager', 'Tab')), 0,
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1664 self.editorActGrp, 'vm_edit_indent_one_level')
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1665 self.esm.setMapping(act, QsciScintilla.SCI_TAB)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1666 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1667 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1668
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1669 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1670 QCoreApplication.translate('ViewManager', 'Unindent one level'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1671 QCoreApplication.translate('ViewManager', 'Unindent one level'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1672 QKeySequence(QCoreApplication.translate('ViewManager',
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1673 'Shift+Tab')),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1674 0, self.editorActGrp, 'vm_edit_unindent_one_level')
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1675 self.esm.setMapping(act, QsciScintilla.SCI_BACKTAB)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1676 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1677 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1678
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1679 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1680 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1681 'ViewManager', 'Extend selection left one character'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1682 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1683 'ViewManager', 'Extend selection left one character'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1684 QKeySequence(QCoreApplication.translate('ViewManager',
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1685 'Shift+Left')),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1686 0, self.editorActGrp, 'vm_edit_extend_selection_left_char')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1687 if isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1688 act.setAlternateShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1689 QCoreApplication.translate('ViewManager', 'Meta+Shift+B')))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1690 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFTEXTEND)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1691 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1692 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1693
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1694 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1695 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1696 'ViewManager', 'Extend selection right one character'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1697 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1698 'ViewManager', 'Extend selection right one character'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1699 QKeySequence(QCoreApplication.translate('ViewManager',
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1700 'Shift+Right')),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1701 0, self.editorActGrp, 'vm_edit_extend_selection_right_char')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1702 if isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1703 act.setAlternateShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1704 QCoreApplication.translate('ViewManager', 'Meta+Shift+F')))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1705 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHTEXTEND)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1706 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1707 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1708
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1709 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1710 QCoreApplication.translate(
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1711 'ViewManager', 'Extend selection up one line'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1712 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1713 'ViewManager', 'Extend selection up one line'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1714 QKeySequence(QCoreApplication.translate('ViewManager',
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1715 'Shift+Up')),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1716 0, self.editorActGrp, 'vm_edit_extend_selection_up_line')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1717 if isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1718 act.setAlternateShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1719 QCoreApplication.translate('ViewManager', 'Meta+Shift+P')))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1720 self.esm.setMapping(act, QsciScintilla.SCI_LINEUPEXTEND)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1721 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1722 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1723
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1724 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1725 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1726 'ViewManager', 'Extend selection down one line'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1727 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1728 'ViewManager', 'Extend selection down one line'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1729 QKeySequence(QCoreApplication.translate('ViewManager',
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1730 'Shift+Down')),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1731 0, self.editorActGrp, 'vm_edit_extend_selection_down_line')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1732 if isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1733 act.setAlternateShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1734 QCoreApplication.translate('ViewManager', 'Meta+Shift+N')))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1735 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWNEXTEND)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1736 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1737 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1738
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1739 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1740 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1741 'ViewManager', 'Extend selection left one word part'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1742 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1743 'ViewManager', 'Extend selection left one word part'),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1744 0, 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1745 self.editorActGrp, 'vm_edit_extend_selection_left_word_part')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1746 if not isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1747 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1748 QCoreApplication.translate('ViewManager', 'Alt+Shift+Left')))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1749 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTLEFTEXTEND)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1750 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1751 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1752
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1753 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1754 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1755 'ViewManager', 'Extend selection right one word part'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1756 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1757 'ViewManager', 'Extend selection right one word part'),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1758 0, 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1759 self.editorActGrp, 'vm_edit_extend_selection_right_word_part')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1760 if not isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1761 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1762 QCoreApplication.translate('ViewManager', 'Alt+Shift+Right')))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1763 self.esm.setMapping(act, QsciScintilla.SCI_WORDPARTRIGHTEXTEND)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1764 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1765 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1766
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1767 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1768 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1769 'ViewManager', 'Extend selection left one word'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1770 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1771 'ViewManager', 'Extend selection left one word'),
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1772 0, 0,
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1773 self.editorActGrp, 'vm_edit_extend_selection_left_word')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1774 if isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1775 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1776 QCoreApplication.translate('ViewManager', 'Alt+Shift+Left')))
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1777 else:
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1778 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1779 QCoreApplication.translate('ViewManager', 'Ctrl+Shift+Left')))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1780 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTEXTEND)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1781 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1782 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1783
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1784 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1785 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1786 'ViewManager', 'Extend selection right one word'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1787 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1788 'ViewManager', 'Extend selection right one word'),
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1789 0, 0,
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1790 self.editorActGrp, 'vm_edit_extend_selection_right_word')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1791 if isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1792 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1793 QCoreApplication.translate('ViewManager', 'Alt+Shift+Right')))
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1794 else:
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1795 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1796 QCoreApplication.translate('ViewManager', 'Ctrl+Shift+Right')))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1797 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTEXTEND)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1798 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1799 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1800
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1801 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1802 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1803 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1804 'Extend selection to first visible character in document'
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1805 ' line'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1806 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1807 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1808 'Extend selection to first visible character in document'
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1809 ' line'),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1810 0, 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1811 self.editorActGrp, 'vm_edit_extend_selection_first_visible_char')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1812 if not isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1813 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1814 QCoreApplication.translate('ViewManager', 'Shift+Home')))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1815 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMEEXTEND)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1816 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1817 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1818
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1819 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1820 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1821 'ViewManager', 'Extend selection to end of document line'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1822 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1823 'ViewManager', 'Extend selection to end of document line'),
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1824 0, 0,
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1825 self.editorActGrp, 'vm_edit_extend_selection_end_line')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1826 if isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1827 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1828 QCoreApplication.translate('ViewManager', 'Meta+Shift+E')))
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1829 else:
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1830 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1831 QCoreApplication.translate('ViewManager', 'Shift+End')))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1832 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDEXTEND)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1833 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1834 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1835
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1836 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1837 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1838 'ViewManager', 'Extend selection up one paragraph'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1839 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1840 'ViewManager', 'Extend selection up one paragraph'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1841 QKeySequence(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1842 'ViewManager', 'Alt+Shift+Up')),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1843 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1844 self.editorActGrp, 'vm_edit_extend_selection_up_para')
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1845 self.esm.setMapping(act, QsciScintilla.SCI_PARAUPEXTEND)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1846 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1847 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1848
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1849 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1850 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1851 'ViewManager', 'Extend selection down one paragraph'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1852 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1853 'ViewManager', 'Extend selection down one paragraph'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1854 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1855 'ViewManager', 'Alt+Shift+Down')),
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1856 0,
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1857 self.editorActGrp, 'vm_edit_extend_selection_down_para')
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1858 self.esm.setMapping(act, QsciScintilla.SCI_PARADOWNEXTEND)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1859 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1860 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1861
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1862 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1863 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1864 'ViewManager', 'Extend selection up one page'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1865 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1866 'ViewManager', 'Extend selection up one page'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1867 QKeySequence(QCoreApplication.translate('ViewManager',
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1868 'Shift+PgUp')),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1869 0, self.editorActGrp, 'vm_edit_extend_selection_up_page')
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1870 self.esm.setMapping(act, QsciScintilla.SCI_PAGEUPEXTEND)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1871 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1872 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1873
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1874 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1875 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1876 'ViewManager', 'Extend selection down one page'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1877 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1878 'ViewManager', 'Extend selection down one page'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1879 QKeySequence(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1880 'ViewManager', 'Shift+PgDown')),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1881 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1882 self.editorActGrp, 'vm_edit_extend_selection_down_page')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1883 if isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1884 act.setAlternateShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1885 QCoreApplication.translate('ViewManager', 'Meta+Shift+V')))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1886 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWNEXTEND)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1887 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1888 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1889
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1890 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1891 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1892 'ViewManager', 'Extend selection to start of document'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1893 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1894 'ViewManager', 'Extend selection to start of document'),
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1895 0, 0,
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1896 self.editorActGrp, 'vm_edit_extend_selection_start_text')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1897 if isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1898 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1899 QCoreApplication.translate('ViewManager', 'Ctrl+Shift+Up')))
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1900 else:
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1901 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1902 QCoreApplication.translate('ViewManager', 'Ctrl+Shift+Home')))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1903 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTSTARTEXTEND)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1904 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1905 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1906
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1907 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1908 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1909 'ViewManager', 'Extend selection to end of document'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1910 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1911 'ViewManager', 'Extend selection to end of document'),
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1912 0, 0,
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
1913 self.editorActGrp, 'vm_edit_extend_selection_end_text')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1914 if isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1915 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1916 QCoreApplication.translate('ViewManager', 'Ctrl+Shift+Down')))
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1917 else:
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1918 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1919 QCoreApplication.translate('ViewManager', 'Ctrl+Shift+End')))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1920 self.esm.setMapping(act, QsciScintilla.SCI_DOCUMENTENDEXTEND)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1921 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1922 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1923
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1924 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1925 QCoreApplication.translate('ViewManager',
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1926 'Delete previous character'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1927 QCoreApplication.translate('ViewManager',
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1928 'Delete previous character'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1929 QKeySequence(QCoreApplication.translate('ViewManager',
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1930 'Backspace')),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1931 0, self.editorActGrp, 'vm_edit_delete_previous_char')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1932 if isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1933 act.setAlternateShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1934 QCoreApplication.translate('ViewManager', 'Meta+H')))
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1935 else:
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1936 act.setAlternateShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1937 QCoreApplication.translate('ViewManager', 'Shift+Backspace')))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1938 self.esm.setMapping(act, QsciScintilla.SCI_DELETEBACK)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1939 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1940 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1941
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1942 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1943 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1944 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1945 'Delete previous character if not at start of line'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1946 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1947 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1948 'Delete previous character if not at start of line'),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1949 0, 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1950 self.editorActGrp, 'vm_edit_delet_previous_char_not_line_start')
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1951 self.esm.setMapping(act, QsciScintilla.SCI_DELETEBACKNOTLINE)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1952 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1953 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1954
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1955 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1956 QCoreApplication.translate('ViewManager',
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1957 'Delete current character'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1958 QCoreApplication.translate('ViewManager',
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1959 'Delete current character'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1960 QKeySequence(QCoreApplication.translate('ViewManager', 'Del')),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1961 0, self.editorActGrp, 'vm_edit_delete_current_char')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1962 if isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
1963 act.setAlternateShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1964 QCoreApplication.translate('ViewManager', 'Meta+D')))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1965 self.esm.setMapping(act, QsciScintilla.SCI_CLEAR)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1966 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1967 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1968
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1969 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1970 QCoreApplication.translate('ViewManager', 'Delete word to left'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1971 QCoreApplication.translate('ViewManager', 'Delete word to left'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1972 QKeySequence(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1973 'ViewManager', 'Ctrl+Backspace')),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1974 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1975 self.editorActGrp, 'vm_edit_delete_word_left')
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1976 self.esm.setMapping(act, QsciScintilla.SCI_DELWORDLEFT)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1977 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1978 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1979
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1980 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1981 QCoreApplication.translate('ViewManager', 'Delete word to right'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1982 QCoreApplication.translate('ViewManager', 'Delete word to right'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1983 QKeySequence(QCoreApplication.translate('ViewManager',
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1984 'Ctrl+Del')),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1985 0, self.editorActGrp, 'vm_edit_delete_word_right')
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1986 self.esm.setMapping(act, QsciScintilla.SCI_DELWORDRIGHT)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1987 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1988 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1989
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1990 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1991 QCoreApplication.translate('ViewManager', 'Delete line to left'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1992 QCoreApplication.translate('ViewManager', 'Delete line to left'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
1993 QKeySequence(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1994 'ViewManager', 'Ctrl+Shift+Backspace')),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1995 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
1996 self.editorActGrp, 'vm_edit_delete_line_left')
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1997 self.esm.setMapping(act, QsciScintilla.SCI_DELLINELEFT)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
1998 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1999 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2000
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2001 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2002 QCoreApplication.translate('ViewManager', 'Delete line to right'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2003 QCoreApplication.translate('ViewManager', 'Delete line to right'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2004 0, 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2005 self.editorActGrp, 'vm_edit_delete_line_right')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2006 if isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2007 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2008 QCoreApplication.translate('ViewManager', 'Meta+K')))
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2009 else:
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2010 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2011 QCoreApplication.translate('ViewManager', 'Ctrl+Shift+Del')))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2012 self.esm.setMapping(act, QsciScintilla.SCI_DELLINERIGHT)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2013 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2014 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2015
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2016 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2017 QCoreApplication.translate('ViewManager', 'Insert new line'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2018 QCoreApplication.translate('ViewManager', 'Insert new line'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2019 QKeySequence(QCoreApplication.translate('ViewManager', 'Return')),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2020 QKeySequence(QCoreApplication.translate('ViewManager', 'Enter')),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2021 self.editorActGrp, 'vm_edit_insert_line')
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2022 self.esm.setMapping(act, QsciScintilla.SCI_NEWLINE)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2023 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2024 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2025
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2026 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2027 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2028 'ViewManager', 'Insert new line below current line'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2029 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2030 'ViewManager', 'Insert new line below current line'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2031 QKeySequence(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2032 'ViewManager', 'Shift+Return')),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2033 QKeySequence(QCoreApplication.translate('ViewManager',
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2034 'Shift+Enter')),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2035 self.editorActGrp, 'vm_edit_insert_line_below')
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2036 act.triggered.connect(self.__newLineBelow)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2037 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2038
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2039 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2040 QCoreApplication.translate('ViewManager', 'Delete current line'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2041 QCoreApplication.translate('ViewManager', 'Delete current line'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2042 QKeySequence(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2043 'ViewManager', 'Ctrl+Shift+L')),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2044 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2045 self.editorActGrp, 'vm_edit_delete_current_line')
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2046 self.esm.setMapping(act, QsciScintilla.SCI_LINEDELETE)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2047 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2048 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2049
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2050 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2051 QCoreApplication.translate(
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2052 'ViewManager', 'Duplicate current line'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2053 QCoreApplication.translate(
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2054 'ViewManager', 'Duplicate current line'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2055 QKeySequence(QCoreApplication.translate('ViewManager', 'Ctrl+D')),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2056 0, self.editorActGrp, 'vm_edit_duplicate_current_line')
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2057 self.esm.setMapping(act, QsciScintilla.SCI_LINEDUPLICATE)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2058 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2059 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2060
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2061 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2062 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2063 'ViewManager', 'Swap current and previous lines'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2064 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2065 'ViewManager', 'Swap current and previous lines'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2066 QKeySequence(QCoreApplication.translate('ViewManager', 'Ctrl+T')),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2067 0, self.editorActGrp, 'vm_edit_swap_current_previous_line')
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2068 self.esm.setMapping(act, QsciScintilla.SCI_LINETRANSPOSE)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2069 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2070 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2071
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2072 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2073 QCoreApplication.translate('ViewManager', 'Cut current line'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2074 QCoreApplication.translate('ViewManager', 'Cut current line'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2075 QKeySequence(QCoreApplication.translate('ViewManager',
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2076 'Alt+Shift+L')),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2077 0, self.editorActGrp, 'vm_edit_cut_current_line')
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2078 self.esm.setMapping(act, QsciScintilla.SCI_LINECUT)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2079 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2080 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2081
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2082 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2083 QCoreApplication.translate('ViewManager', 'Copy current line'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2084 QCoreApplication.translate('ViewManager', 'Copy current line'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2085 QKeySequence(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2086 'ViewManager', 'Ctrl+Shift+T')),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2087 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2088 self.editorActGrp, 'vm_edit_copy_current_line')
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2089 self.esm.setMapping(act, QsciScintilla.SCI_LINECOPY)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2090 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2091 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2092
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2093 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2094 QCoreApplication.translate(
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2095 'ViewManager', 'Toggle insert/overtype'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2096 QCoreApplication.translate(
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2097 'ViewManager', 'Toggle insert/overtype'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2098 QKeySequence(QCoreApplication.translate('ViewManager', 'Ins')),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2099 0, self.editorActGrp, 'vm_edit_toggle_insert_overtype')
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2100 self.esm.setMapping(act, QsciScintilla.SCI_EDITTOGGLEOVERTYPE)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2101 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2102 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2103
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2104 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2105 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2106 'ViewManager', 'Move to end of display line'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2107 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2108 'ViewManager', 'Move to end of display line'),
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2109 0, 0,
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2110 self.editorActGrp, 'vm_edit_move_end_displayed_line')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2111 if isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2112 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2113 QCoreApplication.translate('ViewManager', 'Ctrl+Right')))
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2114 else:
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2115 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2116 QCoreApplication.translate('ViewManager', 'Alt+End')))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2117 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDDISPLAY)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2118 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2119 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2120
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2121 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2122 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2123 'ViewManager', 'Extend selection to end of display line'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2124 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2125 'ViewManager', 'Extend selection to end of display line'),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2126 0, 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2127 self.editorActGrp, 'vm_edit_extend_selection_end_displayed_line')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2128 if isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2129 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2130 QCoreApplication.translate('ViewManager', 'Ctrl+Shift+Right')))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2131 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDDISPLAYEXTEND)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2132 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2133 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2134
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2135 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2136 QCoreApplication.translate('ViewManager', 'Formfeed'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2137 QCoreApplication.translate('ViewManager', 'Formfeed'),
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2138 0, 0,
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2139 self.editorActGrp, 'vm_edit_formfeed')
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2140 self.esm.setMapping(act, QsciScintilla.SCI_FORMFEED)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2141 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2142 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2143
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2144 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2145 QCoreApplication.translate('ViewManager', 'Escape'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2146 QCoreApplication.translate('ViewManager', 'Escape'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2147 QKeySequence(QCoreApplication.translate('ViewManager', 'Esc')), 0,
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2148 self.editorActGrp, 'vm_edit_escape')
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2149 self.esm.setMapping(act, QsciScintilla.SCI_CANCEL)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2150 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2151 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2152
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2153 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2154 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2155 'ViewManager', 'Extend rectangular selection down one line'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2156 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2157 'ViewManager', 'Extend rectangular selection down one line'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2158 QKeySequence(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2159 'ViewManager', 'Alt+Ctrl+Down')),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2160 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2161 self.editorActGrp, 'vm_edit_extend_rect_selection_down_line')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2162 if isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2163 act.setAlternateShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2164 QCoreApplication.translate('ViewManager', 'Meta+Alt+Shift+N')))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2165 self.esm.setMapping(act, QsciScintilla.SCI_LINEDOWNRECTEXTEND)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2166 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2167 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2168
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2169 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2170 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2171 'ViewManager', 'Extend rectangular selection up one line'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2172 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2173 'ViewManager', 'Extend rectangular selection up one line'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2174 QKeySequence(QCoreApplication.translate('ViewManager',
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2175 'Alt+Ctrl+Up')),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2176 0, self.editorActGrp, 'vm_edit_extend_rect_selection_up_line')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2177 if isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2178 act.setAlternateShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2179 QCoreApplication.translate('ViewManager', 'Meta+Alt+Shift+P')))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2180 self.esm.setMapping(act, QsciScintilla.SCI_LINEUPRECTEXTEND)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2181 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2182 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2183
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2184 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2185 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2186 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2187 'Extend rectangular selection left one character'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2188 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2189 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2190 'Extend rectangular selection left one character'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2191 QKeySequence(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2192 'ViewManager', 'Alt+Ctrl+Left')),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2193 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2194 self.editorActGrp, 'vm_edit_extend_rect_selection_left_char')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2195 if isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2196 act.setAlternateShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2197 QCoreApplication.translate('ViewManager', 'Meta+Alt+Shift+B')))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2198 self.esm.setMapping(act, QsciScintilla.SCI_CHARLEFTRECTEXTEND)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2199 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2200 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2201
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2202 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2203 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2204 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2205 'Extend rectangular selection right one character'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2206 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2207 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2208 'Extend rectangular selection right one character'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2209 QKeySequence(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2210 'ViewManager', 'Alt+Ctrl+Right')),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2211 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2212 self.editorActGrp, 'vm_edit_extend_rect_selection_right_char')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2213 if isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2214 act.setAlternateShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2215 QCoreApplication.translate('ViewManager', 'Meta+Alt+Shift+F')))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2216 self.esm.setMapping(act, QsciScintilla.SCI_CHARRIGHTRECTEXTEND)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2217 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2218 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2219
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2220 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2221 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2222 'ViewManager',
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2223 'Extend rectangular selection to first visible character in'
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2224 ' document line'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2225 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2226 'ViewManager',
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2227 'Extend rectangular selection to first visible character in'
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2228 ' document line'),
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2229 0, 0,
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2230 self.editorActGrp,
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2231 'vm_edit_extend_rect_selection_first_visible_char')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2232 if not isMacPlatform():
1474
1eaec11a0078 Fixed a few PEP-8 issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1464
diff changeset
2233 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2234 QCoreApplication.translate('ViewManager', 'Alt+Shift+Home')))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2235 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMERECTEXTEND)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2236 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2237 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2238
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2239 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2240 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2241 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2242 'Extend rectangular selection to end of document line'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2243 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2244 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2245 'Extend rectangular selection to end of document line'),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2246 0, 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2247 self.editorActGrp, 'vm_edit_extend_rect_selection_end_line')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2248 if isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2249 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2250 QCoreApplication.translate('ViewManager', 'Meta+Alt+Shift+E')))
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2251 else:
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2252 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2253 QCoreApplication.translate('ViewManager', 'Alt+Shift+End')))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2254 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDRECTEXTEND)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2255 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2256 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2257
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2258 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2259 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2260 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2261 'Extend rectangular selection up one page'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2262 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2263 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2264 'Extend rectangular selection up one page'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2265 QKeySequence(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2266 'ViewManager', 'Alt+Shift+PgUp')),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2267 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2268 self.editorActGrp, 'vm_edit_extend_rect_selection_up_page')
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2269 self.esm.setMapping(act, QsciScintilla.SCI_PAGEUPRECTEXTEND)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2270 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2271 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2272
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2273 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2274 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2275 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2276 'Extend rectangular selection down one page'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2277 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2278 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2279 'Extend rectangular selection down one page'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2280 QKeySequence(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2281 'ViewManager', 'Alt+Shift+PgDown')),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2282 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2283 self.editorActGrp, 'vm_edit_extend_rect_selection_down_page')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2284 if isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2285 act.setAlternateShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2286 QCoreApplication.translate('ViewManager', 'Meta+Alt+Shift+V')))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2287 self.esm.setMapping(act, QsciScintilla.SCI_PAGEDOWNRECTEXTEND)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2288 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2289 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2290
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2291 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2292 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2293 'ViewManager', 'Duplicate current selection'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2294 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2295 'ViewManager', 'Duplicate current selection'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2296 QKeySequence(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2297 'ViewManager', 'Ctrl+Shift+D')),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2298 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2299 self.editorActGrp, 'vm_edit_duplicate_current_selection')
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2300 self.esm.setMapping(act, QsciScintilla.SCI_SELECTIONDUPLICATE)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2301 act.triggered.connect(self.esm.map)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2302 self.editActions.append(act)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2303
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2304 if hasattr(QsciScintilla, "SCI_SCROLLTOSTART"):
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2305 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2306 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2307 'ViewManager', 'Scroll to start of document'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2308 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2309 'ViewManager', 'Scroll to start of document'),
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2310 0, 0,
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2311 self.editorActGrp, 'vm_edit_scroll_start_text')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2312 if isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2313 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2314 QCoreApplication.translate('ViewManager', 'Home')))
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2315 self.esm.setMapping(act, QsciScintilla.SCI_SCROLLTOSTART)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2316 act.triggered.connect(self.esm.map)
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2317 self.editActions.append(act)
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2318
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2319 if hasattr(QsciScintilla, "SCI_SCROLLTOEND"):
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2320 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2321 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2322 'ViewManager', 'Scroll to end of document'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2323 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2324 'ViewManager', 'Scroll to end of document'),
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2325 0, 0,
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2326 self.editorActGrp, 'vm_edit_scroll_end_text')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2327 if isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2328 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2329 QCoreApplication.translate('ViewManager', 'End')))
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2330 self.esm.setMapping(act, QsciScintilla.SCI_SCROLLTOEND)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2331 act.triggered.connect(self.esm.map)
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2332 self.editActions.append(act)
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2333
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2334 if hasattr(QsciScintilla, "SCI_VERTICALCENTRECARET"):
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2335 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2336 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2337 'ViewManager', 'Scroll vertically to center current line'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2338 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2339 'ViewManager', 'Scroll vertically to center current line'),
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2340 0, 0,
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2341 self.editorActGrp, 'vm_edit_scroll_vertically_center')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2342 if isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2343 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2344 QCoreApplication.translate('ViewManager', 'Meta+L')))
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2345 self.esm.setMapping(act, QsciScintilla.SCI_VERTICALCENTRECARET)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2346 act.triggered.connect(self.esm.map)
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2347 self.editActions.append(act)
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2348
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2349 if hasattr(QsciScintilla, "SCI_WORDRIGHTEND"):
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2350 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2351 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2352 'ViewManager', 'Move to end of next word'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2353 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2354 'ViewManager', 'Move to end of next word'),
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2355 0, 0,
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2356 self.editorActGrp, 'vm_edit_move_end_next_word')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2357 if isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2358 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2359 QCoreApplication.translate('ViewManager', 'Alt+Right')))
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2360 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTEND)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2361 act.triggered.connect(self.esm.map)
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2362 self.editActions.append(act)
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2363
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2364 if hasattr(QsciScintilla, "SCI_WORDRIGHTENDEXTEND"):
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2365 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2366 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2367 'ViewManager', 'Extend selection to end of next word'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2368 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2369 'ViewManager', 'Extend selection to end of next word'),
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2370 0, 0,
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2371 self.editorActGrp, 'vm_edit_select_end_next_word')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2372 if isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2373 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2374 QCoreApplication.translate('ViewManager',
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2375 'Alt+Shift+Right')))
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2376 self.esm.setMapping(act, QsciScintilla.SCI_WORDRIGHTENDEXTEND)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2377 act.triggered.connect(self.esm.map)
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2378 self.editActions.append(act)
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2379
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2380 if hasattr(QsciScintilla, "SCI_WORDLEFTEND"):
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2381 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2382 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2383 'ViewManager', 'Move to end of previous word'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2384 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2385 'ViewManager', 'Move to end of previous word'),
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2386 0, 0,
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2387 self.editorActGrp, 'vm_edit_move_end_previous_word')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2388 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTEND)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2389 act.triggered.connect(self.esm.map)
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2390 self.editActions.append(act)
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2391
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2392 if hasattr(QsciScintilla, "SCI_WORDLEFTENDEXTEND"):
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2393 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2394 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2395 'ViewManager', 'Extend selection to end of previous word'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2396 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2397 'ViewManager', 'Extend selection to end of previous word'),
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2398 0, 0,
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2399 self.editorActGrp, 'vm_edit_select_end_previous_word')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2400 self.esm.setMapping(act, QsciScintilla.SCI_WORDLEFTENDEXTEND)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2401 act.triggered.connect(self.esm.map)
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2402 self.editActions.append(act)
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2403
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2404 if hasattr(QsciScintilla, "SCI_HOME"):
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2405 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2406 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2407 'ViewManager', 'Move to start of document line'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2408 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2409 'ViewManager', 'Move to start of document line'),
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2410 0, 0,
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2411 self.editorActGrp, 'vm_edit_move_start_document_line')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2412 if isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2413 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2414 QCoreApplication.translate('ViewManager', 'Meta+A')))
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2415 self.esm.setMapping(act, QsciScintilla.SCI_HOME)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2416 act.triggered.connect(self.esm.map)
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2417 self.editActions.append(act)
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2418
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2419 if hasattr(QsciScintilla, "SCI_HOMEEXTEND"):
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2420 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2421 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2422 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2423 'Extend selection to start of document line'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2424 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2425 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2426 'Extend selection to start of document line'),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2427 0, 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2428 self.editorActGrp,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2429 'vm_edit_extend_selection_start_document_line')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2430 if isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2431 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2432 QCoreApplication.translate('ViewManager', 'Meta+Shift+A')))
4636
7e57528c43a0 Fixed a bug in the View Manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
2433 self.esm.setMapping(act, QsciScintilla.SCI_HOMEEXTEND)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2434 act.triggered.connect(self.esm.map)
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2435 self.editActions.append(act)
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2436
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2437 if hasattr(QsciScintilla, "SCI_HOMERECTEXTEND"):
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2438 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2439 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2440 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2441 'Extend rectangular selection to start of document line'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2442 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2443 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2444 'Extend rectangular selection to start of document line'),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2445 0, 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2446 self.editorActGrp, 'vm_edit_select_rect_start_line')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2447 if isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2448 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2449 QCoreApplication.translate('ViewManager',
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2450 'Meta+Alt+Shift+A')))
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2451 self.esm.setMapping(act, QsciScintilla.SCI_HOMERECTEXTEND)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2452 act.triggered.connect(self.esm.map)
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2453 self.editActions.append(act)
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2454
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2455 if hasattr(QsciScintilla, "SCI_HOMEDISPLAYEXTEND"):
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2456 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2457 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2458 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2459 'Extend selection to start of display line'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2460 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2461 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2462 'Extend selection to start of display line'),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2463 0, 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2464 self.editorActGrp,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2465 'vm_edit_extend_selection_start_display_line')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2466 if isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2467 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2468 QCoreApplication.translate('ViewManager',
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2469 'Ctrl+Shift+Left')))
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2470 self.esm.setMapping(act, QsciScintilla.SCI_HOMEDISPLAYEXTEND)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2471 act.triggered.connect(self.esm.map)
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2472 self.editActions.append(act)
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2473
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2474 if hasattr(QsciScintilla, "SCI_HOMEWRAP"):
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2475 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2476 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2477 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2478 'Move to start of display or document line'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2479 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2480 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2481 'Move to start of display or document line'),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2482 0, 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2483 self.editorActGrp, 'vm_edit_move_start_display_document_line')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2484 self.esm.setMapping(act, QsciScintilla.SCI_HOMEWRAP)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2485 act.triggered.connect(self.esm.map)
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2486 self.editActions.append(act)
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2487
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2488 if hasattr(QsciScintilla, "SCI_HOMEWRAPEXTEND"):
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2489 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2490 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2491 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2492 'Extend selection to start of display or document line'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2493 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2494 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2495 'Extend selection to start of display or document line'),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2496 0, 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2497 self.editorActGrp,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2498 'vm_edit_extend_selection_start_display_document_line')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2499 self.esm.setMapping(act, QsciScintilla.SCI_HOMEWRAPEXTEND)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2500 act.triggered.connect(self.esm.map)
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2501 self.editActions.append(act)
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2502
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2503 if hasattr(QsciScintilla, "SCI_VCHOMEWRAP"):
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2504 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2505 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2506 'ViewManager',
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2507 'Move to first visible character in display or document'
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2508 ' line'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2509 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2510 'ViewManager',
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2511 'Move to first visible character in display or document'
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2512 ' line'),
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2513 0, 0,
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2514 self.editorActGrp,
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2515 'vm_edit_move_first_visible_char_document_line')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2516 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMEWRAP)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2517 act.triggered.connect(self.esm.map)
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2518 self.editActions.append(act)
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2519
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2520 if hasattr(QsciScintilla, "SCI_VCHOMEWRAPEXTEND"):
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2521 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2522 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2523 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2524 'Extend selection to first visible character in'
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2525 ' display or document line'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2526 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2527 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2528 'Extend selection to first visible character in'
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2529 ' display or document line'),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2530 0, 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2531 self.editorActGrp,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2532 'vm_edit_extend_selection_first_visible_char_document_line')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2533 self.esm.setMapping(act, QsciScintilla.SCI_VCHOMEWRAPEXTEND)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2534 act.triggered.connect(self.esm.map)
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2535 self.editActions.append(act)
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2536
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2537 if hasattr(QsciScintilla, "SCI_LINEENDWRAP"):
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2538 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2539 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2540 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2541 'Move to end of display or document line'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2542 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2543 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2544 'Move to end of display or document line'),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2545 0, 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2546 self.editorActGrp, 'vm_edit_end_start_display_document_line')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2547 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDWRAP)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2548 act.triggered.connect(self.esm.map)
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2549 self.editActions.append(act)
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2550
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2551 if hasattr(QsciScintilla, "SCI_LINEENDWRAPEXTEND"):
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2552 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2553 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2554 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2555 'Extend selection to end of display or document line'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2556 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2557 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2558 'Extend selection to end of display or document line'),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2559 0, 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2560 self.editorActGrp,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2561 'vm_edit_extend_selection_end_display_document_line')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2562 self.esm.setMapping(act, QsciScintilla.SCI_LINEENDWRAPEXTEND)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2563 act.triggered.connect(self.esm.map)
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2564 self.editActions.append(act)
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2565
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2566 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEUP"):
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2567 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2568 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2569 'ViewManager', 'Stuttered move up one page'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2570 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2571 'ViewManager', 'Stuttered move up one page'),
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2572 0, 0,
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2573 self.editorActGrp, 'vm_edit_stuttered_move_up_page')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2574 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEUP)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2575 act.triggered.connect(self.esm.map)
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2576 self.editActions.append(act)
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2577
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2578 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEUPEXTEND"):
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2579 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2580 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2581 'ViewManager', 'Stuttered extend selection up one page'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2582 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2583 'ViewManager', 'Stuttered extend selection up one page'),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2584 0, 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2585 self.editorActGrp,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2586 'vm_edit_stuttered_extend_selection_up_page')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2587 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEUPEXTEND)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2588 act.triggered.connect(self.esm.map)
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2589 self.editActions.append(act)
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2590
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2591 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEDOWN"):
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2592 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2593 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2594 'ViewManager', 'Stuttered move down one page'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2595 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2596 'ViewManager', 'Stuttered move down one page'),
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2597 0, 0,
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2598 self.editorActGrp, 'vm_edit_stuttered_move_down_page')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2599 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEDOWN)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2600 act.triggered.connect(self.esm.map)
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2601 self.editActions.append(act)
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2602
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2603 if hasattr(QsciScintilla, "SCI_STUTTEREDPAGEDOWNEXTEND"):
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2604 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2605 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2606 'ViewManager', 'Stuttered extend selection down one page'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2607 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2608 'ViewManager', 'Stuttered extend selection down one page'),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2609 0, 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2610 self.editorActGrp,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2611 'vm_edit_stuttered_extend_selection_down_page')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2612 self.esm.setMapping(act, QsciScintilla.SCI_STUTTEREDPAGEDOWNEXTEND)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2613 act.triggered.connect(self.esm.map)
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2614 self.editActions.append(act)
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2615
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2616 if hasattr(QsciScintilla, "SCI_DELWORDRIGHTEND"):
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2617 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2618 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2619 'ViewManager', 'Delete right to end of next word'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2620 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2621 'ViewManager', 'Delete right to end of next word'),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2622 0, 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2623 self.editorActGrp, 'vm_edit_delete_right_end_next_word')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2624 if isMacPlatform():
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2625 act.setShortcut(QKeySequence(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2626 QCoreApplication.translate('ViewManager', 'Alt+Del')))
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2627 self.esm.setMapping(act, QsciScintilla.SCI_DELWORDRIGHTEND)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2628 act.triggered.connect(self.esm.map)
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2629 self.editActions.append(act)
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2630
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2631 if hasattr(QsciScintilla, "SCI_MOVESELECTEDLINESUP"):
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2632 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2633 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2634 'ViewManager', 'Move selected lines up one line'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2635 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2636 'ViewManager', 'Move selected lines up one line'),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2637 0, 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2638 self.editorActGrp, 'vm_edit_move_selection_up_one_line')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2639 self.esm.setMapping(act, QsciScintilla.SCI_MOVESELECTEDLINESUP)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2640 act.triggered.connect(self.esm.map)
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2641 self.editActions.append(act)
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2642
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2643 if hasattr(QsciScintilla, "SCI_MOVESELECTEDLINESDOWN"):
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2644 act = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2645 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2646 'ViewManager', 'Move selected lines down one line'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2647 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2648 'ViewManager', 'Move selected lines down one line'),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2649 0, 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2650 self.editorActGrp, 'vm_edit_move_selection_down_one_line')
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2651 self.esm.setMapping(act, QsciScintilla.SCI_MOVESELECTEDLINESDOWN)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2652 act.triggered.connect(self.esm.map)
1449
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2653 self.editActions.append(act)
36138359d3a3 Finished the Mac part of the QScintilla 2.6 support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1421
diff changeset
2654
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2655 self.editorActGrp.setEnabled(False)
2593
a2df0adce985 Added entires to convert the selection to upper/lower case to the edit menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2589
diff changeset
2656
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2657 self.editLowerCaseAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2658 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2659 'ViewManager', 'Convert selection to lower case'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2660 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2661 'ViewManager', 'Convert selection to lower case'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2662 QKeySequence(QCoreApplication.translate('ViewManager',
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2663 'Alt+Shift+U')),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2664 0, self.editActGrp, 'vm_edit_convert_selection_lower')
2593
a2df0adce985 Added entires to convert the selection to upper/lower case to the edit menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2589
diff changeset
2665 self.esm.setMapping(self.editLowerCaseAct, QsciScintilla.SCI_LOWERCASE)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2666 self.editLowerCaseAct.triggered.connect(self.esm.map)
2593
a2df0adce985 Added entires to convert the selection to upper/lower case to the edit menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2589
diff changeset
2667 self.editActions.append(self.editLowerCaseAct)
a2df0adce985 Added entires to convert the selection to upper/lower case to the edit menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2589
diff changeset
2668
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2669 self.editUpperCaseAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2670 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2671 'ViewManager', 'Convert selection to upper case'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2672 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2673 'ViewManager', 'Convert selection to upper case'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2674 QKeySequence(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2675 'ViewManager', 'Ctrl+Shift+U')),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2676 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2677 self.editActGrp, 'vm_edit_convert_selection_upper')
2593
a2df0adce985 Added entires to convert the selection to upper/lower case to the edit menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2589
diff changeset
2678 self.esm.setMapping(self.editUpperCaseAct, QsciScintilla.SCI_UPPERCASE)
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2679 self.editUpperCaseAct.triggered.connect(self.esm.map)
2593
a2df0adce985 Added entires to convert the selection to upper/lower case to the edit menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2589
diff changeset
2680 self.editActions.append(self.editUpperCaseAct)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2681
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2682 def initEditMenu(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2683 """
2965
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2886
diff changeset
2684 Public method to create the Edit menu.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2685
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2686 @return the generated menu
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2687 """
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2688 autocompletionMenu = QMenu(
4153
95b18307079f Corrected some auto-completion related terms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4133
diff changeset
2689 QCoreApplication.translate('ViewManager', 'Complete'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2690 self.ui)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2691 autocompletionMenu.setTearOffEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2692 autocompletionMenu.addAction(self.autoCompleteAct)
4814
0e3903a7480d Synchronized the Complete menus of the global Edit menu and the editor context menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4636
diff changeset
2693 autocompletionMenu.addSeparator()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2694 autocompletionMenu.addAction(self.autoCompleteFromDocAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2695 autocompletionMenu.addAction(self.autoCompleteFromAPIsAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2696 autocompletionMenu.addAction(self.autoCompleteFromAllAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2697
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2698 searchMenu = QMenu(
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2699 QCoreApplication.translate('ViewManager', '&Search'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2700 self.ui)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2701 searchMenu.setTearOffEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2702 searchMenu.addAction(self.quickSearchAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2703 searchMenu.addAction(self.quickSearchBackAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2704 searchMenu.addAction(self.searchAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2705 searchMenu.addAction(self.searchNextAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2706 searchMenu.addAction(self.searchPrevAct)
2213
022f4ad3ed19 Added actions to search for the next/previous occurence of the current word (default shortcuts Ctrl+. and Ctrl+,).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2211
diff changeset
2707 searchMenu.addAction(self.searchNextWordAct)
022f4ad3ed19 Added actions to search for the next/previous occurence of the current word (default shortcuts Ctrl+. and Ctrl+,).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2211
diff changeset
2708 searchMenu.addAction(self.searchPrevWordAct)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2709 searchMenu.addAction(self.replaceAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2710 searchMenu.addSeparator()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2711 searchMenu.addAction(self.searchClearMarkersAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2712 searchMenu.addSeparator()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2713 searchMenu.addAction(self.searchFilesAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2714 searchMenu.addAction(self.replaceFilesAct)
2214
4ce1ebcc3806 Added actions to open the find in files and replace in files dialogs in a mode that searches open files only.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2213
diff changeset
2715 searchMenu.addSeparator()
4ce1ebcc3806 Added actions to open the find in files and replace in files dialogs in a mode that searches open files only.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2213
diff changeset
2716 searchMenu.addAction(self.searchOpenFilesAct)
4ce1ebcc3806 Added actions to open the find in files and replace in files dialogs in a mode that searches open files only.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2213
diff changeset
2717 searchMenu.addAction(self.replaceOpenFilesAct)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2718
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2719 menu = QMenu(QCoreApplication.translate('ViewManager', '&Edit'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2720 self.ui)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2721 menu.setTearOffEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2722 menu.addAction(self.undoAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2723 menu.addAction(self.redoAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2724 menu.addAction(self.revertAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2725 menu.addSeparator()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2726 menu.addAction(self.cutAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2727 menu.addAction(self.copyAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2728 menu.addAction(self.pasteAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2729 menu.addAction(self.deleteAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2730 menu.addSeparator()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2731 menu.addAction(self.indentAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2732 menu.addAction(self.unindentAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2733 menu.addAction(self.smartIndentAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2734 menu.addSeparator()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2735 menu.addAction(self.commentAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2736 menu.addAction(self.uncommentAct)
1500
6ce6deb421cf Added an action to the editor to toggle block comments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1490
diff changeset
2737 menu.addAction(self.toggleCommentAct)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2738 menu.addAction(self.streamCommentAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2739 menu.addAction(self.boxCommentAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2740 menu.addSeparator()
2593
a2df0adce985 Added entires to convert the selection to upper/lower case to the edit menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2589
diff changeset
2741 menu.addAction(self.editUpperCaseAct)
a2df0adce985 Added entires to convert the selection to upper/lower case to the edit menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2589
diff changeset
2742 menu.addAction(self.editLowerCaseAct)
a2df0adce985 Added entires to convert the selection to upper/lower case to the edit menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2589
diff changeset
2743 menu.addAction(self.sortAct)
a2df0adce985 Added entires to convert the selection to upper/lower case to the edit menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2589
diff changeset
2744 menu.addSeparator()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2745 menu.addMenu(autocompletionMenu)
4153
95b18307079f Corrected some auto-completion related terms.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4133
diff changeset
2746 menu.addAction(self.calltipsAct)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2747 menu.addSeparator()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2748 menu.addMenu(searchMenu)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2749 menu.addSeparator()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2750 menu.addAction(self.gotoAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2751 menu.addAction(self.gotoBraceAct)
1169
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
2752 menu.addAction(self.gotoLastEditAct)
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
2753 menu.addAction(self.gotoPreviousDefAct)
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
2754 menu.addAction(self.gotoNextDefAct)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2755 menu.addSeparator()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2756 menu.addAction(self.selectBraceAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2757 menu.addAction(self.selectAllAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2758 menu.addAction(self.deselectAllAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2759 menu.addSeparator()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2760 menu.addAction(self.shortenEmptyAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2761 menu.addAction(self.convertEOLAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2762
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2763 return menu
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2764
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2765 def initEditToolbar(self, toolbarManager):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2766 """
2965
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2886
diff changeset
2767 Public method to create the Edit toolbar.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2768
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2769 @param toolbarManager reference to a toolbar manager object
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2770 (E5ToolBarManager)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2771 @return the generated toolbar
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2772 """
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2773 tb = QToolBar(QCoreApplication.translate('ViewManager', 'Edit'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2774 self.ui)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2775 tb.setIconSize(UI.Config.ToolBarIconSize)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2776 tb.setObjectName("EditToolbar")
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2777 tb.setToolTip(QCoreApplication.translate('ViewManager', 'Edit'))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2778
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2779 tb.addAction(self.undoAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2780 tb.addAction(self.redoAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2781 tb.addSeparator()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2782 tb.addAction(self.cutAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2783 tb.addAction(self.copyAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2784 tb.addAction(self.pasteAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2785 tb.addAction(self.deleteAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2786 tb.addSeparator()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2787 tb.addAction(self.commentAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2788 tb.addAction(self.uncommentAct)
1500
6ce6deb421cf Added an action to the editor to toggle block comments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1490
diff changeset
2789 tb.addAction(self.toggleCommentAct)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2790
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2791 toolbarManager.addToolBar(tb, tb.windowTitle())
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2792 toolbarManager.addAction(self.smartIndentAct, tb.windowTitle())
3970
c16a52652af5 Removed the Indent and Unindent action from the edit toolbar because these are readily available via the keyboard (tab and shift-tab).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3670
diff changeset
2793 toolbarManager.addAction(self.indentAct, tb.windowTitle())
c16a52652af5 Removed the Indent and Unindent action from the edit toolbar because these are readily available via the keyboard (tab and shift-tab).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3670
diff changeset
2794 toolbarManager.addAction(self.unindentAct, tb.windowTitle())
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2795
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2796 return tb
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2797
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2798 ##################################################################
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2799 ## Initialize the search related actions and the search toolbar
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2800 ##################################################################
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2801
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2802 def __initSearchActions(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2803 """
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2804 Private method defining the user interface actions for the search
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2805 commands.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2806 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2807 self.searchActGrp = createActionGroup(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2808
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2809 self.searchAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2810 QCoreApplication.translate('ViewManager', 'Search'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2811 UI.PixmapCache.getIcon("find.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2812 QCoreApplication.translate('ViewManager', '&Search...'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2813 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2814 'ViewManager', "Ctrl+F", "Search|Search")),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2815 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2816 self.searchActGrp, 'vm_search')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2817 self.searchAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2818 'ViewManager', 'Search for a text'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2819 self.searchAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2820 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2821 """<b>Search</b>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2822 """<p>Search for some text in the current editor. A"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2823 """ dialog is shown to enter the searchtext and options"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2824 """ for the search.</p>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2825 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2826 self.searchAct.triggered.connect(self.__search)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2827 self.searchActions.append(self.searchAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2828
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2829 self.searchNextAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2830 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2831 'ViewManager', 'Search next'),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2832 UI.PixmapCache.getIcon("findNext.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2833 QCoreApplication.translate('ViewManager', 'Search &next'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2834 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2835 'ViewManager', "F3", "Search|Search next")),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2836 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2837 self.searchActGrp, 'vm_search_next')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2838 self.searchNextAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2839 'ViewManager', 'Search next occurrence of text'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2840 self.searchNextAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2841 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2842 """<b>Search next</b>"""
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2843 """<p>Search the next occurrence of some text in the current"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2844 """ editor. The previously entered searchtext and options are"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2845 """ reused.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2846 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2847 self.searchNextAct.triggered.connect(self.__searchWidget.findNext)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2848 self.searchActions.append(self.searchNextAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2849
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2850 self.searchPrevAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2851 QCoreApplication.translate('ViewManager', 'Search previous'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2852 UI.PixmapCache.getIcon("findPrev.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2853 QCoreApplication.translate('ViewManager', 'Search &previous'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2854 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2855 'ViewManager', "Shift+F3", "Search|Search previous")),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2856 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2857 self.searchActGrp, 'vm_search_previous')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2858 self.searchPrevAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2859 'ViewManager', 'Search previous occurrence of text'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2860 self.searchPrevAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2861 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2862 """<b>Search previous</b>"""
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2863 """<p>Search the previous occurrence of some text in the current"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2864 """ editor. The previously entered searchtext and options are"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2865 """ reused.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2866 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2867 self.searchPrevAct.triggered.connect(self.__searchWidget.findPrev)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2868 self.searchActions.append(self.searchPrevAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2869
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2870 self.searchClearMarkersAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2871 QCoreApplication.translate('ViewManager', 'Clear search markers'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2872 UI.PixmapCache.getIcon("findClear.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2873 QCoreApplication.translate('ViewManager', 'Clear search markers'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2874 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2875 'ViewManager', "Ctrl+3", "Search|Clear search markers")),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2876 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2877 self.searchActGrp, 'vm_clear_search_markers')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2878 self.searchClearMarkersAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2879 'ViewManager', 'Clear all displayed search markers'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2880 self.searchClearMarkersAct.setWhatsThis(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2881 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2882 """<b>Clear search markers</b>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2883 """<p>Clear all displayed search markers.</p>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2884 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2885 self.searchClearMarkersAct.triggered.connect(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2886 self.__searchClearMarkers)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2887 self.searchActions.append(self.searchClearMarkersAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2888
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2889 self.searchNextWordAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2890 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2891 'ViewManager', 'Search current word forward'),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2892 UI.PixmapCache.getIcon("findWordNext.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2893 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2894 'ViewManager', 'Search current word forward'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2895 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2896 'ViewManager',
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2897 "Ctrl+.", "Search|Search current word forward")),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2898 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2899 self.searchActGrp, 'vm_search_word_next')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2900 self.searchNextWordAct.setStatusTip(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2901 'ViewManager',
2213
022f4ad3ed19 Added actions to search for the next/previous occurence of the current word (default shortcuts Ctrl+. and Ctrl+,).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2211
diff changeset
2902 'Search next occurrence of the current word'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2903 self.searchNextWordAct.setWhatsThis(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2904 'ViewManager',
2213
022f4ad3ed19 Added actions to search for the next/previous occurence of the current word (default shortcuts Ctrl+. and Ctrl+,).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2211
diff changeset
2905 """<b>Search current word forward</b>"""
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2906 """<p>Search the next occurrence of the current word of the"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2907 """ current editor.</p>"""
2213
022f4ad3ed19 Added actions to search for the next/previous occurence of the current word (default shortcuts Ctrl+. and Ctrl+,).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2211
diff changeset
2908 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2909 self.searchNextWordAct.triggered.connect(self.__findNextWord)
2213
022f4ad3ed19 Added actions to search for the next/previous occurence of the current word (default shortcuts Ctrl+. and Ctrl+,).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2211
diff changeset
2910 self.searchActions.append(self.searchNextWordAct)
022f4ad3ed19 Added actions to search for the next/previous occurence of the current word (default shortcuts Ctrl+. and Ctrl+,).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2211
diff changeset
2911
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2912 self.searchPrevWordAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2913 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2914 'ViewManager', 'Search current word backward'),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2915 UI.PixmapCache.getIcon("findWordPrev.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2916 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2917 'ViewManager', 'Search current word backward'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2918 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2919 'ViewManager',
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2920 "Ctrl+,", "Search|Search current word backward")),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2921 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2922 self.searchActGrp, 'vm_search_word_previous')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2923 self.searchPrevWordAct.setStatusTip(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2924 'ViewManager',
2213
022f4ad3ed19 Added actions to search for the next/previous occurence of the current word (default shortcuts Ctrl+. and Ctrl+,).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2211
diff changeset
2925 'Search previous occurrence of the current word'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2926 self.searchPrevWordAct.setWhatsThis(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2927 'ViewManager',
2213
022f4ad3ed19 Added actions to search for the next/previous occurence of the current word (default shortcuts Ctrl+. and Ctrl+,).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2211
diff changeset
2928 """<b>Search current word backward</b>"""
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2929 """<p>Search the previous occurrence of the current word of the"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2930 """ current editor.</p>"""
2213
022f4ad3ed19 Added actions to search for the next/previous occurence of the current word (default shortcuts Ctrl+. and Ctrl+,).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2211
diff changeset
2931 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2932 self.searchPrevWordAct.triggered.connect(self.__findPrevWord)
2213
022f4ad3ed19 Added actions to search for the next/previous occurence of the current word (default shortcuts Ctrl+. and Ctrl+,).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2211
diff changeset
2933 self.searchActions.append(self.searchPrevWordAct)
022f4ad3ed19 Added actions to search for the next/previous occurence of the current word (default shortcuts Ctrl+. and Ctrl+,).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2211
diff changeset
2934
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2935 self.replaceAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2936 QCoreApplication.translate('ViewManager', 'Replace'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2937 QCoreApplication.translate('ViewManager', '&Replace...'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2938 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2939 'ViewManager', "Ctrl+R", "Search|Replace")),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2940 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2941 self.searchActGrp, 'vm_search_replace')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2942 self.replaceAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2943 'ViewManager', 'Replace some text'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2944 self.replaceAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2945 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2946 """<b>Replace</b>"""
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2947 """<p>Search for some text in the current editor and replace it."""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2948 """ A dialog is shown to enter the searchtext, the replacement"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2949 """ text and options for the search and replace.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2950 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2951 self.replaceAct.triggered.connect(self.__replace)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2952 self.searchActions.append(self.replaceAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2953
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2954 self.quickSearchAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2955 QCoreApplication.translate('ViewManager', 'Quicksearch'),
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2956 UI.PixmapCache.getIcon("quickFindNext.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2957 QCoreApplication.translate('ViewManager', '&Quicksearch'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2958 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2959 'ViewManager', "Ctrl+Shift+K", "Search|Quicksearch")),
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2960 0,
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2961 self.searchActGrp, 'vm_quicksearch')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2962 self.quickSearchAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2963 'ViewManager', 'Perform a quicksearch'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2964 self.quickSearchAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2965 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2966 """<b>Quicksearch</b>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2967 """<p>This activates the quicksearch function of the IDE by"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2968 """ giving focus to the quicksearch entry field. If this field"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2969 """ is already active and contains text, it searches for the"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2970 """ next occurrence of this text.</p>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2971 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2972 self.quickSearchAct.triggered.connect(self.__quickSearch)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2973 self.searchActions.append(self.quickSearchAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2974
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2975 self.quickSearchBackAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2976 QCoreApplication.translate(
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2977 'ViewManager', 'Quicksearch backwards'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2978 UI.PixmapCache.getIcon("quickFindPrev.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2979 QCoreApplication.translate(
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2980 'ViewManager', 'Quicksearch &backwards'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2981 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
2982 'ViewManager',
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2983 "Ctrl+Shift+J", "Search|Quicksearch backwards")),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2984 0, self.searchActGrp, 'vm_quicksearch_backwards')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2985 self.quickSearchBackAct.setStatusTip(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2986 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2987 'Perform a quicksearch backwards'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2988 self.quickSearchBackAct.setWhatsThis(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2989 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2990 """<b>Quicksearch backwards</b>"""
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2991 """<p>This searches the previous occurrence of the quicksearch"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2992 """ text.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2993 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
2994 self.quickSearchBackAct.triggered.connect(self.__quickSearchPrev)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2995 self.searchActions.append(self.quickSearchBackAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2996
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2997 self.quickSearchExtendAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
2998 QCoreApplication.translate('ViewManager', 'Quicksearch extend'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
2999 UI.PixmapCache.getIcon("quickFindExtend.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3000 QCoreApplication.translate('ViewManager', 'Quicksearch e&xtend'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3001 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3002 'ViewManager', "Ctrl+Shift+H", "Search|Quicksearch extend")),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3003 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3004 self.searchActGrp, 'vm_quicksearch_extend')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3005 self.quickSearchExtendAct.setStatusTip(QCoreApplication.translate(
3034
7ce719013078 Fixed various coding style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3031
diff changeset
3006 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3007 'Extend the quicksearch to the end of the current word'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3008 self.quickSearchExtendAct.setWhatsThis(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3009 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3010 """<b>Quicksearch extend</b>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3011 """<p>This extends the quicksearch text to the end of the word"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3012 """ currently found.</p>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3013 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
3014 self.quickSearchExtendAct.triggered.connect(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3015 self.__quickSearchExtend)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3016 self.searchActions.append(self.quickSearchExtendAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3017
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3018 self.gotoAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3019 QCoreApplication.translate('ViewManager', 'Goto Line'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3020 UI.PixmapCache.getIcon("goto.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3021 QCoreApplication.translate('ViewManager', '&Goto Line...'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3022 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3023 'ViewManager', "Ctrl+G", "Search|Goto Line")),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3024 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3025 self.searchActGrp, 'vm_search_goto_line')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3026 self.gotoAct.setStatusTip(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3027 'ViewManager', 'Goto Line'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3028 self.gotoAct.setWhatsThis(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3029 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3030 """<b>Goto Line</b>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3031 """<p>Go to a specific line of text in the current editor."""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3032 """ A dialog is shown to enter the linenumber.</p>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3033 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
3034 self.gotoAct.triggered.connect(self.__goto)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3035 self.searchActions.append(self.gotoAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3036
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3037 self.gotoBraceAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3038 QCoreApplication.translate('ViewManager', 'Goto Brace'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3039 UI.PixmapCache.getIcon("gotoBrace.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3040 QCoreApplication.translate('ViewManager', 'Goto &Brace'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3041 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3042 'ViewManager', "Ctrl+L", "Search|Goto Brace")),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3043 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3044 self.searchActGrp, 'vm_search_goto_brace')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3045 self.gotoBraceAct.setStatusTip(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3046 'ViewManager', 'Goto Brace'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3047 self.gotoBraceAct.setWhatsThis(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3048 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3049 """<b>Goto Brace</b>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3050 """<p>Go to the matching brace in the current editor.</p>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3051 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
3052 self.gotoBraceAct.triggered.connect(self.__gotoBrace)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3053 self.searchActions.append(self.gotoBraceAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3054
1169
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
3055 self.gotoLastEditAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3056 QCoreApplication.translate(
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3057 'ViewManager', 'Goto Last Edit Location'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3058 UI.PixmapCache.getIcon("gotoLastEditPosition.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3059 QCoreApplication.translate(
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3060 'ViewManager', 'Goto Last &Edit Location'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3061 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3062 'ViewManager',
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3063 "Ctrl+Shift+G", "Search|Goto Last Edit Location")),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3064 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3065 self.searchActGrp, 'vm_search_goto_last_edit_location')
1169
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
3066 self.gotoLastEditAct.setStatusTip(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3067 QCoreApplication.translate(
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3068 'ViewManager', 'Goto Last Edit Location'))
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3069 self.gotoLastEditAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3070 'ViewManager',
1169
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
3071 """<b>Goto Last Edit Location</b>"""
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3072 """<p>Go to the location of the last edit in the current"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3073 """ editor.</p>"""
1169
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
3074 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
3075 self.gotoLastEditAct.triggered.connect(self.__gotoLastEditPosition)
1169
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
3076 self.searchActions.append(self.gotoLastEditAct)
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
3077
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
3078 self.gotoPreviousDefAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3079 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3080 'ViewManager', 'Goto Previous Method or Class'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3081 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3082 'ViewManager', 'Goto Previous Method or Class'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3083 QKeySequence(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3084 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3085 "Ctrl+Shift+Up", "Search|Goto Previous Method or Class")),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3086 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3087 self.searchActGrp, 'vm_search_goto_previous_method_or_class')
1169
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
3088 self.gotoPreviousDefAct.setStatusTip(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3089 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3090 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3091 'Go to the previous method or class definition'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3092 self.gotoPreviousDefAct.setWhatsThis(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3093 'ViewManager',
1169
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
3094 """<b>Goto Previous Method or Class</b>"""
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3095 """<p>Goes to the line of the previous method or class"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3096 """ definition and highlights the name.</p>"""
1169
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
3097 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
3098 self.gotoPreviousDefAct.triggered.connect(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3099 self.__gotoPreviousMethodClass)
1169
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
3100 self.searchActions.append(self.gotoPreviousDefAct)
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
3101
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
3102 self.gotoNextDefAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3103 QCoreApplication.translate(
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3104 'ViewManager', 'Goto Next Method or Class'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3105 QCoreApplication.translate(
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3106 'ViewManager', 'Goto Next Method or Class'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3107 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3108 'ViewManager',
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3109 "Ctrl+Shift+Down", "Search|Goto Next Method or Class")),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3110 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3111 self.searchActGrp, 'vm_search_goto_next_method_or_class')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3112 self.gotoNextDefAct.setStatusTip(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3113 'ViewManager', 'Go to the next method or class definition'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3114 self.gotoNextDefAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3115 'ViewManager',
1169
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
3116 """<b>Goto Next Method or Class</b>"""
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
3117 """<p>Goes to the line of the next method or class definition"""
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
3118 """ and highlights the name.</p>"""
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
3119 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
3120 self.gotoNextDefAct.triggered.connect(self.__gotoNextMethodClass)
1169
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
3121 self.searchActions.append(self.gotoNextDefAct)
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
3122
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3123 self.searchActGrp.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3124
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3125 self.searchFilesAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3126 QCoreApplication.translate('ViewManager', 'Search in Files'),
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3127 UI.PixmapCache.getIcon("projectFind.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3128 QCoreApplication.translate('ViewManager', 'Search in &Files...'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3129 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3130 'ViewManager', "Shift+Ctrl+F", "Search|Search Files")),
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3131 0,
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3132 self, 'vm_search_in_files')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3133 self.searchFilesAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3134 'ViewManager', 'Search for a text in files'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3135 self.searchFilesAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3136 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3137 """<b>Search in Files</b>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3138 """<p>Search for some text in the files of a directory tree"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3139 """ or the project. A dialog is shown to enter the searchtext"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3140 """ and options for the search and to display the result.</p>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3141 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
3142 self.searchFilesAct.triggered.connect(self.__searchFiles)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3143 self.searchActions.append(self.searchFilesAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3144
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3145 self.replaceFilesAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3146 QCoreApplication.translate('ViewManager', 'Replace in Files'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3147 QCoreApplication.translate('ViewManager', 'Replace in F&iles...'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3148 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3149 'ViewManager', "Shift+Ctrl+R", "Search|Replace in Files")),
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3150 0,
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3151 self, 'vm_replace_in_files')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3152 self.replaceFilesAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3153 'ViewManager', 'Search for a text in files and replace it'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3154 self.replaceFilesAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3155 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3156 """<b>Replace in Files</b>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3157 """<p>Search for some text in the files of a directory tree"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3158 """ or the project and replace it. A dialog is shown to enter"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3159 """ the searchtext, the replacement text and options for the"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3160 """ search and to display the result.</p>"""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3161 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
3162 self.replaceFilesAct.triggered.connect(self.__replaceFiles)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3163 self.searchActions.append(self.replaceFilesAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3164
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3165 self.searchOpenFilesAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3166 QCoreApplication.translate(
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3167 'ViewManager', 'Search in Open Files'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3168 UI.PixmapCache.getIcon("documentFind.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3169 QCoreApplication.translate(
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3170 'ViewManager', 'Search in Open Files...'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3171 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3172 'ViewManager',
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3173 "Meta+Ctrl+Alt+F", "Search|Search Open Files")),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3174 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3175 self.searchActGrp, 'vm_search_in_open_files')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3176 self.searchOpenFilesAct.setStatusTip(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3177 'ViewManager', 'Search for a text in open files'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3178 self.searchOpenFilesAct.setWhatsThis(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3179 'ViewManager',
2214
4ce1ebcc3806 Added actions to open the find in files and replace in files dialogs in a mode that searches open files only.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2213
diff changeset
3180 """<b>Search in Open Files</b>"""
4ce1ebcc3806 Added actions to open the find in files and replace in files dialogs in a mode that searches open files only.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2213
diff changeset
3181 """<p>Search for some text in the currently opened files."""
4ce1ebcc3806 Added actions to open the find in files and replace in files dialogs in a mode that searches open files only.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2213
diff changeset
3182 """ A dialog is shown to enter the searchtext"""
4ce1ebcc3806 Added actions to open the find in files and replace in files dialogs in a mode that searches open files only.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2213
diff changeset
3183 """ and options for the search and to display the result.</p>"""
4ce1ebcc3806 Added actions to open the find in files and replace in files dialogs in a mode that searches open files only.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2213
diff changeset
3184 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
3185 self.searchOpenFilesAct.triggered.connect(self.__searchOpenFiles)
2214
4ce1ebcc3806 Added actions to open the find in files and replace in files dialogs in a mode that searches open files only.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2213
diff changeset
3186 self.searchActions.append(self.searchOpenFilesAct)
4ce1ebcc3806 Added actions to open the find in files and replace in files dialogs in a mode that searches open files only.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2213
diff changeset
3187
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3188 self.replaceOpenFilesAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3189 QCoreApplication.translate(
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3190 'ViewManager', 'Replace in Open Files'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3191 QCoreApplication.translate(
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3192 'ViewManager', 'Replace in Open Files...'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3193 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3194 'ViewManager',
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3195 "Meta+Ctrl+Alt+R", "Search|Replace in Open Files")),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3196 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3197 self.searchActGrp, 'vm_replace_in_open_files')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3198 self.replaceOpenFilesAct.setStatusTip(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3199 'ViewManager', 'Search for a text in open files and replace it'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3200 self.replaceOpenFilesAct.setWhatsThis(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3201 'ViewManager',
2214
4ce1ebcc3806 Added actions to open the find in files and replace in files dialogs in a mode that searches open files only.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2213
diff changeset
3202 """<b>Replace in Open Files</b>"""
4ce1ebcc3806 Added actions to open the find in files and replace in files dialogs in a mode that searches open files only.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2213
diff changeset
3203 """<p>Search for some text in the currently opened files"""
4ce1ebcc3806 Added actions to open the find in files and replace in files dialogs in a mode that searches open files only.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2213
diff changeset
3204 """ and replace it. A dialog is shown to enter"""
4ce1ebcc3806 Added actions to open the find in files and replace in files dialogs in a mode that searches open files only.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2213
diff changeset
3205 """ the searchtext, the replacement text and options for the"""
4ce1ebcc3806 Added actions to open the find in files and replace in files dialogs in a mode that searches open files only.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2213
diff changeset
3206 """ search and to display the result.</p>"""
4ce1ebcc3806 Added actions to open the find in files and replace in files dialogs in a mode that searches open files only.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2213
diff changeset
3207 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
3208 self.replaceOpenFilesAct.triggered.connect(self.__replaceOpenFiles)
2214
4ce1ebcc3806 Added actions to open the find in files and replace in files dialogs in a mode that searches open files only.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2213
diff changeset
3209 self.searchActions.append(self.replaceOpenFilesAct)
4ce1ebcc3806 Added actions to open the find in files and replace in files dialogs in a mode that searches open files only.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2213
diff changeset
3210
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3211 def initSearchToolbars(self, toolbarManager):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3212 """
2965
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2886
diff changeset
3213 Public method to create the Search toolbars.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3214
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3215 @param toolbarManager reference to a toolbar manager object
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3216 (E5ToolBarManager)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3217 @return a tuple of the generated toolbar (search, quicksearch)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3218 """
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3219 qtb = QToolBar(QCoreApplication.translate(
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3220 'ViewManager', 'Quicksearch'), self.ui)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3221 qtb.setIconSize(UI.Config.ToolBarIconSize)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3222 qtb.setObjectName("QuicksearchToolbar")
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3223 qtb.setToolTip(QCoreApplication.translate(
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3224 'ViewManager', 'Quicksearch'))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3225
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3226 self.quickFindLineEdit = QuickSearchLineEdit(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3227 self.quickFindtextCombo = QComboBox(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3228 self.quickFindtextCombo.setEditable(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3229 self.quickFindtextCombo.setLineEdit(self.quickFindLineEdit)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3230 self.quickFindtextCombo.setDuplicatesEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3231 self.quickFindtextCombo.setInsertPolicy(QComboBox.InsertAtTop)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3232 self.quickFindtextCombo.lastActive = None
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3233 self.quickFindtextCombo.lastCursorPos = None
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3234 self.quickFindtextCombo.lastSearchText = ""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3235 self.quickFindtextCombo._editor = self.quickFindtextCombo.lineEdit()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3236 # this allows us not to jump across searched text
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3237 # just because of autocompletion enabled
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3238 self.quickFindtextCombo.setMinimumWidth(250)
716
c62f08259b1a Modified the sizing behavior of the quicksearch combo.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
3239 self.quickFindtextCombo.setSizeAdjustPolicy(
c62f08259b1a Modified the sizing behavior of the quicksearch combo.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
3240 QComboBox.AdjustToMinimumContentsLengthWithIcon)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3241 self.quickFindtextCombo.addItem("")
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3242 self.quickFindtextCombo.setWhatsThis(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3243 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3244 """<p>Enter the searchtext directly into this field."""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3245 """ The search will be performed case insensitive."""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3246 """ The quicksearch function is activated upon activation"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3247 """ of the quicksearch next action (default key Ctrl+Shift+K),"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3248 """ if this entry field does not have the input focus."""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3249 """ Otherwise it searches for the next occurrence of the"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3250 """ text entered. The quicksearch backwards action"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3251 """ (default key Ctrl+Shift+J) searches backward."""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3252 """ Activating the 'quicksearch extend' action"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3253 """ (default key Ctrl+Shift+H) extends the current"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3254 """ searchtext to the end of the currently found word."""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3255 """ The quicksearch can be ended by pressing the Return key"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3256 """ while the quicksearch entry has the the input focus.</p>"""
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3257 ))
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3258 self.quickFindtextCombo._editor.returnPressed.connect(
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3259 self.__quickSearchEnter)
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3260 self.quickFindtextCombo._editor.textChanged.connect(
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3261 self.__quickSearchText)
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3262 self.quickFindtextCombo._editor.escPressed.connect(
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3263 self.__quickSearchEscape)
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3264 self.quickFindtextCombo._editor.gotFocus.connect(
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3265 self.__quickSearchFocusIn)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3266 self.quickFindtextAction = QWidgetAction(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3267 self.quickFindtextAction.setDefaultWidget(self.quickFindtextCombo)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3268 self.quickFindtextAction.setObjectName("vm_quickfindtext_action")
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
3269 self.quickFindtextAction.setText(self.tr("Quicksearch Textedit"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3270 qtb.addAction(self.quickFindtextAction)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3271 qtb.addAction(self.quickSearchAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3272 qtb.addAction(self.quickSearchBackAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3273 qtb.addAction(self.quickSearchExtendAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3274 self.quickFindtextCombo.setEnabled(False)
1128
b8ab8eac9dde Fixed an issue with the quick search actions anabled state and fixed an issue with the quicksearch toolbar not being shown, when quick search is activated while the toolbar is hidden.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
3275 self.__quickSearchToolbar = qtb
b8ab8eac9dde Fixed an issue with the quick search actions anabled state and fixed an issue with the quicksearch toolbar not being shown, when quick search is activated while the toolbar is hidden.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
3276 self.__quickSearchToolbarVisibility = None
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3277
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3278 tb = QToolBar(QCoreApplication.translate('ViewManager', 'Search'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3279 self.ui)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3280 tb.setIconSize(UI.Config.ToolBarIconSize)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3281 tb.setObjectName("SearchToolbar")
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3282 tb.setToolTip(QCoreApplication.translate('ViewManager', 'Search'))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3283
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3284 tb.addAction(self.searchAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3285 tb.addAction(self.searchNextAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3286 tb.addAction(self.searchPrevAct)
2215
5b49d2731fa3 Fixed an omission of the recent changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2214
diff changeset
3287 tb.addAction(self.searchNextWordAct)
5b49d2731fa3 Fixed an omission of the recent changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2214
diff changeset
3288 tb.addAction(self.searchPrevWordAct)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3289 tb.addSeparator()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3290 tb.addAction(self.searchClearMarkersAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3291 tb.addSeparator()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3292 tb.addAction(self.searchFilesAct)
2214
4ce1ebcc3806 Added actions to open the find in files and replace in files dialogs in a mode that searches open files only.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2213
diff changeset
3293 tb.addAction(self.searchOpenFilesAct)
1169
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
3294 tb.addSeparator()
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
3295 tb.addAction(self.gotoLastEditAct)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3296
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3297 tb.setAllowedAreas(
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3298 Qt.ToolBarAreas(Qt.TopToolBarArea | Qt.BottomToolBarArea))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3299
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3300 toolbarManager.addToolBar(qtb, qtb.windowTitle())
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3301 toolbarManager.addToolBar(tb, tb.windowTitle())
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3302 toolbarManager.addAction(self.gotoAct, tb.windowTitle())
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3303 toolbarManager.addAction(self.gotoBraceAct, tb.windowTitle())
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3304
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3305 return tb, qtb
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3306
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3307 ##################################################################
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3308 ## Initialize the view related actions, view menu and toolbar
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3309 ##################################################################
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3310
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3311 def __initViewActions(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3312 """
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3313 Private method defining the user interface actions for the view
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3314 commands.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3315 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3316 self.viewActGrp = createActionGroup(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3317 self.viewFoldActGrp = createActionGroup(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3318
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3319 self.zoomInAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3320 QCoreApplication.translate('ViewManager', 'Zoom in'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3321 UI.PixmapCache.getIcon("zoomIn.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3322 QCoreApplication.translate('ViewManager', 'Zoom &in'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3323 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3324 'ViewManager', "Ctrl++", "View|Zoom in")),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3325 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3326 'ViewManager', "Zoom In", "View|Zoom in")),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3327 self.viewActGrp, 'vm_view_zoom_in')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3328 self.zoomInAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3329 'ViewManager', 'Zoom in on the text'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3330 self.zoomInAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3331 'ViewManager',
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3332 """<b>Zoom in</b>"""
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3333 """<p>Zoom in on the text. This makes the text bigger.</p>"""
3039
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
3334 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
3335 self.zoomInAct.triggered.connect(self.__zoomIn)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3336 self.viewActions.append(self.zoomInAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3337
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3338 self.zoomOutAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3339 QCoreApplication.translate('ViewManager', 'Zoom out'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3340 UI.PixmapCache.getIcon("zoomOut.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3341 QCoreApplication.translate('ViewManager', 'Zoom &out'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3342 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3343 'ViewManager', "Ctrl+-", "View|Zoom out")),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3344 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3345 'ViewManager', "Zoom Out", "View|Zoom out")),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3346 self.viewActGrp, 'vm_view_zoom_out')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3347 self.zoomOutAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3348 'ViewManager', 'Zoom out on the text'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3349 self.zoomOutAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3350 'ViewManager',
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3351 """<b>Zoom out</b>"""
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3352 """<p>Zoom out on the text. This makes the text smaller.</p>"""
3039
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
3353 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
3354 self.zoomOutAct.triggered.connect(self.__zoomOut)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3355 self.viewActions.append(self.zoomOutAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3356
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3357 self.zoomResetAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3358 QCoreApplication.translate('ViewManager', 'Zoom reset'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3359 UI.PixmapCache.getIcon("zoomReset.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3360 QCoreApplication.translate('ViewManager', 'Zoom &reset'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3361 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3362 'ViewManager', "Ctrl+0", "View|Zoom reset")),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3363 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3364 self.viewActGrp, 'vm_view_zoom_reset')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3365 self.zoomResetAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3366 'ViewManager', 'Reset the zoom of the text'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3367 self.zoomResetAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3368 'ViewManager',
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3369 """<b>Zoom reset</b>"""
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3370 """<p>Reset the zoom of the text. """
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3371 """This sets the zoom factor to 100%.</p>"""
3039
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
3372 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
3373 self.zoomResetAct.triggered.connect(self.__zoomReset)
1504
3e6ec85cede1 Added an action to reset the zoom factor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1500
diff changeset
3374 self.viewActions.append(self.zoomResetAct)
3e6ec85cede1 Added an action to reset the zoom factor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1500
diff changeset
3375
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3376 self.zoomToAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3377 QCoreApplication.translate('ViewManager', 'Zoom'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3378 UI.PixmapCache.getIcon("zoomTo.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3379 QCoreApplication.translate('ViewManager', '&Zoom'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3380 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3381 'ViewManager', "Ctrl+#", "View|Zoom")),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3382 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3383 self.viewActGrp, 'vm_view_zoom')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3384 self.zoomToAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3385 'ViewManager', 'Zoom the text'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3386 self.zoomToAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3387 'ViewManager',
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3388 """<b>Zoom</b>"""
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3389 """<p>Zoom the text. This opens a dialog where the"""
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3390 """ desired size can be entered.</p>"""
3039
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
3391 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
3392 self.zoomToAct.triggered.connect(self.__zoom)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3393 self.viewActions.append(self.zoomToAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3394
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3395 self.toggleAllAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3396 QCoreApplication.translate('ViewManager', 'Toggle all folds'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3397 QCoreApplication.translate('ViewManager', 'Toggle &all folds'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3398 0, 0, self.viewFoldActGrp, 'vm_view_toggle_all_folds')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3399 self.toggleAllAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3400 'ViewManager', 'Toggle all folds'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3401 self.toggleAllAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3402 'ViewManager',
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3403 """<b>Toggle all folds</b>"""
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3404 """<p>Toggle all folds of the current editor.</p>"""
3039
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
3405 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
3406 self.toggleAllAct.triggered.connect(self.__toggleAll)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3407 self.viewActions.append(self.toggleAllAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3408
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3409 self.toggleAllChildrenAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3410 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3411 'ViewManager', 'Toggle all folds (including children)'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3412 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3413 'ViewManager', 'Toggle all &folds (including children)'),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3414 0, 0, self.viewFoldActGrp, 'vm_view_toggle_all_folds_children')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3415 self.toggleAllChildrenAct.setStatusTip(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3416 'ViewManager', 'Toggle all folds (including children)'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3417 self.toggleAllChildrenAct.setWhatsThis(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3418 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3419 """<b>Toggle all folds (including children)</b>"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3420 """<p>Toggle all folds of the current editor including"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3421 """ all children.</p>"""
3039
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
3422 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
3423 self.toggleAllChildrenAct.triggered.connect(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3424 self.__toggleAllChildren)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3425 self.viewActions.append(self.toggleAllChildrenAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3426
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3427 self.toggleCurrentAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3428 QCoreApplication.translate('ViewManager', 'Toggle current fold'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3429 QCoreApplication.translate('ViewManager', 'Toggle &current fold'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3430 0, 0, self.viewFoldActGrp, 'vm_view_toggle_current_fold')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3431 self.toggleCurrentAct.setStatusTip(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3432 'ViewManager', 'Toggle current fold'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3433 self.toggleCurrentAct.setWhatsThis(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3434 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3435 """<b>Toggle current fold</b>"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3436 """<p>Toggle the folds of the current line of the current"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3437 """ editor.</p>"""
3039
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
3438 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
3439 self.toggleCurrentAct.triggered.connect(self.__toggleCurrent)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3440 self.viewActions.append(self.toggleCurrentAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3441
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3442 self.unhighlightAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3443 QCoreApplication.translate('ViewManager', 'Remove all highlights'),
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3444 UI.PixmapCache.getIcon("unhighlight.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3445 QCoreApplication.translate('ViewManager', 'Remove all highlights'),
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3446 0, 0,
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3447 self, 'vm_view_unhighlight')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3448 self.unhighlightAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3449 'ViewManager', 'Remove all highlights'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3450 self.unhighlightAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3451 'ViewManager',
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3452 """<b>Remove all highlights</b>"""
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3453 """<p>Remove the highlights of all editors.</p>"""
3039
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
3454 ))
3346
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
3455 self.unhighlightAct.triggered.connect(self.__unhighlight)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3456 self.viewActions.append(self.unhighlightAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3457
3101
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
3458 self.newDocumentViewAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3459 QCoreApplication.translate('ViewManager', 'New Document View'),
3101
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
3460 UI.PixmapCache.getIcon("documentNewView.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3461 QCoreApplication.translate('ViewManager', 'New &Document View'),
3101
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
3462 0, 0, self, 'vm_view_new_document_view')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3463 self.newDocumentViewAct.setStatusTip(QCoreApplication.translate(
3101
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
3464 'ViewManager', 'Open a new view of the current document'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3465 self.newDocumentViewAct.setWhatsThis(QCoreApplication.translate(
3101
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
3466 'ViewManager',
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
3467 """<b>New Document View</b>"""
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
3468 """<p>Opens a new view of the current document. Both views show"""
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
3469 """ the same document. However, the cursors may be positioned"""
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
3470 """ independently.</p>"""
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
3471 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
3472 self.newDocumentViewAct.triggered.connect(self.__newDocumentView)
3101
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
3473 self.viewActions.append(self.newDocumentViewAct)
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
3474
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
3475 self.newDocumentSplitViewAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3476 QCoreApplication.translate(
3101
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
3477 'ViewManager', 'New Document View (with new split)'),
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
3478 UI.PixmapCache.getIcon("splitVertical.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3479 QCoreApplication.translate(
3101
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
3480 'ViewManager', 'New Document View (with new split)'),
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
3481 0, 0, self, 'vm_view_new_document_split_view')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3482 self.newDocumentSplitViewAct.setStatusTip(QCoreApplication.translate(
3101
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
3483 'ViewManager',
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
3484 'Open a new view of the current document in a new split'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3485 self.newDocumentSplitViewAct.setWhatsThis(QCoreApplication.translate(
3101
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
3486 'ViewManager',
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
3487 """<b>New Document View</b>"""
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
3488 """<p>Opens a new view of the current document in a new split."""
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
3489 """ Both views show the same document. However, the cursors may"""
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
3490 """ be positioned independently.</p>"""
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
3491 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
3492 self.newDocumentSplitViewAct.triggered.connect(
3101
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
3493 self.__newDocumentSplitView)
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
3494 self.viewActions.append(self.newDocumentSplitViewAct)
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
3495
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3496 self.splitViewAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3497 QCoreApplication.translate('ViewManager', 'Split view'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3498 UI.PixmapCache.getIcon("splitVertical.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3499 QCoreApplication.translate('ViewManager', '&Split view'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3500 0, 0, self, 'vm_view_split_view')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3501 self.splitViewAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3502 'ViewManager', 'Add a split to the view'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3503 self.splitViewAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3504 'ViewManager',
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3505 """<b>Split view</b>"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3506 """<p>Add a split to the view.</p>"""
3039
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
3507 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
3508 self.splitViewAct.triggered.connect(self.__splitView)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3509 self.viewActions.append(self.splitViewAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3510
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3511 self.splitOrientationAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3512 QCoreApplication.translate('ViewManager', 'Arrange horizontally'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3513 QCoreApplication.translate('ViewManager', 'Arrange &horizontally'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3514 0, 0, self, 'vm_view_arrange_horizontally', True)
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3515 self.splitOrientationAct.setStatusTip(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3516 'ViewManager', 'Arrange the splitted views horizontally'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3517 self.splitOrientationAct.setWhatsThis(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3518 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3519 """<b>Arrange horizontally</b>"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3520 """<p>Arrange the splitted views horizontally.</p>"""
3039
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
3521 ))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3522 self.splitOrientationAct.setChecked(False)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
3523 self.splitOrientationAct.toggled[bool].connect(self.__splitOrientation)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3524 self.viewActions.append(self.splitOrientationAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3525
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3526 self.splitRemoveAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3527 QCoreApplication.translate('ViewManager', 'Remove split'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3528 UI.PixmapCache.getIcon("remsplitVertical.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3529 QCoreApplication.translate('ViewManager', '&Remove split'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3530 0, 0, self, 'vm_view_remove_split')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3531 self.splitRemoveAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3532 'ViewManager', 'Remove the current split'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3533 self.splitRemoveAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3534 'ViewManager',
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3535 """<b>Remove split</b>"""
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3536 """<p>Remove the current split.</p>"""
3039
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
3537 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
3538 self.splitRemoveAct.triggered.connect(self.removeSplit)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3539 self.viewActions.append(self.splitRemoveAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3540
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3541 self.nextSplitAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3542 QCoreApplication.translate('ViewManager', 'Next split'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3543 QCoreApplication.translate('ViewManager', '&Next split'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3544 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3545 'ViewManager', "Ctrl+Alt+N", "View|Next split")),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3546 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3547 self, 'vm_next_split')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3548 self.nextSplitAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3549 'ViewManager', 'Move to the next split'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3550 self.nextSplitAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3551 'ViewManager',
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3552 """<b>Next split</b>"""
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3553 """<p>Move to the next split.</p>"""
3039
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
3554 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
3555 self.nextSplitAct.triggered.connect(self.nextSplit)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3556 self.viewActions.append(self.nextSplitAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3557
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3558 self.prevSplitAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3559 QCoreApplication.translate('ViewManager', 'Previous split'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3560 QCoreApplication.translate('ViewManager', '&Previous split'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3561 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3562 'ViewManager', "Ctrl+Alt+P", "View|Previous split")),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3563 0, self, 'vm_previous_split')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3564 self.prevSplitAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3565 'ViewManager', 'Move to the previous split'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3566 self.prevSplitAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3567 'ViewManager',
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3568 """<b>Previous split</b>"""
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3569 """<p>Move to the previous split.</p>"""
3039
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
3570 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
3571 self.prevSplitAct.triggered.connect(self.prevSplit)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3572 self.viewActions.append(self.prevSplitAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3573
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3574 self.previewAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3575 QCoreApplication.translate('ViewManager', 'Preview'),
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3576 UI.PixmapCache.getIcon("previewer.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3577 QCoreApplication.translate('ViewManager', 'Preview'),
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3578 0, 0, self, 'vm_preview', True)
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3579 self.previewAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3580 'ViewManager', 'Preview the current file in the web browser'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3581 self.previewAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3582 'ViewManager',
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3583 """<b>Preview</b>"""
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3584 """<p>This opens the web browser with a preview of"""
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3585 """ the current file.</p>"""
3039
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
3586 ))
2424
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2415
diff changeset
3587 self.previewAct.setChecked(Preferences.getUI("ShowFilePreview"))
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2415
diff changeset
3588 self.previewAct.toggled[bool].connect(self.__previewEditor)
1196
77da430b4080 Added an action to preview the file in the eric web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1190
diff changeset
3589 self.viewActions.append(self.previewAct)
77da430b4080 Added an action to preview the file in the eric web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1190
diff changeset
3590
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3591 self.viewActGrp.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3592 self.viewFoldActGrp.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3593 self.unhighlightAct.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3594 self.splitViewAct.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3595 self.splitOrientationAct.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3596 self.splitRemoveAct.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3597 self.nextSplitAct.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3598 self.prevSplitAct.setEnabled(False)
2424
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2415
diff changeset
3599 self.previewAct.setEnabled(True)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3600
3547
c2a187c63209 Added code to save the editor split direction.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3484
diff changeset
3601 self.splitOrientationAct.setChecked(
c2a187c63209 Added code to save the editor split direction.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3484
diff changeset
3602 Preferences.getUI("SplitOrientationVertical"))
c2a187c63209 Added code to save the editor split direction.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3484
diff changeset
3603
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3604 def initViewMenu(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3605 """
2965
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2886
diff changeset
3606 Public method to create the View menu.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3607
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3608 @return the generated menu
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3609 """
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3610 menu = QMenu(QCoreApplication.translate('ViewManager', '&View'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3611 self.ui)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3612 menu.setTearOffEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3613 menu.addActions(self.viewActGrp.actions())
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3614 menu.addSeparator()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3615 menu.addActions(self.viewFoldActGrp.actions())
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3616 menu.addSeparator()
1196
77da430b4080 Added an action to preview the file in the eric web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1190
diff changeset
3617 menu.addAction(self.previewAct)
77da430b4080 Added an action to preview the file in the eric web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1190
diff changeset
3618 menu.addSeparator()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3619 menu.addAction(self.unhighlightAct)
3101
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
3620 menu.addSeparator()
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
3621 menu.addAction(self.newDocumentViewAct)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3622 if self.canSplit():
3101
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
3623 menu.addAction(self.newDocumentSplitViewAct)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3624 menu.addSeparator()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3625 menu.addAction(self.splitViewAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3626 menu.addAction(self.splitOrientationAct)
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
3627 menu.addAction(self.splitRemoveAct)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3628 menu.addAction(self.nextSplitAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3629 menu.addAction(self.prevSplitAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3630
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3631 return menu
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3632
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3633 def initViewToolbar(self, toolbarManager):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3634 """
2965
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2886
diff changeset
3635 Public method to create the View toolbar.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3636
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3637 @param toolbarManager reference to a toolbar manager object
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3638 (E5ToolBarManager)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3639 @return the generated toolbar
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3640 """
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3641 tb = QToolBar(QCoreApplication.translate('ViewManager', 'View'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3642 self.ui)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3643 tb.setIconSize(UI.Config.ToolBarIconSize)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3644 tb.setObjectName("ViewToolbar")
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3645 tb.setToolTip(QCoreApplication.translate('ViewManager', 'View'))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3646
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3647 tb.addActions(self.viewActGrp.actions())
1196
77da430b4080 Added an action to preview the file in the eric web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1190
diff changeset
3648 tb.addSeparator()
77da430b4080 Added an action to preview the file in the eric web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1190
diff changeset
3649 tb.addAction(self.previewAct)
3101
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
3650 tb.addSeparator()
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
3651 tb.addAction(self.newDocumentViewAct)
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
3652 if self.canSplit():
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
3653 tb.addAction(self.newDocumentSplitViewAct)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3654
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3655 toolbarManager.addToolBar(tb, tb.windowTitle())
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3656 toolbarManager.addAction(self.unhighlightAct, tb.windowTitle())
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3657 toolbarManager.addAction(self.splitViewAct, tb.windowTitle())
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3658 toolbarManager.addAction(self.splitRemoveAct, tb.windowTitle())
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3659
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3660 return tb
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3661
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3662 ##################################################################
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3663 ## Initialize the macro related actions and macro menu
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3664 ##################################################################
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3665
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3666 def __initMacroActions(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3667 """
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3668 Private method defining the user interface actions for the macro
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3669 commands.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3670 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3671 self.macroActGrp = createActionGroup(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3672
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3673 self.macroStartRecAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3674 QCoreApplication.translate(
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3675 'ViewManager', 'Start Macro Recording'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3676 QCoreApplication.translate(
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3677 'ViewManager', 'S&tart Macro Recording'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3678 0, 0, self.macroActGrp, 'vm_macro_start_recording')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3679 self.macroStartRecAct.setStatusTip(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3680 'ViewManager', 'Start Macro Recording'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3681 self.macroStartRecAct.setWhatsThis(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3682 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3683 """<b>Start Macro Recording</b>"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3684 """<p>Start recording editor commands into a new macro.</p>"""
3039
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
3685 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
3686 self.macroStartRecAct.triggered.connect(self.__macroStartRecording)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3687 self.macroActions.append(self.macroStartRecAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3688
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3689 self.macroStopRecAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3690 QCoreApplication.translate('ViewManager', 'Stop Macro Recording'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3691 QCoreApplication.translate('ViewManager', 'Sto&p Macro Recording'),
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3692 0, 0, self.macroActGrp, 'vm_macro_stop_recording')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3693 self.macroStopRecAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3694 'ViewManager', 'Stop Macro Recording'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3695 self.macroStopRecAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3696 'ViewManager',
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3697 """<b>Stop Macro Recording</b>"""
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3698 """<p>Stop recording editor commands into a new macro.</p>"""
3039
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
3699 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
3700 self.macroStopRecAct.triggered.connect(self.__macroStopRecording)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3701 self.macroActions.append(self.macroStopRecAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3702
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3703 self.macroRunAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3704 QCoreApplication.translate('ViewManager', 'Run Macro'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3705 QCoreApplication.translate('ViewManager', '&Run Macro'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3706 0, 0, self.macroActGrp, 'vm_macro_run')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3707 self.macroRunAct.setStatusTip(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3708 'ViewManager', 'Run Macro'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3709 self.macroRunAct.setWhatsThis(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3710 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3711 """<b>Run Macro</b>"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3712 """<p>Run a previously recorded editor macro.</p>"""
3039
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
3713 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
3714 self.macroRunAct.triggered.connect(self.__macroRun)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3715 self.macroActions.append(self.macroRunAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3716
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3717 self.macroDeleteAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3718 QCoreApplication.translate('ViewManager', 'Delete Macro'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3719 QCoreApplication.translate('ViewManager', '&Delete Macro'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3720 0, 0, self.macroActGrp, 'vm_macro_delete')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3721 self.macroDeleteAct.setStatusTip(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3722 'ViewManager', 'Delete Macro'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3723 self.macroDeleteAct.setWhatsThis(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3724 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3725 """<b>Delete Macro</b>"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3726 """<p>Delete a previously recorded editor macro.</p>"""
3039
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
3727 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
3728 self.macroDeleteAct.triggered.connect(self.__macroDelete)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3729 self.macroActions.append(self.macroDeleteAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3730
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3731 self.macroLoadAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3732 QCoreApplication.translate('ViewManager', 'Load Macro'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3733 QCoreApplication.translate('ViewManager', '&Load Macro'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3734 0, 0, self.macroActGrp, 'vm_macro_load')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3735 self.macroLoadAct.setStatusTip(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3736 'ViewManager', 'Load Macro'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3737 self.macroLoadAct.setWhatsThis(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3738 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3739 """<b>Load Macro</b>"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3740 """<p>Load an editor macro from a file.</p>"""
3039
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
3741 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
3742 self.macroLoadAct.triggered.connect(self.__macroLoad)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3743 self.macroActions.append(self.macroLoadAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3744
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3745 self.macroSaveAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3746 QCoreApplication.translate('ViewManager', 'Save Macro'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3747 QCoreApplication.translate('ViewManager', '&Save Macro'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3748 0, 0, self.macroActGrp, 'vm_macro_save')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3749 self.macroSaveAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3750 'ViewManager', 'Save Macro'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3751 self.macroSaveAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3752 'ViewManager',
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3753 """<b>Save Macro</b>"""
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3754 """<p>Save a previously recorded editor macro to a file.</p>"""
3039
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
3755 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
3756 self.macroSaveAct.triggered.connect(self.__macroSave)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3757 self.macroActions.append(self.macroSaveAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3758
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3759 self.macroActGrp.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3760
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3761 def initMacroMenu(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3762 """
2965
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2886
diff changeset
3763 Public method to create the Macro menu.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3764
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3765 @return the generated menu
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3766 """
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3767 menu = QMenu(QCoreApplication.translate('ViewManager', "&Macros"),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3768 self.ui)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3769 menu.setTearOffEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3770 menu.addActions(self.macroActGrp.actions())
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3771
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3772 return menu
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3773
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3774 #####################################################################
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3775 ## Initialize the bookmark related actions, bookmark menu and toolbar
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3776 #####################################################################
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3777
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3778 def __initBookmarkActions(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3779 """
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3780 Private method defining the user interface actions for the bookmarks
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3781 commands.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3782 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3783 self.bookmarkActGrp = createActionGroup(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3784
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3785 self.bookmarkToggleAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3786 QCoreApplication.translate('ViewManager', 'Toggle Bookmark'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3787 UI.PixmapCache.getIcon("bookmarkToggle.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3788 QCoreApplication.translate('ViewManager', '&Toggle Bookmark'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3789 QKeySequence(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3790 'ViewManager', "Alt+Ctrl+T", "Bookmark|Toggle")),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3791 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3792 self.bookmarkActGrp, 'vm_bookmark_toggle')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3793 self.bookmarkToggleAct.setStatusTip(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3794 'ViewManager', 'Toggle Bookmark'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3795 self.bookmarkToggleAct.setWhatsThis(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3796 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3797 """<b>Toggle Bookmark</b>"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3798 """<p>Toggle a bookmark at the current line of the current"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3799 """ editor.</p>"""
3039
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
3800 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
3801 self.bookmarkToggleAct.triggered.connect(self.__toggleBookmark)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3802 self.bookmarkActions.append(self.bookmarkToggleAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3803
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3804 self.bookmarkNextAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3805 QCoreApplication.translate('ViewManager', 'Next Bookmark'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3806 UI.PixmapCache.getIcon("bookmarkNext.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3807 QCoreApplication.translate('ViewManager', '&Next Bookmark'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3808 QKeySequence(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3809 'ViewManager', "Ctrl+PgDown", "Bookmark|Next")),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3810 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3811 self.bookmarkActGrp, 'vm_bookmark_next')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3812 self.bookmarkNextAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3813 'ViewManager', 'Next Bookmark'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3814 self.bookmarkNextAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3815 'ViewManager',
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3816 """<b>Next Bookmark</b>"""
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3817 """<p>Go to next bookmark of the current editor.</p>"""
3039
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
3818 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
3819 self.bookmarkNextAct.triggered.connect(self.__nextBookmark)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3820 self.bookmarkActions.append(self.bookmarkNextAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3821
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3822 self.bookmarkPreviousAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3823 QCoreApplication.translate('ViewManager', 'Previous Bookmark'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3824 UI.PixmapCache.getIcon("bookmarkPrevious.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3825 QCoreApplication.translate('ViewManager', '&Previous Bookmark'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3826 QKeySequence(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3827 'ViewManager', "Ctrl+PgUp", "Bookmark|Previous")),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3828 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3829 self.bookmarkActGrp, 'vm_bookmark_previous')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3830 self.bookmarkPreviousAct.setStatusTip(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3831 'ViewManager', 'Previous Bookmark'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3832 self.bookmarkPreviousAct.setWhatsThis(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3833 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3834 """<b>Previous Bookmark</b>"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3835 """<p>Go to previous bookmark of the current editor.</p>"""
3039
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
3836 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
3837 self.bookmarkPreviousAct.triggered.connect(self.__previousBookmark)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3838 self.bookmarkActions.append(self.bookmarkPreviousAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3839
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3840 self.bookmarkClearAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3841 QCoreApplication.translate('ViewManager', 'Clear Bookmarks'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3842 QCoreApplication.translate('ViewManager', '&Clear Bookmarks'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3843 QKeySequence(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3844 'ViewManager', "Alt+Ctrl+C", "Bookmark|Clear")),
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3845 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3846 self.bookmarkActGrp, 'vm_bookmark_clear')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3847 self.bookmarkClearAct.setStatusTip(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3848 'ViewManager', 'Clear Bookmarks'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3849 self.bookmarkClearAct.setWhatsThis(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3850 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3851 """<b>Clear Bookmarks</b>"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3852 """<p>Clear bookmarks of all editors.</p>"""
3039
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
3853 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
3854 self.bookmarkClearAct.triggered.connect(self.__clearAllBookmarks)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3855 self.bookmarkActions.append(self.bookmarkClearAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3856
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3857 self.syntaxErrorGotoAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3858 QCoreApplication.translate('ViewManager', 'Goto Syntax Error'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3859 UI.PixmapCache.getIcon("syntaxErrorGoto.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3860 QCoreApplication.translate('ViewManager', '&Goto Syntax Error'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3861 0, 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3862 self.bookmarkActGrp, 'vm_syntaxerror_goto')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3863 self.syntaxErrorGotoAct.setStatusTip(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3864 'ViewManager', 'Goto Syntax Error'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3865 self.syntaxErrorGotoAct.setWhatsThis(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3866 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3867 """<b>Goto Syntax Error</b>"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3868 """<p>Go to next syntax error of the current editor.</p>"""
3039
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
3869 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
3870 self.syntaxErrorGotoAct.triggered.connect(self.__gotoSyntaxError)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3871 self.bookmarkActions.append(self.syntaxErrorGotoAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3872
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3873 self.syntaxErrorClearAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3874 QCoreApplication.translate('ViewManager', 'Clear Syntax Errors'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3875 QCoreApplication.translate('ViewManager', 'Clear &Syntax Errors'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3876 0, 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3877 self.bookmarkActGrp, 'vm_syntaxerror_clear')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3878 self.syntaxErrorClearAct.setStatusTip(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3879 'ViewManager', 'Clear Syntax Errors'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3880 self.syntaxErrorClearAct.setWhatsThis(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3881 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3882 """<b>Clear Syntax Errors</b>"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3883 """<p>Clear syntax errors of all editors.</p>"""
3039
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
3884 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
3885 self.syntaxErrorClearAct.triggered.connect(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3886 self.__clearAllSyntaxErrors)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3887 self.bookmarkActions.append(self.syntaxErrorClearAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3888
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3889 self.warningsNextAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3890 QCoreApplication.translate('ViewManager', 'Next warning message'),
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3891 UI.PixmapCache.getIcon("warningNext.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3892 QCoreApplication.translate('ViewManager', '&Next warning message'),
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3893 0, 0,
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3894 self.bookmarkActGrp, 'vm_warning_next')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3895 self.warningsNextAct.setStatusTip(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3896 'ViewManager', 'Next warning message'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3897 self.warningsNextAct.setWhatsThis(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3898 'ViewManager',
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3899 """<b>Next warning message</b>"""
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3900 """<p>Go to next line of the current editor"""
3207
6cf664694e3c Renamed Utilities.py3flakes to Utilities.pyflakes to prepare the upgrade to the latest pyflakes version (supporting both Python variants).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3190
diff changeset
3901 """ having a pyflakes warning.</p>"""
3039
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
3902 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
3903 self.warningsNextAct.triggered.connect(self.__nextWarning)
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 65
diff changeset
3904 self.bookmarkActions.append(self.warningsNextAct)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 65
diff changeset
3905
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3906 self.warningsPreviousAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3907 QCoreApplication.translate(
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3908 'ViewManager', 'Previous warning message'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3909 UI.PixmapCache.getIcon("warningPrev.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3910 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3911 'ViewManager', '&Previous warning message'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3912 0, 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3913 self.bookmarkActGrp, 'vm_warning_previous')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3914 self.warningsPreviousAct.setStatusTip(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3915 'ViewManager', 'Previous warning message'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3916 self.warningsPreviousAct.setWhatsThis(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3917 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3918 """<b>Previous warning message</b>"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3919 """<p>Go to previous line of the current editor"""
3207
6cf664694e3c Renamed Utilities.py3flakes to Utilities.pyflakes to prepare the upgrade to the latest pyflakes version (supporting both Python variants).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3190
diff changeset
3920 """ having a pyflakes warning.</p>"""
3039
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
3921 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
3922 self.warningsPreviousAct.triggered.connect(self.__previousWarning)
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 65
diff changeset
3923 self.bookmarkActions.append(self.warningsPreviousAct)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 65
diff changeset
3924
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3925 self.warningsClearAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3926 QCoreApplication.translate(
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3927 'ViewManager', 'Clear Warning Messages'),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3928 QCoreApplication.translate(
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3929 'ViewManager', 'Clear &Warning Messages'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3930 0, 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3931 self.bookmarkActGrp, 'vm_warnings_clear')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3932 self.warningsClearAct.setStatusTip(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3933 'ViewManager', 'Clear Warning Messages'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3934 self.warningsClearAct.setWhatsThis(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3935 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3936 """<b>Clear Warning Messages</b>"""
3207
6cf664694e3c Renamed Utilities.py3flakes to Utilities.pyflakes to prepare the upgrade to the latest pyflakes version (supporting both Python variants).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3190
diff changeset
3937 """<p>Clear pyflakes warning messages of all editors.</p>"""
3039
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
3938 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
3939 self.warningsClearAct.triggered.connect(self.__clearAllWarnings)
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 65
diff changeset
3940 self.bookmarkActions.append(self.warningsClearAct)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 65
diff changeset
3941
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3942 self.notcoveredNextAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3943 QCoreApplication.translate('ViewManager', 'Next uncovered line'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3944 UI.PixmapCache.getIcon("notcoveredNext.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3945 QCoreApplication.translate('ViewManager', '&Next uncovered line'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3946 0, 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3947 self.bookmarkActGrp, 'vm_uncovered_next')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3948 self.notcoveredNextAct.setStatusTip(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3949 'ViewManager', 'Next uncovered line'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3950 self.notcoveredNextAct.setWhatsThis(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3951 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3952 """<b>Next uncovered line</b>"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3953 """<p>Go to next line of the current editor marked as not"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3954 """ covered.</p>"""
3039
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
3955 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
3956 self.notcoveredNextAct.triggered.connect(self.__nextUncovered)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3957 self.bookmarkActions.append(self.notcoveredNextAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3958
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3959 self.notcoveredPreviousAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3960 QCoreApplication.translate(
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3961 'ViewManager', 'Previous uncovered line'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3962 UI.PixmapCache.getIcon("notcoveredPrev.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3963 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3964 'ViewManager', '&Previous uncovered line'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3965 0, 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3966 self.bookmarkActGrp, 'vm_uncovered_previous')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3967 self.notcoveredPreviousAct.setStatusTip(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3968 'ViewManager', 'Previous uncovered line'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3969 self.notcoveredPreviousAct.setWhatsThis(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3970 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3971 """<b>Previous uncovered line</b>"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3972 """<p>Go to previous line of the current editor marked"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3973 """ as not covered.</p>"""
3039
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
3974 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
3975 self.notcoveredPreviousAct.triggered.connect(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3976 self.__previousUncovered)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3977 self.bookmarkActions.append(self.notcoveredPreviousAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3978
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3979 self.taskNextAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3980 QCoreApplication.translate('ViewManager', 'Next Task'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3981 UI.PixmapCache.getIcon("taskNext.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3982 QCoreApplication.translate('ViewManager', '&Next Task'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3983 0, 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3984 self.bookmarkActGrp, 'vm_task_next')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3985 self.taskNextAct.setStatusTip(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3986 'ViewManager', 'Next Task'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3987 self.taskNextAct.setWhatsThis(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3988 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3989 """<b>Next Task</b>"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3990 """<p>Go to next line of the current editor having a task.</p>"""
3039
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
3991 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
3992 self.taskNextAct.triggered.connect(self.__nextTask)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3993 self.bookmarkActions.append(self.taskNextAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
3994
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3995 self.taskPreviousAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3996 QCoreApplication.translate('ViewManager', 'Previous Task'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
3997 UI.PixmapCache.getIcon("taskPrev.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
3998 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
3999 'ViewManager', '&Previous Task'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4000 0, 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4001 self.bookmarkActGrp, 'vm_task_previous')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
4002 self.taskPreviousAct.setStatusTip(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4003 'ViewManager', 'Previous Task'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
4004 self.taskPreviousAct.setWhatsThis(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4005 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4006 """<b>Previous Task</b>"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4007 """<p>Go to previous line of the current editor having a"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4008 """ task.</p>"""
3039
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
4009 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
4010 self.taskPreviousAct.triggered.connect(self.__previousTask)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4011 self.bookmarkActions.append(self.taskPreviousAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4012
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4013 self.changeNextAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
4014 QCoreApplication.translate('ViewManager', 'Next Change'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4015 UI.PixmapCache.getIcon("changeNext.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
4016 QCoreApplication.translate('ViewManager', '&Next Change'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4017 0, 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4018 self.bookmarkActGrp, 'vm_change_next')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
4019 self.changeNextAct.setStatusTip(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4020 'ViewManager', 'Next Change'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
4021 self.changeNextAct.setWhatsThis(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4022 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4023 """<b>Next Change</b>"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4024 """<p>Go to next line of the current editor having a change"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4025 """ marker.</p>"""
3039
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
4026 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
4027 self.changeNextAct.triggered.connect(self.__nextChange)
2162
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2138
diff changeset
4028 self.bookmarkActions.append(self.changeNextAct)
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2138
diff changeset
4029
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4030 self.changePreviousAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
4031 QCoreApplication.translate('ViewManager', 'Previous Change'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4032 UI.PixmapCache.getIcon("changePrev.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
4033 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
4034 'ViewManager', '&Previous Change'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4035 0, 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4036 self.bookmarkActGrp, 'vm_change_previous')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
4037 self.changePreviousAct.setStatusTip(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4038 'ViewManager', 'Previous Change'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
4039 self.changePreviousAct.setWhatsThis(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4040 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4041 """<b>Previous Change</b>"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4042 """<p>Go to previous line of the current editor having"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4043 """ a change marker.</p>"""
3039
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
4044 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
4045 self.changePreviousAct.triggered.connect(self.__previousChange)
2162
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2138
diff changeset
4046 self.bookmarkActions.append(self.changePreviousAct)
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2138
diff changeset
4047
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4048 self.bookmarkActGrp.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4049
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4050 def initBookmarkMenu(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4051 """
2965
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2886
diff changeset
4052 Public method to create the Bookmark menu.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4053
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4054 @return the generated menu
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4055 """
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
4056 menu = QMenu(QCoreApplication.translate('ViewManager', '&Bookmarks'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4057 self.ui)
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4058 self.bookmarksMenu = QMenu(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
4059 QCoreApplication.translate('ViewManager', '&Bookmarks'),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4060 menu)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4061 menu.setTearOffEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4062
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4063 menu.addAction(self.bookmarkToggleAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4064 menu.addAction(self.bookmarkNextAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4065 menu.addAction(self.bookmarkPreviousAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4066 menu.addAction(self.bookmarkClearAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4067 menu.addSeparator()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4068 self.menuBookmarksAct = menu.addMenu(self.bookmarksMenu)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4069 menu.addSeparator()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4070 menu.addAction(self.syntaxErrorGotoAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4071 menu.addAction(self.syntaxErrorClearAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4072 menu.addSeparator()
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 65
diff changeset
4073 menu.addAction(self.warningsNextAct)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 65
diff changeset
4074 menu.addAction(self.warningsPreviousAct)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 65
diff changeset
4075 menu.addAction(self.warningsClearAct)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 65
diff changeset
4076 menu.addSeparator()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4077 menu.addAction(self.notcoveredNextAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4078 menu.addAction(self.notcoveredPreviousAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4079 menu.addSeparator()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4080 menu.addAction(self.taskNextAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4081 menu.addAction(self.taskPreviousAct)
2162
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2138
diff changeset
4082 menu.addSeparator()
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2138
diff changeset
4083 menu.addAction(self.changeNextAct)
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2138
diff changeset
4084 menu.addAction(self.changePreviousAct)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4085
461
34528aaedf1c Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 454
diff changeset
4086 self.bookmarksMenu.aboutToShow.connect(self.__showBookmarksMenu)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
4087 self.bookmarksMenu.triggered.connect(self.__bookmarkSelected)
461
34528aaedf1c Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 454
diff changeset
4088 menu.aboutToShow.connect(self.__showBookmarkMenu)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4089
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4090 return menu
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4091
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4092 def initBookmarkToolbar(self, toolbarManager):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4093 """
2965
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2886
diff changeset
4094 Public method to create the Bookmark toolbar.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4095
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4096 @param toolbarManager reference to a toolbar manager object
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4097 (E5ToolBarManager)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4098 @return the generated toolbar
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4099 """
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
4100 tb = QToolBar(QCoreApplication.translate('ViewManager', 'Bookmarks'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4101 self.ui)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4102 tb.setIconSize(UI.Config.ToolBarIconSize)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4103 tb.setObjectName("BookmarksToolbar")
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
4104 tb.setToolTip(QCoreApplication.translate('ViewManager', 'Bookmarks'))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4105
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4106 tb.addAction(self.bookmarkToggleAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4107 tb.addAction(self.bookmarkNextAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4108 tb.addAction(self.bookmarkPreviousAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4109 tb.addSeparator()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4110 tb.addAction(self.syntaxErrorGotoAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4111 tb.addSeparator()
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 65
diff changeset
4112 tb.addAction(self.warningsNextAct)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 65
diff changeset
4113 tb.addAction(self.warningsPreviousAct)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 65
diff changeset
4114 tb.addSeparator()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4115 tb.addAction(self.taskNextAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4116 tb.addAction(self.taskPreviousAct)
2162
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2138
diff changeset
4117 tb.addSeparator()
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2138
diff changeset
4118 tb.addAction(self.changeNextAct)
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2138
diff changeset
4119 tb.addAction(self.changePreviousAct)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4120
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4121 toolbarManager.addToolBar(tb, tb.windowTitle())
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4122 toolbarManager.addAction(self.notcoveredNextAct, tb.windowTitle())
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4123 toolbarManager.addAction(self.notcoveredPreviousAct, tb.windowTitle())
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4124
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4125 return tb
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4126
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4127 ##################################################################
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4128 ## Initialize the spell checking related actions
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4129 ##################################################################
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4130
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4131 def __initSpellingActions(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4132 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4133 Private method to initialize the spell checking actions.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4134 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4135 self.spellingActGrp = createActionGroup(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4136
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4137 self.spellCheckAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
4138 QCoreApplication.translate('ViewManager', 'Check spelling'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4139 UI.PixmapCache.getIcon("spellchecking.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
4140 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
4141 'ViewManager', 'Check &spelling...'),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
4142 QKeySequence(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
4143 'ViewManager', "Shift+F7", "Spelling|Spell Check")),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4144 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4145 self.spellingActGrp, 'vm_spelling_spellcheck')
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
4146 self.spellCheckAct.setStatusTip(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4147 'ViewManager', 'Perform spell check of current editor'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
4148 self.spellCheckAct.setWhatsThis(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4149 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4150 """<b>Check spelling</b>"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4151 """<p>Perform a spell check of the current editor.</p>"""
3039
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
4152 ))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
4153 self.spellCheckAct.triggered.connect(self.__spellCheck)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4154 self.spellingActions.append(self.spellCheckAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4155
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4156 self.autoSpellCheckAct = E5Action(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
4157 QCoreApplication.translate(
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
4158 'ViewManager', 'Automatic spell checking'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4159 UI.PixmapCache.getIcon("autospellchecking.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
4160 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
4161 'ViewManager', '&Automatic spell checking'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4162 0, 0,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4163 self.spellingActGrp, 'vm_spelling_autospellcheck', True)
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
4164 self.autoSpellCheckAct.setStatusTip(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4165 'ViewManager', '(De-)Activate automatic spell checking'))
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
4166 self.autoSpellCheckAct.setWhatsThis(QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4167 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4168 """<b>Automatic spell checking</b>"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4169 """<p>Activate or deactivate the automatic spell checking"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4170 """ function of all editors.</p>"""
3039
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
4171 ))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4172 self.autoSpellCheckAct.setChecked(
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4173 Preferences.getEditor("AutoSpellCheckingEnabled"))
3345
071afe8be2a1 Changed signal/slot usage to not use constructs like 'triggered[()].connect(...)' anymore.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3321
diff changeset
4174 self.autoSpellCheckAct.triggered.connect(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4175 self.__setAutoSpellChecking)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4176 self.spellingActions.append(self.autoSpellCheckAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4177
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4178 self.__enableSpellingActions()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4179
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4180 def __enableSpellingActions(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4181 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4182 Private method to set the enabled state of the spelling actions.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4183 """
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
4184 from QScintilla.SpellChecker import SpellChecker
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4185 spellingAvailable = SpellChecker.isAvailable()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4186
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4187 self.spellCheckAct.setEnabled(
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4188 len(self.editors) != 0 and spellingAvailable)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4189 self.autoSpellCheckAct.setEnabled(spellingAvailable)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4190
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4191 def addToExtrasMenu(self, menu):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4192 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4193 Public method to add some actions to the extras menu.
2965
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2886
diff changeset
4194
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2886
diff changeset
4195 @param menu reference to the menu to add actions to (QMenu)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4196 """
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
4197 self.__editSpellingMenu = QMenu(QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
4198 'ViewManager', "Edit Dictionary"))
2211
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
4199 self.__editProjectPwlAct = self.__editSpellingMenu.addAction(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
4200 QCoreApplication.translate('ViewManager', "Project Word List"),
2211
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
4201 self.__editProjectPWL)
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
4202 self.__editProjectPelAct = self.__editSpellingMenu.addAction(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
4203 QCoreApplication.translate(
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
4204 'ViewManager', "Project Exception List"),
2211
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
4205 self.__editProjectPEL)
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
4206 self.__editSpellingMenu.addSeparator()
2673
c62efb5f2d79 Changed logic when showing the 'Edit Dictionaries' menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2593
diff changeset
4207 self.__editUserPwlAct = self.__editSpellingMenu.addAction(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
4208 QCoreApplication.translate('ViewManager', "User Word List"),
2211
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
4209 self.__editUserPWL)
2673
c62efb5f2d79 Changed logic when showing the 'Edit Dictionaries' menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2593
diff changeset
4210 self.__editUserPelAct = self.__editSpellingMenu.addAction(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
4211 QCoreApplication.translate('ViewManager', "User Exception List"),
2211
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
4212 self.__editUserPEL)
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4213 self.__editSpellingMenu.aboutToShow.connect(
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4214 self.__showEditSpellingMenu)
2211
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
4215
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4216 menu.addAction(self.spellCheckAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4217 menu.addAction(self.autoSpellCheckAct)
2211
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
4218 menu.addMenu(self.__editSpellingMenu)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4219 menu.addSeparator()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4220
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4221 def initSpellingToolbar(self, toolbarManager):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4222 """
2965
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2886
diff changeset
4223 Public method to create the Spelling toolbar.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4224
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4225 @param toolbarManager reference to a toolbar manager object
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4226 (E5ToolBarManager)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4227 @return the generated toolbar
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4228 """
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
4229 tb = QToolBar(QCoreApplication.translate('ViewManager', 'Spelling'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4230 self.ui)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4231 tb.setIconSize(UI.Config.ToolBarIconSize)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4232 tb.setObjectName("SpellingToolbar")
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
4233 tb.setToolTip(QCoreApplication.translate('ViewManager', 'Spelling'))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4234
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4235 tb.addAction(self.spellCheckAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4236 tb.addAction(self.autoSpellCheckAct)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4237
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4238 toolbarManager.addToolBar(tb, tb.windowTitle())
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4239
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4240 return tb
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4241
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4242 ##################################################################
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4243 ## Methods and slots that deal with file and window handling
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4244 ##################################################################
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4245
3346
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
4246 def __openFiles(self):
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
4247 """
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
4248 Private slot to open some files.
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
4249 """
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
4250 # set the cwd of the dialog based on the following search criteria:
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
4251 # 1: Directory of currently active editor
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
4252 # 2: Directory of currently active project
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
4253 # 3: CWD
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
4254 import QScintilla.Lexers
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
4255 filter = self._getOpenFileFilter()
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
4256 progs = E5FileDialog.getOpenFileNamesAndFilter(
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
4257 self.ui,
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
4258 QCoreApplication.translate('ViewManager', "Open files"),
3346
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
4259 self._getOpenStartDir(),
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
4260 QScintilla.Lexers.getOpenFileFiltersList(True, True),
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
4261 filter)[0]
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
4262 for prog in progs:
3374
78873f09329e Fixed an issue in ViewManager.py.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3346
diff changeset
4263 self.openFiles(prog)
3346
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
4264
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
4265 def openFiles(self, prog):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4266 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4267 Public slot to open some files.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4268
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4269 @param prog name of file to be opened (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4270 """
3346
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
4271 prog = Utilities.normabspath(prog)
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
4272 # Open up the new files.
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
4273 self.openSourceFile(prog)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4274
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
4275 def checkDirty(self, editor, autosave=False):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4276 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4277 Public method to check dirty status and open a message window.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4278
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4279 @param editor editor window to check
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
4280 @param autosave flag indicating that the file should be saved
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4281 automatically (boolean)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4282 @return flag indicating successful reset of the dirty flag (boolean)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4283 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4284 if editor.isModified():
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4285 fn = editor.getFileName()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4286 # ignore the dirty status, if there is more than one open editor
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4287 # for the same file
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4288 if fn and self.getOpenEditorCount(fn) > 1:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4289 return True
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4290
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4291 if fn is None:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4292 fn = editor.getNoName()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4293 autosave = False
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4294 if autosave:
549
fe99d46d56c8 Continued replacing QMessageBox.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 548
diff changeset
4295 res = editor.saveFile()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4296 else:
3020
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3019
diff changeset
4297 res = E5MessageBox.okToClearData(
542e97d4ecb3 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3019
diff changeset
4298 self.ui,
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
4299 QCoreApplication.translate('ViewManager', "File Modified"),
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
4300 QCoreApplication.translate(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
4301 'ViewManager',
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4302 """<p>The file <b>{0}</b> has unsaved changes.</p>""")
3039
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
4303 .format(fn),
549
fe99d46d56c8 Continued replacing QMessageBox.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 548
diff changeset
4304 editor.saveFile)
fe99d46d56c8 Continued replacing QMessageBox.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 548
diff changeset
4305 if res:
fe99d46d56c8 Continued replacing QMessageBox.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 548
diff changeset
4306 self.setEditorName(editor, editor.getFileName())
fe99d46d56c8 Continued replacing QMessageBox.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 548
diff changeset
4307 return res
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4308
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4309 return True
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4310
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4311 def checkAllDirty(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4312 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4313 Public method to check the dirty status of all editors.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4314
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4315 @return flag indicating successful reset of all dirty flags (boolean)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4316 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4317 for editor in self.editors:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4318 if not self.checkDirty(editor):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4319 return False
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4320
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4321 return True
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4322
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4323 def closeEditor(self, editor):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4324 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4325 Public method to close an editor window.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4326
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4327 @param editor editor window to be closed
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4328 @return flag indicating success (boolean)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4329 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4330 # save file if necessary
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4331 if not self.checkDirty(editor):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4332 return False
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4333
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4334 # get the filename of the editor for later use
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4335 fn = editor.getFileName()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4336
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4337 # remove the window
1421
8fead6686d1c Fixed an issue related to the editor assembly.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1419
diff changeset
4338 editor.parent().shutdownTimer()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4339 self._removeView(editor)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4340 self.editors.remove(editor)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4341
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4342 # send a signal, if it was the last editor for this filename
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4343 if fn and self.getOpenEditor(fn) is None:
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
4344 self.editorClosed.emit(fn)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
4345 self.editorClosedEd.emit(editor)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4346
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4347 # send a signal, if it was the very last editor
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4348 if not len(self.editors):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4349 self.__lastEditorClosed()
486
e4711a55e482 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 482
diff changeset
4350 self.lastEditorClosed.emit()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4351
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
4352 editor.deleteLater()
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
4353
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4354 return True
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4355
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4356 def closeCurrentWindow(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4357 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4358 Public method to close the current window.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4359
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4360 @return flag indicating success (boolean)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4361 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4362 aw = self.activeWindow()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4363 if aw is None:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4364 return False
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4365
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4366 res = self.closeEditor(aw)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4367 if res and aw == self.currentEditor:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4368 self.currentEditor = None
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4369
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4370 return res
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4371
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4372 def closeAllWindows(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4373 """
3591
2f2a4a76dd22 Corrected a bunch of source docu issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3547
diff changeset
4374 Public method to close all editor windows via file menu.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4375 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4376 savedEditors = self.editors[:]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4377 for editor in savedEditors:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4378 self.closeEditor(editor)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4379
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4380 def closeWindow(self, fn):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4381 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4382 Public method to close an arbitrary source editor.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4383
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4384 @param fn filename of editor to be closed
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4385 @return flag indicating success (boolean)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4386 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4387 for editor in self.editors:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4388 if Utilities.samepath(fn, editor.getFileName()):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4389 break
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4390 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4391 return True
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4392
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4393 res = self.closeEditor(editor)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4394 if res and editor == self.currentEditor:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4395 self.currentEditor = None
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4396
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4397 return res
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4398
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4399 def closeEditorWindow(self, editor):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4400 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4401 Public method to close an arbitrary source editor.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4402
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4403 @param editor editor to be closed
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4404 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4405 if editor is None:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4406 return
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4407
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4408 res = self.closeEditor(editor)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4409 if res and editor == self.currentEditor:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4410 self.currentEditor = None
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4411
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4412 def exit(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4413 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4414 Public method to handle the debugged program terminating.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4415 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4416 if self.currentEditor is not None:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4417 self.currentEditor.highlight()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4418 self.currentEditor = None
2391
f9a6a512bc1e Added functionality to refresh the coverage markers of an editor if such are shown.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2362
diff changeset
4419
f9a6a512bc1e Added functionality to refresh the coverage markers of an editor if such are shown.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2362
diff changeset
4420 for editor in self.editors:
f9a6a512bc1e Added functionality to refresh the coverage markers of an editor if such are shown.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2362
diff changeset
4421 editor.refreshCoverageAnnotations()
f9a6a512bc1e Added functionality to refresh the coverage markers of an editor if such are shown.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2362
diff changeset
4422
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4423 self.__setSbFile()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4424
1546
240f55bb6e26 Changed the file double click behavior in the source and file browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1520
diff changeset
4425 def openSourceFile(self, fn, lineno=-1, filetype="",
4298
4e7a0e2c20fc Extended the viewmanager interface to allow to open a new editor next to the current one.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4186
diff changeset
4426 selStart=0, selEnd=0, pos=0, next=False):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4427 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4428 Public slot to display a file in an editor.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4429
476
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 461
diff changeset
4430 @param fn name of file to be opened (string)
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: 4156
diff changeset
4431 @param lineno line number to place the cursor at (integer) or
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: 4156
diff changeset
4432 list of line numbers (list of integers) (cursor will be
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: 4156
diff changeset
4433 placed at the next line greater than the current one)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4434 @param filetype type of the source file (string)
476
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 461
diff changeset
4435 @param selStart start of an area to be selected (integer)
121633976eca Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 461
diff changeset
4436 @param selEnd end of an area to be selected (integer)
2965
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2886
diff changeset
4437 @param pos position within the line to place the cursor at (integer)
4298
4e7a0e2c20fc Extended the viewmanager interface to allow to open a new editor next to the current one.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4186
diff changeset
4438 @param next flag indicating to add the file next to the current
4e7a0e2c20fc Extended the viewmanager interface to allow to open a new editor next to the current one.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4186
diff changeset
4439 editor (bool)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4440 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4441 try:
4298
4e7a0e2c20fc Extended the viewmanager interface to allow to open a new editor next to the current one.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4186
diff changeset
4442 newWin, editor = self.getEditor(fn, filetype=filetype, next=next)
12
1d8dd9706f46 First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7
diff changeset
4443 except (IOError, UnicodeDecodeError):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4444 return
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4445
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4446 if newWin:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4447 self._modificationStatusChanged(editor.isModified(), editor)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4448 self._checkActions(editor)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4449
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: 4156
diff changeset
4450 cline, cindex = editor.getCursorPosition()
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: 4156
diff changeset
4451 cline += 1
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: 4156
diff changeset
4452 if isinstance(lineno, list):
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: 4156
diff changeset
4453 if len(lineno) > 1:
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: 4156
diff changeset
4454 for line in lineno:
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: 4156
diff changeset
4455 if line > cline:
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: 4156
diff changeset
4456 break
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: 4156
diff changeset
4457 else:
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: 4156
diff changeset
4458 line = lineno[0]
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: 4156
diff changeset
4459 elif len(lineno) == 1:
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: 4156
diff changeset
4460 line = lineno[0]
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: 4156
diff changeset
4461 else:
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: 4156
diff changeset
4462 line = -1
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: 4156
diff changeset
4463 else:
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: 4156
diff changeset
4464 line = lineno
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: 4156
diff changeset
4465
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: 4156
diff changeset
4466 if line >= 0 and line != cline:
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: 4156
diff changeset
4467 editor.ensureVisibleTop(line)
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: 4156
diff changeset
4468 editor.gotoLine(line, pos)
1546
240f55bb6e26 Changed the file double click behavior in the source and file browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1520
diff changeset
4469
240f55bb6e26 Changed the file double click behavior in the source and file browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1520
diff changeset
4470 if selStart != selEnd:
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: 4156
diff changeset
4471 editor.setSelection(line - 1, selStart, line - 1, selEnd)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4472
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4473 # insert filename into list of recently opened files
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4474 self.addToRecentList(fn)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4475
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4476 def __connectEditor(self, editor):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4477 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4478 Private method to establish all editor connections.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4479
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4480 @param editor reference to the editor object to be connected
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4481 """
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4482 editor.modificationStatusChanged.connect(
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4483 self._modificationStatusChanged)
486
e4711a55e482 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 482
diff changeset
4484 editor.cursorChanged.connect(self.__cursorChanged)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
4485 editor.editorSaved.connect(self.__editorSaved)
4025
ffc69fe3a61d Added three new signals to the viewmanager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
4486 editor.editorRenamed.connect(self.__editorRenamed)
486
e4711a55e482 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 482
diff changeset
4487 editor.breakpointToggled.connect(self.__breakpointToggled)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
4488 editor.bookmarkToggled.connect(self.__bookmarkToggled)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
4489 editor.syntaxerrorToggled.connect(self._syntaxErrorToggled)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
4490 editor.coverageMarkersShown.connect(self.__coverageMarkersShown)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
4491 editor.autoCompletionAPIsAvailable.connect(
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4492 self.__editorAutoCompletionAPIsAvailable)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
4493 editor.undoAvailable.connect(self.undoAct.setEnabled)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
4494 editor.redoAvailable.connect(self.redoAct.setEnabled)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
4495 editor.taskMarkersUpdated.connect(self.__taskMarkersUpdated)
2162
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2138
diff changeset
4496 editor.changeMarkersUpdated.connect(self.__changeMarkersUpdated)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
4497 editor.languageChanged.connect(self.__editorConfigChanged)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
4498 editor.eolChanged.connect(self.__editorConfigChanged)
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
4499 editor.encodingChanged.connect(self.__editorConfigChanged)
2362
68a92d01c1cc Made the search and replace widgets scrollable (customisation for smaller screens).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2351
diff changeset
4500 editor.selectionChanged.connect(self.__searchWidget.selectionChanged)
68a92d01c1cc Made the search and replace widgets scrollable (customisation for smaller screens).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2351
diff changeset
4501 editor.selectionChanged.connect(self.__replaceWidget.selectionChanged)
2589
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2484
diff changeset
4502 editor.selectionChanged.connect(self.__editorSelectionChanged)
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4503 editor.lastEditPositionAvailable.connect(
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4504 self.__lastEditPositionAvailable)
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
4505 editor.zoomValueChanged.connect(self.zoomValueChanged)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4506
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4507 editor.languageChanged.connect(
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4508 lambda: self.editorLanguageChanged.emit(editor))
2424
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2415
diff changeset
4509 editor.textChanged.connect(lambda: self.editorTextChanged.emit(editor))
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2415
diff changeset
4510
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
4511 def newEditorView(self, fn, caller, filetype=""):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4512 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4513 Public method to create a new editor displaying the given document.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4514
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4515 @param fn filename of this view
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4516 @param caller reference to the editor calling this method
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4517 @param filetype type of the source file (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4518 """
1416
c547d0b2e9c6 Fixed a few issues related to the new editor assembly and to drag&drop of tabs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1358
diff changeset
4519 editor, assembly = self.cloneEditor(caller, filetype, fn)
c547d0b2e9c6 Fixed a few issues related to the new editor assembly and to drag&drop of tabs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1358
diff changeset
4520
c547d0b2e9c6 Fixed a few issues related to the new editor assembly and to drag&drop of tabs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1358
diff changeset
4521 self._addView(assembly, fn, caller.getNoName())
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4522 self._modificationStatusChanged(editor.isModified(), editor)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4523 self._checkActions(editor)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4524
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4525 def cloneEditor(self, caller, filetype, fn):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4526 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4527 Public method to clone an editor displaying the given document.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4528
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4529 @param caller reference to the editor calling this method
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4530 @param filetype type of the source file (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4531 @param fn filename of this view
1416
c547d0b2e9c6 Fixed a few issues related to the new editor assembly and to drag&drop of tabs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1358
diff changeset
4532 @return reference to the new editor object (Editor.Editor) and the new
c547d0b2e9c6 Fixed a few issues related to the new editor assembly and to drag&drop of tabs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1358
diff changeset
4533 edito assembly object (EditorAssembly.EditorAssembly)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4534 """
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
4535 from QScintilla.EditorAssembly import EditorAssembly
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4536 assembly = EditorAssembly(self.dbs, fn, self, filetype=filetype,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4537 editor=caller,
1358
c1622c708cd9 Added source navigation function for Python 2, Python 3 and Ruby sources.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1196
diff changeset
4538 tv=e5App().getObject("TaskViewer"))
c1622c708cd9 Added source navigation function for Python 2, Python 3 and Ruby sources.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1196
diff changeset
4539 editor = assembly.getEditor()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4540 self.editors.append(editor)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4541 self.__connectEditor(editor)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4542 self.__editorOpened()
486
e4711a55e482 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 482
diff changeset
4543 self.editorOpened.emit(fn)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
4544 self.editorOpenedEd.emit(editor)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4545
1416
c547d0b2e9c6 Fixed a few issues related to the new editor assembly and to drag&drop of tabs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1358
diff changeset
4546 return editor, assembly
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4547
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4548 def addToRecentList(self, fn):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4549 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4550 Public slot to add a filename to the list of recently opened files.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4551
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4552 @param fn name of the file to be added
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4553 """
335
5ad648828e2e Fixed another case related issue on Windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 253
diff changeset
4554 for recent in self.recent[:]:
5ad648828e2e Fixed another case related issue on Windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 253
diff changeset
4555 if Utilities.samepath(fn, recent):
5ad648828e2e Fixed another case related issue on Windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 253
diff changeset
4556 self.recent.remove(recent)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4557 self.recent.insert(0, fn)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4558 maxRecent = Preferences.getUI("RecentNumber")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4559 if len(self.recent) > maxRecent:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4560 self.recent = self.recent[:maxRecent]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4561 self.__saveRecent()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4562
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4563 def showDebugSource(self, fn, line):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4564 """
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4565 Public method to open the given file and highlight the given line in
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4566 it.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4567
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4568 @param fn filename of editor to update (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4569 @param line line number to highlight (int)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4570 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4571 self.openSourceFile(fn, line)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4572 self.setFileLine(fn, line)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4573
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
4574 def setFileLine(self, fn, line, error=False, syntaxError=False):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4575 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4576 Public method to update the user interface when the current program
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4577 or line changes.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4578
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4579 @param fn filename of editor to update (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4580 @param line line number to highlight (int)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4581 @param error flag indicating an error highlight (boolean)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4582 @param syntaxError flag indicating a syntax error
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4583 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4584 try:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4585 newWin, self.currentEditor = self.getEditor(fn)
12
1d8dd9706f46 First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7
diff changeset
4586 except (IOError, UnicodeDecodeError):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4587 return
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4588
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4589 enc = self.currentEditor.getEncoding()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4590 lang = self.currentEditor.getLanguage()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4591 eol = self.currentEditor.getEolIndicator()
2334
fc69ad77e18a Introduced a zoom widget in the status bar of several windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2331
diff changeset
4592 zoom = self.currentEditor.getZoom()
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4593 self.__setSbFile(fn, line, encoding=enc, language=lang, eol=eol,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4594 zoom=zoom)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4595
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4596 # Change the highlighted line.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4597 self.currentEditor.highlight(line, error, syntaxError)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4598
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4599 self.currentEditor.highlightVisible()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4600 self._checkActions(self.currentEditor, False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4601
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
4602 def __setSbFile(self, fn=None, line=None, pos=None,
2334
fc69ad77e18a Introduced a zoom widget in the status bar of several windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2331
diff changeset
4603 encoding=None, language=None, eol=None,
fc69ad77e18a Introduced a zoom widget in the status bar of several windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2331
diff changeset
4604 zoom=None):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4605 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4606 Private method to set the file info in the status bar.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4607
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4608 @param fn filename to display (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4609 @param line line number to display (int)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4610 @param pos character position to display (int)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4611 @param encoding encoding name to display (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4612 @param language language to display (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4613 @param eol eol indicator to display (string)
2334
fc69ad77e18a Introduced a zoom widget in the status bar of several windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2331
diff changeset
4614 @param zoom zoom value (integer)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4615 """
2329
7706d05104c5 Fixed a little issue in ViewManager.py.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
4616 if not fn:
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4617 fn = ''
2329
7706d05104c5 Fixed a little issue in ViewManager.py.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
4618 writ = ' '
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4619 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4620 if QFileInfo(fn).isWritable():
2329
7706d05104c5 Fixed a little issue in ViewManager.py.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
4621 writ = 'rw'
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4622 else:
2329
7706d05104c5 Fixed a little issue in ViewManager.py.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
4623 writ = 'ro'
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4624 self.sbWritable.setText(writ)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4625
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4626 if line is None:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4627 line = ''
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4628 self.sbLine.setText(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
4629 QCoreApplication.translate('ViewManager', 'Line: {0:5}')
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
4630 .format(line))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4631
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4632 if pos is None:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4633 pos = ''
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4634 self.sbPos.setText(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
4635 QCoreApplication.translate('ViewManager', 'Pos: {0:5}')
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
4636 .format(pos))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4637
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4638 if encoding is None:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4639 encoding = ''
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4640 self.sbEnc.setText(encoding)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4641
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4642 if language is None:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4643 language = ''
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
4644 import QScintilla.Lexers
2217
e80c74f2a25a Added some icons to the "Languages" and "End-of-Line Type" context menus of the editor and changed the status labels for programming language and end-of-line type of the main window to show an icon.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2215
diff changeset
4645 pixmap = QScintilla.Lexers.getLanguageIcon(language, True)
e80c74f2a25a Added some icons to the "Languages" and "End-of-Line Type" context menus of the editor and changed the status labels for programming language and end-of-line type of the main window to show an icon.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2215
diff changeset
4646 self.sbLang.setPixmap(pixmap)
e80c74f2a25a Added some icons to the "Languages" and "End-of-Line Type" context menus of the editor and changed the status labels for programming language and end-of-line type of the main window to show an icon.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2215
diff changeset
4647 if pixmap.isNull():
e80c74f2a25a Added some icons to the "Languages" and "End-of-Line Type" context menus of the editor and changed the status labels for programming language and end-of-line type of the main window to show an icon.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2215
diff changeset
4648 self.sbLang.setText(language)
e80c74f2a25a Added some icons to the "Languages" and "End-of-Line Type" context menus of the editor and changed the status labels for programming language and end-of-line type of the main window to show an icon.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2215
diff changeset
4649 self.sbLang.setToolTip("")
e80c74f2a25a Added some icons to the "Languages" and "End-of-Line Type" context menus of the editor and changed the status labels for programming language and end-of-line type of the main window to show an icon.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2215
diff changeset
4650 else:
e80c74f2a25a Added some icons to the "Languages" and "End-of-Line Type" context menus of the editor and changed the status labels for programming language and end-of-line type of the main window to show an icon.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2215
diff changeset
4651 self.sbLang.setText("")
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4652 self.sbLang.setToolTip(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
4653 QCoreApplication.translate('ViewManager', 'Language: {0}')
3039
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
4654 .format(language))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4655
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4656 if eol is None:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4657 eol = ''
2217
e80c74f2a25a Added some icons to the "Languages" and "End-of-Line Type" context menus of the editor and changed the status labels for programming language and end-of-line type of the main window to show an icon.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2215
diff changeset
4658 self.sbEol.setPixmap(self.__eolPixmap(eol))
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4659 self.sbEol.setToolTip(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
4660 QCoreApplication.translate('ViewManager', 'EOL Mode: {0}')
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
4661 .format(eol))
2217
e80c74f2a25a Added some icons to the "Languages" and "End-of-Line Type" context menus of the editor and changed the status labels for programming language and end-of-line type of the main window to show an icon.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2215
diff changeset
4662
2334
fc69ad77e18a Introduced a zoom widget in the status bar of several windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2331
diff changeset
4663 if zoom is None:
fc69ad77e18a Introduced a zoom widget in the status bar of several windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2331
diff changeset
4664 if QApplication.focusWidget() == e5App().getObject("Shell"):
fc69ad77e18a Introduced a zoom widget in the status bar of several windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2331
diff changeset
4665 aw = e5App().getObject("Shell")
fc69ad77e18a Introduced a zoom widget in the status bar of several windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2331
diff changeset
4666 else:
fc69ad77e18a Introduced a zoom widget in the status bar of several windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2331
diff changeset
4667 aw = self.activeWindow()
fc69ad77e18a Introduced a zoom widget in the status bar of several windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2331
diff changeset
4668 if aw:
fc69ad77e18a Introduced a zoom widget in the status bar of several windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2331
diff changeset
4669 self.sbZoom.setValue(aw.getZoom())
fc69ad77e18a Introduced a zoom widget in the status bar of several windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2331
diff changeset
4670 else:
fc69ad77e18a Introduced a zoom widget in the status bar of several windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2331
diff changeset
4671 self.sbZoom.setValue(zoom)
fc69ad77e18a Introduced a zoom widget in the status bar of several windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2331
diff changeset
4672
2217
e80c74f2a25a Added some icons to the "Languages" and "End-of-Line Type" context menus of the editor and changed the status labels for programming language and end-of-line type of the main window to show an icon.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2215
diff changeset
4673 def __eolPixmap(self, eolIndicator):
e80c74f2a25a Added some icons to the "Languages" and "End-of-Line Type" context menus of the editor and changed the status labels for programming language and end-of-line type of the main window to show an icon.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2215
diff changeset
4674 """
e80c74f2a25a Added some icons to the "Languages" and "End-of-Line Type" context menus of the editor and changed the status labels for programming language and end-of-line type of the main window to show an icon.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2215
diff changeset
4675 Private method to get an EOL pixmap for an EOL string.
e80c74f2a25a Added some icons to the "Languages" and "End-of-Line Type" context menus of the editor and changed the status labels for programming language and end-of-line type of the main window to show an icon.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2215
diff changeset
4676
e80c74f2a25a Added some icons to the "Languages" and "End-of-Line Type" context menus of the editor and changed the status labels for programming language and end-of-line type of the main window to show an icon.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2215
diff changeset
4677 @param eolIndicator eol indicator string (string)
e80c74f2a25a Added some icons to the "Languages" and "End-of-Line Type" context menus of the editor and changed the status labels for programming language and end-of-line type of the main window to show an icon.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2215
diff changeset
4678 @return pixmap for the eol indicator (QPixmap)
e80c74f2a25a Added some icons to the "Languages" and "End-of-Line Type" context menus of the editor and changed the status labels for programming language and end-of-line type of the main window to show an icon.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2215
diff changeset
4679 """
e80c74f2a25a Added some icons to the "Languages" and "End-of-Line Type" context menus of the editor and changed the status labels for programming language and end-of-line type of the main window to show an icon.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2215
diff changeset
4680 if eolIndicator == "LF":
e80c74f2a25a Added some icons to the "Languages" and "End-of-Line Type" context menus of the editor and changed the status labels for programming language and end-of-line type of the main window to show an icon.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2215
diff changeset
4681 pixmap = UI.PixmapCache.getPixmap("eolLinux.png")
e80c74f2a25a Added some icons to the "Languages" and "End-of-Line Type" context menus of the editor and changed the status labels for programming language and end-of-line type of the main window to show an icon.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2215
diff changeset
4682 elif eolIndicator == "CR":
e80c74f2a25a Added some icons to the "Languages" and "End-of-Line Type" context menus of the editor and changed the status labels for programming language and end-of-line type of the main window to show an icon.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2215
diff changeset
4683 pixmap = UI.PixmapCache.getPixmap("eolMac.png")
e80c74f2a25a Added some icons to the "Languages" and "End-of-Line Type" context menus of the editor and changed the status labels for programming language and end-of-line type of the main window to show an icon.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2215
diff changeset
4684 elif eolIndicator == "CRLF":
e80c74f2a25a Added some icons to the "Languages" and "End-of-Line Type" context menus of the editor and changed the status labels for programming language and end-of-line type of the main window to show an icon.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2215
diff changeset
4685 pixmap = UI.PixmapCache.getPixmap("eolWindows.png")
e80c74f2a25a Added some icons to the "Languages" and "End-of-Line Type" context menus of the editor and changed the status labels for programming language and end-of-line type of the main window to show an icon.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2215
diff changeset
4686 else:
e80c74f2a25a Added some icons to the "Languages" and "End-of-Line Type" context menus of the editor and changed the status labels for programming language and end-of-line type of the main window to show an icon.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2215
diff changeset
4687 pixmap = QPixmap()
e80c74f2a25a Added some icons to the "Languages" and "End-of-Line Type" context menus of the editor and changed the status labels for programming language and end-of-line type of the main window to show an icon.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2215
diff changeset
4688 return pixmap
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4689
3346
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
4690 def __unhighlight(self):
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
4691 """
3591
2f2a4a76dd22 Corrected a bunch of source docu issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3547
diff changeset
4692 Private slot to switch of all highlights.
3346
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
4693 """
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
4694 self.unhighlight()
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
4695
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
4696 def unhighlight(self, current=False):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4697 """
3346
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
4698 Public method to switch off all highlights or the highlight of
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
4699 the current editor.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4700
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4701 @param current flag indicating only the current editor should be
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4702 unhighlighted (boolean)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4703 """
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
4704 if current:
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4705 if self.currentEditor is not None:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4706 self.currentEditor.highlight()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4707 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4708 for editor in self.editors:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4709 editor.highlight()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4710
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4711 def getOpenFilenames(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4712 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4713 Public method returning a list of the filenames of all editors.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4714
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4715 @return list of all opened filenames (list of strings)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4716 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4717 filenames = []
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4718 for editor in self.editors:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4719 fn = editor.getFileName()
3261
b8fee972444b Fixed issues with reopening a project where files were delete while they were opened in an editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3207
diff changeset
4720 if fn is not None and fn not in filenames and os.path.exists(fn):
b8fee972444b Fixed issues with reopening a project where files were delete while they were opened in an editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3207
diff changeset
4721 # only return names of existing files
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4722 filenames.append(fn)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4723
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4724 return filenames
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4725
4298
4e7a0e2c20fc Extended the viewmanager interface to allow to open a new editor next to the current one.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4186
diff changeset
4726 def getEditor(self, fn, filetype="", next=False):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4727 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4728 Public method to return the editor displaying the given file.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4729
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4730 If there is no editor with the given file, a new editor window is
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4731 created.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4732
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4733 @param fn filename to look for
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4734 @param filetype type of the source file (string)
4298
4e7a0e2c20fc Extended the viewmanager interface to allow to open a new editor next to the current one.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4186
diff changeset
4735 @param next flag indicating that if a new editor needs to be created,
4e7a0e2c20fc Extended the viewmanager interface to allow to open a new editor next to the current one.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4186
diff changeset
4736 it should be added next to the current editor (bool)
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4737 @return tuple of two values giving a flag indicating a new window
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4738 creation and a reference to the editor displaying this file
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4739 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4740 newWin = False
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4741 editor = self.activeWindow()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4742 if editor is None or not Utilities.samepath(fn, editor.getFileName()):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4743 for editor in self.editors:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4744 if Utilities.samepath(fn, editor.getFileName()):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4745 break
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4746 else:
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
4747 from QScintilla.EditorAssembly import EditorAssembly
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4748 assembly = EditorAssembly(self.dbs, fn, self,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4749 filetype=filetype,
1358
c1622c708cd9 Added source navigation function for Python 2, Python 3 and Ruby sources.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1196
diff changeset
4750 tv=e5App().getObject("TaskViewer"))
c1622c708cd9 Added source navigation function for Python 2, Python 3 and Ruby sources.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1196
diff changeset
4751 editor = assembly.getEditor()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4752 self.editors.append(editor)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4753 self.__connectEditor(editor)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4754 self.__editorOpened()
486
e4711a55e482 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 482
diff changeset
4755 self.editorOpened.emit(fn)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
4756 self.editorOpenedEd.emit(editor)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4757 newWin = True
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4758
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4759 if newWin:
4298
4e7a0e2c20fc Extended the viewmanager interface to allow to open a new editor next to the current one.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4186
diff changeset
4760 self._addView(assembly, fn, next=next)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4761 else:
1419
e200f9084c5d Fixed a few more editor assembly related issues and made 'listspace' the default view manager for Mac.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1416
diff changeset
4762 self._showView(editor.parent(), fn)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4763
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4764 return (newWin, editor)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4765
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4766 def getOpenEditors(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4767 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4768 Public method to get references to all open editors.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4769
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4770 @return list of references to all open editors (list of
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
4771 QScintilla.editor)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4772 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4773 return self.editors
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4774
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4775 def getOpenEditorsCount(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4776 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4777 Public method to get the number of open editors.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4778
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4779 @return number of open editors (integer)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4780 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4781 return len(self.editors)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4782
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4783 def getOpenEditor(self, fn):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4784 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4785 Public method to return the editor displaying the given file.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4786
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4787 @param fn filename to look for
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4788 @return a reference to the editor displaying this file or None, if
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4789 no editor was found
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4790 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4791 for editor in self.editors:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4792 if Utilities.samepath(fn, editor.getFileName()):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4793 return editor
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4794
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4795 return None
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4796
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4797 def getOpenEditorCount(self, fn):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4798 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4799 Public method to return the count of editors displaying the given file.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4800
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4801 @param fn filename to look for
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4802 @return count of editors displaying this file (integer)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4803 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4804 count = 0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4805 for editor in self.editors:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4806 if Utilities.samepath(fn, editor.getFileName()):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4807 count += 1
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4808 return count
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4809
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4810 def getActiveName(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4811 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4812 Public method to retrieve the filename of the active window.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4813
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4814 @return filename of active window (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4815 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4816 aw = self.activeWindow()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4817 if aw:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4818 return aw.getFileName()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4819 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4820 return None
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4821
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4822 def saveEditor(self, fn):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4823 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4824 Public method to save a named editor file.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4825
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4826 @param fn filename of editor to be saved (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4827 @return flag indicating success (boolean)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4828 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4829 for editor in self.editors:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4830 if Utilities.samepath(fn, editor.getFileName()):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4831 break
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4832 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4833 return True
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4834
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4835 if not editor.isModified():
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4836 return True
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4837 else:
548
ac7af05dd54a Continued replacing QMessageBox.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 540
diff changeset
4838 ok = editor.saveFile()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4839 return ok
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4840
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4841 def saveEditorEd(self, ed):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4842 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4843 Public slot to save the contents of an editor.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4844
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4845 @param ed editor to be saved
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4846 @return flag indicating success (boolean)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4847 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4848 if ed:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4849 if not ed.isModified():
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4850 return True
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4851 else:
548
ac7af05dd54a Continued replacing QMessageBox.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 540
diff changeset
4852 ok = ed.saveFile()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4853 if ok:
548
ac7af05dd54a Continued replacing QMessageBox.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 540
diff changeset
4854 self.setEditorName(ed, ed.getFileName())
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4855 return ok
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4856 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4857 return False
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4858
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4859 def saveCurrentEditor(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4860 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4861 Public slot to save the contents of the current editor.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4862 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4863 aw = self.activeWindow()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4864 self.saveEditorEd(aw)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4865
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4866 def saveAsEditorEd(self, ed):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4867 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4868 Public slot to save the contents of an editor to a new file.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4869
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4870 @param ed editor to be saved
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4871 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4872 if ed:
559
ee695ebbd6e0 Fixed an issue introduced by the E5MessageBox job.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 549
diff changeset
4873 ok = ed.saveFileAs()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4874 if ok:
559
ee695ebbd6e0 Fixed an issue introduced by the E5MessageBox job.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 549
diff changeset
4875 self.setEditorName(ed, ed.getFileName())
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4876
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4877 def saveAsCurrentEditor(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4878 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4879 Public slot to save the contents of the current editor to a new file.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4880 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4881 aw = self.activeWindow()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4882 self.saveAsEditorEd(aw)
4402
ad524553e765 Added capability to save a copy of the editor contents.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4298
diff changeset
4883
ad524553e765 Added capability to save a copy of the editor contents.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4298
diff changeset
4884 def saveCopyEditorEd(self, ed):
ad524553e765 Added capability to save a copy of the editor contents.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4298
diff changeset
4885 """
ad524553e765 Added capability to save a copy of the editor contents.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4298
diff changeset
4886 Public slot to save the contents of an editor to a new copy of
ad524553e765 Added capability to save a copy of the editor contents.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4298
diff changeset
4887 the file.
ad524553e765 Added capability to save a copy of the editor contents.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4298
diff changeset
4888
ad524553e765 Added capability to save a copy of the editor contents.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4298
diff changeset
4889 @param ed editor to be saved
ad524553e765 Added capability to save a copy of the editor contents.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4298
diff changeset
4890 """
ad524553e765 Added capability to save a copy of the editor contents.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4298
diff changeset
4891 if ed:
ad524553e765 Added capability to save a copy of the editor contents.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4298
diff changeset
4892 ed.saveFileCopy()
ad524553e765 Added capability to save a copy of the editor contents.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4298
diff changeset
4893
ad524553e765 Added capability to save a copy of the editor contents.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4298
diff changeset
4894 def saveCopyCurrentEditor(self):
ad524553e765 Added capability to save a copy of the editor contents.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4298
diff changeset
4895 """
ad524553e765 Added capability to save a copy of the editor contents.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4298
diff changeset
4896 Public slot to save the contents of the current editor to a new copy
ad524553e765 Added capability to save a copy of the editor contents.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4298
diff changeset
4897 of the file.
ad524553e765 Added capability to save a copy of the editor contents.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4298
diff changeset
4898 """
ad524553e765 Added capability to save a copy of the editor contents.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4298
diff changeset
4899 aw = self.activeWindow()
ad524553e765 Added capability to save a copy of the editor contents.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4298
diff changeset
4900 self.saveCopyEditorEd(aw)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4901
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4902 def saveEditorsList(self, editors):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4903 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4904 Public slot to save a list of editors.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4905
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4906 @param editors list of editors to be saved
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4907 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4908 for editor in editors:
548
ac7af05dd54a Continued replacing QMessageBox.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 540
diff changeset
4909 ok = editor.saveFile()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4910 if ok:
548
ac7af05dd54a Continued replacing QMessageBox.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 540
diff changeset
4911 self.setEditorName(editor, editor.getFileName())
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4912
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4913 def saveAllEditors(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4914 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4915 Public slot to save the contents of all editors.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4916 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4917 for editor in self.editors:
548
ac7af05dd54a Continued replacing QMessageBox.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 540
diff changeset
4918 ok = editor.saveFile()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4919 if ok:
548
ac7af05dd54a Continued replacing QMessageBox.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 540
diff changeset
4920 self.setEditorName(editor, editor.getFileName())
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4921
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4922 # restart autosave timer
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4923 if self.autosaveInterval > 0:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4924 self.autosaveTimer.start(self.autosaveInterval * 60000)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4925
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4926 def __exportMenuTriggered(self, act):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4927 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4928 Private method to handle the selection of an export format.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4929
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4930 @param act reference to the action that was triggered (QAction)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4931 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4932 aw = self.activeWindow()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4933 if aw:
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
4934 exporterFormat = act.data()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4935 aw.exportFile(exporterFormat)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4936
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4937 def newEditor(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4938 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4939 Public slot to generate a new empty editor.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4940 """
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
4941 from QScintilla.EditorAssembly import EditorAssembly
1358
c1622c708cd9 Added source navigation function for Python 2, Python 3 and Ruby sources.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1196
diff changeset
4942 assembly = EditorAssembly(self.dbs, None, self,
c1622c708cd9 Added source navigation function for Python 2, Python 3 and Ruby sources.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1196
diff changeset
4943 tv=e5App().getObject("TaskViewer"))
c1622c708cd9 Added source navigation function for Python 2, Python 3 and Ruby sources.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1196
diff changeset
4944 editor = assembly.getEditor()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4945 self.editors.append(editor)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4946 self.__connectEditor(editor)
1416
c547d0b2e9c6 Fixed a few issues related to the new editor assembly and to drag&drop of tabs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1358
diff changeset
4947 self._addView(assembly, None)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4948 self.__editorOpened()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4949 self._checkActions(editor)
486
e4711a55e482 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 482
diff changeset
4950 self.editorOpened.emit("")
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
4951 self.editorOpenedEd.emit(editor)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4952
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4953 def printEditor(self, editor):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4954 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4955 Public slot to print an editor.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4956
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4957 @param editor editor to be printed
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4958 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4959 if editor:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4960 editor.printFile()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4961 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4962 return
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4963
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4964 def printCurrentEditor(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4965 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4966 Public slot to print the contents of the current editor.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4967 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4968 aw = self.activeWindow()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4969 self.printEditor(aw)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4970
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4971 def printPreviewCurrentEditor(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4972 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4973 Public slot to show a print preview of the current editor.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4974 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4975 aw = self.activeWindow()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4976 if aw:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4977 aw.printPreviewFile()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4978
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4979 def __showFileMenu(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4980 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4981 Private method to set up the file menu.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4982 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4983 self.menuRecentAct.setEnabled(len(self.recent) > 0)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4984
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4985 def __showRecentMenu(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4986 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4987 Private method to set up recent files menu.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4988 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4989 self.__loadRecent()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4990
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4991 self.recentMenu.clear()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4992
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4993 idx = 1
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4994 for rs in self.recent:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4995 if idx < 10:
432
497e188ee86e Did some more string format conversions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 372
diff changeset
4996 formatStr = '&{0:d}. {1}'
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4997 else:
432
497e188ee86e Did some more string format conversions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 372
diff changeset
4998 formatStr = '{0:d}. {1}'
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 559
diff changeset
4999 act = self.recentMenu.addAction(
3031
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
5000 formatStr.format(
ed2eaa573ca5 Fixed a bunch of visible indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3020
diff changeset
5001 idx,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5002 Utilities.compactPath(rs, self.ui.maxMenuFilePathLen)))
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
5003 act.setData(rs)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5004 act.setEnabled(QFileInfo(rs).exists())
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5005 idx += 1
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5006
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5007 self.recentMenu.addSeparator()
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 559
diff changeset
5008 self.recentMenu.addAction(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
5009 QCoreApplication.translate('ViewManager', '&Clear'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
5010 self.__clearRecent)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5011
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5012 def __openSourceFile(self, act):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5013 """
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
5014 Private method to open a file from the list of recently opened files.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5015
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5016 @param act reference to the action that triggered (QAction)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5017 """
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
5018 file = act.data()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5019 if file:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5020 self.openSourceFile(file)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5021
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5022 def __clearRecent(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5023 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5024 Private method to clear the recent files menu.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5025 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5026 self.recent = []
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5027
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5028 def __showBookmarkedMenu(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5029 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5030 Private method to set up bookmarked files menu.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5031 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5032 self.bookmarkedMenu.clear()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5033
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5034 for rp in self.bookmarked:
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 559
diff changeset
5035 act = self.bookmarkedMenu.addAction(
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5036 Utilities.compactPath(rp, self.ui.maxMenuFilePathLen))
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
5037 act.setData(rp)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5038 act.setEnabled(QFileInfo(rp).exists())
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5039
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5040 if len(self.bookmarked):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5041 self.bookmarkedMenu.addSeparator()
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 559
diff changeset
5042 self.bookmarkedMenu.addAction(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
5043 QCoreApplication.translate('ViewManager', '&Add'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
5044 self.__addBookmarked)
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 559
diff changeset
5045 self.bookmarkedMenu.addAction(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
5046 QCoreApplication.translate('ViewManager', '&Edit...'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
5047 self.__editBookmarked)
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 559
diff changeset
5048 self.bookmarkedMenu.addAction(
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
5049 QCoreApplication.translate('ViewManager', '&Clear'),
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
5050 self.__clearBookmarked)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5051
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5052 def __addBookmarked(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5053 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5054 Private method to add the current file to the list of bookmarked files.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5055 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5056 an = self.getActiveName()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5057 if an is not None and an not in self.bookmarked:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5058 self.bookmarked.append(an)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5059
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5060 def __editBookmarked(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5061 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5062 Private method to edit the list of bookmarked files.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5063 """
2400
c1726b754f96 Started with delaying the import upon the time it is needed.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2391
diff changeset
5064 from .BookmarkedFilesDialog import BookmarkedFilesDialog
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5065 dlg = BookmarkedFilesDialog(self.bookmarked, self.ui)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5066 if dlg.exec_() == QDialog.Accepted:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5067 self.bookmarked = dlg.getBookmarkedFiles()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5068
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5069 def __clearBookmarked(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5070 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5071 Private method to clear the bookmarked files menu.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5072 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5073 self.bookmarked = []
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5074
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5075 def projectOpened(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5076 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5077 Public slot to handle the projectOpened signal.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5078 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5079 for editor in self.editors:
1754
4e2f87d03546 Fixed an issue in the editor caused by double connecting to a signal.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1546
diff changeset
5080 editor.projectOpened()
2211
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
5081
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
5082 self.__editProjectPwlAct.setEnabled(True)
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
5083 self.__editProjectPelAct.setEnabled(True)
1754
4e2f87d03546 Fixed an issue in the editor caused by double connecting to a signal.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1546
diff changeset
5084
4e2f87d03546 Fixed an issue in the editor caused by double connecting to a signal.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1546
diff changeset
5085 def projectClosed(self):
4e2f87d03546 Fixed an issue in the editor caused by double connecting to a signal.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1546
diff changeset
5086 """
4e2f87d03546 Fixed an issue in the editor caused by double connecting to a signal.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1546
diff changeset
5087 Public slot to handle the projectClosed signal.
4e2f87d03546 Fixed an issue in the editor caused by double connecting to a signal.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1546
diff changeset
5088 """
4e2f87d03546 Fixed an issue in the editor caused by double connecting to a signal.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1546
diff changeset
5089 for editor in self.editors:
4e2f87d03546 Fixed an issue in the editor caused by double connecting to a signal.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1546
diff changeset
5090 editor.projectClosed()
2211
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
5091
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
5092 self.__editProjectPwlAct.setEnabled(False)
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
5093 self.__editProjectPelAct.setEnabled(False)
1754
4e2f87d03546 Fixed an issue in the editor caused by double connecting to a signal.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1546
diff changeset
5094
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5095 def projectFileRenamed(self, oldfn, newfn):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5096 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5097 Public slot to handle the projectFileRenamed signal.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5098
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5099 @param oldfn old filename of the file (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5100 @param newfn new filename of the file (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5101 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5102 editor = self.getOpenEditor(oldfn)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5103 if editor:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5104 editor.fileRenamed(newfn)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5105
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5106 def projectLexerAssociationsChanged(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5107 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5108 Public slot to handle changes of the project lexer associations.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5109 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5110 for editor in self.editors:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5111 editor.projectLexerAssociationsChanged()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5112
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5113 def enableEditorsCheckFocusIn(self, enabled):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5114 """
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
5115 Public method to set a flag enabling the editors to perform focus in
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
5116 checks.
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
5117
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
5118 @param enabled flag indicating focus in checks should be performed
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
5119 (boolean)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5120 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5121 self.editorsCheckFocusIn = enabled
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5122
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5123 def editorsCheckFocusInEnabled(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5124 """
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
5125 Public method returning the flag indicating editors should perform
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5126 focus in checks.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5127
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5128 @return flag indicating focus in checks should be performed (boolean)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5129 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5130 return self.editorsCheckFocusIn
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5131
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5132 def __findFileName(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5133 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5134 Private method to handle the search for file action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5135 """
1490
ed6f2208297d Changes to speed up the start-up phase by creating some dialog on demand.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1474
diff changeset
5136 self.ui.showFindFileByNameDialog()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5137
128
13e96bd0f5a5 Fixed an issue with handling the focus and (de-)activation of actions as it changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 97
diff changeset
5138 def appFocusChanged(self, old, now):
13e96bd0f5a5 Fixed an issue with handling the focus and (de-)activation of actions as it changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 97
diff changeset
5139 """
13e96bd0f5a5 Fixed an issue with handling the focus and (de-)activation of actions as it changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 97
diff changeset
5140 Public method to handle the global change of focus.
13e96bd0f5a5 Fixed an issue with handling the focus and (de-)activation of actions as it changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 97
diff changeset
5141
13e96bd0f5a5 Fixed an issue with handling the focus and (de-)activation of actions as it changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 97
diff changeset
5142 @param old reference to the widget loosing focus (QWidget)
13e96bd0f5a5 Fixed an issue with handling the focus and (de-)activation of actions as it changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 97
diff changeset
5143 @param now reference to the widget gaining focus (QWidget)
13e96bd0f5a5 Fixed an issue with handling the focus and (de-)activation of actions as it changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 97
diff changeset
5144 """
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
5145 from QScintilla.Shell import Shell
2474
8727522a69d5 Removed the Terminal widget because there are severe issues with certain shells that cannot be fixed and it is a rarely used feature.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2424
diff changeset
5146
8727522a69d5 Removed the Terminal widget because there are severe issues with certain shells that cannot be fixed and it is a rarely used feature.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2424
diff changeset
5147 if not isinstance(now, (Editor, Shell)):
128
13e96bd0f5a5 Fixed an issue with handling the focus and (de-)activation of actions as it changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 97
diff changeset
5148 self.editActGrp.setEnabled(False)
13e96bd0f5a5 Fixed an issue with handling the focus and (de-)activation of actions as it changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 97
diff changeset
5149 self.copyActGrp.setEnabled(False)
13e96bd0f5a5 Fixed an issue with handling the focus and (de-)activation of actions as it changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 97
diff changeset
5150 self.viewActGrp.setEnabled(False)
2334
fc69ad77e18a Introduced a zoom widget in the status bar of several windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2331
diff changeset
5151 self.sbZoom.setEnabled(False)
fc69ad77e18a Introduced a zoom widget in the status bar of several windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2331
diff changeset
5152 else:
fc69ad77e18a Introduced a zoom widget in the status bar of several windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2331
diff changeset
5153 self.sbZoom.setEnabled(True)
fc69ad77e18a Introduced a zoom widget in the status bar of several windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2331
diff changeset
5154 self.sbZoom.setValue(now.getZoom())
1128
b8ab8eac9dde Fixed an issue with the quick search actions anabled state and fixed an issue with the quicksearch toolbar not being shown, when quick search is activated while the toolbar is hidden.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
5155
2474
8727522a69d5 Removed the Terminal widget because there are severe issues with certain shells that cannot be fixed and it is a rarely used feature.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2424
diff changeset
5156 if not isinstance(now, (Editor, Shell)) and \
1128
b8ab8eac9dde Fixed an issue with the quick search actions anabled state and fixed an issue with the quicksearch toolbar not being shown, when quick search is activated while the toolbar is hidden.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
5157 now is not self.quickFindtextCombo:
128
13e96bd0f5a5 Fixed an issue with handling the focus and (de-)activation of actions as it changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 97
diff changeset
5158 self.searchActGrp.setEnabled(False)
365
0686ac00256e Added a symbols viewer with capability to insert the selected symbol by double-clicking it.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 335
diff changeset
5159
1128
b8ab8eac9dde Fixed an issue with the quick search actions anabled state and fixed an issue with the quicksearch toolbar not being shown, when quick search is activated while the toolbar is hidden.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
5160 if now is self.quickFindtextCombo:
b8ab8eac9dde Fixed an issue with the quick search actions anabled state and fixed an issue with the quicksearch toolbar not being shown, when quick search is activated while the toolbar is hidden.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
5161 self.searchActGrp.setEnabled(True)
b8ab8eac9dde Fixed an issue with the quick search actions anabled state and fixed an issue with the quicksearch toolbar not being shown, when quick search is activated while the toolbar is hidden.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
5162
2474
8727522a69d5 Removed the Terminal widget because there are severe issues with certain shells that cannot be fixed and it is a rarely used feature.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2424
diff changeset
5163 if not isinstance(now, (Editor, Shell)):
365
0686ac00256e Added a symbols viewer with capability to insert the selected symbol by double-clicking it.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 335
diff changeset
5164 self.__lastFocusWidget = old
128
13e96bd0f5a5 Fixed an issue with handling the focus and (de-)activation of actions as it changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 97
diff changeset
5165
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5166 ##################################################################
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5167 ## Below are the action methods for the edit menu
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5168 ##################################################################
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5169
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5170 def __editUndo(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5171 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5172 Private method to handle the undo action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5173 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5174 self.activeWindow().undo()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5175
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5176 def __editRedo(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5177 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5178 Private method to handle the redo action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5179 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5180 self.activeWindow().redo()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5181
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5182 def __editRevert(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5183 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5184 Private method to handle the revert action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5185 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5186 self.activeWindow().revertToUnmodified()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5187
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5188 def __editCut(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5189 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5190 Private method to handle the cut action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5191 """
53
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 15
diff changeset
5192 if QApplication.focusWidget() == e5App().getObject("Shell"):
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 15
diff changeset
5193 e5App().getObject("Shell").cut()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5194 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5195 self.activeWindow().cut()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5196
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5197 def __editCopy(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5198 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5199 Private method to handle the copy action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5200 """
53
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 15
diff changeset
5201 if QApplication.focusWidget() == e5App().getObject("Shell"):
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 15
diff changeset
5202 e5App().getObject("Shell").copy()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5203 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5204 self.activeWindow().copy()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5205
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5206 def __editPaste(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5207 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5208 Private method to handle the paste action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5209 """
53
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 15
diff changeset
5210 if QApplication.focusWidget() == e5App().getObject("Shell"):
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 15
diff changeset
5211 e5App().getObject("Shell").paste()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5212 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5213 self.activeWindow().paste()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5214
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5215 def __editDelete(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5216 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5217 Private method to handle the delete action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5218 """
53
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 15
diff changeset
5219 if QApplication.focusWidget() == e5App().getObject("Shell"):
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 15
diff changeset
5220 e5App().getObject("Shell").clear()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5221 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5222 self.activeWindow().clear()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5223
478
e7d778ea21d6 Added an editor action to join the current line with the next one.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 476
diff changeset
5224 def __editJoin(self):
e7d778ea21d6 Added an editor action to join the current line with the next one.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 476
diff changeset
5225 """
e7d778ea21d6 Added an editor action to join the current line with the next one.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 476
diff changeset
5226 Private method to handle the join action.
e7d778ea21d6 Added an editor action to join the current line with the next one.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 476
diff changeset
5227 """
e7d778ea21d6 Added an editor action to join the current line with the next one.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 476
diff changeset
5228 self.activeWindow().joinLines()
e7d778ea21d6 Added an editor action to join the current line with the next one.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 476
diff changeset
5229
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5230 def __editIndent(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5231 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5232 Private method to handle the indent action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5233 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5234 self.activeWindow().indentLineOrSelection()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5235
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5236 def __editUnindent(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5237 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5238 Private method to handle the unindent action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5239 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5240 self.activeWindow().unindentLineOrSelection()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5241
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5242 def __editSmartIndent(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5243 """
2965
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2886
diff changeset
5244 Private method to handle the smart indent action.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5245 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5246 self.activeWindow().smartIndentLineOrSelection()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5247
1500
6ce6deb421cf Added an action to the editor to toggle block comments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1490
diff changeset
5248 def __editToggleComment(self):
6ce6deb421cf Added an action to the editor to toggle block comments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1490
diff changeset
5249 """
6ce6deb421cf Added an action to the editor to toggle block comments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1490
diff changeset
5250 Private method to handle the toggle comment action.
6ce6deb421cf Added an action to the editor to toggle block comments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1490
diff changeset
5251 """
6ce6deb421cf Added an action to the editor to toggle block comments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1490
diff changeset
5252 self.activeWindow().toggleCommentBlock()
6ce6deb421cf Added an action to the editor to toggle block comments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1490
diff changeset
5253
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5254 def __editComment(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5255 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5256 Private method to handle the comment action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5257 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5258 self.activeWindow().commentLineOrSelection()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5259
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5260 def __editUncomment(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5261 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5262 Private method to handle the uncomment action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5263 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5264 self.activeWindow().uncommentLineOrSelection()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5265
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5266 def __editStreamComment(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5267 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5268 Private method to handle the stream comment action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5269 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5270 self.activeWindow().streamCommentLineOrSelection()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5271
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5272 def __editBoxComment(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5273 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5274 Private method to handle the box comment action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5275 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5276 self.activeWindow().boxCommentLineOrSelection()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5277
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5278 def __editSelectBrace(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5279 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5280 Private method to handle the select to brace action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5281 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5282 self.activeWindow().selectToMatchingBrace()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5283
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5284 def __editSelectAll(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5285 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5286 Private method to handle the select all action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5287 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5288 self.activeWindow().selectAll(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5289
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5290 def __editDeselectAll(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5291 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5292 Private method to handle the select all action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5293 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5294 self.activeWindow().selectAll(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5295
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5296 def __convertEOL(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5297 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5298 Private method to handle the convert line end characters action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5299 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5300 aw = self.activeWindow()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5301 aw.convertEols(aw.eolMode())
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5302
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5303 def __shortenEmptyLines(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5304 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5305 Private method to handle the shorten empty lines action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5306 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5307 self.activeWindow().shortenEmptyLines()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5308
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5309 def __editAutoComplete(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5310 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5311 Private method to handle the autocomplete action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5312 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5313 self.activeWindow().autoComplete()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5314
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5315 def __editAutoCompleteFromDoc(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5316 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5317 Private method to handle the autocomplete from document action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5318 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5319 self.activeWindow().autoCompleteFromDocument()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5320
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5321 def __editAutoCompleteFromAPIs(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5322 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5323 Private method to handle the autocomplete from APIs action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5324 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5325 self.activeWindow().autoCompleteFromAPIs()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5326
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5327 def __editAutoCompleteFromAll(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5328 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5329 Private method to handle the autocomplete from All action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5330 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5331 self.activeWindow().autoCompleteFromAll()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5332
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5333 def __editorAutoCompletionAPIsAvailable(self, available):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5334 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5335 Private method to handle the availability of API autocompletion signal.
2965
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2886
diff changeset
5336
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2886
diff changeset
5337 @param available flag indicating the availability of API
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2886
diff changeset
5338 autocompletion (boolean)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5339 """
4133
3d868439dddc Improved the handling of the various auto-completion actions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4067
diff changeset
5340 editor = self.sender()
3d868439dddc Improved the handling of the various auto-completion actions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4067
diff changeset
5341 self.autoCompleteAct.setEnabled(
3d868439dddc Improved the handling of the various auto-completion actions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4067
diff changeset
5342 editor.canProvideDynamicAutoCompletion())
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5343 self.autoCompleteFromAPIsAct.setEnabled(available)
4133
3d868439dddc Improved the handling of the various auto-completion actions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4067
diff changeset
5344 self.autoCompleteFromAllAct.setEnabled(available)
3d868439dddc Improved the handling of the various auto-completion actions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4067
diff changeset
5345 self.calltipsAct.setEnabled(editor.canProvideCallTipps())
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5346
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5347 def __editShowCallTips(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5348 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5349 Private method to handle the calltips action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5350 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5351 self.activeWindow().callTip()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5352
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5353 ##################################################################
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5354 ## Below are the action and utility methods for the search menu
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5355 ##################################################################
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5356
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
5357 def textForFind(self, getCurrentWord=True):
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
5358 """
2965
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2886
diff changeset
5359 Public method to determine the selection or the current word for the
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2886
diff changeset
5360 next find operation.
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2886
diff changeset
5361
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2886
diff changeset
5362 @param getCurrentWord flag indicating to return the current word, if
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2886
diff changeset
5363 no selected text was found (boolean)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5364 @return selection or current word (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5365 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5366 aw = self.activeWindow()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5367 if aw is None:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5368 return ""
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5369
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5370 return aw.getSearchText(not getCurrentWord)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5371
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5372 def getSRHistory(self, key):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5373 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5374 Public method to get the search or replace history list.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5375
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5376 @param key list to return (must be 'search' or 'replace')
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5377 @return the requested history list (list of strings)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5378 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5379 return self.srHistory[key]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5380
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5381 def __quickSearch(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5382 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5383 Private slot to handle the incremental quick search.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5384 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5385 # first we have to check if quick search is active
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5386 # and try to activate it if not
1128
b8ab8eac9dde Fixed an issue with the quick search actions anabled state and fixed an issue with the quicksearch toolbar not being shown, when quick search is activated while the toolbar is hidden.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
5387 if self.__quickSearchToolbarVisibility is None:
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
5388 self.__quickSearchToolbarVisibility = \
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
5389 self.__quickSearchToolbar.isVisible()
1128
b8ab8eac9dde Fixed an issue with the quick search actions anabled state and fixed an issue with the quicksearch toolbar not being shown, when quick search is activated while the toolbar is hidden.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
5390 if not self.__quickSearchToolbar.isVisible():
b8ab8eac9dde Fixed an issue with the quick search actions anabled state and fixed an issue with the quicksearch toolbar not being shown, when quick search is activated while the toolbar is hidden.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
5391 self.__quickSearchToolbar.show()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5392 if not self.quickFindtextCombo.lineEdit().hasFocus():
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5393 aw = self.activeWindow()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5394 self.quickFindtextCombo.lastActive = aw
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5395 if aw:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5396 self.quickFindtextCombo.lastCursorPos = aw.getCursorPosition()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5397 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5398 self.quickFindtextCombo.lastCursorPos = None
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5399 tff = self.textForFind(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5400 if tff:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5401 self.quickFindtextCombo.lineEdit().setText(tff)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5402 self.quickFindtextCombo.lineEdit().setFocus()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5403 self.quickFindtextCombo.lineEdit().selectAll()
1149
ace5e56c36a1 Enhanced the quick search function.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1134
diff changeset
5404 self.__quickSearchSetEditColors(False)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5405 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5406 self.__quickSearchInEditor(True, False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5407
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5408 def __quickSearchFocusIn(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5409 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5410 Private method to handle a focus in signal of the quicksearch lineedit.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5411 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5412 self.quickFindtextCombo.lastActive = self.activeWindow()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5413
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5414 def __quickSearchEnter(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5415 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5416 Private slot to handle the incremental quick search return pressed
2965
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2886
diff changeset
5417 (jump back to text).
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5418 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5419 if self.quickFindtextCombo.lastActive:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5420 self.quickFindtextCombo.lastActive.setFocus()
1128
b8ab8eac9dde Fixed an issue with the quick search actions anabled state and fixed an issue with the quicksearch toolbar not being shown, when quick search is activated while the toolbar is hidden.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
5421 if self.__quickSearchToolbarVisibility is not None:
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
5422 self.__quickSearchToolbar.setVisible(
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
5423 self.__quickSearchToolbarVisibility)
1128
b8ab8eac9dde Fixed an issue with the quick search actions anabled state and fixed an issue with the quicksearch toolbar not being shown, when quick search is activated while the toolbar is hidden.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
5424 self.__quickSearchToolbarVisibility = None
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5425
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5426 def __quickSearchEscape(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5427 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5428 Private slot to handle the incremental quick search escape pressed
2965
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2886
diff changeset
5429 (jump back to text).
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5430 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5431 if self.quickFindtextCombo.lastActive:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5432 self.quickFindtextCombo.lastActive.setFocus()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5433 aw = self.activeWindow()
3069
8a9579bbf583 Added support for find indicators to the editor (QScintilla >= 2.8).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3062
diff changeset
5434 if aw:
8a9579bbf583 Added support for find indicators to the editor (QScintilla >= 2.8).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3062
diff changeset
5435 aw.hideFindIndicator()
8a9579bbf583 Added support for find indicators to the editor (QScintilla >= 2.8).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3062
diff changeset
5436 if self.quickFindtextCombo.lastCursorPos:
8a9579bbf583 Added support for find indicators to the editor (QScintilla >= 2.8).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3062
diff changeset
5437 aw.setCursorPosition(
8a9579bbf583 Added support for find indicators to the editor (QScintilla >= 2.8).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3062
diff changeset
5438 self.quickFindtextCombo.lastCursorPos[0],
8a9579bbf583 Added support for find indicators to the editor (QScintilla >= 2.8).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3062
diff changeset
5439 self.quickFindtextCombo.lastCursorPos[1])
8a9579bbf583 Added support for find indicators to the editor (QScintilla >= 2.8).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3062
diff changeset
5440
1128
b8ab8eac9dde Fixed an issue with the quick search actions anabled state and fixed an issue with the quicksearch toolbar not being shown, when quick search is activated while the toolbar is hidden.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
5441 if self.__quickSearchToolbarVisibility is not None:
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
5442 self.__quickSearchToolbar.setVisible(
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
5443 self.__quickSearchToolbarVisibility)
1128
b8ab8eac9dde Fixed an issue with the quick search actions anabled state and fixed an issue with the quicksearch toolbar not being shown, when quick search is activated while the toolbar is hidden.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
5444 self.__quickSearchToolbarVisibility = None
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5445
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5446 def __quickSearchText(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5447 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5448 Private slot to handle the textChanged signal of the quicksearch edit.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5449 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5450 self.__quickSearchInEditor(False, False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5451
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5452 def __quickSearchPrev(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5453 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5454 Private slot to handle the quickFindPrev toolbutton action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5455 """
1134
9185e9dd52ef Made the quick search backward work the same way forward does.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1131
diff changeset
5456 # first we have to check if quick search is active
9185e9dd52ef Made the quick search backward work the same way forward does.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1131
diff changeset
5457 # and try to activate it if not
9185e9dd52ef Made the quick search backward work the same way forward does.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1131
diff changeset
5458 if self.__quickSearchToolbarVisibility is None:
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
5459 self.__quickSearchToolbarVisibility = \
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
5460 self.__quickSearchToolbar.isVisible()
1134
9185e9dd52ef Made the quick search backward work the same way forward does.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1131
diff changeset
5461 if not self.__quickSearchToolbar.isVisible():
9185e9dd52ef Made the quick search backward work the same way forward does.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1131
diff changeset
5462 self.__quickSearchToolbar.show()
9185e9dd52ef Made the quick search backward work the same way forward does.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1131
diff changeset
5463 if not self.quickFindtextCombo.lineEdit().hasFocus():
9185e9dd52ef Made the quick search backward work the same way forward does.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1131
diff changeset
5464 aw = self.activeWindow()
9185e9dd52ef Made the quick search backward work the same way forward does.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1131
diff changeset
5465 self.quickFindtextCombo.lastActive = aw
9185e9dd52ef Made the quick search backward work the same way forward does.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1131
diff changeset
5466 if aw:
9185e9dd52ef Made the quick search backward work the same way forward does.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1131
diff changeset
5467 self.quickFindtextCombo.lastCursorPos = aw.getCursorPosition()
9185e9dd52ef Made the quick search backward work the same way forward does.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1131
diff changeset
5468 else:
9185e9dd52ef Made the quick search backward work the same way forward does.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1131
diff changeset
5469 self.quickFindtextCombo.lastCursorPos = None
9185e9dd52ef Made the quick search backward work the same way forward does.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1131
diff changeset
5470 tff = self.textForFind(False)
9185e9dd52ef Made the quick search backward work the same way forward does.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1131
diff changeset
5471 if tff:
9185e9dd52ef Made the quick search backward work the same way forward does.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1131
diff changeset
5472 self.quickFindtextCombo.lineEdit().setText(tff)
9185e9dd52ef Made the quick search backward work the same way forward does.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1131
diff changeset
5473 self.quickFindtextCombo.lineEdit().setFocus()
9185e9dd52ef Made the quick search backward work the same way forward does.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1131
diff changeset
5474 self.quickFindtextCombo.lineEdit().selectAll()
1149
ace5e56c36a1 Enhanced the quick search function.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1134
diff changeset
5475 self.__quickSearchSetEditColors(False)
1134
9185e9dd52ef Made the quick search backward work the same way forward does.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1131
diff changeset
5476 else:
9185e9dd52ef Made the quick search backward work the same way forward does.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1131
diff changeset
5477 self.__quickSearchInEditor(True, True)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5478
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5479 def __quickSearchMarkOccurrences(self, txt):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5480 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5481 Private method to mark all occurrences of the search text.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5482
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5483 @param txt text to search for (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5484 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5485 aw = self.activeWindow()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5486
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5487 lineFrom = 0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5488 indexFrom = 0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5489 lineTo = -1
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5490 indexTo = -1
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5491
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5492 aw.clearSearchIndicators()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5493 ok = aw.findFirstTarget(txt, False, False, False,
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5494 lineFrom, indexFrom, lineTo, indexTo)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5495 while ok:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5496 tgtPos, tgtLen = aw.getFoundTarget()
2110
eff6b085ea89 Removed obsolete and incorrect code from the view manager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2109
diff changeset
5497 aw.setSearchIndicator(tgtPos, tgtLen)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5498 ok = aw.findNextTarget()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5499
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5500 def __quickSearchInEditor(self, again, back):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5501 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5502 Private slot to perform a quick search.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5503
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5504 @param again flag indicating a repeat of the last search (boolean)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5505 @param back flag indicating a backwards search operation (boolean)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5506 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5507 aw = self.activeWindow()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5508 if not aw:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5509 return
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5510
3069
8a9579bbf583 Added support for find indicators to the editor (QScintilla >= 2.8).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3062
diff changeset
5511 aw.hideFindIndicator()
8a9579bbf583 Added support for find indicators to the editor (QScintilla >= 2.8).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3062
diff changeset
5512
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5513 text = self.quickFindtextCombo.lineEdit().text()
1153
8fe2e1abd4ea Slight code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1149
diff changeset
5514 if not text and again:
1149
ace5e56c36a1 Enhanced the quick search function.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1134
diff changeset
5515 text = self.quickFindtextCombo.lastSearchText
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5516 if not text:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5517 if Preferences.getEditor("QuickSearchMarkersEnabled"):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5518 aw.clearSearchIndicators()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5519 return
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5520 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5521 self.quickFindtextCombo.lastSearchText = text
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5522
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5523 if Preferences.getEditor("QuickSearchMarkersEnabled"):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5524 self.__quickSearchMarkOccurrences(text)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5525
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5526 lineFrom, indexFrom, lineTo, indexTo = aw.getSelection()
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
5527 cline, cindex = aw.getCursorPosition()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5528 if again:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5529 if back:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5530 if indexFrom != 0:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5531 index = indexFrom - 1
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5532 line = lineFrom
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5533 elif lineFrom == 0:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5534 return
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5535 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5536 line = lineFrom - 1
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5537 index = aw.lineLength(line)
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
5538 ok = aw.findFirst(text, False, False, False, True, False,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
5539 line, index)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5540 else:
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
5541 ok = aw.findFirst(text, False, False, False, True, not back,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5542 cline, cindex)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5543 else:
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
5544 ok = aw.findFirst(text, False, False, False, True, not back,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5545 lineFrom, indexFrom)
3069
8a9579bbf583 Added support for find indicators to the editor (QScintilla >= 2.8).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3062
diff changeset
5546 if ok:
8a9579bbf583 Added support for find indicators to the editor (QScintilla >= 2.8).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3062
diff changeset
5547 sline, sindex, eline, eindex = aw.getSelection()
8a9579bbf583 Added support for find indicators to the editor (QScintilla >= 2.8).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3062
diff changeset
5548 aw.showFindIndicator(sline, sindex, eline, eindex)
1149
ace5e56c36a1 Enhanced the quick search function.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1134
diff changeset
5549 self.__quickSearchSetEditColors(not ok)
ace5e56c36a1 Enhanced the quick search function.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1134
diff changeset
5550
ace5e56c36a1 Enhanced the quick search function.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1134
diff changeset
5551 def __quickSearchSetEditColors(self, error):
ace5e56c36a1 Enhanced the quick search function.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1134
diff changeset
5552 """
ace5e56c36a1 Enhanced the quick search function.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1134
diff changeset
5553 Private method to set the quick search edit colors.
ace5e56c36a1 Enhanced the quick search function.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1134
diff changeset
5554
ace5e56c36a1 Enhanced the quick search function.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1134
diff changeset
5555 @param error flag indicating an error (boolean)
ace5e56c36a1 Enhanced the quick search function.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1134
diff changeset
5556 """
ace5e56c36a1 Enhanced the quick search function.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1134
diff changeset
5557 if error:
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5558 palette = self.quickFindtextCombo.lineEdit().palette()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5559 palette.setColor(QPalette.Base, QColor("red"))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5560 palette.setColor(QPalette.Text, QColor("white"))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5561 self.quickFindtextCombo.lineEdit().setPalette(palette)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5562 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5563 palette = self.quickFindtextCombo.lineEdit().palette()
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
5564 palette.setColor(
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
5565 QPalette.Base,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
5566 self.quickFindtextCombo.palette().color(QPalette.Base))
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
5567 palette.setColor(
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
5568 QPalette.Text,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
5569 self.quickFindtextCombo.palette().color(QPalette.Text))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5570 self.quickFindtextCombo.lineEdit().setPalette(palette)
1149
ace5e56c36a1 Enhanced the quick search function.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1134
diff changeset
5571
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5572 def __quickSearchExtend(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5573 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5574 Private method to handle the quicksearch extend action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5575 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5576 aw = self.activeWindow()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5577 if aw is None:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5578 return
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5579
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5580 txt = self.quickFindtextCombo.lineEdit().text()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5581 if not txt:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5582 return
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5583
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5584 line, index = aw.getCursorPosition()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5585 text = aw.text(line)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5586
2415
814c66cb0746 Added support for SSI include statements to the HTML preview function.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2409
diff changeset
5587 reg = QRegExp('[^\w_]')
814c66cb0746 Added support for SSI include statements to the HTML preview function.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2409
diff changeset
5588 end = reg.indexIn(text, index)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5589 if end > index:
1128
b8ab8eac9dde Fixed an issue with the quick search actions anabled state and fixed an issue with the quicksearch toolbar not being shown, when quick search is activated while the toolbar is hidden.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1112
diff changeset
5590 ext = text[index:end]
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5591 txt += ext
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5592 self.quickFindtextCombo.lineEdit().setText(txt)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5593
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5594 def __search(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5595 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5596 Private method to handle the search action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5597 """
2362
68a92d01c1cc Made the search and replace widgets scrollable (customisation for smaller screens).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2351
diff changeset
5598 self.__replaceWidget.hide()
68a92d01c1cc Made the search and replace widgets scrollable (customisation for smaller screens).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2351
diff changeset
5599 self.__searchWidget.show()
68a92d01c1cc Made the search and replace widgets scrollable (customisation for smaller screens).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2351
diff changeset
5600 self.__searchWidget.show(self.textForFind())
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5601
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5602 def __replace(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5603 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5604 Private method to handle the replace action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5605 """
2362
68a92d01c1cc Made the search and replace widgets scrollable (customisation for smaller screens).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2351
diff changeset
5606 self.__searchWidget.hide()
68a92d01c1cc Made the search and replace widgets scrollable (customisation for smaller screens).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2351
diff changeset
5607 self.__replaceWidget.show(self.textForFind())
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5608
2213
022f4ad3ed19 Added actions to search for the next/previous occurence of the current word (default shortcuts Ctrl+. and Ctrl+,).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2211
diff changeset
5609 def __findNextWord(self):
022f4ad3ed19 Added actions to search for the next/previous occurence of the current word (default shortcuts Ctrl+. and Ctrl+,).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2211
diff changeset
5610 """
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
5611 Private slot to find the next occurrence of the current word of the
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
5612 current editor.
2213
022f4ad3ed19 Added actions to search for the next/previous occurence of the current word (default shortcuts Ctrl+. and Ctrl+,).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2211
diff changeset
5613 """
022f4ad3ed19 Added actions to search for the next/previous occurence of the current word (default shortcuts Ctrl+. and Ctrl+,).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2211
diff changeset
5614 self.activeWindow().searchCurrentWordForward()
022f4ad3ed19 Added actions to search for the next/previous occurence of the current word (default shortcuts Ctrl+. and Ctrl+,).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2211
diff changeset
5615
022f4ad3ed19 Added actions to search for the next/previous occurence of the current word (default shortcuts Ctrl+. and Ctrl+,).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2211
diff changeset
5616 def __findPrevWord(self):
022f4ad3ed19 Added actions to search for the next/previous occurence of the current word (default shortcuts Ctrl+. and Ctrl+,).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2211
diff changeset
5617 """
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
5618 Private slot to find the previous occurrence of the current word of
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
5619 the current editor.
2213
022f4ad3ed19 Added actions to search for the next/previous occurence of the current word (default shortcuts Ctrl+. and Ctrl+,).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2211
diff changeset
5620 """
022f4ad3ed19 Added actions to search for the next/previous occurence of the current word (default shortcuts Ctrl+. and Ctrl+,).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2211
diff changeset
5621 self.activeWindow().searchCurrentWordBackward()
022f4ad3ed19 Added actions to search for the next/previous occurence of the current word (default shortcuts Ctrl+. and Ctrl+,).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2211
diff changeset
5622
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5623 def __searchClearMarkers(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5624 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5625 Private method to clear the search markers of the active window.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5626 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5627 self.activeWindow().clearSearchIndicators()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5628
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5629 def __goto(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5630 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5631 Private method to handle the goto action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5632 """
2400
c1726b754f96 Started with delaying the import upon the time it is needed.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2391
diff changeset
5633 from QScintilla.GotoDialog import GotoDialog
c1726b754f96 Started with delaying the import upon the time it is needed.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2391
diff changeset
5634
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5635 aw = self.activeWindow()
958
9f712690525e Correct the behavior of the Goto dialog to show the line of the cursor as the default.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 949
diff changeset
5636 lines = aw.lines()
9f712690525e Correct the behavior of the Goto dialog to show the line of the cursor as the default.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 949
diff changeset
5637 curLine = aw.getCursorPosition()[0] + 1
9f712690525e Correct the behavior of the Goto dialog to show the line of the cursor as the default.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 949
diff changeset
5638 dlg = GotoDialog(lines, curLine, self.ui, None, True)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5639 if dlg.exec_() == QDialog.Accepted:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5640 aw.gotoLine(dlg.getLinenumber())
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5641
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5642 def __gotoBrace(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5643 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5644 Private method to handle the goto brace action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5645 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5646 self.activeWindow().moveToMatchingBrace()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5647
1169
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
5648 def __gotoLastEditPosition(self):
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
5649 """
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
5650 Private method to move the cursor to the last edit position.
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
5651 """
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
5652 self.activeWindow().gotoLastEditPosition()
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
5653
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
5654 def __lastEditPositionAvailable(self):
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
5655 """
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
5656 Private slot to handle the lastEditPositionAvailable signal of an
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
5657 editor.
1169
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
5658 """
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
5659 self.gotoLastEditAct.setEnabled(True)
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
5660
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
5661 def __gotoNextMethodClass(self):
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
5662 """
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
5663 Private slot to go to the next Python/Ruby method or class definition.
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
5664 """
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
5665 self.activeWindow().gotoMethodClass(False)
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
5666
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
5667 def __gotoPreviousMethodClass(self):
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
5668 """
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
5669 Private slot to go to the previous Python/Ruby method or class
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
5670 definition.
1169
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
5671 """
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
5672 self.activeWindow().gotoMethodClass(True)
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
5673
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5674 def __searchFiles(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5675 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5676 Private method to handle the search in files action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5677 """
1490
ed6f2208297d Changes to speed up the start-up phase by creating some dialog on demand.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1474
diff changeset
5678 self.ui.showFindFilesDialog(self.textForFind())
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5679
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5680 def __replaceFiles(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5681 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5682 Private method to handle the replace in files action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5683 """
1490
ed6f2208297d Changes to speed up the start-up phase by creating some dialog on demand.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1474
diff changeset
5684 self.ui.showReplaceFilesDialog(self.textForFind())
2214
4ce1ebcc3806 Added actions to open the find in files and replace in files dialogs in a mode that searches open files only.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2213
diff changeset
5685
4ce1ebcc3806 Added actions to open the find in files and replace in files dialogs in a mode that searches open files only.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2213
diff changeset
5686 def __searchOpenFiles(self):
4ce1ebcc3806 Added actions to open the find in files and replace in files dialogs in a mode that searches open files only.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2213
diff changeset
5687 """
4ce1ebcc3806 Added actions to open the find in files and replace in files dialogs in a mode that searches open files only.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2213
diff changeset
5688 Private method to handle the search in open files action.
4ce1ebcc3806 Added actions to open the find in files and replace in files dialogs in a mode that searches open files only.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2213
diff changeset
5689 """
4ce1ebcc3806 Added actions to open the find in files and replace in files dialogs in a mode that searches open files only.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2213
diff changeset
5690 self.ui.showFindFilesDialog(self.textForFind(), openFiles=True)
4ce1ebcc3806 Added actions to open the find in files and replace in files dialogs in a mode that searches open files only.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2213
diff changeset
5691
4ce1ebcc3806 Added actions to open the find in files and replace in files dialogs in a mode that searches open files only.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2213
diff changeset
5692 def __replaceOpenFiles(self):
4ce1ebcc3806 Added actions to open the find in files and replace in files dialogs in a mode that searches open files only.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2213
diff changeset
5693 """
4ce1ebcc3806 Added actions to open the find in files and replace in files dialogs in a mode that searches open files only.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2213
diff changeset
5694 Private method to handle the replace in open files action.
4ce1ebcc3806 Added actions to open the find in files and replace in files dialogs in a mode that searches open files only.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2213
diff changeset
5695 """
4ce1ebcc3806 Added actions to open the find in files and replace in files dialogs in a mode that searches open files only.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2213
diff changeset
5696 self.ui.showReplaceFilesDialog(self.textForFind(), openFiles=True)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5697
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5698 ##################################################################
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5699 ## Below are the action methods for the view menu
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5700 ##################################################################
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5701
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5702 def __zoomIn(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5703 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5704 Private method to handle the zoom in action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5705 """
53
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 15
diff changeset
5706 if QApplication.focusWidget() == e5App().getObject("Shell"):
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 15
diff changeset
5707 e5App().getObject("Shell").zoomIn()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5708 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5709 aw = self.activeWindow()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5710 if aw:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5711 aw.zoomIn()
2334
fc69ad77e18a Introduced a zoom widget in the status bar of several windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2331
diff changeset
5712 self.sbZoom.setValue(aw.getZoom())
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5713
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5714 def __zoomOut(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5715 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5716 Private method to handle the zoom out action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5717 """
53
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 15
diff changeset
5718 if QApplication.focusWidget() == e5App().getObject("Shell"):
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 15
diff changeset
5719 e5App().getObject("Shell").zoomOut()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5720 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5721 aw = self.activeWindow()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5722 if aw:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5723 aw.zoomOut()
2334
fc69ad77e18a Introduced a zoom widget in the status bar of several windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2331
diff changeset
5724 self.sbZoom.setValue(aw.getZoom())
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5725
1504
3e6ec85cede1 Added an action to reset the zoom factor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1500
diff changeset
5726 def __zoomReset(self):
3e6ec85cede1 Added an action to reset the zoom factor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1500
diff changeset
5727 """
3e6ec85cede1 Added an action to reset the zoom factor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1500
diff changeset
5728 Private method to reset the zoom factor.
3e6ec85cede1 Added an action to reset the zoom factor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1500
diff changeset
5729 """
3e6ec85cede1 Added an action to reset the zoom factor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1500
diff changeset
5730 if QApplication.focusWidget() == e5App().getObject("Shell"):
3e6ec85cede1 Added an action to reset the zoom factor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1500
diff changeset
5731 e5App().getObject("Shell").zoomTo(0)
3e6ec85cede1 Added an action to reset the zoom factor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1500
diff changeset
5732 else:
3e6ec85cede1 Added an action to reset the zoom factor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1500
diff changeset
5733 aw = self.activeWindow()
3e6ec85cede1 Added an action to reset the zoom factor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1500
diff changeset
5734 if aw:
3e6ec85cede1 Added an action to reset the zoom factor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1500
diff changeset
5735 aw.zoomTo(0)
2334
fc69ad77e18a Introduced a zoom widget in the status bar of several windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2331
diff changeset
5736 self.sbZoom.setValue(aw.getZoom())
fc69ad77e18a Introduced a zoom widget in the status bar of several windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2331
diff changeset
5737
3346
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
5738 def __zoom(self):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5739 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5740 Private method to handle the zoom action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5741 """
53
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 15
diff changeset
5742 if QApplication.focusWidget() == e5App().getObject("Shell"):
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 15
diff changeset
5743 aw = e5App().getObject("Shell")
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5744 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5745 aw = self.activeWindow()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5746 if aw:
3346
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
5747 from QScintilla.ZoomDialog import ZoomDialog
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
5748 dlg = ZoomDialog(aw.getZoom(), self.ui, None, True)
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
5749 if dlg.exec_() == QDialog.Accepted:
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
5750 value = dlg.getZoomSize()
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
5751 self.__zoomTo(value)
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
5752
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
5753 def __zoomTo(self, value):
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
5754 """
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
5755 Private slot to zoom to a given value.
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
5756
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
5757 @param value zoom value to be set (integer)
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
5758 """
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
5759 if QApplication.focusWidget() == e5App().getObject("Shell"):
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
5760 aw = e5App().getObject("Shell")
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
5761 else:
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
5762 aw = self.activeWindow()
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
5763 if aw:
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
5764 aw.zoomTo(value)
39f9273ebd61 Fixed issues caused by the signal/slot connection changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3345
diff changeset
5765 self.sbZoom.setValue(aw.getZoom())
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5766
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
5767 def zoomValueChanged(self, value):
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
5768 """
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
5769 Public slot to handle changes of the zoom value.
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
5770
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
5771 @param value new zoom value (integer)
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
5772 """
2351
649e4f8c5cef Fixed the QScintilla related zoom code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2347
diff changeset
5773 if QApplication.focusWidget() == e5App().getObject("Shell"):
649e4f8c5cef Fixed the QScintilla related zoom code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2347
diff changeset
5774 aw = e5App().getObject("Shell")
649e4f8c5cef Fixed the QScintilla related zoom code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2347
diff changeset
5775 else:
649e4f8c5cef Fixed the QScintilla related zoom code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2347
diff changeset
5776 aw = self.activeWindow()
649e4f8c5cef Fixed the QScintilla related zoom code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2347
diff changeset
5777 if aw and aw == self.sender():
649e4f8c5cef Fixed the QScintilla related zoom code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2347
diff changeset
5778 self.sbZoom.setValue(value)
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
5779
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5780 def __toggleAll(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5781 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5782 Private method to handle the toggle all folds action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5783 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5784 aw = self.activeWindow()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5785 if aw:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5786 aw.foldAll()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5787
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5788 def __toggleAllChildren(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5789 """
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
5790 Private method to handle the toggle all folds (including children)
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
5791 action.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5792 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5793 aw = self.activeWindow()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5794 if aw:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5795 aw.foldAll(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5796
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5797 def __toggleCurrent(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5798 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5799 Private method to handle the toggle current fold action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5800 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5801 aw = self.activeWindow()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5802 if aw:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5803 line, index = aw.getCursorPosition()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5804 aw.foldLine(line)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5805
3101
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
5806 def __newDocumentView(self):
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
5807 """
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
5808 Private method to open a new view of the current editor.
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
5809 """
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
5810 aw = self.activeWindow()
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
5811 if aw:
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
5812 self.newEditorView(aw.getFileName(), aw, aw.getFileType())
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
5813
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
5814 def __newDocumentSplitView(self):
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
5815 """
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
5816 Private method to open a new view of the current editor in a new split.
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
5817 """
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
5818 aw = self.activeWindow()
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
5819 if aw:
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
5820 self.addSplit()
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
5821 self.newEditorView(aw.getFileName(), aw, aw.getFileType())
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
5822
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5823 def __splitView(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5824 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5825 Private method to handle the split view action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5826 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5827 self.addSplit()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5828
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5829 def __splitOrientation(self, checked):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5830 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5831 Private method to handle the split orientation action.
2965
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2886
diff changeset
5832
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2886
diff changeset
5833 @param checked flag indicating the checked state of the action
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2886
diff changeset
5834 (boolean). True means splitting horizontally.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5835 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5836 if checked:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5837 self.setSplitOrientation(Qt.Horizontal)
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 559
diff changeset
5838 self.splitViewAct.setIcon(
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5839 UI.PixmapCache.getIcon("splitHorizontal.png"))
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 559
diff changeset
5840 self.splitRemoveAct.setIcon(
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5841 UI.PixmapCache.getIcon("remsplitHorizontal.png"))
3102
0bc989a51428 Fixed the forgotten icon change of the new document view in new split action when the split direction is changed.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3101
diff changeset
5842 self.newDocumentSplitViewAct.setIcon(
0bc989a51428 Fixed the forgotten icon change of the new document view in new split action when the split direction is changed.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3101
diff changeset
5843 UI.PixmapCache.getIcon("splitHorizontal.png"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5844 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5845 self.setSplitOrientation(Qt.Vertical)
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 559
diff changeset
5846 self.splitViewAct.setIcon(
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5847 UI.PixmapCache.getIcon("splitVertical.png"))
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 559
diff changeset
5848 self.splitRemoveAct.setIcon(
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5849 UI.PixmapCache.getIcon("remsplitVertical.png"))
3102
0bc989a51428 Fixed the forgotten icon change of the new document view in new split action when the split direction is changed.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3101
diff changeset
5850 self.newDocumentSplitViewAct.setIcon(
0bc989a51428 Fixed the forgotten icon change of the new document view in new split action when the split direction is changed.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3101
diff changeset
5851 UI.PixmapCache.getIcon("splitVertical.png"))
3547
c2a187c63209 Added code to save the editor split direction.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3484
diff changeset
5852 Preferences.setUI("SplitOrientationVertical", checked)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5853
2424
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2415
diff changeset
5854 def __previewEditor(self, checked):
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2415
diff changeset
5855 """
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2415
diff changeset
5856 Private slot to handle a change of the preview selection state.
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2415
diff changeset
5857
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2415
diff changeset
5858 @param checked state of the action (boolean)
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2415
diff changeset
5859 """
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2415
diff changeset
5860 Preferences.setUI("ShowFilePreview", checked)
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2415
diff changeset
5861 self.previewStateChanged.emit(checked)
1196
77da430b4080 Added an action to preview the file in the eric web browser.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1190
diff changeset
5862
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5863 ##################################################################
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5864 ## Below are the action methods for the macro menu
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5865 ##################################################################
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5866
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5867 def __macroStartRecording(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5868 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5869 Private method to handle the start macro recording action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5870 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5871 self.activeWindow().macroRecordingStart()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5872
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5873 def __macroStopRecording(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5874 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5875 Private method to handle the stop macro recording action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5876 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5877 self.activeWindow().macroRecordingStop()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5878
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5879 def __macroRun(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5880 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5881 Private method to handle the run macro action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5882 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5883 self.activeWindow().macroRun()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5884
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5885 def __macroDelete(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5886 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5887 Private method to handle the delete macro action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5888 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5889 self.activeWindow().macroDelete()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5890
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5891 def __macroLoad(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5892 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5893 Private method to handle the load macro action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5894 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5895 self.activeWindow().macroLoad()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5896
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5897 def __macroSave(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5898 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5899 Private method to handle the save macro action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5900 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5901 self.activeWindow().macroSave()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5902
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5903 ##################################################################
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5904 ## Below are the action methods for the bookmarks menu
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5905 ##################################################################
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5906
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5907 def __toggleBookmark(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5908 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5909 Private method to handle the toggle bookmark action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5910 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5911 self.activeWindow().menuToggleBookmark()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5912
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5913 def __nextBookmark(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5914 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5915 Private method to handle the next bookmark action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5916 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5917 self.activeWindow().nextBookmark()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5918
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5919 def __previousBookmark(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5920 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5921 Private method to handle the previous bookmark action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5922 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5923 self.activeWindow().previousBookmark()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5924
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5925 def __clearAllBookmarks(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5926 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5927 Private method to handle the clear all bookmarks action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5928 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5929 for editor in self.editors:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5930 editor.clearBookmarks()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5931
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5932 self.bookmarkNextAct.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5933 self.bookmarkPreviousAct.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5934 self.bookmarkClearAct.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5935
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5936 def __showBookmarkMenu(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5937 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5938 Private method to set up the bookmark menu.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5939 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5940 bookmarksFound = 0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5941 filenames = self.getOpenFilenames()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5942 for filename in filenames:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5943 editor = self.getOpenEditor(filename)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5944 bookmarksFound = len(editor.getBookmarks()) > 0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5945 if bookmarksFound:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5946 self.menuBookmarksAct.setEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5947 return
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5948 self.menuBookmarksAct.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5949
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5950 def __showBookmarksMenu(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5951 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5952 Private method to handle the show bookmarks menu signal.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5953 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5954 self.bookmarksMenu.clear()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5955
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5956 filenames = self.getOpenFilenames()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5957 for filename in sorted(filenames):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5958 editor = self.getOpenEditor(filename)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5959 for bookmark in editor.getBookmarks():
432
497e188ee86e Did some more string format conversions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 372
diff changeset
5960 bmSuffix = " : {0:d}".format(bookmark)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5961 act = self.bookmarksMenu.addAction(
432
497e188ee86e Did some more string format conversions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 372
diff changeset
5962 "{0}{1}".format(
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5963 Utilities.compactPath(
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5964 filename,
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
5965 self.ui.maxMenuFilePathLen - len(bmSuffix)),
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5966 bmSuffix))
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
5967 act.setData([filename, bookmark])
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5968
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5969 def __bookmarkSelected(self, act):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5970 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5971 Private method to handle the bookmark selected signal.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5972
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5973 @param act reference to the action that triggered (QAction)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5974 """
7
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
5975 bmList = act.data()
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
5976 filename = bmList[0]
c679fb30c8f3 Change code dealing with QVariant (and QSettings) to use the PyQt4 QVariant v2 API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 0
diff changeset
5977 line = bmList[1]
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5978 self.openSourceFile(filename, line)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5979
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5980 def __bookmarkToggled(self, editor):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5981 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5982 Private slot to handle the bookmarkToggled signal.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5983
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5984 It checks some bookmark actions and reemits the signal.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5985
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5986 @param editor editor that sent the signal
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5987 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5988 if editor.hasBookmarks():
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5989 self.bookmarkNextAct.setEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5990 self.bookmarkPreviousAct.setEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5991 self.bookmarkClearAct.setEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5992 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5993 self.bookmarkNextAct.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5994 self.bookmarkPreviousAct.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5995 self.bookmarkClearAct.setEnabled(False)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
5996 self.bookmarkToggled.emit(editor)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5997
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5998 def __gotoSyntaxError(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5999 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6000 Private method to handle the goto syntax error action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6001 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6002 self.activeWindow().gotoSyntaxError()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6003
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6004 def __clearAllSyntaxErrors(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6005 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6006 Private method to handle the clear all syntax errors action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6007 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6008 for editor in self.editors:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6009 editor.clearSyntaxError()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6010
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6011 def _syntaxErrorToggled(self, editor):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6012 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6013 Protected slot to handle the syntaxerrorToggled signal.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6014
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6015 It checks some syntax error actions and reemits the signal.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6016
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6017 @param editor editor that sent the signal
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6018 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6019 if editor.hasSyntaxErrors():
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6020 self.syntaxErrorGotoAct.setEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6021 self.syntaxErrorClearAct.setEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6022 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6023 self.syntaxErrorGotoAct.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6024 self.syntaxErrorClearAct.setEnabled(False)
3062
9de9373da5bb Extended the editor warning messages handling and refactored the names of warning handling methods to reflect their more general use.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3039
diff changeset
6025 if editor.hasWarnings():
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 65
diff changeset
6026 self.warningsNextAct.setEnabled(True)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 65
diff changeset
6027 self.warningsPreviousAct.setEnabled(True)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 65
diff changeset
6028 self.warningsClearAct.setEnabled(True)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 65
diff changeset
6029 else:
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 65
diff changeset
6030 self.warningsNextAct.setEnabled(False)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 65
diff changeset
6031 self.warningsPreviousAct.setEnabled(False)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 65
diff changeset
6032 self.warningsClearAct.setEnabled(False)
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
6033 self.syntaxerrorToggled.emit(editor)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6034
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 65
diff changeset
6035 def __nextWarning(self):
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 65
diff changeset
6036 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 65
diff changeset
6037 Private method to handle the next warning action.
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 65
diff changeset
6038 """
3062
9de9373da5bb Extended the editor warning messages handling and refactored the names of warning handling methods to reflect their more general use.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3039
diff changeset
6039 self.activeWindow().nextWarning()
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 65
diff changeset
6040
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 65
diff changeset
6041 def __previousWarning(self):
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 65
diff changeset
6042 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 65
diff changeset
6043 Private method to handle the previous warning action.
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 65
diff changeset
6044 """
3062
9de9373da5bb Extended the editor warning messages handling and refactored the names of warning handling methods to reflect their more general use.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3039
diff changeset
6045 self.activeWindow().previousWarning()
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 65
diff changeset
6046
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 65
diff changeset
6047 def __clearAllWarnings(self):
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 65
diff changeset
6048 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 65
diff changeset
6049 Private method to handle the clear all warnings action.
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 65
diff changeset
6050 """
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 65
diff changeset
6051 for editor in self.editors:
3062
9de9373da5bb Extended the editor warning messages handling and refactored the names of warning handling methods to reflect their more general use.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3039
diff changeset
6052 editor.clearWarnings()
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 65
diff changeset
6053
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6054 def __nextUncovered(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6055 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6056 Private method to handle the next uncovered action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6057 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6058 self.activeWindow().nextUncovered()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6059
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6060 def __previousUncovered(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6061 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6062 Private method to handle the previous uncovered action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6063 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6064 self.activeWindow().previousUncovered()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6065
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6066 def __coverageMarkersShown(self, shown):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6067 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6068 Private slot to handle the coverageMarkersShown signal.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6069
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6070 @param shown flag indicating whether the markers were shown or cleared
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6071 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6072 if shown:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6073 self.notcoveredNextAct.setEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6074 self.notcoveredPreviousAct.setEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6075 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6076 self.notcoveredNextAct.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6077 self.notcoveredPreviousAct.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6078
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6079 def __taskMarkersUpdated(self, editor):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6080 """
2162
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2138
diff changeset
6081 Private slot to handle the taskMarkersUpdated signal.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6082
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6083 @param editor editor that sent the signal
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6084 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6085 if editor.hasTaskMarkers():
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6086 self.taskNextAct.setEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6087 self.taskPreviousAct.setEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6088 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6089 self.taskNextAct.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6090 self.taskPreviousAct.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6091
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6092 def __nextTask(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6093 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6094 Private method to handle the next task action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6095 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6096 self.activeWindow().nextTask()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6097
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6098 def __previousTask(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6099 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6100 Private method to handle the previous task action.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6101 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6102 self.activeWindow().previousTask()
2162
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2138
diff changeset
6103
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2138
diff changeset
6104 def __changeMarkersUpdated(self, editor):
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2138
diff changeset
6105 """
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2138
diff changeset
6106 Private slot to handle the changeMarkersUpdated signal.
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2138
diff changeset
6107
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2138
diff changeset
6108 @param editor editor that sent the signal
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2138
diff changeset
6109 """
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2138
diff changeset
6110 if editor.hasChangeMarkers():
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2138
diff changeset
6111 self.changeNextAct.setEnabled(True)
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2138
diff changeset
6112 self.changePreviousAct.setEnabled(True)
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2138
diff changeset
6113 else:
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2138
diff changeset
6114 self.changeNextAct.setEnabled(False)
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2138
diff changeset
6115 self.changePreviousAct.setEnabled(False)
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2138
diff changeset
6116
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2138
diff changeset
6117 def __nextChange(self):
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2138
diff changeset
6118 """
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2138
diff changeset
6119 Private method to handle the next change action.
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2138
diff changeset
6120 """
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2138
diff changeset
6121 self.activeWindow().nextChange()
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2138
diff changeset
6122
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2138
diff changeset
6123 def __previousChange(self):
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2138
diff changeset
6124 """
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2138
diff changeset
6125 Private method to handle the previous change action.
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2138
diff changeset
6126 """
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2138
diff changeset
6127 self.activeWindow().previousChange()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6128
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6129 ##################################################################
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6130 ## Below are the action methods for the spell checking functions
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6131 ##################################################################
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6132
2673
c62efb5f2d79 Changed logic when showing the 'Edit Dictionaries' menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2593
diff changeset
6133 def __showEditSpellingMenu(self):
c62efb5f2d79 Changed logic when showing the 'Edit Dictionaries' menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2593
diff changeset
6134 """
c62efb5f2d79 Changed logic when showing the 'Edit Dictionaries' menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2593
diff changeset
6135 Private method to set up the edit dictionaries menu.
c62efb5f2d79 Changed logic when showing the 'Edit Dictionaries' menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2593
diff changeset
6136 """
c62efb5f2d79 Changed logic when showing the 'Edit Dictionaries' menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2593
diff changeset
6137 proj = e5App().getObject("Project")
c62efb5f2d79 Changed logic when showing the 'Edit Dictionaries' menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2593
diff changeset
6138 projetOpen = proj.isOpen()
c62efb5f2d79 Changed logic when showing the 'Edit Dictionaries' menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2593
diff changeset
6139 pwl = e5App().getObject("Project").getProjectDictionaries()[0]
c62efb5f2d79 Changed logic when showing the 'Edit Dictionaries' menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2593
diff changeset
6140 self.__editProjectPwlAct.setEnabled(projetOpen and bool(pwl))
c62efb5f2d79 Changed logic when showing the 'Edit Dictionaries' menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2593
diff changeset
6141 pel = e5App().getObject("Project").getProjectDictionaries()[1]
c62efb5f2d79 Changed logic when showing the 'Edit Dictionaries' menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2593
diff changeset
6142 self.__editProjectPelAct.setEnabled(projetOpen and bool(pel))
c62efb5f2d79 Changed logic when showing the 'Edit Dictionaries' menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2593
diff changeset
6143
c62efb5f2d79 Changed logic when showing the 'Edit Dictionaries' menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2593
diff changeset
6144 from QScintilla.SpellChecker import SpellChecker
c62efb5f2d79 Changed logic when showing the 'Edit Dictionaries' menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2593
diff changeset
6145 pwl = SpellChecker.getUserDictionaryPath()
c62efb5f2d79 Changed logic when showing the 'Edit Dictionaries' menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2593
diff changeset
6146 self.__editUserPwlAct.setEnabled(bool(pwl))
c62efb5f2d79 Changed logic when showing the 'Edit Dictionaries' menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2593
diff changeset
6147 pel = SpellChecker.getUserDictionaryPath(True)
c62efb5f2d79 Changed logic when showing the 'Edit Dictionaries' menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2593
diff changeset
6148 self.__editUserPelAct.setEnabled(bool(pel))
c62efb5f2d79 Changed logic when showing the 'Edit Dictionaries' menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2593
diff changeset
6149
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6150 def __setAutoSpellChecking(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6151 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6152 Private slot to set the automatic spell checking of all editors.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6153 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6154 enabled = self.autoSpellCheckAct.isChecked()
65
ca6449ba4824 Fixed a few porting bugs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 55
diff changeset
6155 Preferences.setEditor("AutoSpellCheckingEnabled", enabled)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6156 for editor in self.editors:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6157 editor.setAutoSpellChecking()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6158
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6159 def __spellCheck(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6160 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6161 Private slot to perform a spell check of the current editor.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6162 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6163 aw = self.activeWindow()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6164 if aw:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6165 aw.checkSpelling()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6166
2211
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6167 def __editProjectPWL(self):
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6168 """
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6169 Private slot to edit the project word list.
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6170 """
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6171 pwl = e5App().getObject("Project").getProjectDictionaries()[0]
2673
c62efb5f2d79 Changed logic when showing the 'Edit Dictionaries' menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2593
diff changeset
6172 self.__editSpellingDictionary(pwl)
2211
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6173
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6174 def __editProjectPEL(self):
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6175 """
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6176 Private slot to edit the project exception list.
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6177 """
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6178 pel = e5App().getObject("Project").getProjectDictionaries()[1]
2673
c62efb5f2d79 Changed logic when showing the 'Edit Dictionaries' menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2593
diff changeset
6179 self.__editSpellingDictionary(pel)
2211
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6180
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6181 def __editUserPWL(self):
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6182 """
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6183 Private slot to edit the user word list.
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6184 """
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
6185 from QScintilla.SpellChecker import SpellChecker
2211
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6186 pwl = SpellChecker.getUserDictionaryPath()
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6187 self.__editSpellingDictionary(pwl)
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6188
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6189 def __editUserPEL(self):
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6190 """
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6191 Private slot to edit the user exception list.
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6192 """
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
6193 from QScintilla.SpellChecker import SpellChecker
2211
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6194 pel = SpellChecker.getUserDictionaryPath(True)
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6195 self.__editSpellingDictionary(pel)
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6196
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6197 def __editSpellingDictionary(self, dictionaryFile):
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6198 """
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6199 Private slot to edit the given spelling dictionary.
2965
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2886
diff changeset
6200
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2886
diff changeset
6201 @param dictionaryFile file name of the dictionary to edit (string)
2211
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6202 """
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6203 if os.path.exists(dictionaryFile):
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6204 try:
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6205 f = open(dictionaryFile, "r", encoding="utf-8")
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6206 data = f.read()
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6207 f.close()
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6208 except (IOError, OSError) as err:
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
6209 E5MessageBox.critical(
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
6210 self.ui,
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
6211 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
6212 'ViewManager', "Edit Spelling Dictionary"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
6213 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
6214 'ViewManager',
2211
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6215 """<p>The spelling dictionary file <b>{0}</b> could"""
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6216 """ not be read.</p><p>Reason: {1}</p>""").format(
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6217 dictionaryFile, str(err)))
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6218 return
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6219
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6220 fileInfo = dictionaryFile if len(dictionaryFile) < 40 \
3039
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
6221 else "...{0}".format(dictionaryFile[-40:])
2400
c1726b754f96 Started with delaying the import upon the time it is needed.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2391
diff changeset
6222 from QScintilla.SpellingDictionaryEditDialog import \
c1726b754f96 Started with delaying the import upon the time it is needed.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2391
diff changeset
6223 SpellingDictionaryEditDialog
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
6224 dlg = SpellingDictionaryEditDialog(
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
6225 data,
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
6226 QCoreApplication.translate('ViewManager', "Editing {0}")
3039
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
6227 .format(fileInfo),
2211
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6228 self.ui)
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6229 if dlg.exec_() == QDialog.Accepted:
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6230 data = dlg.getData()
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6231 try:
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6232 f = open(dictionaryFile, "w", encoding="utf-8")
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6233 f.write(data)
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6234 f.close()
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6235 except (IOError, OSError) as err:
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
6236 E5MessageBox.critical(
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
6237 self.ui,
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
6238 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
6239 'ViewManager', "Edit Spelling Dictionary"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
6240 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
6241 'ViewManager',
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
6242 """<p>The spelling dictionary file <b>{0}</b>"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
6243 """ could not be written.</p>"""
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
6244 """<p>Reason: {1}</p>""").format(
2211
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6245 dictionaryFile, str(err)))
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6246 return
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6247
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6248 if self.ui.notificationsEnabled():
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6249 self.ui.showNotification(
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6250 UI.PixmapCache.getPixmap("spellchecking48.png"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
6251 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
6252 'ViewManager', "Edit Spelling Dictionary"),
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3591
diff changeset
6253 QCoreApplication.translate(
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
6254 'ViewManager',
2211
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6255 "The spelling dictionary was saved successfully."))
86bdcfac4a4a Added a dialog to edit the various spell checking dictionaries.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2162
diff changeset
6256
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6257 ##################################################################
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6258 ## Below are general utility methods
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6259 ##################################################################
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6260
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6261 def handleResetUI(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6262 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6263 Public slot to handle the resetUI signal.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6264 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6265 editor = self.activeWindow()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6266 if editor is None:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6267 self.__setSbFile()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6268 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6269 line, pos = editor.getCursorPosition()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6270 enc = editor.getEncoding()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6271 lang = editor.getLanguage()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6272 eol = editor.getEolIndicator()
2334
fc69ad77e18a Introduced a zoom widget in the status bar of several windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2331
diff changeset
6273 zoom = editor.getZoom()
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
6274 self.__setSbFile(editor.getFileName(), line + 1, pos, enc, lang,
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
6275 eol, zoom)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6276
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6277 def closeViewManager(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6278 """
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
6279 Public method to shutdown the viewmanager.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6280
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6281 If it cannot close all editor windows, it aborts the shutdown process.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6282
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6283 @return flag indicating success (boolean)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6284 """
2138
6fa3cda67d42 Redid the focusChanged change of ViewManager.py.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2110
diff changeset
6285 e5App().focusChanged.disconnect(self.appFocusChanged)
6fa3cda67d42 Redid the focusChanged change of ViewManager.py.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2110
diff changeset
6286
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6287 self.closeAllWindows()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6288
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6289 # save the list of recently opened projects
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6290 self.__saveRecent()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6291
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6292 # save the list of recently opened projects
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
6293 Preferences.Prefs.settings.setValue(
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
6294 'Bookmarked/Sources', self.bookmarked)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6295
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6296 if len(self.editors):
2108
22e480e4a47e Some code cleanup in the view manager and a change to get rid of an observation related to the C++ object of the editActGrp object being destroyed while still in use.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1980
diff changeset
6297 res = False
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6298 else:
2108
22e480e4a47e Some code cleanup in the view manager and a change to get rid of an observation related to the C++ object of the editActGrp object being destroyed while still in use.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1980
diff changeset
6299 res = True
22e480e4a47e Some code cleanup in the view manager and a change to get rid of an observation related to the C++ object of the editActGrp object being destroyed while still in use.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1980
diff changeset
6300
2138
6fa3cda67d42 Redid the focusChanged change of ViewManager.py.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2110
diff changeset
6301 if not res:
6fa3cda67d42 Redid the focusChanged change of ViewManager.py.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2110
diff changeset
6302 e5App().focusChanged.connect(self.appFocusChanged)
2108
22e480e4a47e Some code cleanup in the view manager and a change to get rid of an observation related to the C++ object of the editActGrp object being destroyed while still in use.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1980
diff changeset
6303
22e480e4a47e Some code cleanup in the view manager and a change to get rid of an observation related to the C++ object of the editActGrp object being destroyed while still in use.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1980
diff changeset
6304 return res
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6305
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6306 def __lastEditorClosed(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6307 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6308 Private slot to handle the lastEditorClosed signal.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6309 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6310 self.closeActGrp.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6311 self.saveActGrp.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6312 self.exportersMenuAct.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6313 self.printAct.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6314 if self.printPreviewAct:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6315 self.printPreviewAct.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6316 self.editActGrp.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6317 self.searchActGrp.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6318 self.quickFindtextCombo.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6319 self.viewActGrp.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6320 self.viewFoldActGrp.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6321 self.unhighlightAct.setEnabled(False)
3101
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
6322 self.newDocumentViewAct.setEnabled(False)
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
6323 self.newDocumentSplitViewAct.setEnabled(False)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6324 self.splitViewAct.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6325 self.splitOrientationAct.setEnabled(False)
2424
8fe1fdc174ab Added the capability to preview HTML, Mardown and ReST files.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2415
diff changeset
6326 self.previewAct.setEnabled(True)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6327 self.macroActGrp.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6328 self.bookmarkActGrp.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6329 self.__enableSpellingActions()
2334
fc69ad77e18a Introduced a zoom widget in the status bar of several windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2331
diff changeset
6330 self.__setSbFile(zoom=0)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6331
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6332 # remove all split views, if this is supported
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6333 if self.canSplit():
826
2e3e2055e715 Fixed a few PEP 8 related issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 825
diff changeset
6334 while self.removeSplit():
2e3e2055e715 Fixed a few PEP 8 related issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 825
diff changeset
6335 pass
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6336
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6337 # stop the autosave timer
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6338 if self.autosaveTimer.isActive():
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6339 self.autosaveTimer.stop()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6340
2886
dcaebdef6f4a Fixed an error in the view manager when the last editor is closed.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2769
diff changeset
6341 # hide search and replace widgets
dcaebdef6f4a Fixed an error in the view manager when the last editor is closed.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2769
diff changeset
6342 self.__searchWidget.hide()
dcaebdef6f4a Fixed an error in the view manager when the last editor is closed.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2769
diff changeset
6343 self.__replaceWidget.hide()
dcaebdef6f4a Fixed an error in the view manager when the last editor is closed.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2769
diff changeset
6344
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6345 def __editorOpened(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6346 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6347 Private slot to handle the editorOpened signal.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6348 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6349 self.closeActGrp.setEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6350 self.saveActGrp.setEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6351 self.exportersMenuAct.setEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6352 self.printAct.setEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6353 if self.printPreviewAct:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6354 self.printPreviewAct.setEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6355 self.editActGrp.setEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6356 self.searchActGrp.setEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6357 self.quickFindtextCombo.setEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6358 self.viewActGrp.setEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6359 self.viewFoldActGrp.setEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6360 self.unhighlightAct.setEnabled(True)
3101
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
6361 self.newDocumentViewAct.setEnabled(True)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6362 if self.canSplit():
3101
5213d9f28318 Added entires to the view menu and view toolbar for opening a new documen view.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3100
diff changeset
6363 self.newDocumentSplitViewAct.setEnabled(True)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6364 self.splitViewAct.setEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6365 self.splitOrientationAct.setEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6366 self.macroActGrp.setEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6367 self.bookmarkActGrp.setEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6368 self.__enableSpellingActions()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6369
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6370 # activate the autosave timer
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6371 if not self.autosaveTimer.isActive() and \
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6372 self.autosaveInterval > 0:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6373 self.autosaveTimer.start(self.autosaveInterval * 60000)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6374
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6375 def __autosave(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6376 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6377 Private slot to save the contents of all editors automatically.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6378
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6379 Only named editors will be saved by the autosave timer.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6380 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6381 for editor in self.editors:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6382 if editor.shouldAutosave():
548
ac7af05dd54a Continued replacing QMessageBox.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 540
diff changeset
6383 ok = editor.saveFile()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6384 if ok:
548
ac7af05dd54a Continued replacing QMessageBox.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 540
diff changeset
6385 self.setEditorName(editor, editor.getFileName())
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6386
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6387 # restart autosave timer
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6388 if self.autosaveInterval > 0:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6389 self.autosaveTimer.start(self.autosaveInterval * 60000)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6390
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
6391 def _checkActions(self, editor, setSb=True):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6392 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6393 Protected slot to check some actions for their enable/disable status
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6394 and set the statusbar info.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6395
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6396 @param editor editor window
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
6397 @param setSb flag indicating an update of the status bar is wanted
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
6398 (boolean)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6399 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6400 if editor is not None:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6401 self.saveAct.setEnabled(editor.isModified())
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6402 self.revertAct.setEnabled(editor.isModified())
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6403
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6404 self.undoAct.setEnabled(editor.isUndoAvailable())
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6405 self.redoAct.setEnabled(editor.isRedoAvailable())
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
6406 self.gotoLastEditAct.setEnabled(
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
6407 editor.isLastEditPositionAvailable())
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6408
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6409 lex = editor.getLexer()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6410 if lex is not None:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6411 self.commentAct.setEnabled(lex.canBlockComment())
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6412 self.uncommentAct.setEnabled(lex.canBlockComment())
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6413 self.streamCommentAct.setEnabled(lex.canStreamComment())
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6414 self.boxCommentAct.setEnabled(lex.canBoxComment())
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6415 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6416 self.commentAct.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6417 self.uncommentAct.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6418 self.streamCommentAct.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6419 self.boxCommentAct.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6420
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6421 if editor.hasBookmarks():
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6422 self.bookmarkNextAct.setEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6423 self.bookmarkPreviousAct.setEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6424 self.bookmarkClearAct.setEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6425 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6426 self.bookmarkNextAct.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6427 self.bookmarkPreviousAct.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6428 self.bookmarkClearAct.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6429
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6430 if editor.hasSyntaxErrors():
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6431 self.syntaxErrorGotoAct.setEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6432 self.syntaxErrorClearAct.setEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6433 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6434 self.syntaxErrorGotoAct.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6435 self.syntaxErrorClearAct.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6436
3062
9de9373da5bb Extended the editor warning messages handling and refactored the names of warning handling methods to reflect their more general use.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3039
diff changeset
6437 if editor.hasWarnings():
88
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 65
diff changeset
6438 self.warningsNextAct.setEnabled(True)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 65
diff changeset
6439 self.warningsPreviousAct.setEnabled(True)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 65
diff changeset
6440 self.warningsClearAct.setEnabled(True)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 65
diff changeset
6441 else:
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 65
diff changeset
6442 self.warningsNextAct.setEnabled(False)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 65
diff changeset
6443 self.warningsPreviousAct.setEnabled(False)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 65
diff changeset
6444 self.warningsClearAct.setEnabled(False)
3701923bccf2 Added my own Python3 port of pyflakes and integrated py3flakes into syntax checker dialog and editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 65
diff changeset
6445
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6446 if editor.hasCoverageMarkers():
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6447 self.notcoveredNextAct.setEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6448 self.notcoveredPreviousAct.setEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6449 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6450 self.notcoveredNextAct.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6451 self.notcoveredPreviousAct.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6452
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6453 if editor.hasTaskMarkers():
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6454 self.taskNextAct.setEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6455 self.taskPreviousAct.setEnabled(True)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6456 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6457 self.taskNextAct.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6458 self.taskPreviousAct.setEnabled(False)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6459
2162
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2138
diff changeset
6460 if editor.hasChangeMarkers():
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2138
diff changeset
6461 self.changeNextAct.setEnabled(True)
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2138
diff changeset
6462 self.changePreviousAct.setEnabled(True)
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2138
diff changeset
6463 else:
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2138
diff changeset
6464 self.changeNextAct.setEnabled(False)
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2138
diff changeset
6465 self.changePreviousAct.setEnabled(False)
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2138
diff changeset
6466
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6467 if editor.canAutoCompleteFromAPIs():
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6468 self.autoCompleteFromAPIsAct.setEnabled(True)
4133
3d868439dddc Improved the handling of the various auto-completion actions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4067
diff changeset
6469 self.autoCompleteFromAllAct.setEnabled(True)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6470 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6471 self.autoCompleteFromAPIsAct.setEnabled(False)
4133
3d868439dddc Improved the handling of the various auto-completion actions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4067
diff changeset
6472 self.autoCompleteFromAllAct.setEnabled(False)
3d868439dddc Improved the handling of the various auto-completion actions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4067
diff changeset
6473 self.autoCompleteAct.setEnabled(
3d868439dddc Improved the handling of the various auto-completion actions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4067
diff changeset
6474 editor.canProvideDynamicAutoCompletion())
3d868439dddc Improved the handling of the various auto-completion actions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4067
diff changeset
6475 self.calltipsAct.setEnabled(editor.canProvideCallTipps())
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6476
3446
5a670e55adbb Improved the way the Python variant of a source file is detected (thanks to Tobias Rzepka).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3377
diff changeset
6477 if editor.isPyFile() or editor.isRubyFile():
1169
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
6478 self.gotoPreviousDefAct.setEnabled(True)
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
6479 self.gotoNextDefAct.setEnabled(True)
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
6480 else:
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
6481 self.gotoPreviousDefAct.setEnabled(False)
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
6482 self.gotoNextDefAct.setEnabled(False)
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
6483
2589
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2484
diff changeset
6484 self.sortAct.setEnabled(editor.selectionIsRectangle())
2593
a2df0adce985 Added entires to convert the selection to upper/lower case to the edit menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2589
diff changeset
6485 enable = editor.hasSelection()
a2df0adce985 Added entires to convert the selection to upper/lower case to the edit menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2589
diff changeset
6486 self.editUpperCaseAct.setEnabled(enable)
a2df0adce985 Added entires to convert the selection to upper/lower case to the edit menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2589
diff changeset
6487 self.editLowerCaseAct.setEnabled(enable)
2589
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2484
diff changeset
6488
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6489 if setSb:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6490 line, pos = editor.getCursorPosition()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6491 enc = editor.getEncoding()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6492 lang = editor.getLanguage()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6493 eol = editor.getEolIndicator()
2334
fc69ad77e18a Introduced a zoom widget in the status bar of several windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2331
diff changeset
6494 zoom = editor.getZoom()
fc69ad77e18a Introduced a zoom widget in the status bar of several windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2331
diff changeset
6495 self.__setSbFile(
fc69ad77e18a Introduced a zoom widget in the status bar of several windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2331
diff changeset
6496 editor.getFileName(), line + 1, pos, enc, lang, eol, zoom)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6497
486
e4711a55e482 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 482
diff changeset
6498 self.checkActions.emit(editor)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6499
2484
105d78ba97d4 Made the activation state of the "Save All" action dependent upon the overall modification status of all open editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2474
diff changeset
6500 saveAllEnable = False
105d78ba97d4 Made the activation state of the "Save All" action dependent upon the overall modification status of all open editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2474
diff changeset
6501 for editor in self.editors:
105d78ba97d4 Made the activation state of the "Save All" action dependent upon the overall modification status of all open editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2474
diff changeset
6502 if editor.isModified():
105d78ba97d4 Made the activation state of the "Save All" action dependent upon the overall modification status of all open editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2474
diff changeset
6503 saveAllEnable = True
105d78ba97d4 Made the activation state of the "Save All" action dependent upon the overall modification status of all open editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2474
diff changeset
6504 self.saveAllAct.setEnabled(saveAllEnable)
105d78ba97d4 Made the activation state of the "Save All" action dependent upon the overall modification status of all open editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2474
diff changeset
6505
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6506 def preferencesChanged(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6507 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6508 Public slot to handle the preferencesChanged signal.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6509
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6510 This method performs the following actions
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6511 <ul>
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6512 <li>reread the colours for the syntax highlighting</li>
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6513 <li>reloads the already created API objetcs</li>
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6514 <li>starts or stops the autosave timer</li>
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6515 <li><b>Note</b>: changes in viewmanager type are activated
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6516 on an application restart.</li>
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6517 </ul>
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6518 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6519 # reload the APIs
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6520 self.apisManager.reloadAPIs()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6521
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6522 # reload editor settings
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6523 for editor in self.editors:
2351
649e4f8c5cef Fixed the QScintilla related zoom code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2347
diff changeset
6524 zoom = editor.getZoom()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6525 editor.readSettings()
2351
649e4f8c5cef Fixed the QScintilla related zoom code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2347
diff changeset
6526 editor.zoomTo(zoom)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6527
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6528 # reload the autosave timer setting
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6529 self.autosaveInterval = Preferences.getEditor("AutosaveInterval")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6530 if len(self.editors):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6531 if self.autosaveTimer.isActive() and \
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6532 self.autosaveInterval == 0:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6533 self.autosaveTimer.stop()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6534 elif not self.autosaveTimer.isActive() and \
3039
8dd0165d805d Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3034
diff changeset
6535 self.autosaveInterval > 0:
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6536 self.autosaveTimer.start(self.autosaveInterval * 60000)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6537
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6538 self.__enableSpellingActions()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6539
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6540 def __editorSaved(self, fn):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6541 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6542 Private slot to handle the editorSaved signal.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6543
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6544 It simply reemits the signal.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6545
4025
ffc69fe3a61d Added three new signals to the viewmanager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
6546 @param fn filename of the saved editor (string)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6547 """
500
c3abc7895a01 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 486
diff changeset
6548 self.editorSaved.emit(fn)
4025
ffc69fe3a61d Added three new signals to the viewmanager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
6549 editor = self.sender()
ffc69fe3a61d Added three new signals to the viewmanager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
6550 if editor:
ffc69fe3a61d Added three new signals to the viewmanager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
6551 self.editorSavedEd.emit(editor)
ffc69fe3a61d Added three new signals to the viewmanager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
6552
ffc69fe3a61d Added three new signals to the viewmanager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
6553 def __editorRenamed(self, fn):
ffc69fe3a61d Added three new signals to the viewmanager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
6554 """
ffc69fe3a61d Added three new signals to the viewmanager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
6555 Private slot to handle the editorRenamed signal.
ffc69fe3a61d Added three new signals to the viewmanager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
6556
ffc69fe3a61d Added three new signals to the viewmanager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
6557 It simply reemits the signal.
ffc69fe3a61d Added three new signals to the viewmanager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
6558
ffc69fe3a61d Added three new signals to the viewmanager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
6559 @param fn filename of the renamed editor (string)
ffc69fe3a61d Added three new signals to the viewmanager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
6560 """
ffc69fe3a61d Added three new signals to the viewmanager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
6561 self.editorRenamed.emit(fn)
ffc69fe3a61d Added three new signals to the viewmanager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
6562 editor = self.sender()
ffc69fe3a61d Added three new signals to the viewmanager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
6563 if editor:
ffc69fe3a61d Added three new signals to the viewmanager.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4021
diff changeset
6564 self.editorRenamedEd.emit(editor)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6565
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6566 def __cursorChanged(self, fn, line, pos):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6567 """
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
6568 Private slot to handle the cursorChanged signal.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6569
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6570 It emits the signal cursorChanged with parameter editor.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6571
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6572 @param fn filename (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6573 @param line line number of the cursor (int)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6574 @param pos position in line of the cursor (int)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6575 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6576 editor = self.getOpenEditor(fn)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6577 if editor is None:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6578 editor = self.sender()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6579
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6580 if editor is not None:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6581 enc = editor.getEncoding()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6582 lang = editor.getLanguage()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6583 eol = editor.getEolIndicator()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6584 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6585 enc = None
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6586 lang = None
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6587 eol = None
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6588 self.__setSbFile(fn, line, pos, enc, lang, eol)
486
e4711a55e482 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 482
diff changeset
6589 self.cursorChanged.emit(editor)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6590
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6591 def __breakpointToggled(self, editor):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6592 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6593 Private slot to handle the breakpointToggled signal.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6594
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6595 It simply reemits the signal.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6596
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6597 @param editor editor that sent the signal
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6598 """
486
e4711a55e482 Continued porting signal/slot usage to the new API.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 482
diff changeset
6599 self.breakpointToggled.emit(editor)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6600
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6601 def getActions(self, type):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6602 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6603 Public method to get a list of all actions.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6604
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6605 @param type string denoting the action set to get.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6606 It must be one of "edit", "file", "search",
12
1d8dd9706f46 First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7
diff changeset
6607 "view", "window", "macro", "bookmark" or
1d8dd9706f46 First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7
diff changeset
6608 "spelling".
55
b5c84934de9c Renamed E4Gui to E5Gui.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 53
diff changeset
6609 @return list of all actions (list of E5Action)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6610 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6611 try:
12
1d8dd9706f46 First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7
diff changeset
6612 return self.__actions[type][:]
1d8dd9706f46 First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7
diff changeset
6613 except KeyError:
1d8dd9706f46 First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7
diff changeset
6614 return []
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6615
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6616 def __editorCommand(self, cmd):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6617 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6618 Private method to send an editor command to the active window.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6619
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6620 @param cmd the scintilla command to be sent
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6621 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6622 focusWidget = QApplication.focusWidget()
53
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 15
diff changeset
6623 if focusWidget == e5App().getObject("Shell"):
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 15
diff changeset
6624 e5App().getObject("Shell").editorCommand(cmd)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6625 elif focusWidget == self.quickFindtextCombo:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6626 self.quickFindtextCombo._editor.editorCommand(cmd)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6627 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6628 aw = self.activeWindow()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6629 if aw:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6630 aw.editorCommand(cmd)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6631
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6632 def __newLineBelow(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6633 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6634 Private method to insert a new line below the current one even if
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6635 cursor is not at the end of the line.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6636 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6637 focusWidget = QApplication.focusWidget()
53
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 15
diff changeset
6638 if focusWidget == e5App().getObject("Shell") or \
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6639 focusWidget == self.quickFindtextCombo:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6640 return
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6641 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6642 aw = self.activeWindow()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6643 if aw:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6644 aw.newLineBelow()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6645
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6646 def __editorConfigChanged(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6647 """
3019
7912530a33e2 Fixed a few documentation strings that got broken while doing the line shortening job. That concludes the later.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3013
diff changeset
6648 Private slot to handle changes of an editor's configuration.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6649 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6650 editor = self.sender()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6651 fn = editor.getFileName()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6652 line, pos = editor.getCursorPosition()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6653 enc = editor.getEncoding()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6654 lang = editor.getLanguage()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6655 eol = editor.getEolIndicator()
2334
fc69ad77e18a Introduced a zoom widget in the status bar of several windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2331
diff changeset
6656 zoom = editor.getZoom()
fc69ad77e18a Introduced a zoom widget in the status bar of several windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2331
diff changeset
6657 self.__setSbFile(
fc69ad77e18a Introduced a zoom widget in the status bar of several windows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2331
diff changeset
6658 fn, line + 1, pos, encoding=enc, language=lang, eol=eol, zoom=zoom)
1169
36a3bb21e6e6 Added editor actions to go to the last edit location and to the previous or next Python or Ruby class or method definition.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1153
diff changeset
6659 self._checkActions(editor, False)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6660
2589
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2484
diff changeset
6661 def __editorSelectionChanged(self):
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2484
diff changeset
6662 """
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2484
diff changeset
6663 Private slot to handle changes of the current editors selection.
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2484
diff changeset
6664 """
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2484
diff changeset
6665 editor = self.sender()
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2484
diff changeset
6666 if editor:
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2484
diff changeset
6667 self.sortAct.setEnabled(editor.selectionIsRectangle())
2593
a2df0adce985 Added entires to convert the selection to upper/lower case to the edit menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2589
diff changeset
6668 enable = editor.hasSelection()
a2df0adce985 Added entires to convert the selection to upper/lower case to the edit menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2589
diff changeset
6669 self.editUpperCaseAct.setEnabled(enable)
a2df0adce985 Added entires to convert the selection to upper/lower case to the edit menu.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2589
diff changeset
6670 self.editLowerCaseAct.setEnabled(enable)
2589
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2484
diff changeset
6671 else:
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2484
diff changeset
6672 self.sortAct.setEnabled(False)
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2484
diff changeset
6673
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2484
diff changeset
6674 def __editSortSelectedLines(self):
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2484
diff changeset
6675 """
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2484
diff changeset
6676 Private slot to sort the selected lines.
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2484
diff changeset
6677 """
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2484
diff changeset
6678 editor = self.activeWindow()
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2484
diff changeset
6679 if editor:
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2484
diff changeset
6680 editor.sortLines()
a51b0c113ed7 Added the capability to sort lines spanned by a rectangular selection based on the selected text.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2484
diff changeset
6681
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6682 ##################################################################
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6683 ## Below are protected utility methods
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6684 ##################################################################
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6685
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6686 def _getOpenStartDir(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6687 """
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
6688 Protected method to return the starting directory for a file open
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
6689 dialog.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6690
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6691 The appropriate starting directory is calculated
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6692 using the following search order, until a match is found:<br />
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6693 1: Directory of currently active editor<br />
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6694 2: Directory of currently active Project<br />
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6695 3: CWD
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6696
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6697 @return name of directory to start (string)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6698 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6699 # if we have an active source, return its path
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6700 if self.activeWindow() is not None and \
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6701 self.activeWindow().getFileName():
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6702 return os.path.dirname(self.activeWindow().getFileName())
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6703
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6704 # check, if there is an active project and return its path
53
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 15
diff changeset
6705 elif e5App().getObject("Project").isOpen():
c3eb7cc1ff8b Renamed e5App to e5App.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 15
diff changeset
6706 return e5App().getObject("Project").ppath
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6707
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6708 else:
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
6709 return Preferences.getMultiProject("Workspace") or \
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
6710 Utilities.getHomeDir()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6711
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6712 def _getOpenFileFilter(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6713 """
3013
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
6714 Protected method to return the active filename filter for a file open
fe886b7f8f40 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2965
diff changeset
6715 dialog.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6716
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6717 The appropriate filename filter is determined by file extension of
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6718 the currently active editor.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6719
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6720 @return name of the filename filter (string) or None
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6721 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6722 if self.activeWindow() is not None and \
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6723 self.activeWindow().getFileName():
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6724 ext = os.path.splitext(self.activeWindow().getFileName())[1]
432
497e188ee86e Did some more string format conversions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 372
diff changeset
6725 rx = QRegExp(".*\*\.{0}[ )].*".format(ext[1:]))
2409
df3820f08247 Continued implementing the delayed import.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2400
diff changeset
6726 import QScintilla.Lexers
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6727 filters = QScintilla.Lexers.getOpenFileFiltersList()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6728 index = -1
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6729 for i in range(len(filters)):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6730 if rx.exactMatch(filters[i]):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6731 index = i
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6732 break
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6733 if index == -1:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6734 return Preferences.getEditor("DefaultOpenFilter")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6735 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6736 return filters[index]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6737 else:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6738 return Preferences.getEditor("DefaultOpenFilter")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6739
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6740 ##################################################################
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6741 ## Below are API handling methods
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6742 ##################################################################
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6743
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6744 def getAPIsManager(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6745 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6746 Public method to get a reference to the APIs manager.
2965
d133c7edd88a Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2886
diff changeset
6747
3670
f0cb7579c0b4 Finished renaming eric5 for PyQt5 to eric6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3656
diff changeset
6748 @return the APIs manager object (eric6.QScintilla.APIsManager)
15
f6ccc31d6e72 Started to rename stuff for eric5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 13
diff changeset
6749 """
65
ca6449ba4824 Fixed a few porting bugs.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 55
diff changeset
6750 return self.apisManager
155
375e3c884874 Added code to transmit selections to remote editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 128
diff changeset
6751
375e3c884874 Added code to transmit selections to remote editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 128
diff changeset
6752 #######################################################################
375e3c884874 Added code to transmit selections to remote editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 128
diff changeset
6753 ## Cooperation related methods
375e3c884874 Added code to transmit selections to remote editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 128
diff changeset
6754 #######################################################################
375e3c884874 Added code to transmit selections to remote editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 128
diff changeset
6755
158
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6756 def setCooperationClient(self, client):
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6757 """
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6758 Public method to set a reference to the cooperation client.
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6759
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6760 @param client reference to the cooperation client (CooperationClient)
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6761 """
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6762 self.__cooperationClient = client
156
478787b5607e Tuned the remote editor commands to only send, if the IDE is connected.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 155
diff changeset
6763
478787b5607e Tuned the remote editor commands to only send, if the IDE is connected.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 155
diff changeset
6764 def isConnected(self):
478787b5607e Tuned the remote editor commands to only send, if the IDE is connected.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 155
diff changeset
6765 """
478787b5607e Tuned the remote editor commands to only send, if the IDE is connected.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 155
diff changeset
6766 Public method to check the connection status of the IDE.
478787b5607e Tuned the remote editor commands to only send, if the IDE is connected.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 155
diff changeset
6767
478787b5607e Tuned the remote editor commands to only send, if the IDE is connected.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 155
diff changeset
6768 @return flag indicating the connection status (boolean)
478787b5607e Tuned the remote editor commands to only send, if the IDE is connected.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 155
diff changeset
6769 """
158
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6770 return self.__cooperationClient.hasConnections()
156
478787b5607e Tuned the remote editor commands to only send, if the IDE is connected.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 155
diff changeset
6771
155
375e3c884874 Added code to transmit selections to remote editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 128
diff changeset
6772 def send(self, fileName, message):
375e3c884874 Added code to transmit selections to remote editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 128
diff changeset
6773 """
375e3c884874 Added code to transmit selections to remote editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 128
diff changeset
6774 Public method to send an editor command to remote editors.
375e3c884874 Added code to transmit selections to remote editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 128
diff changeset
6775
375e3c884874 Added code to transmit selections to remote editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 128
diff changeset
6776 @param fileName file name of the editor (string)
375e3c884874 Added code to transmit selections to remote editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 128
diff changeset
6777 @param message command message to be sent (string)
375e3c884874 Added code to transmit selections to remote editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 128
diff changeset
6778 """
375e3c884874 Added code to transmit selections to remote editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 128
diff changeset
6779 project = e5App().getObject("Project")
375e3c884874 Added code to transmit selections to remote editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 128
diff changeset
6780 if project.isProjectFile(fileName):
158
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6781 self.__cooperationClient.sendEditorCommand(
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
6782 project.getHash(),
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 882
diff changeset
6783 project.getRelativeUniversalPath(fileName),
155
375e3c884874 Added code to transmit selections to remote editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 128
diff changeset
6784 message
375e3c884874 Added code to transmit selections to remote editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 128
diff changeset
6785 )
375e3c884874 Added code to transmit selections to remote editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 128
diff changeset
6786
158
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6787 def receive(self, hash, fileName, command):
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6788 """
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6789 Public slot to handle received editor commands.
155
375e3c884874 Added code to transmit selections to remote editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 128
diff changeset
6790
375e3c884874 Added code to transmit selections to remote editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 128
diff changeset
6791 @param hash hash of the project (string)
375e3c884874 Added code to transmit selections to remote editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 128
diff changeset
6792 @param fileName project relative file name of the editor (string)
375e3c884874 Added code to transmit selections to remote editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 128
diff changeset
6793 @param command command string (string)
375e3c884874 Added code to transmit selections to remote editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 128
diff changeset
6794 """
375e3c884874 Added code to transmit selections to remote editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 128
diff changeset
6795 project = e5App().getObject("Project")
375e3c884874 Added code to transmit selections to remote editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 128
diff changeset
6796 if hash == project.getHash():
375e3c884874 Added code to transmit selections to remote editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 128
diff changeset
6797 fn = project.getAbsoluteUniversalPath(fileName)
375e3c884874 Added code to transmit selections to remote editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 128
diff changeset
6798 editor = self.getOpenEditor(fn)
375e3c884874 Added code to transmit selections to remote editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 128
diff changeset
6799 if editor:
375e3c884874 Added code to transmit selections to remote editors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 128
diff changeset
6800 editor.receive(command)
158
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6801
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6802 def shareConnected(self, connected):
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6803 """
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6804 Public slot to handle a change of the connected state.
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6805
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6806 @param connected flag indicating the connected state (boolean)
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6807 """
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6808 for editor in self.getOpenEditors():
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6809 editor.shareConnected(connected)
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6810
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6811 def shareEditor(self, share):
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6812 """
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6813 Public slot to set the shared status of the current editor.
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6814
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6815 @param share flag indicating the share status (boolean)
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6816 """
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6817 aw = self.activeWindow()
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6818 if aw is not None:
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6819 fn = aw.getFileName()
162
28f235c426c4 Added functionality to cut/copy/... the chat and to interactively accept/reject connections.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 158
diff changeset
6820 if fn and e5App().getObject("Project").isProjectFile(fn):
158
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6821 aw.shareEditor(share)
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6822
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6823 def startSharedEdit(self):
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6824 """
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6825 Public slot to start a shared edit session for the current editor.
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6826 """
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6827 aw = self.activeWindow()
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6828 if aw is not None:
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6829 fn = aw.getFileName()
162
28f235c426c4 Added functionality to cut/copy/... the chat and to interactively accept/reject connections.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 158
diff changeset
6830 if fn and e5App().getObject("Project").isProjectFile(fn):
158
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6831 aw.startSharedEdit()
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6832
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6833 def sendSharedEdit(self):
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6834 """
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6835 Public slot to end a shared edit session for the current editor and
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6836 send the changes.
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6837 """
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6838 aw = self.activeWindow()
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6839 if aw is not None:
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6840 fn = aw.getFileName()
162
28f235c426c4 Added functionality to cut/copy/... the chat and to interactively accept/reject connections.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 158
diff changeset
6841 if fn and e5App().getObject("Project").isProjectFile(fn):
158
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6842 aw.sendSharedEdit()
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6843
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6844 def cancelSharedEdit(self):
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6845 """
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6846 Public slot to cancel a shared edit session for the current editor.
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6847 """
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6848 aw = self.activeWindow()
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6849 if aw is not None:
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6850 fn = aw.getFileName()
162
28f235c426c4 Added functionality to cut/copy/... the chat and to interactively accept/reject connections.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 158
diff changeset
6851 if fn and e5App().getObject("Project").isProjectFile(fn):
158
6a561f87bc07 Added shared editor functions.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 156
diff changeset
6852 aw.cancelSharedEdit()
365
0686ac00256e Added a symbols viewer with capability to insert the selected symbol by double-clicking it.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 335
diff changeset
6853
0686ac00256e Added a symbols viewer with capability to insert the selected symbol by double-clicking it.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 335
diff changeset
6854 #######################################################################
0686ac00256e Added a symbols viewer with capability to insert the selected symbol by double-clicking it.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 335
diff changeset
6855 ## Symbols viewer related methods
0686ac00256e Added a symbols viewer with capability to insert the selected symbol by double-clicking it.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 335
diff changeset
6856 #######################################################################
0686ac00256e Added a symbols viewer with capability to insert the selected symbol by double-clicking it.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 335
diff changeset
6857
0686ac00256e Added a symbols viewer with capability to insert the selected symbol by double-clicking it.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 335
diff changeset
6858 def insertSymbol(self, txt):
0686ac00256e Added a symbols viewer with capability to insert the selected symbol by double-clicking it.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 335
diff changeset
6859 """
3591
2f2a4a76dd22 Corrected a bunch of source docu issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3547
diff changeset
6860 Public slot to insert a symbol text into the active window.
365
0686ac00256e Added a symbols viewer with capability to insert the selected symbol by double-clicking it.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 335
diff changeset
6861
0686ac00256e Added a symbols viewer with capability to insert the selected symbol by double-clicking it.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 335
diff changeset
6862 @param txt text to be inserted (string)
0686ac00256e Added a symbols viewer with capability to insert the selected symbol by double-clicking it.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 335
diff changeset
6863 """
0686ac00256e Added a symbols viewer with capability to insert the selected symbol by double-clicking it.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 335
diff changeset
6864 if self.__lastFocusWidget == e5App().getObject("Shell"):
0686ac00256e Added a symbols viewer with capability to insert the selected symbol by double-clicking it.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 335
diff changeset
6865 e5App().getObject("Shell").insert(txt)
0686ac00256e Added a symbols viewer with capability to insert the selected symbol by double-clicking it.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 335
diff changeset
6866 else:
0686ac00256e Added a symbols viewer with capability to insert the selected symbol by double-clicking it.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 335
diff changeset
6867 aw = self.activeWindow()
0686ac00256e Added a symbols viewer with capability to insert the selected symbol by double-clicking it.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 335
diff changeset
6868 if aw is not None:
0686ac00256e Added a symbols viewer with capability to insert the selected symbol by double-clicking it.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 335
diff changeset
6869 curline, curindex = aw.getCursorPosition()
0686ac00256e Added a symbols viewer with capability to insert the selected symbol by double-clicking it.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 335
diff changeset
6870 aw.insert(txt)
0686ac00256e Added a symbols viewer with capability to insert the selected symbol by double-clicking it.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 335
diff changeset
6871 aw.setCursorPosition(curline, curindex + len(txt))
372
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
6872
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
6873 #######################################################################
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
6874 ## Numbers viewer related methods
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
6875 #######################################################################
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
6876
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
6877 def insertNumber(self, txt):
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
6878 """
3591
2f2a4a76dd22 Corrected a bunch of source docu issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3547
diff changeset
6879 Public slot to insert a number text into the active window.
372
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
6880
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
6881 @param txt text to be inserted (string)
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
6882 """
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
6883 if self.__lastFocusWidget == e5App().getObject("Shell"):
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
6884 aw = e5App().getObject("Shell")
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
6885 if aw.hasSelectedText():
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
6886 aw.removeSelectedText()
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
6887 aw.insert(txt)
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
6888 else:
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
6889 aw = self.activeWindow()
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
6890 if aw is not None:
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
6891 if aw.hasSelectedText():
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
6892 aw.removeSelectedText()
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
6893 curline, curindex = aw.getCursorPosition()
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
6894 aw.insert(txt)
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
6895 aw.setCursorPosition(curline, curindex + len(txt))
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
6896
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
6897 def getNumber(self):
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
6898 """
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
6899 Public method to get a number from the active window.
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
6900
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
6901 @return selected text of the active window (string)
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
6902 """
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
6903 txt = ""
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
6904 if self.__lastFocusWidget == e5App().getObject("Shell"):
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
6905 aw = e5App().getObject("Shell")
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
6906 if aw.hasSelectedText():
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
6907 txt = aw.selectedText()
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
6908 else:
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
6909 aw = self.activeWindow()
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
6910 if aw is not None:
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
6911 if aw.hasSelectedText():
237c3fe739f5 Added a numbers viewer to convert numbers into various formats.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 365
diff changeset
6912 txt = aw.selectedText()
716
c62f08259b1a Modified the sizing behavior of the quicksearch combo.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
6913 return txt

eric ide

mercurial