25 from Debugger.DebugViewer import DebugViewer |
25 from Debugger.DebugViewer import DebugViewer |
26 from Debugger.DebugClientCapabilities import HasUnittest |
26 from Debugger.DebugClientCapabilities import HasUnittest |
27 |
27 |
28 from QScintilla.Shell import ShellAssembly |
28 from QScintilla.Shell import ShellAssembly |
29 from QScintilla.Terminal import TerminalAssembly |
29 from QScintilla.Terminal import TerminalAssembly |
30 from QScintilla.MiniEditor import MiniEditor |
|
31 from QScintilla.SpellChecker import SpellChecker |
30 from QScintilla.SpellChecker import SpellChecker |
32 |
31 |
33 from PyUnit.UnittestDialog import UnittestDialog |
|
34 |
|
35 from Helpviewer.HelpWindow import HelpWindow |
32 from Helpviewer.HelpWindow import HelpWindow |
36 from Helpviewer.Passwords.PasswordManager import PasswordManager |
33 |
37 |
|
38 from Preferences.ConfigurationDialog import ConfigurationDialog |
|
39 from Preferences.ViewProfileDialog import ViewProfileDialog |
|
40 from Preferences.ShortcutsDialog import ShortcutsDialog |
|
41 from Preferences.ToolConfigurationDialog import ToolConfigurationDialog |
|
42 from Preferences.ToolGroupConfigurationDialog import ToolGroupConfigurationDialog |
|
43 from Preferences.ProgramsDialog import ProgramsDialog |
|
44 from Preferences import Shortcuts |
34 from Preferences import Shortcuts |
45 |
35 |
46 from PluginManager.PluginManager import PluginManager |
36 from PluginManager.PluginManager import PluginManager |
47 from PluginManager.PluginInfoDialog import PluginInfoDialog |
|
48 from PluginManager.PluginInstallDialog import PluginInstallDialog |
|
49 from PluginManager.PluginUninstallDialog import PluginUninstallDialog |
|
50 from PluginManager.PluginRepositoryDialog import PluginRepositoryDialog |
|
51 |
37 |
52 from Project.Project import Project |
38 from Project.Project import Project |
53 from Project.ProjectBrowser import ProjectBrowser |
39 from Project.ProjectBrowser import ProjectBrowser |
54 |
40 |
55 from MultiProject.MultiProject import MultiProject |
41 from MultiProject.MultiProject import MultiProject |
64 from Network.IRC.IrcWidget import IrcWidget |
50 from Network.IRC.IrcWidget import IrcWidget |
65 |
51 |
66 from .Browser import Browser |
52 from .Browser import Browser |
67 from .Info import Version, BugAddress, Program, FeatureAddress |
53 from .Info import Version, BugAddress, Program, FeatureAddress |
68 from . import Config |
54 from . import Config |
69 from .EmailDialog import EmailDialog |
|
70 from .DiffDialog import DiffDialog |
|
71 from .CompareDialog import CompareDialog |
|
72 from .LogView import LogViewer |
55 from .LogView import LogViewer |
73 from .FindFileDialog import FindFileDialog |
|
74 from .FindFileNameDialog import FindFileNameDialog |
|
75 from .SymbolsWidget import SymbolsWidget |
56 from .SymbolsWidget import SymbolsWidget |
76 from .NumbersWidget import NumbersWidget |
57 from .NumbersWidget import NumbersWidget |
77 from .NotificationWidget import NotificationWidget |
|
78 |
58 |
79 from E5Gui.E5SingleApplication import E5SingleApplicationServer |
59 from E5Gui.E5SingleApplication import E5SingleApplicationServer |
80 from E5Gui.E5Action import E5Action, createActionGroup |
60 from E5Gui.E5Action import E5Action, createActionGroup |
81 from E5Gui.E5ToolBarManager import E5ToolBarManager |
61 from E5Gui.E5ToolBarManager import E5ToolBarManager |
82 from E5Gui.E5ToolBarDialog import E5ToolBarDialog |
|
83 from E5Gui.E5ToolBox import E5VerticalToolBox, E5HorizontalToolBox |
|
84 from E5Gui.E5SideBar import E5SideBar |
|
85 from E5Gui import E5MessageBox, E5FileDialog |
62 from E5Gui import E5MessageBox, E5FileDialog |
86 from E5Gui.E5Application import e5App |
63 from E5Gui.E5Application import e5App |
87 from E5Gui.E5MainWindow import E5MainWindow |
64 from E5Gui.E5MainWindow import E5MainWindow |
88 from E5Gui.E5ZoomWidget import E5ZoomWidget |
65 from E5Gui.E5ZoomWidget import E5ZoomWidget |
89 |
66 |
91 |
68 |
92 import Preferences |
69 import Preferences |
93 import ViewManager |
70 import ViewManager |
94 import Utilities |
71 import Utilities |
95 |
72 |
96 from Graphics.PixmapDiagram import PixmapDiagram |
|
97 from Graphics.SvgDiagram import SvgDiagram |
|
98 |
|
99 import UI.PixmapCache |
73 import UI.PixmapCache |
100 |
|
101 from E5XML.TasksReader import TasksReader |
|
102 from E5XML.TasksWriter import TasksWriter |
|
103 from E5XML.SessionReader import SessionReader |
|
104 from E5XML.SessionWriter import SessionWriter |
|
105 |
74 |
106 from E5Network.E5NetworkProxyFactory import E5NetworkProxyFactory, \ |
75 from E5Network.E5NetworkProxyFactory import E5NetworkProxyFactory, \ |
107 proxyAuthenticationRequired |
76 proxyAuthenticationRequired |
108 try: |
77 try: |
109 from E5Network.E5SslErrorHandler import E5SslErrorHandler |
78 from E5Network.E5SslErrorHandler import E5SslErrorHandler |
110 SSL_AVAILABLE = True |
79 SSL_AVAILABLE = True |
111 except ImportError: |
80 except ImportError: |
112 SSL_AVAILABLE = False |
81 SSL_AVAILABLE = False |
113 |
|
114 from IconEditor.IconEditorWindow import IconEditorWindow |
|
115 |
82 |
116 from eric5config import getConfig |
83 from eric5config import getConfig |
117 |
84 |
118 |
85 |
119 class Redirector(QObject): |
86 class Redirector(QObject): |
631 """ |
598 """ |
632 Private method to create the Toolboxes layout. |
599 Private method to create the Toolboxes layout. |
633 |
600 |
634 @param debugServer reference to the debug server object |
601 @param debugServer reference to the debug server object |
635 """ |
602 """ |
|
603 from E5Gui.E5ToolBox import E5VerticalToolBox, E5HorizontalToolBox |
|
604 |
636 # Create the left toolbox |
605 # Create the left toolbox |
637 self.lToolboxDock = self.__createDockWindow("lToolboxDock") |
606 self.lToolboxDock = self.__createDockWindow("lToolboxDock") |
638 self.lToolbox = E5VerticalToolBox(self.lToolboxDock) |
607 self.lToolbox = E5VerticalToolBox(self.lToolboxDock) |
639 self.__setupDockWindow(self.lToolboxDock, Qt.LeftDockWidgetArea, |
608 self.__setupDockWindow(self.lToolboxDock, Qt.LeftDockWidgetArea, |
640 self.lToolbox, self.trUtf8("Left Toolbox")) |
609 self.lToolbox, self.trUtf8("Left Toolbox")) |
750 """ |
719 """ |
751 Private method to create the Sidebars layout. |
720 Private method to create the Sidebars layout. |
752 |
721 |
753 @param debugServer reference to the debug server object |
722 @param debugServer reference to the debug server object |
754 """ |
723 """ |
|
724 from E5Gui.E5SideBar import E5SideBar |
|
725 |
755 # Create the left sidebar |
726 # Create the left sidebar |
756 self.leftSidebar = E5SideBar(E5SideBar.West) |
727 self.leftSidebar = E5SideBar(E5SideBar.West) |
757 |
728 |
758 # Create the bottom sidebar |
729 # Create the bottom sidebar |
759 self.bottomSidebar = E5SideBar(E5SideBar.South) |
730 self.bottomSidebar = E5SideBar(E5SideBar.South) |
2726 """ Please configure your Email settings in the""" |
2697 """ Please configure your Email settings in the""" |
2727 """ Preferences Dialog.""")) |
2698 """ Preferences Dialog.""")) |
2728 self.showPreferences("emailPage") |
2699 self.showPreferences("emailPage") |
2729 return |
2700 return |
2730 |
2701 |
|
2702 from .EmailDialog import EmailDialog |
2731 self.dlg = EmailDialog(mode=mode) |
2703 self.dlg = EmailDialog(mode=mode) |
2732 if attachFile is not None: |
2704 if attachFile is not None: |
2733 self.dlg.attachFile(attachFile, deleteAttachFile) |
2705 self.dlg.attachFile(attachFile, deleteAttachFile) |
2734 self.dlg.show() |
2706 self.dlg.show() |
2735 |
2707 |
2782 Private slot to handle the Compare Files dialog. |
2754 Private slot to handle the Compare Files dialog. |
2783 """ |
2755 """ |
2784 aw = self.viewmanager.activeWindow() |
2756 aw = self.viewmanager.activeWindow() |
2785 fn = aw and aw.getFileName() or None |
2757 fn = aw and aw.getFileName() or None |
2786 if self.diffDlg is None: |
2758 if self.diffDlg is None: |
|
2759 from .DiffDialog import DiffDialog |
2787 self.diffDlg = DiffDialog() |
2760 self.diffDlg = DiffDialog() |
2788 self.diffDlg.show(fn) |
2761 self.diffDlg.show(fn) |
2789 |
2762 |
2790 def __compareFilesSbs(self): |
2763 def __compareFilesSbs(self): |
2791 """ |
2764 """ |
2792 Private slot to handle the Compare Files dialog. |
2765 Private slot to handle the Compare Files dialog. |
2793 """ |
2766 """ |
2794 aw = self.viewmanager.activeWindow() |
2767 aw = self.viewmanager.activeWindow() |
2795 fn = aw and aw.getFileName() or None |
2768 fn = aw and aw.getFileName() or None |
2796 if self.compareDlg is None: |
2769 if self.compareDlg is None: |
|
2770 from .CompareDialog import CompareDialog |
2797 self.compareDlg = CompareDialog() |
2771 self.compareDlg = CompareDialog() |
2798 self.compareDlg.show(fn) |
2772 self.compareDlg.show(fn) |
2799 |
2773 |
2800 def __openMiniEditor(self): |
2774 def __openMiniEditor(self): |
2801 """ |
2775 """ |
2802 Private slot to show a mini editor window. |
2776 Private slot to show a mini editor window. |
2803 """ |
2777 """ |
|
2778 from QScintilla.MiniEditor import MiniEditor |
2804 editor = MiniEditor(parent=self) |
2779 editor = MiniEditor(parent=self) |
2805 editor.show() |
2780 editor.show() |
2806 |
2781 |
2807 def addE5Actions(self, actions, type): |
2782 def addE5Actions(self, actions, type): |
2808 """ |
2783 """ |
3646 |
3621 |
3647 def __toolsConfiguration(self): |
3622 def __toolsConfiguration(self): |
3648 """ |
3623 """ |
3649 Private slot to handle the tools configuration menu entry. |
3624 Private slot to handle the tools configuration menu entry. |
3650 """ |
3625 """ |
|
3626 from Preferences.ToolConfigurationDialog import ToolConfigurationDialog |
3651 dlg = ToolConfigurationDialog(self.toolGroups[self.currentToolGroup][1], self) |
3627 dlg = ToolConfigurationDialog(self.toolGroups[self.currentToolGroup][1], self) |
3652 if dlg.exec_() == QDialog.Accepted: |
3628 if dlg.exec_() == QDialog.Accepted: |
3653 self.toolGroups[self.currentToolGroup][1] = dlg.getToollist() |
3629 self.toolGroups[self.currentToolGroup][1] = dlg.getToollist() |
3654 self.__updateExternalToolsActions() |
3630 self.__updateExternalToolsActions() |
3655 |
3631 |
3656 def __toolGroupsConfiguration(self): |
3632 def __toolGroupsConfiguration(self): |
3657 """ |
3633 """ |
3658 Private slot to handle the tool groups configuration menu entry. |
3634 Private slot to handle the tool groups configuration menu entry. |
3659 """ |
3635 """ |
|
3636 from Preferences.ToolGroupConfigurationDialog import ToolGroupConfigurationDialog |
3660 dlg = ToolGroupConfigurationDialog(self.toolGroups, self.currentToolGroup, self) |
3637 dlg = ToolGroupConfigurationDialog(self.toolGroups, self.currentToolGroup, self) |
3661 if dlg.exec_() == QDialog.Accepted: |
3638 if dlg.exec_() == QDialog.Accepted: |
3662 self.toolGroups, self.currentToolGroup = dlg.getToolGroups() |
3639 self.toolGroups, self.currentToolGroup = dlg.getToolGroups() |
3663 |
3640 |
3664 def __createUnitTestDialog(self): |
3641 def __createUnitTestDialog(self): |
3665 """ |
3642 """ |
3666 Private slot to generate the unit test dialog on demand. |
3643 Private slot to generate the unit test dialog on demand. |
3667 """ |
3644 """ |
3668 if self.unittestDialog is None: |
3645 if self.unittestDialog is None: |
|
3646 from PyUnit.UnittestDialog import UnittestDialog |
3669 self.unittestDialog = UnittestDialog( |
3647 self.unittestDialog = UnittestDialog( |
3670 None, self.debuggerUI.debugServer, self, fromEric=True) |
3648 None, self.debuggerUI.debugServer, self, fromEric=True) |
3671 self.unittestDialog.unittestFile.connect(self.viewmanager.setFileLine) |
3649 self.unittestDialog.unittestFile.connect(self.viewmanager.setFileLine) |
3672 self.unittestDialog.unittestStopped.connect(self.__unittestStopped) |
3650 self.unittestDialog.unittestStopped.connect(self.__unittestStopped) |
3673 |
3651 |
4089 """ |
4067 """ |
4090 Private slot to show a pixmap in a dialog. |
4068 Private slot to show a pixmap in a dialog. |
4091 |
4069 |
4092 @param fn filename of the file to show (string) |
4070 @param fn filename of the file to show (string) |
4093 """ |
4071 """ |
|
4072 from IconEditor.IconEditorWindow import IconEditorWindow |
4094 dlg = IconEditorWindow(fn, self, fromEric=True) |
4073 dlg = IconEditorWindow(fn, self, fromEric=True) |
4095 dlg.show() |
4074 dlg.show() |
4096 |
4075 |
4097 def __showPixmap(self, fn): |
4076 def __showPixmap(self, fn): |
4098 """ |
4077 """ |
4099 Private slot to show a pixmap in a dialog. |
4078 Private slot to show a pixmap in a dialog. |
4100 |
4079 |
4101 @param fn filename of the file to show (string) |
4080 @param fn filename of the file to show (string) |
4102 """ |
4081 """ |
|
4082 from Graphics.PixmapDiagram import PixmapDiagram |
4103 dlg = PixmapDiagram(fn, self) |
4083 dlg = PixmapDiagram(fn, self) |
4104 if dlg.getStatus(): |
4084 if dlg.getStatus(): |
4105 dlg.show() |
4085 dlg.show() |
4106 |
4086 |
4107 def __showSvg(self, fn): |
4087 def __showSvg(self, fn): |
4108 """ |
4088 """ |
4109 Private slot to show a SVG file in a dialog. |
4089 Private slot to show a SVG file in a dialog. |
4110 |
4090 |
4111 @param fn filename of the file to show (string) |
4091 @param fn filename of the file to show (string) |
4112 """ |
4092 """ |
|
4093 from Graphics.SvgDiagram import SvgDiagram |
4113 dlg = SvgDiagram(fn, self) |
4094 dlg = SvgDiagram(fn, self) |
4114 dlg.show() |
4095 dlg.show() |
4115 |
4096 |
4116 def __snapshot(self): |
4097 def __snapshot(self): |
4117 """ |
4098 """ |
4677 """ |
4658 """ |
4678 Public slot to set the preferences. |
4659 Public slot to set the preferences. |
4679 |
4660 |
4680 @param pageName name of the configuration page to show (string) |
4661 @param pageName name of the configuration page to show (string) |
4681 """ |
4662 """ |
|
4663 from Preferences.ConfigurationDialog import ConfigurationDialog |
4682 dlg = ConfigurationDialog(self, 'Configuration') |
4664 dlg = ConfigurationDialog(self, 'Configuration') |
4683 dlg.preferencesChanged.connect(self.__preferencesChanged) |
4665 dlg.preferencesChanged.connect(self.__preferencesChanged) |
4684 dlg.masterPasswordChanged.connect(self.__masterPasswordChanged) |
4666 dlg.masterPasswordChanged.connect(self.__masterPasswordChanged) |
4685 dlg.show() |
4667 dlg.show() |
4686 if pageName is not None: |
4668 if pageName is not None: |
4756 @param newPassword new master password (string) |
4738 @param newPassword new master password (string) |
4757 """ |
4739 """ |
4758 self.masterPasswordChanged.emit(oldPassword, newPassword) |
4740 self.masterPasswordChanged.emit(oldPassword, newPassword) |
4759 Preferences.convertPasswords(oldPassword, newPassword) |
4741 Preferences.convertPasswords(oldPassword, newPassword) |
4760 if self.helpWindow is None: |
4742 if self.helpWindow is None: |
|
4743 from Helpviewer.Passwords.PasswordManager import PasswordManager |
4761 pwManager = PasswordManager() |
4744 pwManager = PasswordManager() |
4762 pwManager.masterPasswordChanged(oldPassword, newPassword) |
4745 pwManager.masterPasswordChanged(oldPassword, newPassword) |
4763 Utilities.crypto.changeRememberedMaster(newPassword) |
4746 Utilities.crypto.changeRememberedMaster(newPassword) |
4764 |
4747 |
4765 def __reloadAPIs(self): |
4748 def __reloadAPIs(self): |
4771 def __showExternalTools(self): |
4754 def __showExternalTools(self): |
4772 """ |
4755 """ |
4773 Private slot to display a dialog show a list of external tools used by eric5. |
4756 Private slot to display a dialog show a list of external tools used by eric5. |
4774 """ |
4757 """ |
4775 if self.programsDialog is None: |
4758 if self.programsDialog is None: |
|
4759 from Preferences.ProgramsDialog import ProgramsDialog |
4776 self.programsDialog = ProgramsDialog(self) |
4760 self.programsDialog = ProgramsDialog(self) |
4777 self.programsDialog.show() |
4761 self.programsDialog.show() |
4778 |
4762 |
4779 def __configViewProfiles(self): |
4763 def __configViewProfiles(self): |
4780 """ |
4764 """ |
4781 Private slot to configure the various view profiles. |
4765 Private slot to configure the various view profiles. |
4782 """ |
4766 """ |
|
4767 from Preferences.ViewProfileDialog import ViewProfileDialog |
4783 dlg = ViewProfileDialog(self.layout, self.profiles, |
4768 dlg = ViewProfileDialog(self.layout, self.profiles, |
4784 not self.embeddedShell, not self.embeddedFileBrowser) |
4769 not self.embeddedShell, not self.embeddedFileBrowser) |
4785 if dlg.exec_() == QDialog.Accepted: |
4770 if dlg.exec_() == QDialog.Accepted: |
4786 self.profiles = dlg.getProfiles() |
4771 self.profiles = dlg.getProfiles() |
4787 Preferences.setUI("ViewProfiles", self.profiles) |
4772 Preferences.setUI("ViewProfiles", self.profiles) |
4792 |
4777 |
4793 def __configToolBars(self): |
4778 def __configToolBars(self): |
4794 """ |
4779 """ |
4795 Private slot to configure the various toolbars. |
4780 Private slot to configure the various toolbars. |
4796 """ |
4781 """ |
|
4782 from E5Gui.E5ToolBarDialog import E5ToolBarDialog |
4797 dlg = E5ToolBarDialog(self.toolbarManager) |
4783 dlg = E5ToolBarDialog(self.toolbarManager) |
4798 if dlg.exec_() == QDialog.Accepted: |
4784 if dlg.exec_() == QDialog.Accepted: |
4799 Preferences.setUI("ToolbarManagerState", self.toolbarManager.saveState()) |
4785 Preferences.setUI("ToolbarManagerState", self.toolbarManager.saveState()) |
4800 |
4786 |
4801 def __configShortcuts(self): |
4787 def __configShortcuts(self): |
4802 """ |
4788 """ |
4803 Private slot to configure the keyboard shortcuts. |
4789 Private slot to configure the keyboard shortcuts. |
4804 """ |
4790 """ |
4805 if self.shortcutsDialog is None: |
4791 if self.shortcutsDialog is None: |
|
4792 from Preferences.ShortcutsDialog import ShortcutsDialog |
4806 self.shortcutsDialog = ShortcutsDialog(self, 'Shortcuts') |
4793 self.shortcutsDialog = ShortcutsDialog(self, 'Shortcuts') |
4807 self.shortcutsDialog.populate() |
4794 self.shortcutsDialog.populate() |
4808 self.shortcutsDialog.show() |
4795 self.shortcutsDialog.show() |
4809 |
4796 |
4810 def __exportShortcuts(self): |
4797 def __exportShortcuts(self): |
4968 self.trUtf8("Save tasks"), |
4955 self.trUtf8("Save tasks"), |
4969 self.trUtf8("<p>The tasks file <b>{0}</b> could not be written.</p>") |
4956 self.trUtf8("<p>The tasks file <b>{0}</b> could not be written.</p>") |
4970 .format(fn)) |
4957 .format(fn)) |
4971 return |
4958 return |
4972 |
4959 |
|
4960 from E5XML.TasksWriter import TasksWriter |
4973 TasksWriter(f, False).writeXML() |
4961 TasksWriter(f, False).writeXML() |
4974 f.close() |
4962 f.close() |
4975 |
4963 |
4976 def __readTasks(self): |
4964 def __readTasks(self): |
4977 """ |
4965 """ |
4980 fn = os.path.join(Utilities.getConfigDir(), "eric5tasks.e4t") |
4968 fn = os.path.join(Utilities.getConfigDir(), "eric5tasks.e4t") |
4981 if not os.path.exists(fn): |
4969 if not os.path.exists(fn): |
4982 return |
4970 return |
4983 f = QFile(fn) |
4971 f = QFile(fn) |
4984 if f.open(QIODevice.ReadOnly): |
4972 if f.open(QIODevice.ReadOnly): |
|
4973 from E5XML.TasksReader import TasksReader |
4985 reader = TasksReader(f, viewer=self.taskViewer) |
4974 reader = TasksReader(f, viewer=self.taskViewer) |
4986 reader.readXML() |
4975 reader.readXML() |
4987 f.close() |
4976 f.close() |
4988 else: |
4977 else: |
4989 E5MessageBox.critical(self, |
4978 E5MessageBox.critical(self, |
4996 Private slot to write the session data to an XML file (.e4s). |
4985 Private slot to write the session data to an XML file (.e4s). |
4997 """ |
4986 """ |
4998 fn = os.path.join(Utilities.getConfigDir(), "eric5session.e4s") |
4987 fn = os.path.join(Utilities.getConfigDir(), "eric5session.e4s") |
4999 f = QFile(fn) |
4988 f = QFile(fn) |
5000 if f.open(QIODevice.WriteOnly): |
4989 if f.open(QIODevice.WriteOnly): |
|
4990 from E5XML.SessionWriter import SessionWriter |
5001 SessionWriter(f, None).writeXML() |
4991 SessionWriter(f, None).writeXML() |
5002 f.close() |
4992 f.close() |
5003 else: |
4993 else: |
5004 E5MessageBox.critical(self, |
4994 E5MessageBox.critical(self, |
5005 self.trUtf8("Save session"), |
4995 self.trUtf8("Save session"), |
5032 def showFindFileByNameDialog(self): |
5023 def showFindFileByNameDialog(self): |
5033 """ |
5024 """ |
5034 Public slot to show the Find File by Name dialog. |
5025 Public slot to show the Find File by Name dialog. |
5035 """ |
5026 """ |
5036 if self.findFileNameDialog is None: |
5027 if self.findFileNameDialog is None: |
|
5028 from .FindFileNameDialog import FindFileNameDialog |
5037 self.findFileNameDialog = FindFileNameDialog(self.project) |
5029 self.findFileNameDialog = FindFileNameDialog(self.project) |
5038 self.findFileNameDialog.sourceFile.connect(self.viewmanager.openSourceFile) |
5030 self.findFileNameDialog.sourceFile.connect(self.viewmanager.openSourceFile) |
5039 self.findFileNameDialog.designerFile.connect(self.__designer) |
5031 self.findFileNameDialog.designerFile.connect(self.__designer) |
5040 self.findFileNameDialog.show() |
5032 self.findFileNameDialog.show() |
5041 self.findFileNameDialog.raise_() |
5033 self.findFileNameDialog.raise_() |
5048 @keyparam txt text to search for (string) |
5040 @keyparam txt text to search for (string) |
5049 @keyparam searchDir directory to search in (string) |
5041 @keyparam searchDir directory to search in (string) |
5050 @keyparam openFiles flag indicating to operate on open files (boolean) |
5042 @keyparam openFiles flag indicating to operate on open files (boolean) |
5051 """ |
5043 """ |
5052 if self.findFilesDialog is None: |
5044 if self.findFilesDialog is None: |
|
5045 from .FindFileDialog import FindFileDialog |
5053 self.findFilesDialog = FindFileDialog(self.project) |
5046 self.findFilesDialog = FindFileDialog(self.project) |
5054 self.findFilesDialog.sourceFile.connect( |
5047 self.findFilesDialog.sourceFile.connect( |
5055 self.viewmanager.openSourceFile) |
5048 self.viewmanager.openSourceFile) |
5056 self.findFilesDialog.designerFile.connect(self.__designer) |
5049 self.findFilesDialog.designerFile.connect(self.__designer) |
5057 if searchDir: |
5050 if searchDir: |
5069 @keyparam txt text to search for (string) |
5062 @keyparam txt text to search for (string) |
5070 @keyparam searchDir directory to search in (string) |
5063 @keyparam searchDir directory to search in (string) |
5071 @keyparam openFiles flag indicating to operate on open files (boolean) |
5064 @keyparam openFiles flag indicating to operate on open files (boolean) |
5072 """ |
5065 """ |
5073 if self.replaceFilesDialog is None: |
5066 if self.replaceFilesDialog is None: |
|
5067 from .FindFileDialog import FindFileDialog |
5074 self.replaceFilesDialog = FindFileDialog(self.project, replaceMode=True) |
5068 self.replaceFilesDialog = FindFileDialog(self.project, replaceMode=True) |
5075 self.replaceFilesDialog.sourceFile.connect( |
5069 self.replaceFilesDialog.sourceFile.connect( |
5076 self.viewmanager.openSourceFile) |
5070 self.viewmanager.openSourceFile) |
5077 self.replaceFilesDialog.designerFile.connect(self.__designer) |
5071 self.replaceFilesDialog.designerFile.connect(self.__designer) |
5078 if searchDir: |
5072 if searchDir: |
5111 |
5105 |
5112 def __showPluginInfo(self): |
5106 def __showPluginInfo(self): |
5113 """ |
5107 """ |
5114 Private slot to show the plugin info dialog. |
5108 Private slot to show the plugin info dialog. |
5115 """ |
5109 """ |
|
5110 from PluginManager.PluginInfoDialog import PluginInfoDialog |
5116 self.__pluginInfoDialog = PluginInfoDialog(self.pluginManager, self) |
5111 self.__pluginInfoDialog = PluginInfoDialog(self.pluginManager, self) |
5117 self.__pluginInfoDialog.show() |
5112 self.__pluginInfoDialog.show() |
5118 |
5113 |
5119 def __installPlugins(self, pluginFileNames=[]): |
5114 def __installPlugins(self, pluginFileNames=[]): |
5120 """ |
5115 """ |
5121 Private slot to show a dialog to install a new plugin. |
5116 Private slot to show a dialog to install a new plugin. |
5122 |
5117 |
5123 @param pluginFileNames list of plugin files suggested for |
5118 @param pluginFileNames list of plugin files suggested for |
5124 installation list of strings |
5119 installation list of strings |
5125 """ |
5120 """ |
|
5121 from PluginManager.PluginInstallDialog import PluginInstallDialog |
5126 dlg = PluginInstallDialog(self.pluginManager, pluginFileNames, self) |
5122 dlg = PluginInstallDialog(self.pluginManager, pluginFileNames, self) |
5127 dlg.exec_() |
5123 dlg.exec_() |
5128 if dlg.restartNeeded(): |
5124 if dlg.restartNeeded(): |
5129 self.__restart() |
5125 self.__restart() |
5130 |
5126 |
5131 def __deinstallPlugin(self): |
5127 def __deinstallPlugin(self): |
5132 """ |
5128 """ |
5133 Private slot to show a dialog to uninstall a plugin. |
5129 Private slot to show a dialog to uninstall a plugin. |
5134 """ |
5130 """ |
|
5131 from PluginManager.PluginUninstallDialog import PluginUninstallDialog |
5135 dlg = PluginUninstallDialog(self.pluginManager, self) |
5132 dlg = PluginUninstallDialog(self.pluginManager, self) |
5136 dlg.exec_() |
5133 dlg.exec_() |
5137 |
5134 |
5138 def __showPluginsAvailable(self): |
5135 def __showPluginsAvailable(self): |
5139 """ |
5136 """ |
5140 Private slot to show the plugins available for download. |
5137 Private slot to show the plugins available for download. |
5141 """ |
5138 """ |
|
5139 from PluginManager.PluginRepositoryDialog import PluginRepositoryDialog |
5142 dlg = PluginRepositoryDialog(self) |
5140 dlg = PluginRepositoryDialog(self) |
5143 res = dlg.exec_() |
5141 res = dlg.exec_() |
5144 if res == (QDialog.Accepted + 1): |
5142 if res == (QDialog.Accepted + 1): |
5145 self.__installPlugins(dlg.getDownloadedPlugins()) |
5143 self.__installPlugins(dlg.getDownloadedPlugins()) |
5146 |
5144 |
5627 @param heading heading of the notification (string) |
5625 @param heading heading of the notification (string) |
5628 @param text text of the notification (string) |
5626 @param text text of the notification (string) |
5629 """ |
5627 """ |
5630 if Preferences.getUI("NotificationsEnabled"): |
5628 if Preferences.getUI("NotificationsEnabled"): |
5631 if self.__notification is None: |
5629 if self.__notification is None: |
|
5630 from .NotificationWidget import NotificationWidget |
5632 self.__notification = NotificationWidget(parent=self) |
5631 self.__notification = NotificationWidget(parent=self) |
5633 self.__notification.setPixmap(icon) |
5632 self.__notification.setPixmap(icon) |
5634 self.__notification.setHeading(heading) |
5633 self.__notification.setHeading(heading) |
5635 self.__notification.setText(text) |
5634 self.__notification.setText(text) |
5636 self.__notification.setTimeout(Preferences.getUI("NotificationTimeout")) |
5635 self.__notification.setTimeout(Preferences.getUI("NotificationTimeout")) |