20 |
20 |
21 from Globals import recentNameFiles, isMacPlatform |
21 from Globals import recentNameFiles, isMacPlatform |
22 |
22 |
23 import Preferences |
23 import Preferences |
24 |
24 |
25 from .BookmarkedFilesDialog import BookmarkedFilesDialog |
|
26 |
|
27 from QScintilla.Editor import Editor |
25 from QScintilla.Editor import Editor |
28 from QScintilla.EditorAssembly import EditorAssembly |
26 from QScintilla.EditorAssembly import EditorAssembly |
29 from QScintilla.GotoDialog import GotoDialog |
|
30 from QScintilla.SearchReplaceWidget import SearchReplaceSlidingWidget |
|
31 from QScintilla.ZoomDialog import ZoomDialog |
|
32 from QScintilla.APIsManager import APIsManager |
27 from QScintilla.APIsManager import APIsManager |
33 from QScintilla.SpellChecker import SpellChecker |
28 from QScintilla.SpellChecker import SpellChecker |
34 import QScintilla.Lexers |
29 import QScintilla.Lexers |
35 import QScintilla.Exporters |
30 import QScintilla.Exporters |
36 from QScintilla.Shell import Shell |
31 from QScintilla.Shell import Shell |
37 from QScintilla.Terminal import Terminal |
32 from QScintilla.Terminal import Terminal |
38 from QScintilla.SpellingDictionaryEditDialog import SpellingDictionaryEditDialog |
|
39 |
33 |
40 import Utilities |
34 import Utilities |
41 |
35 |
42 import UI.PixmapCache |
36 import UI.PixmapCache |
43 import UI.Config |
37 import UI.Config |
170 Public method to set some references needed later on. |
164 Public method to set some references needed later on. |
171 |
165 |
172 @param ui reference to the main user interface |
166 @param ui reference to the main user interface |
173 @param dbs reference to the debug server object |
167 @param dbs reference to the debug server object |
174 """ |
168 """ |
|
169 from QScintilla.SearchReplaceWidget import SearchReplaceSlidingWidget |
|
170 |
175 self.ui = ui |
171 self.ui = ui |
176 self.dbs = dbs |
172 self.dbs = dbs |
177 |
173 |
178 self.__searchWidget = SearchReplaceSlidingWidget(False, self, ui) |
174 self.__searchWidget = SearchReplaceSlidingWidget(False, self, ui) |
179 self.__replaceWidget = SearchReplaceSlidingWidget(True, self, ui) |
175 self.__replaceWidget = SearchReplaceSlidingWidget(True, self, ui) |
4387 |
4383 |
4388 def __editBookmarked(self): |
4384 def __editBookmarked(self): |
4389 """ |
4385 """ |
4390 Private method to edit the list of bookmarked files. |
4386 Private method to edit the list of bookmarked files. |
4391 """ |
4387 """ |
|
4388 from .BookmarkedFilesDialog import BookmarkedFilesDialog |
4392 dlg = BookmarkedFilesDialog(self.bookmarked, self.ui) |
4389 dlg = BookmarkedFilesDialog(self.bookmarked, self.ui) |
4393 if dlg.exec_() == QDialog.Accepted: |
4390 if dlg.exec_() == QDialog.Accepted: |
4394 self.bookmarked = dlg.getBookmarkedFiles() |
4391 self.bookmarked = dlg.getBookmarkedFiles() |
4395 |
4392 |
4396 def __clearBookmarked(self): |
4393 def __clearBookmarked(self): |
4935 |
4932 |
4936 def __goto(self): |
4933 def __goto(self): |
4937 """ |
4934 """ |
4938 Private method to handle the goto action. |
4935 Private method to handle the goto action. |
4939 """ |
4936 """ |
|
4937 from QScintilla.GotoDialog import GotoDialog |
|
4938 |
4940 aw = self.activeWindow() |
4939 aw = self.activeWindow() |
4941 lines = aw.lines() |
4940 lines = aw.lines() |
4942 curLine = aw.getCursorPosition()[0] + 1 |
4941 curLine = aw.getCursorPosition()[0] + 1 |
4943 dlg = GotoDialog(lines, curLine, self.ui, None, True) |
4942 dlg = GotoDialog(lines, curLine, self.ui, None, True) |
4944 if dlg.exec_() == QDialog.Accepted: |
4943 if dlg.exec_() == QDialog.Accepted: |
5056 aw = e5App().getObject("Terminal") |
5055 aw = e5App().getObject("Terminal") |
5057 else: |
5056 else: |
5058 aw = self.activeWindow() |
5057 aw = self.activeWindow() |
5059 if aw: |
5058 if aw: |
5060 if value is None: |
5059 if value is None: |
|
5060 from QScintilla.ZoomDialog import ZoomDialog |
5061 dlg = ZoomDialog(aw.getZoom(), self.ui, None, True) |
5061 dlg = ZoomDialog(aw.getZoom(), self.ui, None, True) |
5062 if dlg.exec_() == QDialog.Accepted: |
5062 if dlg.exec_() == QDialog.Accepted: |
5063 value = dlg.getZoomSize() |
5063 value = dlg.getZoomSize() |
5064 if value is not None: |
5064 if value is not None: |
5065 aw.zoomTo(value) |
5065 aw.zoomTo(value) |
5491 dictionaryFile, str(err))) |
5491 dictionaryFile, str(err))) |
5492 return |
5492 return |
5493 |
5493 |
5494 fileInfo = dictionaryFile if len(dictionaryFile) < 40 \ |
5494 fileInfo = dictionaryFile if len(dictionaryFile) < 40 \ |
5495 else "...{0}".format(dictionaryFile[-40:]) |
5495 else "...{0}".format(dictionaryFile[-40:]) |
|
5496 from QScintilla.SpellingDictionaryEditDialog import \ |
|
5497 SpellingDictionaryEditDialog |
5496 dlg = SpellingDictionaryEditDialog(data, |
5498 dlg = SpellingDictionaryEditDialog(data, |
5497 QApplication.translate('ViewManager', "Editing {0}").format(fileInfo), |
5499 QApplication.translate('ViewManager', "Editing {0}").format(fileInfo), |
5498 self.ui) |
5500 self.ui) |
5499 if dlg.exec_() == QDialog.Accepted: |
5501 if dlg.exec_() == QDialog.Accepted: |
5500 data = dlg.getData() |
5502 data = dlg.getData() |