Tue, 02 Oct 2012 19:53:31 +0200
Made the sixth set of Qt5 compatibility changes.
--- a/APIs/Python3/eric5.api Mon Oct 01 19:55:49 2012 +0200 +++ b/APIs/Python3/eric5.api Tue Oct 02 19:53:31 2012 +0200 @@ -1152,7 +1152,6 @@ eric5.E5Gui.E5Application.E5Application.getPluginObject?4(name) eric5.E5Gui.E5Application.E5Application.getPluginObjectType?4(name) eric5.E5Gui.E5Application.E5Application.getPluginObjects?4() -eric5.E5Gui.E5Application.E5Application.palette?4() eric5.E5Gui.E5Application.E5Application.registerObject?4(name, object) eric5.E5Gui.E5Application.E5Application.registerPluginObject?4(name, object, pluginType=None) eric5.E5Gui.E5Application.E5Application.unregisterPluginObject?4(name) @@ -1655,7 +1654,11 @@ eric5.E5XML.XMLStreamWriterBase.XMLStreamWriterBase.writeBasics?4(tag, pyobject) eric5.E5XML.XMLStreamWriterBase.XMLStreamWriterBase.writeXML?4() eric5.E5XML.XMLStreamWriterBase.XMLStreamWriterBase?1(device) +eric5.Globals.AppInfo.makeAppInfo?4(argv, name, arg, description, options=[]) +eric5.Globals.checkBlacklistedVersions?4() +eric5.Globals.configDir?7 eric5.Globals.findPython2Interpreters?4() +eric5.Globals.getConfigDir?4() eric5.Globals.isLinuxPlatform?4() eric5.Globals.isMacPlatform?4() eric5.Globals.isWindowsPlatform?4() @@ -1663,6 +1666,7 @@ eric5.Globals.recentNameHosts?7 eric5.Globals.recentNameMultiProject?7 eric5.Globals.recentNameProject?7 +eric5.Globals.setConfigDir?4(d) eric5.Globals.settingsNameGlobal?7 eric5.Globals.settingsNameOrganization?7 eric5.Globals.settingsNameRecent?7 @@ -6998,6 +7002,24 @@ eric5.Templates.TemplateViewer.TemplateViewer.removeGroup?4(itm) eric5.Templates.TemplateViewer.TemplateViewer.writeTemplates?4(filename=None) eric5.Templates.TemplateViewer.TemplateViewer?1(parent, viewmanager) +eric5.Toolbox.SingleApplication.SingleApplicationClient.connect?4() +eric5.Toolbox.SingleApplication.SingleApplicationClient.disconnect?4() +eric5.Toolbox.SingleApplication.SingleApplicationClient.errstr?4() +eric5.Toolbox.SingleApplication.SingleApplicationClient.processArgs?4(args) +eric5.Toolbox.SingleApplication.SingleApplicationClient.sendCommand?4(cmd) +eric5.Toolbox.SingleApplication.SingleApplicationClient?1(name) +eric5.Toolbox.SingleApplication.SingleApplicationServer.handleCommand?4(cmd, params) +eric5.Toolbox.SingleApplication.SingleApplicationServer.shutdown?4() +eric5.Toolbox.SingleApplication.SingleApplicationServer?1(name) +eric5.Toolbox.Startup.handleArgs?4(argv, appinfo) +eric5.Toolbox.Startup.initializeResourceSearchPath?4() +eric5.Toolbox.Startup.loadTranslatorForLocale?4(dirs, tn) +eric5.Toolbox.Startup.loadTranslators?4(qtTransDir, app, translationFiles=()) +eric5.Toolbox.Startup.loaded_translators?7 +eric5.Toolbox.Startup.setLibraryPaths?4() +eric5.Toolbox.Startup.simpleAppStartup?4(argv, appinfo, mwFactory, quitOnLastWindowClosed=True, app=None, raiseIt=True) +eric5.Toolbox.Startup.usage?4(appinfo, optlen=12) +eric5.Toolbox.Startup.version?4(appinfo) eric5.Tools.TRPreviewer.TRPreviewer.closeEvent?4(event) eric5.Tools.TRPreviewer.TRPreviewer.reloadTranslations?4() eric5.Tools.TRPreviewer.TRPreviewer.setTranslation?4(name) @@ -7543,25 +7565,6 @@ eric5.Utilities.PasswordChecker.PasswordChecker.Status_Passed?7 eric5.Utilities.PasswordChecker.PasswordChecker.checkPassword?4(password) eric5.Utilities.PasswordChecker.PasswordChecker?1() -eric5.Utilities.SingleApplication.SingleApplicationClient.connect?4() -eric5.Utilities.SingleApplication.SingleApplicationClient.disconnect?4() -eric5.Utilities.SingleApplication.SingleApplicationClient.errstr?4() -eric5.Utilities.SingleApplication.SingleApplicationClient.processArgs?4(args) -eric5.Utilities.SingleApplication.SingleApplicationClient.sendCommand?4(cmd) -eric5.Utilities.SingleApplication.SingleApplicationClient?1(name) -eric5.Utilities.SingleApplication.SingleApplicationServer.handleCommand?4(cmd, params) -eric5.Utilities.SingleApplication.SingleApplicationServer.shutdown?4() -eric5.Utilities.SingleApplication.SingleApplicationServer?1(name) -eric5.Utilities.Startup.handleArgs?4(argv, appinfo) -eric5.Utilities.Startup.initializeResourceSearchPath?4() -eric5.Utilities.Startup.loadTranslatorForLocale?4(dirs, tn) -eric5.Utilities.Startup.loadTranslators?4(qtTransDir, app, translationFiles=()) -eric5.Utilities.Startup.loaded_translators?7 -eric5.Utilities.Startup.makeAppInfo?4(argv, name, arg, description, options=[]) -eric5.Utilities.Startup.setLibraryPaths?4() -eric5.Utilities.Startup.simpleAppStartup?4(argv, appinfo, mwFactory, quitOnLastWindowClosed=True, app=None, raiseIt=True) -eric5.Utilities.Startup.usage?4(appinfo, optlen=12) -eric5.Utilities.Startup.version?4(appinfo) eric5.Utilities._escape?8 eric5.Utilities._escape_map?8 eric5.Utilities._percentReplacementFunc?5(matchobj) @@ -7626,7 +7629,6 @@ eric5.Utilities.binplistlib.readPlistFromBytes?4(data) eric5.Utilities.binplistlib.writePlist?4(rootObject, pathOrFile, binary=True) eric5.Utilities.binplistlib.writePlistToBytes?4(rootObject, binary=True) -eric5.Utilities.checkBlacklistedVersions?4() eric5.Utilities.checkPyside?4() eric5.Utilities.codingBytes_regexps?7 eric5.Utilities.coding_regexps?7 @@ -7685,7 +7687,6 @@ eric5.Utilities.generatePySideToolPath?4(toolname) eric5.Utilities.generateQtToolName?4(toolname) eric5.Utilities.generateVersionInfo?4(linesep='\n') -eric5.Utilities.getConfigDir?4() eric5.Utilities.getDirs?4(path, excludeDirs) eric5.Utilities.getEnvironmentEntry?4(key, default=None) eric5.Utilities.getExecutablePath?4(file) @@ -7804,9 +7805,9 @@ eric5.Utilities.py3flakes.messages.UnusedVariable?1(filename, lineno, name) eric5.Utilities.readEncodedFile?4(filename) eric5.Utilities.readEncodedFileWithHash?4(filename) +eric5.Utilities.readStringFromStream?4(stream) eric5.Utilities.relpath?4(path, start=os.path.curdir) eric5.Utilities.samepath?4(f1, f2) -eric5.Utilities.setConfigDir?4(d) eric5.Utilities.splitPath?4(name) eric5.Utilities.supportedCodecs?7 eric5.Utilities.toBool?4(dataStr)
--- a/Documentation/Help/source.qhp Mon Oct 01 19:55:49 2012 +0200 +++ b/Documentation/Help/source.qhp Tue Oct 02 19:53:31 2012 +0200 @@ -171,6 +171,7 @@ <section title="eric5.E5XML.XMLStreamWriterBase" ref="eric5.E5XML.XMLStreamWriterBase.html" /> </section> <section title="eric5.Globals" ref="index-eric5.Globals.html"> + <section title="eric5.Globals.AppInfo" ref="eric5.Globals.AppInfo.html" /> <section title="eric5.Globals.__init__" ref="eric5.Globals.__init__.html" /> </section> <section title="eric5.Graphics" ref="index-eric5.Graphics.html"> @@ -867,6 +868,10 @@ <section title="eric5.Templates.TemplateSingleVariableDialog" ref="eric5.Templates.TemplateSingleVariableDialog.html" /> <section title="eric5.Templates.TemplateViewer" ref="eric5.Templates.TemplateViewer.html" /> </section> + <section title="eric5.Toolbox" ref="index-eric5.Toolbox.html"> + <section title="eric5.Toolbox.SingleApplication" ref="eric5.Toolbox.SingleApplication.html" /> + <section title="eric5.Toolbox.Startup" ref="eric5.Toolbox.Startup.html" /> + </section> <section title="eric5.Tools" ref="index-eric5.Tools.html"> <section title="eric5.Tools.TRPreviewer" ref="eric5.Tools.TRPreviewer.html" /> <section title="eric5.Tools.TRSingleApplication" ref="eric5.Tools.TRSingleApplication.html" /> @@ -916,8 +921,6 @@ <section title="eric5.Utilities.FtpUtilities" ref="eric5.Utilities.FtpUtilities.html" /> <section title="eric5.Utilities.ModuleParser" ref="eric5.Utilities.ModuleParser.html" /> <section title="eric5.Utilities.PasswordChecker" ref="eric5.Utilities.PasswordChecker.html" /> - <section title="eric5.Utilities.SingleApplication" ref="eric5.Utilities.SingleApplication.html" /> - <section title="eric5.Utilities.Startup" ref="eric5.Utilities.Startup.html" /> <section title="eric5.Utilities.__init__" ref="eric5.Utilities.__init__.html" /> <section title="eric5.Utilities.binplistlib" ref="eric5.Utilities.binplistlib.html" /> <section title="eric5.Utilities.uic" ref="eric5.Utilities.uic.html" /> @@ -1278,6 +1281,7 @@ <keyword name="AddProjectDialog.on_fileButton_clicked" id="AddProjectDialog.on_fileButton_clicked" ref="eric5.MultiProject.AddProjectDialog.html#AddProjectDialog.on_fileButton_clicked" /> <keyword name="AddProjectDialog.on_filenameEdit_textChanged" id="AddProjectDialog.on_filenameEdit_textChanged" ref="eric5.MultiProject.AddProjectDialog.html#AddProjectDialog.on_filenameEdit_textChanged" /> <keyword name="AddProjectDialog.on_nameEdit_textChanged" id="AddProjectDialog.on_nameEdit_textChanged" ref="eric5.MultiProject.AddProjectDialog.html#AddProjectDialog.on_nameEdit_textChanged" /> + <keyword name="AppInfo (Module)" id="AppInfo (Module)" ref="eric5.Globals.AppInfo.html" /> <keyword name="ApplicationDiagramBuilder" id="ApplicationDiagramBuilder" ref="eric5.Graphics.ApplicationDiagramBuilder.html#ApplicationDiagramBuilder" /> <keyword name="ApplicationDiagramBuilder (Constructor)" id="ApplicationDiagramBuilder (Constructor)" ref="eric5.Graphics.ApplicationDiagramBuilder.html#ApplicationDiagramBuilder.__init__" /> <keyword name="ApplicationDiagramBuilder (Module)" id="ApplicationDiagramBuilder (Module)" ref="eric5.Graphics.ApplicationDiagramBuilder.html" /> @@ -3282,7 +3286,6 @@ <keyword name="E5Application.getPluginObject" id="E5Application.getPluginObject" ref="eric5.E5Gui.E5Application.html#E5Application.getPluginObject" /> <keyword name="E5Application.getPluginObjectType" id="E5Application.getPluginObjectType" ref="eric5.E5Gui.E5Application.html#E5Application.getPluginObjectType" /> <keyword name="E5Application.getPluginObjects" id="E5Application.getPluginObjects" ref="eric5.E5Gui.E5Application.html#E5Application.getPluginObjects" /> - <keyword name="E5Application.palette" id="E5Application.palette" ref="eric5.E5Gui.E5Application.html#E5Application.palette" /> <keyword name="E5Application.registerObject" id="E5Application.registerObject" ref="eric5.E5Gui.E5Application.html#E5Application.registerObject" /> <keyword name="E5Application.registerPluginObject" id="E5Application.registerPluginObject" ref="eric5.E5Gui.E5Application.html#E5Application.registerPluginObject" /> <keyword name="E5Application.unregisterPluginObject" id="E5Application.unregisterPluginObject" ref="eric5.E5Gui.E5Application.html#E5Application.unregisterPluginObject" /> @@ -8903,21 +8906,21 @@ <keyword name="SideWidget.event" id="SideWidget.event" ref="eric5.E5Gui.E5LineEdit.html#SideWidget.event" /> <keyword name="SilentObject" id="SilentObject" ref="eric5.DebugClients.Ruby.Debuggee.html#SilentObject" /> <keyword name="SilentObject.method_missing" id="SilentObject.method_missing" ref="eric5.DebugClients.Ruby.Debuggee.html#SilentObject.method_missing" /> - <keyword name="SingleApplication (Module)" id="SingleApplication (Module)" ref="eric5.Utilities.SingleApplication.html" /> - <keyword name="SingleApplicationClient" id="SingleApplicationClient" ref="eric5.Utilities.SingleApplication.html#SingleApplicationClient" /> - <keyword name="SingleApplicationClient (Constructor)" id="SingleApplicationClient (Constructor)" ref="eric5.Utilities.SingleApplication.html#SingleApplicationClient.__init__" /> - <keyword name="SingleApplicationClient.connect" id="SingleApplicationClient.connect" ref="eric5.Utilities.SingleApplication.html#SingleApplicationClient.connect" /> - <keyword name="SingleApplicationClient.disconnect" id="SingleApplicationClient.disconnect" ref="eric5.Utilities.SingleApplication.html#SingleApplicationClient.disconnect" /> - <keyword name="SingleApplicationClient.errstr" id="SingleApplicationClient.errstr" ref="eric5.Utilities.SingleApplication.html#SingleApplicationClient.errstr" /> - <keyword name="SingleApplicationClient.processArgs" id="SingleApplicationClient.processArgs" ref="eric5.Utilities.SingleApplication.html#SingleApplicationClient.processArgs" /> - <keyword name="SingleApplicationClient.sendCommand" id="SingleApplicationClient.sendCommand" ref="eric5.Utilities.SingleApplication.html#SingleApplicationClient.sendCommand" /> - <keyword name="SingleApplicationServer" id="SingleApplicationServer" ref="eric5.Utilities.SingleApplication.html#SingleApplicationServer" /> - <keyword name="SingleApplicationServer (Constructor)" id="SingleApplicationServer (Constructor)" ref="eric5.Utilities.SingleApplication.html#SingleApplicationServer.__init__" /> - <keyword name="SingleApplicationServer.__disconnected" id="SingleApplicationServer.__disconnected" ref="eric5.Utilities.SingleApplication.html#SingleApplicationServer.__disconnected" /> - <keyword name="SingleApplicationServer.__newConnection" id="SingleApplicationServer.__newConnection" ref="eric5.Utilities.SingleApplication.html#SingleApplicationServer.__newConnection" /> - <keyword name="SingleApplicationServer.__parseLine" id="SingleApplicationServer.__parseLine" ref="eric5.Utilities.SingleApplication.html#SingleApplicationServer.__parseLine" /> - <keyword name="SingleApplicationServer.handleCommand" id="SingleApplicationServer.handleCommand" ref="eric5.Utilities.SingleApplication.html#SingleApplicationServer.handleCommand" /> - <keyword name="SingleApplicationServer.shutdown" id="SingleApplicationServer.shutdown" ref="eric5.Utilities.SingleApplication.html#SingleApplicationServer.shutdown" /> + <keyword name="SingleApplication (Module)" id="SingleApplication (Module)" ref="eric5.Toolbox.SingleApplication.html" /> + <keyword name="SingleApplicationClient" id="SingleApplicationClient" ref="eric5.Toolbox.SingleApplication.html#SingleApplicationClient" /> + <keyword name="SingleApplicationClient (Constructor)" id="SingleApplicationClient (Constructor)" ref="eric5.Toolbox.SingleApplication.html#SingleApplicationClient.__init__" /> + <keyword name="SingleApplicationClient.connect" id="SingleApplicationClient.connect" ref="eric5.Toolbox.SingleApplication.html#SingleApplicationClient.connect" /> + <keyword name="SingleApplicationClient.disconnect" id="SingleApplicationClient.disconnect" ref="eric5.Toolbox.SingleApplication.html#SingleApplicationClient.disconnect" /> + <keyword name="SingleApplicationClient.errstr" id="SingleApplicationClient.errstr" ref="eric5.Toolbox.SingleApplication.html#SingleApplicationClient.errstr" /> + <keyword name="SingleApplicationClient.processArgs" id="SingleApplicationClient.processArgs" ref="eric5.Toolbox.SingleApplication.html#SingleApplicationClient.processArgs" /> + <keyword name="SingleApplicationClient.sendCommand" id="SingleApplicationClient.sendCommand" ref="eric5.Toolbox.SingleApplication.html#SingleApplicationClient.sendCommand" /> + <keyword name="SingleApplicationServer" id="SingleApplicationServer" ref="eric5.Toolbox.SingleApplication.html#SingleApplicationServer" /> + <keyword name="SingleApplicationServer (Constructor)" id="SingleApplicationServer (Constructor)" ref="eric5.Toolbox.SingleApplication.html#SingleApplicationServer.__init__" /> + <keyword name="SingleApplicationServer.__disconnected" id="SingleApplicationServer.__disconnected" ref="eric5.Toolbox.SingleApplication.html#SingleApplicationServer.__disconnected" /> + <keyword name="SingleApplicationServer.__newConnection" id="SingleApplicationServer.__newConnection" ref="eric5.Toolbox.SingleApplication.html#SingleApplicationServer.__newConnection" /> + <keyword name="SingleApplicationServer.__parseLine" id="SingleApplicationServer.__parseLine" ref="eric5.Toolbox.SingleApplication.html#SingleApplicationServer.__parseLine" /> + <keyword name="SingleApplicationServer.handleCommand" id="SingleApplicationServer.handleCommand" ref="eric5.Toolbox.SingleApplication.html#SingleApplicationServer.handleCommand" /> + <keyword name="SingleApplicationServer.shutdown" id="SingleApplicationServer.shutdown" ref="eric5.Toolbox.SingleApplication.html#SingleApplicationServer.shutdown" /> <keyword name="SiteInfo (Package)" id="SiteInfo (Package)" ref="index-eric5.Helpviewer.SiteInfo.html" /> <keyword name="SiteInfoDialog" id="SiteInfoDialog" ref="eric5.Helpviewer.SiteInfo.SiteInfoDialog.html#SiteInfoDialog" /> <keyword name="SiteInfoDialog (Constructor)" id="SiteInfoDialog (Constructor)" ref="eric5.Helpviewer.SiteInfo.SiteInfoDialog.html#SiteInfoDialog.__init__" /> @@ -9220,7 +9223,7 @@ <keyword name="StartDialog.on_buttonBox_clicked" id="StartDialog.on_buttonBox_clicked" ref="eric5.Debugger.StartDialog.html#StartDialog.on_buttonBox_clicked" /> <keyword name="StartDialog.on_dirButton_clicked" id="StartDialog.on_dirButton_clicked" ref="eric5.Debugger.StartDialog.html#StartDialog.on_dirButton_clicked" /> <keyword name="StartDialog.on_modFuncCombo_editTextChanged" id="StartDialog.on_modFuncCombo_editTextChanged" ref="eric5.Debugger.StartDialog.html#StartDialog.on_modFuncCombo_editTextChanged" /> - <keyword name="Startup (Module)" id="Startup (Module)" ref="eric5.Utilities.Startup.html" /> + <keyword name="Startup (Module)" id="Startup (Module)" ref="eric5.Toolbox.Startup.html" /> <keyword name="StatusMonitorLed" id="StatusMonitorLed" ref="eric5.VCS.StatusMonitorLed.html#StatusMonitorLed" /> <keyword name="StatusMonitorLed (Constructor)" id="StatusMonitorLed (Constructor)" ref="eric5.VCS.StatusMonitorLed.html#StatusMonitorLed.__init__" /> <keyword name="StatusMonitorLed (Module)" id="StatusMonitorLed (Module)" ref="eric5.VCS.StatusMonitorLed.html" /> @@ -10584,6 +10587,7 @@ <keyword name="ToolGroupConfigurationDialog.on_groupsList_currentRowChanged" id="ToolGroupConfigurationDialog.on_groupsList_currentRowChanged" ref="eric5.Preferences.ToolGroupConfigurationDialog.html#ToolGroupConfigurationDialog.on_groupsList_currentRowChanged" /> <keyword name="ToolGroupConfigurationDialog.on_newButton_clicked" id="ToolGroupConfigurationDialog.on_newButton_clicked" ref="eric5.Preferences.ToolGroupConfigurationDialog.html#ToolGroupConfigurationDialog.on_newButton_clicked" /> <keyword name="ToolGroupConfigurationDialog.on_upButton_clicked" id="ToolGroupConfigurationDialog.on_upButton_clicked" ref="eric5.Preferences.ToolGroupConfigurationDialog.html#ToolGroupConfigurationDialog.on_upButton_clicked" /> + <keyword name="Toolbox (Package)" id="Toolbox (Package)" ref="index-eric5.Toolbox.html" /> <keyword name="Tools (Module)" id="Tools (Module)" ref="eric5.UtilitiesPython2.Tools.html" /> <keyword name="Tools (Package)" id="Tools (Package)" ref="index-eric5.Tools.html" /> <keyword name="Translation" id="Translation" ref="eric5.Tools.TRPreviewer.html#Translation" /> @@ -11803,7 +11807,7 @@ <keyword name="changeRememberedMaster" id="changeRememberedMaster" ref="eric5.Utilities.crypto.__init__.html#changeRememberedMaster" /> <keyword name="check" id="check" ref="eric5.Plugins.CheckerPlugins.Tabnanny.Tabnanny.html#check" /> <keyword name="check" id="check" ref="eric5.UtilitiesPython2.Tabnanny.html#check" /> - <keyword name="checkBlacklistedVersions" id="checkBlacklistedVersions" ref="eric5.Utilities.__init__.html#checkBlacklistedVersions" /> + <keyword name="checkBlacklistedVersions" id="checkBlacklistedVersions" ref="eric5.Globals.__init__.html#checkBlacklistedVersions" /> <keyword name="checkPyside" id="checkPyside" ref="eric5.Utilities.__init__.html#checkPyside" /> <keyword name="checker (Module)" id="checker (Module)" ref="eric5.Utilities.py3flakes.checker.html" /> <keyword name="checker (Module)" id="checker (Module)" ref="eric5.UtilitiesPython2.py2flakes.checker.html" /> @@ -12008,7 +12012,7 @@ <keyword name="getConfigData" id="getConfigData" ref="eric5.Plugins.PluginVcsMercurial.html#getConfigData" /> <keyword name="getConfigData" id="getConfigData" ref="eric5.Plugins.PluginVcsPySvn.html#getConfigData" /> <keyword name="getConfigData" id="getConfigData" ref="eric5.Plugins.PluginVcsSubversion.html#getConfigData" /> - <keyword name="getConfigDir" id="getConfigDir" ref="eric5.Utilities.__init__.html#getConfigDir" /> + <keyword name="getConfigDir" id="getConfigDir" ref="eric5.Globals.__init__.html#getConfigDir" /> <keyword name="getConfigDir" id="getConfigDir" ref="eric5.install-i18n.html#getConfigDir" /> <keyword name="getConfigPath" id="getConfigPath" ref="eric5.Plugins.VcsPlugins.vcsMercurial.HgUtilities.html#getConfigPath" /> <keyword name="getConfigPath" id="getConfigPath" ref="eric5.Plugins.VcsPlugins.vcsPySvn.SvnUtilities.html#getConfigPath" /> @@ -12128,7 +12132,7 @@ <keyword name="getuser" id="getuser" ref="eric5.DebugClients.Python.getpass.html#getuser" /> <keyword name="getuser" id="getuser" ref="eric5.DebugClients.Python3.getpass.html#getuser" /> <keyword name="gpg (Module)" id="gpg (Module)" ref="eric5.Plugins.VcsPlugins.vcsMercurial.GpgExtension.gpg.html" /> - <keyword name="handleArgs" id="handleArgs" ref="eric5.Utilities.Startup.html#handleArgs" /> + <keyword name="handleArgs" id="handleArgs" ref="eric5.Toolbox.Startup.html#handleArgs" /> <keyword name="handleSingleApplication" id="handleSingleApplication" ref="eric5.eric5.html#handleSingleApplication" /> <keyword name="hasEnvironmentEntry" id="hasEnvironmentEntry" ref="eric5.Utilities.__init__.html#hasEnvironmentEntry" /> <keyword name="hashPassword" id="hashPassword" ref="eric5.Utilities.crypto.py3PBKDF2.html#hashPassword" /> @@ -12154,7 +12158,7 @@ <keyword name="initGlobals" id="initGlobals" ref="eric5.uninstall.html#initGlobals" /> <keyword name="initPreferences" id="initPreferences" ref="eric5.Preferences.__init__.html#initPreferences" /> <keyword name="initRecentSettings" id="initRecentSettings" ref="eric5.Preferences.__init__.html#initRecentSettings" /> - <keyword name="initializeResourceSearchPath" id="initializeResourceSearchPath" ref="eric5.Utilities.Startup.html#initializeResourceSearchPath" /> + <keyword name="initializeResourceSearchPath" id="initializeResourceSearchPath" ref="eric5.Toolbox.Startup.html#initializeResourceSearchPath" /> <keyword name="input_dir" id="input_dir" ref="eric5.Plugins.CheckerPlugins.Pep8.pep8.html#input_dir" /> <keyword name="input_dir" id="input_dir" ref="eric5.UtilitiesPython2.pep8.html#input_dir" /> <keyword name="input_file" id="input_file" ref="eric5.Plugins.CheckerPlugins.Pep8.pep8.html#input_file" /> @@ -12175,8 +12179,8 @@ <keyword name="iter_child_nodes" id="iter_child_nodes" ref="eric5.UtilitiesPython2.py2flakes.checker.html#iter_child_nodes" /> <keyword name="joinext" id="joinext" ref="eric5.Utilities.__init__.html#joinext" /> <keyword name="linesep" id="linesep" ref="eric5.Utilities.__init__.html#linesep" /> - <keyword name="loadTranslatorForLocale" id="loadTranslatorForLocale" ref="eric5.Utilities.Startup.html#loadTranslatorForLocale" /> - <keyword name="loadTranslators" id="loadTranslators" ref="eric5.Utilities.Startup.html#loadTranslators" /> + <keyword name="loadTranslatorForLocale" id="loadTranslatorForLocale" ref="eric5.Toolbox.Startup.html#loadTranslatorForLocale" /> + <keyword name="loadTranslators" id="loadTranslators" ref="eric5.Toolbox.Startup.html#loadTranslators" /> <keyword name="main" id="main" ref="eric5.DataViews.CodeMetrics.html#main" /> <keyword name="main" id="main" ref="eric5.compileUiFiles.html#main" /> <keyword name="main" id="main" ref="eric5.eric5.html#main" /> @@ -12203,7 +12207,7 @@ <keyword name="main" id="main" ref="eric5.install.html#main" /> <keyword name="main" id="main" ref="eric5.patch_modpython.html#main" /> <keyword name="main" id="main" ref="eric5.uninstall.html#main" /> - <keyword name="makeAppInfo" id="makeAppInfo" ref="eric5.Utilities.Startup.html#makeAppInfo" /> + <keyword name="makeAppInfo" id="makeAppInfo" ref="eric5.Globals.AppInfo.html#makeAppInfo" /> <keyword name="make_thread_list" id="make_thread_list" ref="eric5.DebugClients.Ruby.Debuggee.html#make_thread_list" /> <keyword name="maximum_line_length" id="maximum_line_length" ref="eric5.Plugins.CheckerPlugins.Pep8.pep8.html#maximum_line_length" /> <keyword name="maximum_line_length" id="maximum_line_length" ref="eric5.UtilitiesPython2.pep8.html#maximum_line_length" /> @@ -12287,6 +12291,7 @@ <keyword name="readPlist" id="readPlist" ref="eric5.Utilities.binplistlib.html#readPlist" /> <keyword name="readPlistFromBytes" id="readPlistFromBytes" ref="eric5.Utilities.binplistlib.html#readPlistFromBytes" /> <keyword name="readShortcuts" id="readShortcuts" ref="eric5.Preferences.Shortcuts.html#readShortcuts" /> + <keyword name="readStringFromStream" id="readStringFromStream" ref="eric5.Utilities.__init__.html#readStringFromStream" /> <keyword name="readToolGroups" id="readToolGroups" ref="eric5.Preferences.__init__.html#readToolGroups" /> <keyword name="readline" id="readline" ref="eric5.DebugClients.Ruby.AsyncFile.html#readline" /> <keyword name="readlines" id="readlines" ref="eric5.DebugClients.Ruby.AsyncFile.html#readlines" /> @@ -12325,7 +12330,7 @@ <keyword name="selftest" id="selftest" ref="eric5.Plugins.CheckerPlugins.Pep8.pep8.html#selftest" /> <keyword name="selftest" id="selftest" ref="eric5.UtilitiesPython2.pep8.html#selftest" /> <keyword name="setActions" id="setActions" ref="eric5.Preferences.Shortcuts.html#setActions" /> - <keyword name="setConfigDir" id="setConfigDir" ref="eric5.Utilities.__init__.html#setConfigDir" /> + <keyword name="setConfigDir" id="setConfigDir" ref="eric5.Globals.__init__.html#setConfigDir" /> <keyword name="setCooperation" id="setCooperation" ref="eric5.Preferences.__init__.html#setCooperation" /> <keyword name="setCorba" id="setCorba" ref="eric5.Preferences.__init__.html#setCorba" /> <keyword name="setDebugger" id="setDebugger" ref="eric5.Preferences.__init__.html#setDebugger" /> @@ -12343,7 +12348,7 @@ <keyword name="setHelp" id="setHelp" ref="eric5.Preferences.__init__.html#setHelp" /> <keyword name="setIconEditor" id="setIconEditor" ref="eric5.Preferences.__init__.html#setIconEditor" /> <keyword name="setIcons" id="setIcons" ref="eric5.Preferences.__init__.html#setIcons" /> - <keyword name="setLibraryPaths" id="setLibraryPaths" ref="eric5.Utilities.Startup.html#setLibraryPaths" /> + <keyword name="setLibraryPaths" id="setLibraryPaths" ref="eric5.Toolbox.Startup.html#setLibraryPaths" /> <keyword name="setMultiProject" id="setMultiProject" ref="eric5.Preferences.__init__.html#setMultiProject" /> <keyword name="setPluginManager" id="setPluginManager" ref="eric5.Preferences.__init__.html#setPluginManager" /> <keyword name="setPrinter" id="setPrinter" ref="eric5.Preferences.__init__.html#setPrinter" /> @@ -12371,7 +12376,7 @@ <keyword name="setVarFilters" id="setVarFilters" ref="eric5.Preferences.__init__.html#setVarFilters" /> <keyword name="setViewManager" id="setViewManager" ref="eric5.Preferences.__init__.html#setViewManager" /> <keyword name="shouldResetLayout" id="shouldResetLayout" ref="eric5.Preferences.__init__.html#shouldResetLayout" /> - <keyword name="simpleAppStartup" id="simpleAppStartup" ref="eric5.Utilities.Startup.html#simpleAppStartup" /> + <keyword name="simpleAppStartup" id="simpleAppStartup" ref="eric5.Toolbox.Startup.html#simpleAppStartup" /> <keyword name="sort" id="sort" ref="eric5.Graphics.GraphicsUtilities.html#sort" /> <keyword name="splitPath" id="splitPath" ref="eric5.Utilities.__init__.html#splitPath" /> <keyword name="startDebugger" id="startDebugger" ref="eric5.DebugClients.Python.eric5dbgstub.html#startDebugger" /> @@ -12409,7 +12414,7 @@ <keyword name="uninstall (Module)" id="uninstall (Module)" ref="eric5.uninstall.html" /> <keyword name="uninstallEric" id="uninstallEric" ref="eric5.uninstall.html#uninstallEric" /> <keyword name="unregisterLexer" id="unregisterLexer" ref="eric5.QScintilla.Lexers.__init__.html#unregisterLexer" /> - <keyword name="usage" id="usage" ref="eric5.Utilities.Startup.html#usage" /> + <keyword name="usage" id="usage" ref="eric5.Toolbox.Startup.html#usage" /> <keyword name="usage" id="usage" ref="eric5.eric5_api.html#usage" /> <keyword name="usage" id="usage" ref="eric5.eric5_doc.html#usage" /> <keyword name="usage" id="usage" ref="eric5.install-i18n.html#usage" /> @@ -12423,7 +12428,7 @@ <keyword name="vcsPySvn (Package)" id="vcsPySvn (Package)" ref="index-eric5.Plugins.VcsPlugins.vcsPySvn.html" /> <keyword name="vcsSubversion (Package)" id="vcsSubversion (Package)" ref="index-eric5.Plugins.VcsPlugins.vcsSubversion.html" /> <keyword name="verifyPassword" id="verifyPassword" ref="eric5.Utilities.crypto.py3PBKDF2.html#verifyPassword" /> - <keyword name="version" id="version" ref="eric5.Utilities.Startup.html#version" /> + <keyword name="version" id="version" ref="eric5.Toolbox.Startup.html#version" /> <keyword name="version" id="version" ref="eric5.eric5_api.html#version" /> <keyword name="version" id="version" ref="eric5.eric5_doc.html#version" /> <keyword name="warning" id="warning" ref="eric5.E5Gui.E5MessageBox.html#warning" /> @@ -12583,6 +12588,7 @@ <file>eric5.E5XML.UserProjectWriter.html</file> <file>eric5.E5XML.XMLStreamReaderBase.html</file> <file>eric5.E5XML.XMLStreamWriterBase.html</file> + <file>eric5.Globals.AppInfo.html</file> <file>eric5.Globals.__init__.html</file> <file>eric5.Graphics.ApplicationDiagramBuilder.html</file> <file>eric5.Graphics.AssociationItem.html</file> @@ -13129,6 +13135,8 @@ <file>eric5.Templates.TemplatePropertiesDialog.html</file> <file>eric5.Templates.TemplateSingleVariableDialog.html</file> <file>eric5.Templates.TemplateViewer.html</file> + <file>eric5.Toolbox.SingleApplication.html</file> + <file>eric5.Toolbox.Startup.html</file> <file>eric5.Tools.TRPreviewer.html</file> <file>eric5.Tools.TRSingleApplication.html</file> <file>eric5.Tools.TrayStarter.html</file> @@ -13162,8 +13170,6 @@ <file>eric5.Utilities.FtpUtilities.html</file> <file>eric5.Utilities.ModuleParser.html</file> <file>eric5.Utilities.PasswordChecker.html</file> - <file>eric5.Utilities.SingleApplication.html</file> - <file>eric5.Utilities.Startup.html</file> <file>eric5.Utilities.__init__.html</file> <file>eric5.Utilities.binplistlib.html</file> <file>eric5.Utilities.crypto.__init__.html</file> @@ -13306,6 +13312,7 @@ <file>index-eric5.SqlBrowser.html</file> <file>index-eric5.Tasks.html</file> <file>index-eric5.Templates.html</file> + <file>index-eric5.Toolbox.html</file> <file>index-eric5.Tools.html</file> <file>index-eric5.UI.html</file> <file>index-eric5.Utilities.ClassBrowsers.html</file>
--- a/Documentation/Source/eric5.E5Gui.E5Application.html Mon Oct 01 19:55:49 2012 +0200 +++ b/Documentation/Source/eric5.E5Gui.E5Application.html Tue Oct 02 19:53:31 2012 +0200 @@ -85,10 +85,7 @@ </table> <h3>Static Methods</h3> <table> -<tr> -<td><a href="#E5Application.palette">palette</a></td> -<td>Static method to get compatibility between Qt4 QApplication and Qt5 QGuiApplication.</td> -</tr> +<tr><td>None</td></tr> </table> <a NAME="E5Application.__init__" ID="E5Application.__init__"></a> <h4>E5Application (Constructor)</h4> @@ -220,17 +217,6 @@ <dd> name of the plugin object (string) </dd> -</dl><a NAME="E5Application.palette" ID="E5Application.palette"></a> -<h4>E5Application.palette (static)</h4> -<b>palette</b>(<i></i>) -<p> - Static method to get compatibility between Qt4 QApplication and - Qt5 QGuiApplication. -</p><dl> -<dt>Returns:</dt> -<dd> -reference to the global palette (QPalette) -</dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr />
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Documentation/Source/eric5.Globals.AppInfo.html Tue Oct 02 19:53:31 2012 +0200 @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' +'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> +<html><head> +<title>eric5.Globals.AppInfo</title> +<style> +body { + background: #EDECE6; + margin: 0em 1em 10em 1em; + color: black; +} + +h1 { color: white; background: #85774A; } +h2 { color: white; background: #85774A; } +h3 { color: white; background: #9D936E; } +h4 { color: white; background: #9D936E; } + +a { color: #BA6D36; } + +</style> +</head> +<body><a NAME="top" ID="top"></a> +<h1>eric5.Globals.AppInfo</h1> +<p> +Module implementing a function to generate an application info. +</p> +<h3>Global Attributes</h3> +<table> +<tr><td>None</td></tr> +</table> +<h3>Classes</h3> +<table> +<tr><td>None</td></tr> +</table> +<h3>Functions</h3> +<table> +<tr> +<td><a href="#makeAppInfo">makeAppInfo</a></td> +<td>Module function to generate a dictionary describing the application.</td> +</tr> +</table> +<hr /><hr /> +<a NAME="makeAppInfo" ID="makeAppInfo"></a> +<h2>makeAppInfo</h2> +<b>makeAppInfo</b>(<i>argv, name, arg, description, options=[]</i>) +<p> + Module function to generate a dictionary describing the application. +</p><dl> +<dt><i>argv</i></dt> +<dd> +list of commandline parameters (list of strings) +</dd><dt><i>name</i></dt> +<dd> +name of the application (string) +</dd><dt><i>arg</i></dt> +<dd> +commandline arguments (string) +</dd><dt><i>description</i></dt> +<dd> +text describing the application (string) +</dd><dt><i>options</i></dt> +<dd> +list of additional commandline options + (list of tuples of two strings (commandline option, option description)). + The options --version, --help and -h are always present and must not + be repeated in this list. +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +dictionary describing the application +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /> +</body></html> \ No newline at end of file
--- a/Documentation/Source/eric5.Globals.__init__.html Mon Oct 01 19:55:49 2012 +0200 +++ b/Documentation/Source/eric5.Globals.__init__.html Tue Oct 02 19:53:31 2012 +0200 @@ -26,7 +26,7 @@ </p> <h3>Global Attributes</h3> <table> -<tr><td>recentNameFiles</td></tr><tr><td>recentNameHosts</td></tr><tr><td>recentNameMultiProject</td></tr><tr><td>recentNameProject</td></tr><tr><td>settingsNameGlobal</td></tr><tr><td>settingsNameOrganization</td></tr><tr><td>settingsNameRecent</td></tr> +<tr><td>configDir</td></tr><tr><td>recentNameFiles</td></tr><tr><td>recentNameHosts</td></tr><tr><td>recentNameMultiProject</td></tr><tr><td>recentNameProject</td></tr><tr><td>settingsNameGlobal</td></tr><tr><td>settingsNameOrganization</td></tr><tr><td>settingsNameRecent</td></tr> </table> <h3>Classes</h3> <table> @@ -35,9 +35,15 @@ <h3>Functions</h3> <table> <tr> +<td><a href="#checkBlacklistedVersions">checkBlacklistedVersions</a></td> +<td>Module functions to check for blacklisted versions of the prerequisites.</td> +</tr><tr> <td><a href="#findPython2Interpreters">findPython2Interpreters</a></td> <td>Module function for searching a Python2 interpreter.</td> </tr><tr> +<td><a href="#getConfigDir">getConfigDir</a></td> +<td>Module function to get the name of the directory storing the config data.</td> +</tr><tr> <td><a href="#isLinuxPlatform">isLinuxPlatform</a></td> <td>Function to check, if this is a Linux platform.</td> </tr><tr> @@ -46,9 +52,25 @@ </tr><tr> <td><a href="#isWindowsPlatform">isWindowsPlatform</a></td> <td>Function to check, if this is a Windows platform.</td> +</tr><tr> +<td><a href="#setConfigDir">setConfigDir</a></td> +<td>Module function to set the name of the directory storing the config data.</td> </tr> </table> <hr /><hr /> +<a NAME="checkBlacklistedVersions" ID="checkBlacklistedVersions"></a> +<h2>checkBlacklistedVersions</h2> +<b>checkBlacklistedVersions</b>(<i></i>) +<p> + Module functions to check for blacklisted versions of the prerequisites. +</p><dl> +<dt>Returns:</dt> +<dd> +flag indicating good versions were found (boolean) +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> <a NAME="findPython2Interpreters" ID="findPython2Interpreters"></a> <h2>findPython2Interpreters</h2> <b>findPython2Interpreters</b>(<i></i>) @@ -62,6 +84,19 @@ </dl> <div align="right"><a href="#top">Up</a></div> <hr /><hr /> +<a NAME="getConfigDir" ID="getConfigDir"></a> +<h2>getConfigDir</h2> +<b>getConfigDir</b>(<i></i>) +<p> + Module function to get the name of the directory storing the config data. +</p><dl> +<dt>Returns:</dt> +<dd> +directory name of the config dir (string) +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> <a NAME="isLinuxPlatform" ID="isLinuxPlatform"></a> <h2>isLinuxPlatform</h2> <b>isLinuxPlatform</b>(<i></i>) @@ -100,5 +135,18 @@ </dd> </dl> <div align="right"><a href="#top">Up</a></div> +<hr /><hr /> +<a NAME="setConfigDir" ID="setConfigDir"></a> +<h2>setConfigDir</h2> +<b>setConfigDir</b>(<i>d</i>) +<p> + Module function to set the name of the directory storing the config data. +</p><dl> +<dt><i>d</i></dt> +<dd> +name of an existing directory (string) +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> <hr /> </body></html> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Documentation/Source/eric5.Toolbox.SingleApplication.html Tue Oct 02 19:53:31 2012 +0200 @@ -0,0 +1,240 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' +'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> +<html><head> +<title>eric5.Toolbox.SingleApplication</title> +<style> +body { + background: #EDECE6; + margin: 0em 1em 10em 1em; + color: black; +} + +h1 { color: white; background: #85774A; } +h2 { color: white; background: #85774A; } +h3 { color: white; background: #9D936E; } +h4 { color: white; background: #9D936E; } + +a { color: #BA6D36; } + +</style> +</head> +<body><a NAME="top" ID="top"></a> +<h1>eric5.Toolbox.SingleApplication</h1> +<p> +Module implementing the single application server and client. +</p> +<h3>Global Attributes</h3> +<table> +<tr><td>None</td></tr> +</table> +<h3>Classes</h3> +<table> +<tr> +<td><a href="#SingleApplicationClient">SingleApplicationClient</a></td> +<td>Class implementing the single application client base class.</td> +</tr><tr> +<td><a href="#SingleApplicationServer">SingleApplicationServer</a></td> +<td>Class implementing the single application server base class.</td> +</tr> +</table> +<h3>Functions</h3> +<table> +<tr><td>None</td></tr> +</table> +<hr /><hr /> +<a NAME="SingleApplicationClient" ID="SingleApplicationClient"></a> +<h2>SingleApplicationClient</h2> +<p> + Class implementing the single application client base class. +</p> +<h3>Derived from</h3> +object +<h3>Class Attributes</h3> +<table> +<tr><td>None</td></tr> +</table> +<h3>Class Methods</h3> +<table> +<tr><td>None</td></tr> +</table> +<h3>Methods</h3> +<table> +<tr> +<td><a href="#SingleApplicationClient.__init__">SingleApplicationClient</a></td> +<td>Constructor</td> +</tr><tr> +<td><a href="#SingleApplicationClient.connect">connect</a></td> +<td>Public method to connect the single application client to its server.</td> +</tr><tr> +<td><a href="#SingleApplicationClient.disconnect">disconnect</a></td> +<td>Public method to disconnect from the Single Appliocation server.</td> +</tr><tr> +<td><a href="#SingleApplicationClient.errstr">errstr</a></td> +<td>Public method to return a meaningful error string for the last error.</td> +</tr><tr> +<td><a href="#SingleApplicationClient.processArgs">processArgs</a></td> +<td>Public method to process the command line args passed to the UI.</td> +</tr><tr> +<td><a href="#SingleApplicationClient.sendCommand">sendCommand</a></td> +<td>Public method to send the command to the application server.</td> +</tr> +</table> +<h3>Static Methods</h3> +<table> +<tr><td>None</td></tr> +</table> +<a NAME="SingleApplicationClient.__init__" ID="SingleApplicationClient.__init__"></a> +<h4>SingleApplicationClient (Constructor)</h4> +<b>SingleApplicationClient</b>(<i>name</i>) +<p> + Constructor +</p><dl> +<dt><i>name</i></dt> +<dd> +name of the local server to connect to (string) +</dd> +</dl><a NAME="SingleApplicationClient.connect" ID="SingleApplicationClient.connect"></a> +<h4>SingleApplicationClient.connect</h4> +<b>connect</b>(<i></i>) +<p> + Public method to connect the single application client to its server. +</p><dl> +<dt>Returns:</dt> +<dd> +value indicating success or an error number. Value is one of: + <table> + <tr><td>0</td><td>No application is running</td></tr> + <tr><td>1</td><td>Application is already running</td></tr> + </table> +</dd> +</dl><a NAME="SingleApplicationClient.disconnect" ID="SingleApplicationClient.disconnect"></a> +<h4>SingleApplicationClient.disconnect</h4> +<b>disconnect</b>(<i></i>) +<p> + Public method to disconnect from the Single Appliocation server. +</p><a NAME="SingleApplicationClient.errstr" ID="SingleApplicationClient.errstr"></a> +<h4>SingleApplicationClient.errstr</h4> +<b>errstr</b>(<i></i>) +<p> + Public method to return a meaningful error string for the last error. +</p><dl> +<dt>Returns:</dt> +<dd> +error string for the last error (string) +</dd> +</dl><a NAME="SingleApplicationClient.processArgs" ID="SingleApplicationClient.processArgs"></a> +<h4>SingleApplicationClient.processArgs</h4> +<b>processArgs</b>(<i>args</i>) +<p> + Public method to process the command line args passed to the UI. +</p><p> + <b>Note</b>: This method must be overridden by subclasses. +</p><dl> +<dt><i>args</i></dt> +<dd> +command line args (list of strings) +</dd> +</dl><a NAME="SingleApplicationClient.sendCommand" ID="SingleApplicationClient.sendCommand"></a> +<h4>SingleApplicationClient.sendCommand</h4> +<b>sendCommand</b>(<i>cmd</i>) +<p> + Public method to send the command to the application server. +</p><dl> +<dt><i>cmd</i></dt> +<dd> +command to be sent (string) +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> +<a NAME="SingleApplicationServer" ID="SingleApplicationServer"></a> +<h2>SingleApplicationServer</h2> +<p> + Class implementing the single application server base class. +</p> +<h3>Derived from</h3> +QLocalServer +<h3>Class Attributes</h3> +<table> +<tr><td>None</td></tr> +</table> +<h3>Class Methods</h3> +<table> +<tr><td>None</td></tr> +</table> +<h3>Methods</h3> +<table> +<tr> +<td><a href="#SingleApplicationServer.__init__">SingleApplicationServer</a></td> +<td>Constructor</td> +</tr><tr> +<td><a href="#SingleApplicationServer.__disconnected">__disconnected</a></td> +<td>Private method to handle the closure of the socket.</td> +</tr><tr> +<td><a href="#SingleApplicationServer.__newConnection">__newConnection</a></td> +<td>Private slot to handle a new connection.</td> +</tr><tr> +<td><a href="#SingleApplicationServer.__parseLine">__parseLine</a></td> +<td>Private method to handle data from the client.</td> +</tr><tr> +<td><a href="#SingleApplicationServer.handleCommand">handleCommand</a></td> +<td>Public slot to handle the command sent by the client.</td> +</tr><tr> +<td><a href="#SingleApplicationServer.shutdown">shutdown</a></td> +<td>Public method used to shut down the server.</td> +</tr> +</table> +<h3>Static Methods</h3> +<table> +<tr><td>None</td></tr> +</table> +<a NAME="SingleApplicationServer.__init__" ID="SingleApplicationServer.__init__"></a> +<h4>SingleApplicationServer (Constructor)</h4> +<b>SingleApplicationServer</b>(<i>name</i>) +<p> + Constructor +</p><dl> +<dt><i>name</i></dt> +<dd> +name this server is listening to (string) +</dd> +</dl><a NAME="SingleApplicationServer.__disconnected" ID="SingleApplicationServer.__disconnected"></a> +<h4>SingleApplicationServer.__disconnected</h4> +<b>__disconnected</b>(<i></i>) +<p> + Private method to handle the closure of the socket. +</p><a NAME="SingleApplicationServer.__newConnection" ID="SingleApplicationServer.__newConnection"></a> +<h4>SingleApplicationServer.__newConnection</h4> +<b>__newConnection</b>(<i></i>) +<p> + Private slot to handle a new connection. +</p><a NAME="SingleApplicationServer.__parseLine" ID="SingleApplicationServer.__parseLine"></a> +<h4>SingleApplicationServer.__parseLine</h4> +<b>__parseLine</b>(<i></i>) +<p> + Private method to handle data from the client. +</p><a NAME="SingleApplicationServer.handleCommand" ID="SingleApplicationServer.handleCommand"></a> +<h4>SingleApplicationServer.handleCommand</h4> +<b>handleCommand</b>(<i>cmd, params</i>) +<p> + Public slot to handle the command sent by the client. +</p><p> + <b>Note</b>: This method must be overridden by subclasses. +</p><dl> +<dt><i>cmd</i></dt> +<dd> +commandstring (string) +</dd><dt><i>params</i></dt> +<dd> +parameterstring (string) +</dd> +</dl><a NAME="SingleApplicationServer.shutdown" ID="SingleApplicationServer.shutdown"></a> +<h4>SingleApplicationServer.shutdown</h4> +<b>shutdown</b>(<i></i>) +<p> + Public method used to shut down the server. +</p> +<div align="right"><a href="#top">Up</a></div> +<hr /> +</body></html> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Documentation/Source/eric5.Toolbox.Startup.html Tue Oct 02 19:53:31 2012 +0200 @@ -0,0 +1,214 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' +'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> +<html><head> +<title>eric5.Toolbox.Startup</title> +<style> +body { + background: #EDECE6; + margin: 0em 1em 10em 1em; + color: black; +} + +h1 { color: white; background: #85774A; } +h2 { color: white; background: #85774A; } +h3 { color: white; background: #9D936E; } +h4 { color: white; background: #9D936E; } + +a { color: #BA6D36; } + +</style> +</head> +<body><a NAME="top" ID="top"></a> +<h1>eric5.Toolbox.Startup</h1> +<p> +Module implementing some startup helper funcions +</p> +<h3>Global Attributes</h3> +<table> +<tr><td>loaded_translators</td></tr> +</table> +<h3>Classes</h3> +<table> +<tr><td>None</td></tr> +</table> +<h3>Functions</h3> +<table> +<tr> +<td><a href="#handleArgs">handleArgs</a></td> +<td>Module function to handle the always present commandline options.</td> +</tr><tr> +<td><a href="#initializeResourceSearchPath">initializeResourceSearchPath</a></td> +<td>Module function to initialize the default mime source factory.</td> +</tr><tr> +<td><a href="#loadTranslatorForLocale">loadTranslatorForLocale</a></td> +<td>Module function to find and load a specific translation.</td> +</tr><tr> +<td><a href="#loadTranslators">loadTranslators</a></td> +<td>Module function to load all required translations.</td> +</tr><tr> +<td><a href="#setLibraryPaths">setLibraryPaths</a></td> +<td>Module function to set the Qt library paths correctly for windows systems.</td> +</tr><tr> +<td><a href="#simpleAppStartup">simpleAppStartup</a></td> +<td>Module function to start up an application that doesn't need a specialized start up.</td> +</tr><tr> +<td><a href="#usage">usage</a></td> +<td>Module function to show the usage information.</td> +</tr><tr> +<td><a href="#version">version</a></td> +<td>Module function to show the version information.</td> +</tr> +</table> +<hr /><hr /> +<a NAME="handleArgs" ID="handleArgs"></a> +<h2>handleArgs</h2> +<b>handleArgs</b>(<i>argv, appinfo</i>) +<p> + Module function to handle the always present commandline options. +</p><dl> +<dt><i>argv</i></dt> +<dd> +list of commandline parameters (list of strings) +</dd><dt><i>appinfo</i></dt> +<dd> +dictionary describing the application +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +index of the '--' option (integer). This is used to tell + the application, that all additional options don't belong to + the application. +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> +<a NAME="initializeResourceSearchPath" ID="initializeResourceSearchPath"></a> +<h2>initializeResourceSearchPath</h2> +<b>initializeResourceSearchPath</b>(<i></i>) +<p> + Module function to initialize the default mime source factory. +</p> +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> +<a NAME="loadTranslatorForLocale" ID="loadTranslatorForLocale"></a> +<h2>loadTranslatorForLocale</h2> +<b>loadTranslatorForLocale</b>(<i>dirs, tn</i>) +<p> + Module function to find and load a specific translation. +</p><dl> +<dt><i>dirs</i></dt> +<dd> +Searchpath for the translations. (list of strings) +</dd><dt><i>tn</i></dt> +<dd> +The translation to be loaded. (string) +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +Tuple of a status flag and the loaded translator. (int, QTranslator) +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> +<a NAME="loadTranslators" ID="loadTranslators"></a> +<h2>loadTranslators</h2> +<b>loadTranslators</b>(<i>qtTransDir, app, translationFiles=()</i>) +<p> + Module function to load all required translations. +</p><dl> +<dt><i>qtTransDir</i></dt> +<dd> +directory of the Qt translations files (string) +</dd><dt><i>app</i></dt> +<dd> +reference to the application object (QApplication) +</dd><dt><i>translationFiles</i></dt> +<dd> +tuple of additional translations to + be loaded (tuple of strings) +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +the requested locale (string) +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> +<a NAME="setLibraryPaths" ID="setLibraryPaths"></a> +<h2>setLibraryPaths</h2> +<b>setLibraryPaths</b>(<i></i>) +<p> + Module function to set the Qt library paths correctly for windows systems. +</p> +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> +<a NAME="simpleAppStartup" ID="simpleAppStartup"></a> +<h2>simpleAppStartup</h2> +<b>simpleAppStartup</b>(<i>argv, appinfo, mwFactory, quitOnLastWindowClosed=True, app=None, raiseIt=True</i>) +<p> + Module function to start up an application that doesn't need a specialized start up. +</p><p> + This function is used by all of eric5's helper programs. +</p><dl> +<dt><i>argv</i></dt> +<dd> +list of commandline parameters (list of strings) +</dd><dt><i>appinfo</i></dt> +<dd> +dictionary describing the application +</dd><dt><i>mwFactory</i></dt> +<dd> +factory function generating the main widget. This + function must accept the following parameter. + <dl> + <dt>argv</dt> + <dd>list of commandline parameters (list of strings)</dd> + </dl> +</dd><dt><i>quitOnLastWindowClosed=</i></dt> +<dd> +flag indicating to quit the application, + if the last window was closed (boolean) +</dd><dt><i>app=</i></dt> +<dd> +reference to the application object (QApplication or None) +</dd><dt><i>raiseIt=</i></dt> +<dd> +flag indicating to raise the generated application window (boolean) +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> +<a NAME="usage" ID="usage"></a> +<h2>usage</h2> +<b>usage</b>(<i>appinfo, optlen=12</i>) +<p> + Module function to show the usage information. +</p><dl> +<dt><i>appinfo</i></dt> +<dd> +dictionary describing the application +</dd><dt><i>optlen</i></dt> +<dd> +length of the field for the commandline option (integer) +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> +<a NAME="version" ID="version"></a> +<h2>version</h2> +<b>version</b>(<i>appinfo</i>) +<p> + Module function to show the version information. +</p><dl> +<dt><i>appinfo</i></dt> +<dd> +dictionary describing the application +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /> +</body></html> \ No newline at end of file
--- a/Documentation/Source/eric5.Utilities.SingleApplication.html Mon Oct 01 19:55:49 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,240 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' -'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> -<html><head> -<title>eric5.Utilities.SingleApplication</title> -<style> -body { - background: #EDECE6; - margin: 0em 1em 10em 1em; - color: black; -} - -h1 { color: white; background: #85774A; } -h2 { color: white; background: #85774A; } -h3 { color: white; background: #9D936E; } -h4 { color: white; background: #9D936E; } - -a { color: #BA6D36; } - -</style> -</head> -<body><a NAME="top" ID="top"></a> -<h1>eric5.Utilities.SingleApplication</h1> -<p> -Module implementing the single application server and client. -</p> -<h3>Global Attributes</h3> -<table> -<tr><td>None</td></tr> -</table> -<h3>Classes</h3> -<table> -<tr> -<td><a href="#SingleApplicationClient">SingleApplicationClient</a></td> -<td>Class implementing the single application client base class.</td> -</tr><tr> -<td><a href="#SingleApplicationServer">SingleApplicationServer</a></td> -<td>Class implementing the single application server base class.</td> -</tr> -</table> -<h3>Functions</h3> -<table> -<tr><td>None</td></tr> -</table> -<hr /><hr /> -<a NAME="SingleApplicationClient" ID="SingleApplicationClient"></a> -<h2>SingleApplicationClient</h2> -<p> - Class implementing the single application client base class. -</p> -<h3>Derived from</h3> -object -<h3>Class Attributes</h3> -<table> -<tr><td>None</td></tr> -</table> -<h3>Class Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<h3>Methods</h3> -<table> -<tr> -<td><a href="#SingleApplicationClient.__init__">SingleApplicationClient</a></td> -<td>Constructor</td> -</tr><tr> -<td><a href="#SingleApplicationClient.connect">connect</a></td> -<td>Public method to connect the single application client to its server.</td> -</tr><tr> -<td><a href="#SingleApplicationClient.disconnect">disconnect</a></td> -<td>Public method to disconnect from the Single Appliocation server.</td> -</tr><tr> -<td><a href="#SingleApplicationClient.errstr">errstr</a></td> -<td>Public method to return a meaningful error string for the last error.</td> -</tr><tr> -<td><a href="#SingleApplicationClient.processArgs">processArgs</a></td> -<td>Public method to process the command line args passed to the UI.</td> -</tr><tr> -<td><a href="#SingleApplicationClient.sendCommand">sendCommand</a></td> -<td>Public method to send the command to the application server.</td> -</tr> -</table> -<h3>Static Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<a NAME="SingleApplicationClient.__init__" ID="SingleApplicationClient.__init__"></a> -<h4>SingleApplicationClient (Constructor)</h4> -<b>SingleApplicationClient</b>(<i>name</i>) -<p> - Constructor -</p><dl> -<dt><i>name</i></dt> -<dd> -name of the local server to connect to (string) -</dd> -</dl><a NAME="SingleApplicationClient.connect" ID="SingleApplicationClient.connect"></a> -<h4>SingleApplicationClient.connect</h4> -<b>connect</b>(<i></i>) -<p> - Public method to connect the single application client to its server. -</p><dl> -<dt>Returns:</dt> -<dd> -value indicating success or an error number. Value is one of: - <table> - <tr><td>0</td><td>No application is running</td></tr> - <tr><td>1</td><td>Application is already running</td></tr> - </table> -</dd> -</dl><a NAME="SingleApplicationClient.disconnect" ID="SingleApplicationClient.disconnect"></a> -<h4>SingleApplicationClient.disconnect</h4> -<b>disconnect</b>(<i></i>) -<p> - Public method to disconnect from the Single Appliocation server. -</p><a NAME="SingleApplicationClient.errstr" ID="SingleApplicationClient.errstr"></a> -<h4>SingleApplicationClient.errstr</h4> -<b>errstr</b>(<i></i>) -<p> - Public method to return a meaningful error string for the last error. -</p><dl> -<dt>Returns:</dt> -<dd> -error string for the last error (string) -</dd> -</dl><a NAME="SingleApplicationClient.processArgs" ID="SingleApplicationClient.processArgs"></a> -<h4>SingleApplicationClient.processArgs</h4> -<b>processArgs</b>(<i>args</i>) -<p> - Public method to process the command line args passed to the UI. -</p><p> - <b>Note</b>: This method must be overridden by subclasses. -</p><dl> -<dt><i>args</i></dt> -<dd> -command line args (list of strings) -</dd> -</dl><a NAME="SingleApplicationClient.sendCommand" ID="SingleApplicationClient.sendCommand"></a> -<h4>SingleApplicationClient.sendCommand</h4> -<b>sendCommand</b>(<i>cmd</i>) -<p> - Public method to send the command to the application server. -</p><dl> -<dt><i>cmd</i></dt> -<dd> -command to be sent (string) -</dd> -</dl> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="SingleApplicationServer" ID="SingleApplicationServer"></a> -<h2>SingleApplicationServer</h2> -<p> - Class implementing the single application server base class. -</p> -<h3>Derived from</h3> -QLocalServer -<h3>Class Attributes</h3> -<table> -<tr><td>None</td></tr> -</table> -<h3>Class Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<h3>Methods</h3> -<table> -<tr> -<td><a href="#SingleApplicationServer.__init__">SingleApplicationServer</a></td> -<td>Constructor</td> -</tr><tr> -<td><a href="#SingleApplicationServer.__disconnected">__disconnected</a></td> -<td>Private method to handle the closure of the socket.</td> -</tr><tr> -<td><a href="#SingleApplicationServer.__newConnection">__newConnection</a></td> -<td>Private slot to handle a new connection.</td> -</tr><tr> -<td><a href="#SingleApplicationServer.__parseLine">__parseLine</a></td> -<td>Private method to handle data from the client.</td> -</tr><tr> -<td><a href="#SingleApplicationServer.handleCommand">handleCommand</a></td> -<td>Public slot to handle the command sent by the client.</td> -</tr><tr> -<td><a href="#SingleApplicationServer.shutdown">shutdown</a></td> -<td>Public method used to shut down the server.</td> -</tr> -</table> -<h3>Static Methods</h3> -<table> -<tr><td>None</td></tr> -</table> -<a NAME="SingleApplicationServer.__init__" ID="SingleApplicationServer.__init__"></a> -<h4>SingleApplicationServer (Constructor)</h4> -<b>SingleApplicationServer</b>(<i>name</i>) -<p> - Constructor -</p><dl> -<dt><i>name</i></dt> -<dd> -name this server is listening to (string) -</dd> -</dl><a NAME="SingleApplicationServer.__disconnected" ID="SingleApplicationServer.__disconnected"></a> -<h4>SingleApplicationServer.__disconnected</h4> -<b>__disconnected</b>(<i></i>) -<p> - Private method to handle the closure of the socket. -</p><a NAME="SingleApplicationServer.__newConnection" ID="SingleApplicationServer.__newConnection"></a> -<h4>SingleApplicationServer.__newConnection</h4> -<b>__newConnection</b>(<i></i>) -<p> - Private slot to handle a new connection. -</p><a NAME="SingleApplicationServer.__parseLine" ID="SingleApplicationServer.__parseLine"></a> -<h4>SingleApplicationServer.__parseLine</h4> -<b>__parseLine</b>(<i></i>) -<p> - Private method to handle data from the client. -</p><a NAME="SingleApplicationServer.handleCommand" ID="SingleApplicationServer.handleCommand"></a> -<h4>SingleApplicationServer.handleCommand</h4> -<b>handleCommand</b>(<i>cmd, params</i>) -<p> - Public slot to handle the command sent by the client. -</p><p> - <b>Note</b>: This method must be overridden by subclasses. -</p><dl> -<dt><i>cmd</i></dt> -<dd> -commandstring (string) -</dd><dt><i>params</i></dt> -<dd> -parameterstring (string) -</dd> -</dl><a NAME="SingleApplicationServer.shutdown" ID="SingleApplicationServer.shutdown"></a> -<h4>SingleApplicationServer.shutdown</h4> -<b>shutdown</b>(<i></i>) -<p> - Public method used to shut down the server. -</p> -<div align="right"><a href="#top">Up</a></div> -<hr /> -</body></html> \ No newline at end of file
--- a/Documentation/Source/eric5.Utilities.Startup.html Mon Oct 01 19:55:49 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,250 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' -'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> -<html><head> -<title>eric5.Utilities.Startup</title> -<style> -body { - background: #EDECE6; - margin: 0em 1em 10em 1em; - color: black; -} - -h1 { color: white; background: #85774A; } -h2 { color: white; background: #85774A; } -h3 { color: white; background: #9D936E; } -h4 { color: white; background: #9D936E; } - -a { color: #BA6D36; } - -</style> -</head> -<body><a NAME="top" ID="top"></a> -<h1>eric5.Utilities.Startup</h1> -<p> -Module implementing some startup helper funcions -</p> -<h3>Global Attributes</h3> -<table> -<tr><td>loaded_translators</td></tr> -</table> -<h3>Classes</h3> -<table> -<tr><td>None</td></tr> -</table> -<h3>Functions</h3> -<table> -<tr> -<td><a href="#handleArgs">handleArgs</a></td> -<td>Module function to handle the always present commandline options.</td> -</tr><tr> -<td><a href="#initializeResourceSearchPath">initializeResourceSearchPath</a></td> -<td>Module function to initialize the default mime source factory.</td> -</tr><tr> -<td><a href="#loadTranslatorForLocale">loadTranslatorForLocale</a></td> -<td>Module function to find and load a specific translation.</td> -</tr><tr> -<td><a href="#loadTranslators">loadTranslators</a></td> -<td>Module function to load all required translations.</td> -</tr><tr> -<td><a href="#makeAppInfo">makeAppInfo</a></td> -<td>Module function to generate a dictionary describing the application.</td> -</tr><tr> -<td><a href="#setLibraryPaths">setLibraryPaths</a></td> -<td>Module function to set the Qt library paths correctly for windows systems.</td> -</tr><tr> -<td><a href="#simpleAppStartup">simpleAppStartup</a></td> -<td>Module function to start up an application that doesn't need a specialized start up.</td> -</tr><tr> -<td><a href="#usage">usage</a></td> -<td>Module function to show the usage information.</td> -</tr><tr> -<td><a href="#version">version</a></td> -<td>Module function to show the version information.</td> -</tr> -</table> -<hr /><hr /> -<a NAME="handleArgs" ID="handleArgs"></a> -<h2>handleArgs</h2> -<b>handleArgs</b>(<i>argv, appinfo</i>) -<p> - Module function to handle the always present commandline options. -</p><dl> -<dt><i>argv</i></dt> -<dd> -list of commandline parameters (list of strings) -</dd><dt><i>appinfo</i></dt> -<dd> -dictionary describing the application -</dd> -</dl><dl> -<dt>Returns:</dt> -<dd> -index of the '--' option (integer). This is used to tell - the application, that all additional options don't belong to - the application. -</dd> -</dl> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="initializeResourceSearchPath" ID="initializeResourceSearchPath"></a> -<h2>initializeResourceSearchPath</h2> -<b>initializeResourceSearchPath</b>(<i></i>) -<p> - Module function to initialize the default mime source factory. -</p> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="loadTranslatorForLocale" ID="loadTranslatorForLocale"></a> -<h2>loadTranslatorForLocale</h2> -<b>loadTranslatorForLocale</b>(<i>dirs, tn</i>) -<p> - Module function to find and load a specific translation. -</p><dl> -<dt><i>dirs</i></dt> -<dd> -Searchpath for the translations. (list of strings) -</dd><dt><i>tn</i></dt> -<dd> -The translation to be loaded. (string) -</dd> -</dl><dl> -<dt>Returns:</dt> -<dd> -Tuple of a status flag and the loaded translator. (int, QTranslator) -</dd> -</dl> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="loadTranslators" ID="loadTranslators"></a> -<h2>loadTranslators</h2> -<b>loadTranslators</b>(<i>qtTransDir, app, translationFiles=()</i>) -<p> - Module function to load all required translations. -</p><dl> -<dt><i>qtTransDir</i></dt> -<dd> -directory of the Qt translations files (string) -</dd><dt><i>app</i></dt> -<dd> -reference to the application object (QApplication) -</dd><dt><i>translationFiles</i></dt> -<dd> -tuple of additional translations to - be loaded (tuple of strings) -</dd> -</dl><dl> -<dt>Returns:</dt> -<dd> -the requested locale (string) -</dd> -</dl> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="makeAppInfo" ID="makeAppInfo"></a> -<h2>makeAppInfo</h2> -<b>makeAppInfo</b>(<i>argv, name, arg, description, options=[]</i>) -<p> - Module function to generate a dictionary describing the application. -</p><dl> -<dt><i>argv</i></dt> -<dd> -list of commandline parameters (list of strings) -</dd><dt><i>name</i></dt> -<dd> -name of the application (string) -</dd><dt><i>arg</i></dt> -<dd> -commandline arguments (string) -</dd><dt><i>description</i></dt> -<dd> -text describing the application (string) -</dd><dt><i>options</i></dt> -<dd> -list of additional commandline options - (list of tuples of two strings (commandline option, option description)). - The options --version, --help and -h are always present and must not - be repeated in this list. -</dd> -</dl><dl> -<dt>Returns:</dt> -<dd> -dictionary describing the application -</dd> -</dl> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="setLibraryPaths" ID="setLibraryPaths"></a> -<h2>setLibraryPaths</h2> -<b>setLibraryPaths</b>(<i></i>) -<p> - Module function to set the Qt library paths correctly for windows systems. -</p> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="simpleAppStartup" ID="simpleAppStartup"></a> -<h2>simpleAppStartup</h2> -<b>simpleAppStartup</b>(<i>argv, appinfo, mwFactory, quitOnLastWindowClosed=True, app=None, raiseIt=True</i>) -<p> - Module function to start up an application that doesn't need a specialized start up. -</p><p> - This function is used by all of eric5's helper programs. -</p><dl> -<dt><i>argv</i></dt> -<dd> -list of commandline parameters (list of strings) -</dd><dt><i>appinfo</i></dt> -<dd> -dictionary describing the application -</dd><dt><i>mwFactory</i></dt> -<dd> -factory function generating the main widget. This - function must accept the following parameter. - <dl> - <dt>argv</dt> - <dd>list of commandline parameters (list of strings)</dd> - </dl> -</dd><dt><i>quitOnLastWindowClosed=</i></dt> -<dd> -flag indicating to quit the application, - if the last window was closed (boolean) -</dd><dt><i>app=</i></dt> -<dd> -reference to the application object (QApplication or None) -</dd><dt><i>raiseIt=</i></dt> -<dd> -flag indicating to raise the generated application window (boolean) -</dd> -</dl> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="usage" ID="usage"></a> -<h2>usage</h2> -<b>usage</b>(<i>appinfo, optlen=12</i>) -<p> - Module function to show the usage information. -</p><dl> -<dt><i>appinfo</i></dt> -<dd> -dictionary describing the application -</dd><dt><i>optlen</i></dt> -<dd> -length of the field for the commandline option (integer) -</dd> -</dl> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> -<a NAME="version" ID="version"></a> -<h2>version</h2> -<b>version</b>(<i>appinfo</i>) -<p> - Module function to show the version information. -</p><dl> -<dt><i>appinfo</i></dt> -<dd> -dictionary describing the application -</dd> -</dl> -<div align="right"><a href="#top">Up</a></div> -<hr /> -</body></html> \ No newline at end of file
--- a/Documentation/Source/eric5.Utilities.__init__.html Mon Oct 01 19:55:49 2012 +0200 +++ b/Documentation/Source/eric5.Utilities.__init__.html Tue Oct 02 19:53:31 2012 +0200 @@ -44,9 +44,6 @@ <td><a href="#_percentReplacementFunc">_percentReplacementFunc</a></td> <td>Protected function called for replacing % codes.</td> </tr><tr> -<td><a href="#checkBlacklistedVersions">checkBlacklistedVersions</a></td> -<td>Module functions to check for blacklisted versions of the prerequisites.</td> -</tr><tr> <td><a href="#checkPyside">checkPyside</a></td> <td>Module function to check the presence of PySide.</td> </tr><tr> @@ -107,9 +104,6 @@ <td><a href="#generateVersionInfo">generateVersionInfo</a></td> <td>Module function to generate a string with various version infos.</td> </tr><tr> -<td><a href="#getConfigDir">getConfigDir</a></td> -<td>Module function to get the name of the directory storing the config data.</td> -</tr><tr> <td><a href="#getDirs">getDirs</a></td> <td>Function returning a list of all directories below path.</td> </tr><tr> @@ -212,15 +206,15 @@ <td><a href="#readEncodedFileWithHash">readEncodedFileWithHash</a></td> <td>Function to read a file, calculate a hash value and decode it's contents into proper text.</td> </tr><tr> +<td><a href="#readStringFromStream">readStringFromStream</a></td> +<td>Module function to read a string from the given stream.</td> +</tr><tr> <td><a href="#relpath">relpath</a></td> <td>Return a relative version of a path.</td> </tr><tr> <td><a href="#samepath">samepath</a></td> <td>Function to compare two paths.</td> </tr><tr> -<td><a href="#setConfigDir">setConfigDir</a></td> -<td>Module function to set the name of the directory storing the config data.</td> -</tr><tr> <td><a href="#splitPath">splitPath</a></td> <td>Function to split a pathname into a directory part and a file part.</td> </tr><tr> @@ -355,19 +349,6 @@ </dl> <div align="right"><a href="#top">Up</a></div> <hr /><hr /> -<a NAME="checkBlacklistedVersions" ID="checkBlacklistedVersions"></a> -<h2>checkBlacklistedVersions</h2> -<b>checkBlacklistedVersions</b>(<i></i>) -<p> - Module functions to check for blacklisted versions of the prerequisites. -</p><dl> -<dt>Returns:</dt> -<dd> -flag indicating good versions were found (boolean) -</dd> -</dl> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> <a NAME="checkPyside" ID="checkPyside"></a> <h2>checkPyside</h2> <b>checkPyside</b>(<i></i>) @@ -772,19 +753,6 @@ </dl> <div align="right"><a href="#top">Up</a></div> <hr /><hr /> -<a NAME="getConfigDir" ID="getConfigDir"></a> -<h2>getConfigDir</h2> -<b>getConfigDir</b>(<i></i>) -<p> - Module function to get the name of the directory storing the config data. -</p><dl> -<dt>Returns:</dt> -<dd> -directory name of the config dir (string) -</dd> -</dl> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> <a NAME="getDirs" ID="getDirs"></a> <h2>getDirs</h2> <b>getDirs</b>(<i>path, excludeDirs</i>) @@ -1417,6 +1385,24 @@ </dl> <div align="right"><a href="#top">Up</a></div> <hr /><hr /> +<a NAME="readStringFromStream" ID="readStringFromStream"></a> +<h2>readStringFromStream</h2> +<b>readStringFromStream</b>(<i>stream</i>) +<p> + Module function to read a string from the given stream. +</p><dl> +<dt><i>stream</i></dt> +<dd> +data stream opened for reading (QDataStream) +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +string read from the stream (string) +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> <a NAME="relpath" ID="relpath"></a> <h2>relpath</h2> <b>relpath</b>(<i>path, start=os.path.curdir</i>) @@ -1455,19 +1441,6 @@ </dl> <div align="right"><a href="#top">Up</a></div> <hr /><hr /> -<a NAME="setConfigDir" ID="setConfigDir"></a> -<h2>setConfigDir</h2> -<b>setConfigDir</b>(<i>d</i>) -<p> - Module function to set the name of the directory storing the config data. -</p><dl> -<dt><i>d</i></dt> -<dd> -name of an existing directory (string) -</dd> -</dl> -<div align="right"><a href="#top">Up</a></div> -<hr /><hr /> <a NAME="splitPath" ID="splitPath"></a> <h2>splitPath</h2> <b>splitPath</b>(<i>name</i>)
--- a/Documentation/Source/index-eric5.Globals.html Mon Oct 01 19:55:49 2012 +0200 +++ b/Documentation/Source/index-eric5.Globals.html Tue Oct 02 19:53:31 2012 +0200 @@ -29,6 +29,9 @@ <h3>Modules</h3> <table> <tr> +<td><a href="eric5.Globals.AppInfo.html">AppInfo</a></td> +<td>Module implementing a function to generate an application info.</td> +</tr><tr> <td><a href="eric5.Globals.__init__.html">Globals</a></td> <td>Module defining common data to be used by all modules.</td> </tr>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Documentation/Source/index-eric5.Toolbox.html Tue Oct 02 19:53:31 2012 +0200 @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' +'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> +<html><head> +<title>eric5.Toolbox</title> +<style> +body { + background: #EDECE6; + margin: 0em 1em 10em 1em; + color: black; +} + +h1 { color: white; background: #85774A; } +h2 { color: white; background: #85774A; } +h3 { color: white; background: #9D936E; } +h4 { color: white; background: #9D936E; } + +a { color: #BA6D36; } + +</style> +</head> +<body> +<h1>eric5.Toolbox</h1> +<p> +Package implementing general purpose tools. +</p> + + +<h3>Modules</h3> +<table> +<tr> +<td><a href="eric5.Toolbox.SingleApplication.html">SingleApplication</a></td> +<td>Module implementing the single application server and client.</td> +</tr><tr> +<td><a href="eric5.Toolbox.Startup.html">Startup</a></td> +<td>Module implementing some startup helper funcions</td> +</tr> +</table> +</body></html> \ No newline at end of file
--- a/Documentation/Source/index-eric5.Utilities.html Mon Oct 01 19:55:49 2012 +0200 +++ b/Documentation/Source/index-eric5.Utilities.html Tue Oct 02 19:53:31 2012 +0200 @@ -54,12 +54,6 @@ <td><a href="eric5.Utilities.PasswordChecker.html">PasswordChecker</a></td> <td>Module implementing a checker for password strength</td> </tr><tr> -<td><a href="eric5.Utilities.SingleApplication.html">SingleApplication</a></td> -<td>Module implementing the single application server and client.</td> -</tr><tr> -<td><a href="eric5.Utilities.Startup.html">Startup</a></td> -<td>Module implementing some startup helper funcions</td> -</tr><tr> <td><a href="eric5.Utilities.__init__.html">Utilities</a></td> <td>Package implementing various functions/classes needed everywhere within eric5.</td> </tr><tr>
--- a/Documentation/Source/index-eric5.html Mon Oct 01 19:55:49 2012 +0200 +++ b/Documentation/Source/index-eric5.html Tue Oct 02 19:53:31 2012 +0200 @@ -103,6 +103,9 @@ <td><a href="index-eric5.Templates.html">Templates</a></td> <td>Package containing modules for the templating system.</td> </tr><tr> +<td><a href="index-eric5.Toolbox.html">Toolbox</a></td> +<td>Package implementing general purpose tools.</td> +</tr><tr> <td><a href="index-eric5.Tools.html">Tools</a></td> <td>Package implementing some useful tools used by the IDE.</td> </tr><tr>
--- a/E5Gui/E5SingleApplication.py Mon Oct 01 19:55:49 2012 +0200 +++ b/E5Gui/E5SingleApplication.py Tue Oct 02 19:53:31 2012 +0200 @@ -11,7 +11,7 @@ from E5Gui.E5Application import e5App -from Utilities.SingleApplication import SingleApplicationClient, SingleApplicationServer +from Toolbox.SingleApplication import SingleApplicationClient, SingleApplicationServer import Utilities
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Globals/AppInfo.py Tue Oct 02 19:53:31 2012 +0200 @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- + +# Copyright (c) 2012 Detlev Offenbach <detlev@die-offenbachs.de> +# + +""" +Module implementing a function to generate an application info. +""" + +from UI.Info import Version + + +def makeAppInfo(argv, name, arg, description, options=[]): + """ + Module function to generate a dictionary describing the application. + + @param argv list of commandline parameters (list of strings) + @param name name of the application (string) + @param arg commandline arguments (string) + @param description text describing the application (string) + @param options list of additional commandline options + (list of tuples of two strings (commandline option, option description)). + The options --version, --help and -h are always present and must not + be repeated in this list. + @return dictionary describing the application + """ + return { + "bin": argv[0], + "arg": arg, + "name": name, + "description": description, + "version": Version, + "options": options + }
--- a/Globals/__init__.py Mon Oct 01 19:55:49 2012 +0200 +++ b/Globals/__init__.py Tue Oct 02 19:53:31 2012 +0200 @@ -10,6 +10,8 @@ import sys import os +from PyQt4.QtCore import QDir + # names of the various settings objects settingsNameOrganization = "Eric5" settingsNameGlobal = "eric5" @@ -21,6 +23,8 @@ recentNameFiles = "Files" recentNameHosts = "Hosts6" +configDir = None + def isWindowsPlatform(): """ @@ -49,6 +53,98 @@ return sys.platform.startswith("linux") +def checkBlacklistedVersions(): + """ + Module functions to check for blacklisted versions of the prerequisites. + + @return flag indicating good versions were found (boolean) + """ + from install import BlackLists, PlatformsBlackLists + + # determine the platform dependent black list + if isWindowsPlatform(): + PlatformBlackLists = PlatformsBlackLists["windows"] + elif isLinuxPlatform(): + PlatformBlackLists = PlatformsBlackLists["linux"] + else: + PlatformBlackLists = PlatformsBlackLists["mac"] + + # check version of sip + try: + import sipconfig + sipVersion = sipconfig.Configuration().sip_version_str + # always assume, that snapshots are good + if "snapshot" not in sipVersion: + # check for blacklisted versions + for vers in BlackLists["sip"] + PlatformBlackLists["sip"]: + if vers == sipVersion: + print('Sorry, sip version {0} is not compatible with eric5.'\ + .format(vers)) + print('Please install another version.') + return False + except ImportError: + pass + + # check version of PyQt + from PyQt4.QtCore import PYQT_VERSION_STR + pyqtVersion = PYQT_VERSION_STR + # always assume, that snapshots are good + if "snapshot" not in pyqtVersion: + # check for blacklisted versions + for vers in BlackLists["PyQt4"] + PlatformBlackLists["PyQt4"]: + if vers == pyqtVersion: + print('Sorry, PyQt4 version {0} is not compatible with eric5.'\ + .format(vers)) + print('Please install another version.') + return False + + # check version of QScintilla + from PyQt4.Qsci import QSCINTILLA_VERSION_STR + scintillaVersion = QSCINTILLA_VERSION_STR + # always assume, that snapshots are new enough + if "snapshot" not in scintillaVersion: + # check for blacklisted versions + for vers in BlackLists["QScintilla2"] + PlatformBlackLists["QScintilla2"]: + if vers == scintillaVersion: + print('Sorry, QScintilla2 version {0} is not compatible with eric5.'\ + .format(vers)) + print('Please install another version.') + return False + + return True + + +def getConfigDir(): + """ + Module function to get the name of the directory storing the config data. + + @return directory name of the config dir (string) + """ + if configDir is not None and os.path.exists(configDir): + hp = configDir + else: + if isWindowsPlatform(): + cdn = "_eric5" + else: + cdn = ".eric5" + + hp = QDir.homePath() + dn = QDir(hp) + dn.mkdir(cdn) + hp += "/" + cdn + return QDir.toNativeSeparators(hp) + + +def setConfigDir(d): + """ + Module function to set the name of the directory storing the config data. + + @param d name of an existing directory (string) + """ + global configDir + configDir = os.path.expanduser(d) + + ################################################################################ ## functions for searching a Python2 interpreter ################################################################################
--- a/Helpviewer/GreaseMonkey/GreaseMonkeyManager.py Mon Oct 01 19:55:49 2012 +0200 +++ b/Helpviewer/GreaseMonkey/GreaseMonkeyManager.py Tue Oct 02 19:53:31 2012 +0200 @@ -10,7 +10,7 @@ import os from PyQt4.QtCore import pyqtSignal, QObject, QTimer, QFile, QDir, QSettings, QUrl, \ - QByteArray + QByteArray, qVersion from PyQt4.QtNetwork import QNetworkAccessManager from .GreaseMonkeyJavaScript import bootstrap_js @@ -298,7 +298,11 @@ """ if op == QNetworkAccessManager.GetOperation and \ request.rawHeader("X-Eric5-UserLoadAction") == QByteArray("1"): - urlString = request.url().toString(QUrl.RemoveFragment | QUrl.RemoveQuery) + if qVersion() >= "5.0.0": + urlString = request.url().toString(QUrl.ComponentFormattingOptions( + QUrl.RemoveFragment | QUrl.RemoveQuery)) + else: + urlString = request.url().toString(QUrl.RemoveFragment | QUrl.RemoveQuery) if urlString.endswith(".user.js"): self.downloadScript(request) return EmptyNetworkReply(self)
--- a/Helpviewer/HelpBrowserWV.py Mon Oct 01 19:55:49 2012 +0200 +++ b/Helpviewer/HelpBrowserWV.py Tue Oct 02 19:53:31 2012 +0200 @@ -10,7 +10,7 @@ from PyQt4.QtCore import pyqtSlot, pyqtSignal, QObject, QT_TRANSLATE_NOOP, QUrl, \ QBuffer, QIODevice, QFileInfo, Qt, QTimer, QEvent, QRect, QFile, QPoint, \ - QByteArray, qVersion + QPointF, QByteArray, qVersion from PyQt4.QtGui import qApp, QDesktopServices, QStyle, QMenu, QApplication, \ QInputDialog, QLineEdit, QClipboard, QMouseEvent, QLabel, QToolTip, QColor, \ QPalette, QFrame, QPrinter, QPrintDialog, QDialog @@ -553,8 +553,12 @@ # Fake a mouse move event just outside of the widget to trigger # the WebKit event handler's mouseMoved function. This implements # the interesting mouse-out behavior like invalidating scrollbars. - fakeEvent = QMouseEvent(QEvent.MouseMove, QPoint(0, -1), - Qt.NoButton, Qt.NoButton, Qt.NoModifier) + if qVersion() >= "5.0.0": + fakeEvent = QMouseEvent(QEvent.MouseMove, QPointF(0, -1), + Qt.NoButton, Qt.NoButton, Qt.NoModifier) + else: + fakeEvent = QMouseEvent(QEvent.MouseMove, QPoint(0, -1), + Qt.NoButton, Qt.NoButton, Qt.NoModifier) return super().event(fakeEvent) return super().event(evt) @@ -785,8 +789,13 @@ """ for URL <b>{0}</b>.</p>""").format(name.toString())) return elif name.scheme() == "javascript": - scriptSource = QUrl.fromPercentEncoding(name.toString( - QUrl.FormattingOptions(QUrl.TolerantMode | QUrl.RemoveScheme))) + if qVersion() >= "5.0.0": + scriptSource = QUrl.fromPercentEncoding(name.toString( + QUrl.ComponentFormattingOptions( + QUrl.TolerantMode | QUrl.RemoveScheme))) + else: + scriptSource = QUrl.fromPercentEncoding(name.toString( + QUrl.FormattingOptions(QUrl.TolerantMode | QUrl.RemoveScheme))) self.page().mainFrame().evaluateJavaScript(scriptSource) return else: @@ -1925,11 +1934,19 @@ while frame and frame != self.page().mainFrame(): p -= frame.scrollPosition() frame = frame.parentFrame() - pevent = QMouseEvent(QEvent.MouseButtonPress, p, Qt.LeftButton, - Qt.MouseButtons(Qt.NoButton), Qt.KeyboardModifiers(Qt.NoModifier)) + if qVersion() >= "5.0.0": + pevent = QMouseEvent(QEvent.MouseButtonPress, QPointF(p), Qt.LeftButton, + Qt.MouseButtons(Qt.NoButton), Qt.KeyboardModifiers(Qt.NoModifier)) + else: + pevent = QMouseEvent(QEvent.MouseButtonPress, p, Qt.LeftButton, + Qt.MouseButtons(Qt.NoButton), Qt.KeyboardModifiers(Qt.NoModifier)) qApp.sendEvent(self, pevent) - revent = QMouseEvent(QEvent.MouseButtonRelease, p, Qt.LeftButton, - Qt.MouseButtons(Qt.NoButton), Qt.KeyboardModifiers(Qt.NoModifier)) + if qVersion() >= "5.0.0": + revent = QMouseEvent(QEvent.MouseButtonRelease, QPointF(p), Qt.LeftButton, + Qt.MouseButtons(Qt.NoButton), Qt.KeyboardModifiers(Qt.NoModifier)) + else: + revent = QMouseEvent(QEvent.MouseButtonRelease, p, Qt.LeftButton, + Qt.MouseButtons(Qt.NoButton), Qt.KeyboardModifiers(Qt.NoModifier)) qApp.sendEvent(self, revent) handled = True
--- a/Helpviewer/HelpUtilities.py Mon Oct 01 19:55:49 2012 +0200 +++ b/Helpviewer/HelpUtilities.py Tue Oct 02 19:53:31 2012 +0200 @@ -9,7 +9,7 @@ import os -from PyQt4.QtCore import QUrl +from PyQt4.QtCore import QUrl, qVersion def getFileNameFromUrl(url): @@ -19,8 +19,12 @@ @param url URL (QUrl) @return file name (string) """ - fileName = url.toString(QUrl.RemoveFragment | QUrl.RemoveQuery | - QUrl.RemoveScheme | QUrl.RemovePort) + if qVersion() >= "5.0.0": + fileName = url.toString(QUrl.ComponentFormattingOptions( + QUrl.RemoveFragment | QUrl.RemoveQuery | QUrl.RemoveScheme | QUrl.RemovePort)) + else: + fileName = url.toString(QUrl.RemoveFragment | QUrl.RemoveQuery | + QUrl.RemoveScheme | QUrl.RemovePort) if fileName.find("/") != -1: pos = fileName.rfind("/") fileName = fileName[pos:]
--- a/Helpviewer/WebPlugins/ClickToFlash/ClickToFlash.py Mon Oct 01 19:55:49 2012 +0200 +++ b/Helpviewer/WebPlugins/ClickToFlash/ClickToFlash.py Tue Oct 02 19:53:31 2012 +0200 @@ -8,7 +8,7 @@ """ -from PyQt4.QtCore import pyqtSlot, QUrl, Qt, QByteArray, QTimer +from PyQt4.QtCore import pyqtSlot, QUrl, Qt, QByteArray, QTimer, qVersion from PyQt4.QtGui import QWidget, QMenu, QCursor, QDialog, QLabel, QFormLayout from PyQt4.QtNetwork import QNetworkRequest from PyQt4.QtWebKit import QWebHitTestResult, QWebElement, QWebView, QWebElementCollection @@ -215,7 +215,12 @@ if checkString == "": checkString = element.attribute("value") - checkString = view.url().resolved(QUrl(checkString)).toString(QUrl.RemoveQuery) + if qVersion() >= "5.0.0": + checkString = view.url().resolved(QUrl(checkString)).toString( + QUrl.ComponentFormattingOptions(QUrl.RemoveQuery)) + else: + checkString = view.url().resolved(QUrl(checkString)).toString( + QUrl.RemoveQuery) return self.__url.toEncoded().contains(QByteArray(checkString.encode("utf-8"))) def __checkElement(self, element):
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Toolbox/SingleApplication.py Tue Oct 02 19:53:31 2012 +0200 @@ -0,0 +1,168 @@ +# -*- coding: utf-8 -*- + +# Copyright (c) 2004 - 2012 Detlev Offenbach <detlev@die-offenbachs.de> +# + +""" +Module implementing the single application server and client. +""" + +from PyQt4.QtNetwork import QLocalServer, QLocalSocket + + +class SingleApplicationServer(QLocalServer): + """ + Class implementing the single application server base class. + """ + def __init__(self, name): + """ + Constructor + + @param name name this server is listening to (string) + """ + super().__init__() + + res = self.listen(name) + if not res: + # maybe it crashed last time + self.removeServer(name) + self.listen(name) + + self.newConnection[()].connect(self.__newConnection) + + self.qsock = None + + def __newConnection(self): + """ + Private slot to handle a new connection. + """ + sock = self.nextPendingConnection() + + # If we already have a connection, refuse this one. It will be closed + # automatically. + if self.qsock is not None: + return + + self.qsock = sock + + self.qsock.readyRead[()].connect(self.__parseLine) + self.qsock.disconnected[()].connect(self.__disconnected) + + def __parseLine(self): + """ + Private method to handle data from the client. + """ + while self.qsock and self.qsock.canReadLine(): + line = bytes(self.qsock.readLine()).decode() + +## print(line) ##debug + + eoc = line.find('<') + 1 + + boc = line.find('>') + if boc >= 0 and eoc > boc: + # handle the command sent by the client. + cmd = line[boc:eoc] + params = line[eoc:-1] + + self.handleCommand(cmd, params) + + def __disconnected(self): + """ + Private method to handle the closure of the socket. + """ + self.qsock = None + + def shutdown(self): + """ + Public method used to shut down the server. + """ + if self.qsock is not None: + self.qsock.readyRead[()].disconnect(self.__parseLine) + self.qsock.disconnected.disconnect(self.__disconnected) + + self.qsock = None + + self.close() + + def handleCommand(self, cmd, params): + """ + Public slot to handle the command sent by the client. + + <b>Note</b>: This method must be overridden by subclasses. + + @param cmd commandstring (string) + @param params parameterstring (string) + """ + raise RuntimeError("'handleCommand' must be overridden") + + +class SingleApplicationClient(object): + """ + Class implementing the single application client base class. + """ + def __init__(self, name): + """ + Constructor + + @param name name of the local server to connect to (string) + """ + self.name = name + self.connected = False + + def connect(self): + """ + Public method to connect the single application client to its server. + + @return value indicating success or an error number. Value is one of: + <table> + <tr><td>0</td><td>No application is running</td></tr> + <tr><td>1</td><td>Application is already running</td></tr> + </table> + """ + self.sock = QLocalSocket() + self.sock.connectToServer(self.name) + if self.sock.waitForConnected(10000): + self.connected = True + return 1 + else: + err = self.sock.error() + if err == QLocalSocket.ServerNotFoundError: + return 0 + else: + return -err + + def disconnect(self): + """ + Public method to disconnect from the Single Appliocation server. + """ + self.sock.disconnectFromServer() + self.connected = False + + def processArgs(self, args): + """ + Public method to process the command line args passed to the UI. + + <b>Note</b>: This method must be overridden by subclasses. + + @param args command line args (list of strings) + """ + raise RuntimeError("'processArgs' must be overridden") + + def sendCommand(self, cmd): + """ + Public method to send the command to the application server. + + @param cmd command to be sent (string) + """ + if self.connected: + self.sock.write(cmd) + self.sock.flush() + + def errstr(self): + """ + Public method to return a meaningful error string for the last error. + + @return error string for the last error (string) + """ + return self.sock.errorString()
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Toolbox/Startup.py Tue Oct 02 19:53:31 2012 +0200 @@ -0,0 +1,228 @@ +# -*- coding: utf-8 -*- + +# Copyright (c) 2002 - 2012 Detlev Offenbach <detlev@die-offenbachs.de> +# + +""" +Module implementing some startup helper funcions +""" + +import os +import sys + +from PyQt4.QtCore import QTranslator, QLocale, QLibraryInfo, QDir +from PyQt4.QtGui import QApplication + +from E5Gui.E5Application import E5Application + +import Globals + +import UI.PixmapCache + +from eric5config import getConfig + + +def usage(appinfo, optlen=12): + """ + Module function to show the usage information. + + @param appinfo dictionary describing the application + @param optlen length of the field for the commandline option (integer) + """ + options = [\ + ("--version", "show the program's version number and exit"), + ("-h, --help", "show this help message and exit") + ] + options.extend(appinfo["options"]) + + print(""" +Usage: {bin} [OPTIONS] {arg} + +{name} - {description} + +Options:""".format(**appinfo)) + for opt in options: + print(" {0} {1}".format(opt[0].ljust(optlen), opt[1])) + sys.exit(0) + + +def version(appinfo): + """ + Module function to show the version information. + + @param appinfo dictionary describing the application + """ + print(""" +{name} {version} + +{description} + +Copyright (c) 2002 - 2012 Detlev Offenbach <detlev@die-offenbachs.de> +This is free software; see LICENSE.GPL3 for copying conditions. +There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE.""".format(**appinfo)) + sys.exit(0) + + +def handleArgs(argv, appinfo): + """ + Module function to handle the always present commandline options. + + @param argv list of commandline parameters (list of strings) + @param appinfo dictionary describing the application + @return index of the '--' option (integer). This is used to tell + the application, that all additional options don't belong to + the application. + """ + ddindex = 30000 # arbitrarily large number + args = { + "--version": version, + "--help": usage, + "-h": usage + } + if '--' in argv: + ddindex = argv.index("--") + for a in args: + if a in argv and argv.index(a) < ddindex: + args[a](appinfo) + return ddindex + + +def loadTranslatorForLocale(dirs, tn): + """ + Module function to find and load a specific translation. + + @param dirs Searchpath for the translations. (list of strings) + @param tn The translation to be loaded. (string) + @return Tuple of a status flag and the loaded translator. (int, QTranslator) + """ + trans = QTranslator(None) + for dir in dirs: + loaded = trans.load(tn, dir) + if loaded: + return (trans, True) + + print("Warning: translation file '" + tn + "'could not be loaded.") + print("Using default.") + return (None, False) + + +def initializeResourceSearchPath(): + """ + Module function to initialize the default mime source factory. + """ + import Preferences + + defaultIconPath = os.path.join(getConfig('ericIconDir'), "default") + iconPaths = Preferences.getIcons("Path") + for iconPath in iconPaths: + if iconPath: + UI.PixmapCache.addSearchPath(iconPath) + if not defaultIconPath in iconPaths: + UI.PixmapCache.addSearchPath(defaultIconPath) + + +def setLibraryPaths(): + """ + Module function to set the Qt library paths correctly for windows systems. + """ + if Globals.isWindowsPlatform(): + from PyQt4 import pyqtconfig + libPath = os.path.join(pyqtconfig._pkg_config["pyqt_mod_dir"], "plugins") + if os.path.exists(libPath): + libPath = QDir.fromNativeSeparators(libPath) + libraryPaths = QApplication.libraryPaths() + if libPath not in libraryPaths: + libraryPaths.insert(0, libPath) + QApplication.setLibraryPaths(libraryPaths) + +# the translator must not be deleted, therefore we save them here +loaded_translators = {} + + +def loadTranslators(qtTransDir, app, translationFiles=()): + """ + Module function to load all required translations. + + @param qtTransDir directory of the Qt translations files (string) + @param app reference to the application object (QApplication) + @param translationFiles tuple of additional translations to + be loaded (tuple of strings) + @return the requested locale (string) + """ + import Preferences + + global loaded_translators + + translations = ("qt", "eric5") + translationFiles + loc = Preferences.getUILanguage() + if loc is None: + return + + if loc == "System": + loc = QLocale.system().name() + if loc != "C": + dirs = [getConfig('ericTranslationsDir'), Globals.getConfigDir()] + if qtTransDir is not None: + dirs.append(qtTransDir) + + loca = loc + for tf in ["{0}_{1}".format(tr, loc) for tr in translations]: + translator, ok = loadTranslatorForLocale(dirs, tf) + loaded_translators[tf] = translator + if ok: + app.installTranslator(translator) + else: + if tf.startswith("eric5"): + loca = None + loc = loca + else: + loc = None + return loc + + +def simpleAppStartup(argv, appinfo, mwFactory, quitOnLastWindowClosed=True, + app=None, raiseIt=True): + """ + Module function to start up an application that doesn't need a specialized start up. + + This function is used by all of eric5's helper programs. + + @param argv list of commandline parameters (list of strings) + @param appinfo dictionary describing the application + @param mwFactory factory function generating the main widget. This + function must accept the following parameter. + <dl> + <dt>argv</dt> + <dd>list of commandline parameters (list of strings)</dd> + </dl> + @keyparam quitOnLastWindowClosed flag indicating to quit the application, + if the last window was closed (boolean) + @keyparam app reference to the application object (QApplication or None) + @keyparam raiseIt flag indicating to raise the generated application window (boolean) + """ + handleArgs(argv, appinfo) + if app is None: + app = E5Application(argv) + app.setQuitOnLastWindowClosed(quitOnLastWindowClosed) + + # the following code depends upon a valid application object + import Preferences + + setLibraryPaths() + initializeResourceSearchPath() + QApplication.setWindowIcon(UI.PixmapCache.getIcon("eric.png")) + + qt4TransDir = Preferences.getQt4TranslationsDir() + if not qt4TransDir: + qt4TransDir = QLibraryInfo.location(QLibraryInfo.TranslationsPath) + loadTranslators(qt4TransDir, app) + + w = mwFactory(argv) + if quitOnLastWindowClosed: + app.lastWindowClosed.connect(app.quit) + w.show() + if raiseIt: + w.raise_() + + return app.exec_()
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Toolbox/__init__.py Tue Oct 02 19:53:31 2012 +0200 @@ -0,0 +1,8 @@ +# -*- coding: utf-8 -*- + +# Copyright (c) 2012 Detlev Offenbach <detlev@die-offenbachs.de> +# + +""" +Package implementing general purpose tools. +"""
--- a/Tools/TRSingleApplication.py Mon Oct 01 19:55:49 2012 +0200 +++ b/Tools/TRSingleApplication.py Tue Oct 02 19:53:31 2012 +0200 @@ -11,7 +11,7 @@ from PyQt4.QtCore import pyqtSignal -from Utilities.SingleApplication import SingleApplicationClient, SingleApplicationServer +from Toolbox.SingleApplication import SingleApplicationClient, SingleApplicationServer ########################################################################### # define some module global stuff
--- a/Utilities/SingleApplication.py Mon Oct 01 19:55:49 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,168 +0,0 @@ -# -*- coding: utf-8 -*- - -# Copyright (c) 2004 - 2012 Detlev Offenbach <detlev@die-offenbachs.de> -# - -""" -Module implementing the single application server and client. -""" - -from PyQt4.QtNetwork import QLocalServer, QLocalSocket - - -class SingleApplicationServer(QLocalServer): - """ - Class implementing the single application server base class. - """ - def __init__(self, name): - """ - Constructor - - @param name name this server is listening to (string) - """ - super().__init__() - - res = self.listen(name) - if not res: - # maybe it crashed last time - self.removeServer(name) - self.listen(name) - - self.newConnection[()].connect(self.__newConnection) - - self.qsock = None - - def __newConnection(self): - """ - Private slot to handle a new connection. - """ - sock = self.nextPendingConnection() - - # If we already have a connection, refuse this one. It will be closed - # automatically. - if self.qsock is not None: - return - - self.qsock = sock - - self.qsock.readyRead[()].connect(self.__parseLine) - self.qsock.disconnected[()].connect(self.__disconnected) - - def __parseLine(self): - """ - Private method to handle data from the client. - """ - while self.qsock and self.qsock.canReadLine(): - line = bytes(self.qsock.readLine()).decode() - -## print(line) ##debug - - eoc = line.find('<') + 1 - - boc = line.find('>') - if boc >= 0 and eoc > boc: - # handle the command sent by the client. - cmd = line[boc:eoc] - params = line[eoc:-1] - - self.handleCommand(cmd, params) - - def __disconnected(self): - """ - Private method to handle the closure of the socket. - """ - self.qsock = None - - def shutdown(self): - """ - Public method used to shut down the server. - """ - if self.qsock is not None: - self.qsock.readyRead[()].disconnect(self.__parseLine) - self.qsock.disconnected.disconnect(self.__disconnected) - - self.qsock = None - - self.close() - - def handleCommand(self, cmd, params): - """ - Public slot to handle the command sent by the client. - - <b>Note</b>: This method must be overridden by subclasses. - - @param cmd commandstring (string) - @param params parameterstring (string) - """ - raise RuntimeError("'handleCommand' must be overridden") - - -class SingleApplicationClient(object): - """ - Class implementing the single application client base class. - """ - def __init__(self, name): - """ - Constructor - - @param name name of the local server to connect to (string) - """ - self.name = name - self.connected = False - - def connect(self): - """ - Public method to connect the single application client to its server. - - @return value indicating success or an error number. Value is one of: - <table> - <tr><td>0</td><td>No application is running</td></tr> - <tr><td>1</td><td>Application is already running</td></tr> - </table> - """ - self.sock = QLocalSocket() - self.sock.connectToServer(self.name) - if self.sock.waitForConnected(10000): - self.connected = True - return 1 - else: - err = self.sock.error() - if err == QLocalSocket.ServerNotFoundError: - return 0 - else: - return -err - - def disconnect(self): - """ - Public method to disconnect from the Single Appliocation server. - """ - self.sock.disconnectFromServer() - self.connected = False - - def processArgs(self, args): - """ - Public method to process the command line args passed to the UI. - - <b>Note</b>: This method must be overridden by subclasses. - - @param args command line args (list of strings) - """ - raise RuntimeError("'processArgs' must be overridden") - - def sendCommand(self, cmd): - """ - Public method to send the command to the application server. - - @param cmd command to be sent (string) - """ - if self.connected: - self.sock.write(cmd) - self.sock.flush() - - def errstr(self): - """ - Public method to return a meaningful error string for the last error. - - @return error string for the last error (string) - """ - return self.sock.errorString()
--- a/Utilities/Startup.py Mon Oct 01 19:55:49 2012 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,246 +0,0 @@ -# -*- coding: utf-8 -*- - -# Copyright (c) 2002 - 2012 Detlev Offenbach <detlev@die-offenbachs.de> -# - -""" -Module implementing some startup helper funcions -""" - -import os -import sys - -from PyQt4.QtCore import QTranslator, QLocale, QLibraryInfo -from PyQt4.QtGui import QApplication - -from E5Gui.E5Application import E5Application - -import Preferences -import Utilities -from UI.Info import Version - -import UI.PixmapCache - -from eric5config import getConfig - - -def makeAppInfo(argv, name, arg, description, options=[]): - """ - Module function to generate a dictionary describing the application. - - @param argv list of commandline parameters (list of strings) - @param name name of the application (string) - @param arg commandline arguments (string) - @param description text describing the application (string) - @param options list of additional commandline options - (list of tuples of two strings (commandline option, option description)). - The options --version, --help and -h are always present and must not - be repeated in this list. - @return dictionary describing the application - """ - return { - "bin": argv[0], - "arg": arg, - "name": name, - "description": description, - "version": Version, - "options": options - } - - -def usage(appinfo, optlen=12): - """ - Module function to show the usage information. - - @param appinfo dictionary describing the application - @param optlen length of the field for the commandline option (integer) - """ - options = [\ - ("--version", "show the program's version number and exit"), - ("-h, --help", "show this help message and exit") - ] - options.extend(appinfo["options"]) - - print(""" -Usage: {bin} [OPTIONS] {arg} - -{name} - {description} - -Options:""".format(**appinfo)) - for opt in options: - print(" {0} {1}".format(opt[0].ljust(optlen), opt[1])) - sys.exit(0) - - -def version(appinfo): - """ - Module function to show the version information. - - @param appinfo dictionary describing the application - """ - print(""" -{name} {version} - -{description} - -Copyright (c) 2002 - 2012 Detlev Offenbach <detlev@die-offenbachs.de> -This is free software; see LICENSE.GPL3 for copying conditions. -There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE.""".format(**appinfo)) - sys.exit(0) - - -def handleArgs(argv, appinfo): - """ - Module function to handle the always present commandline options. - - @param argv list of commandline parameters (list of strings) - @param appinfo dictionary describing the application - @return index of the '--' option (integer). This is used to tell - the application, that all additional options don't belong to - the application. - """ - ddindex = 30000 # arbitrarily large number - args = { - "--version": version, - "--help": usage, - "-h": usage - } - if '--' in argv: - ddindex = argv.index("--") - for a in args: - if a in argv and argv.index(a) < ddindex: - args[a](appinfo) - return ddindex - - -def loadTranslatorForLocale(dirs, tn): - """ - Module function to find and load a specific translation. - - @param dirs Searchpath for the translations. (list of strings) - @param tn The translation to be loaded. (string) - @return Tuple of a status flag and the loaded translator. (int, QTranslator) - """ - trans = QTranslator(None) - for dir in dirs: - loaded = trans.load(tn, dir) - if loaded: - return (trans, True) - - print("Warning: translation file '" + tn + "'could not be loaded.") - print("Using default.") - return (None, False) - - -def initializeResourceSearchPath(): - """ - Module function to initialize the default mime source factory. - """ - defaultIconPath = os.path.join(getConfig('ericIconDir'), "default") - iconPaths = Preferences.getIcons("Path") - for iconPath in iconPaths: - if iconPath: - UI.PixmapCache.addSearchPath(iconPath) - if not defaultIconPath in iconPaths: - UI.PixmapCache.addSearchPath(defaultIconPath) - - -def setLibraryPaths(): - """ - Module function to set the Qt library paths correctly for windows systems. - """ - if Utilities.isWindowsPlatform(): - from PyQt4 import pyqtconfig - libPath = os.path.join(pyqtconfig._pkg_config["pyqt_mod_dir"], "plugins") - if os.path.exists(libPath): - libPath = Utilities.fromNativeSeparators(libPath) - libraryPaths = QApplication.libraryPaths() - if libPath not in libraryPaths: - libraryPaths.insert(0, libPath) - QApplication.setLibraryPaths(libraryPaths) - -# the translator must not be deleted, therefore we save them here -loaded_translators = {} - - -def loadTranslators(qtTransDir, app, translationFiles=()): - """ - Module function to load all required translations. - - @param qtTransDir directory of the Qt translations files (string) - @param app reference to the application object (QApplication) - @param translationFiles tuple of additional translations to - be loaded (tuple of strings) - @return the requested locale (string) - """ - global loaded_translators - translations = ("qt", "eric5") + translationFiles - loc = Preferences.getUILanguage() - if loc is None: - return - - if loc == "System": - loc = QLocale.system().name() - if loc != "C": - dirs = [getConfig('ericTranslationsDir'), Utilities.getConfigDir()] - if qtTransDir is not None: - dirs.append(qtTransDir) - - loca = loc - for tf in ["{0}_{1}".format(tr, loc) for tr in translations]: - translator, ok = loadTranslatorForLocale(dirs, tf) - loaded_translators[tf] = translator - if ok: - app.installTranslator(translator) - else: - if tf.startswith("eric5"): - loca = None - loc = loca - else: - loc = None - return loc - - -def simpleAppStartup(argv, appinfo, mwFactory, quitOnLastWindowClosed=True, - app=None, raiseIt=True): - """ - Module function to start up an application that doesn't need a specialized start up. - - This function is used by all of eric5's helper programs. - - @param argv list of commandline parameters (list of strings) - @param appinfo dictionary describing the application - @param mwFactory factory function generating the main widget. This - function must accept the following parameter. - <dl> - <dt>argv</dt> - <dd>list of commandline parameters (list of strings)</dd> - </dl> - @keyparam quitOnLastWindowClosed flag indicating to quit the application, - if the last window was closed (boolean) - @keyparam app reference to the application object (QApplication or None) - @keyparam raiseIt flag indicating to raise the generated application window (boolean) - """ - handleArgs(argv, appinfo) - if app is None: - app = E5Application(argv) - app.setQuitOnLastWindowClosed(quitOnLastWindowClosed) - - setLibraryPaths() - initializeResourceSearchPath() - QApplication.setWindowIcon(UI.PixmapCache.getIcon("eric.png")) - - qt4TransDir = Preferences.getQt4TranslationsDir() - if not qt4TransDir: - qt4TransDir = QLibraryInfo.location(QLibraryInfo.TranslationsPath) - loadTranslators(qt4TransDir, app) - - w = mwFactory(argv) - if quitOnLastWindowClosed: - app.lastWindowClosed.connect(app.quit) - w.show() - if raiseIt: - w.raise_() - - return app.exec_()
--- a/Utilities/__init__.py Mon Oct 01 19:55:49 2012 +0200 +++ b/Utilities/__init__.py Tue Oct 02 19:53:31 2012 +0200 @@ -43,6 +43,7 @@ from PyQt4.Qsci import QSCINTILLA_VERSION_STR, QsciScintilla from Globals import isWindowsPlatform, isLinuxPlatform, isMacPlatform # __IGNORE_WARNING__ +from Globals import getConfigDir, setConfigDir # __IGNORE_WARNING__ # import these methods into the Utilities namespace from E5Gui.E5Application import e5App @@ -1346,37 +1347,6 @@ []) -def getConfigDir(): - """ - Module function to get the name of the directory storing the config data. - - @return directory name of the config dir (string) - """ - if configDir is not None and os.path.exists(configDir): - hp = configDir - else: - if isWindowsPlatform(): - cdn = "_eric5" - else: - cdn = ".eric5" - - hp = QDir.homePath() - dn = QDir(hp) - dn.mkdir(cdn) - hp += "/" + cdn - return toNativeSeparators(hp) - - -def setConfigDir(d): - """ - Module function to set the name of the directory storing the config data. - - @param d name of an existing directory (string) - """ - global configDir - configDir = os.path.expanduser(d) - - ################################################################################ # functions for environment handling ################################################################################ @@ -1633,67 +1603,6 @@ return infoStr -def checkBlacklistedVersions(): - """ - Module functions to check for blacklisted versions of the prerequisites. - - @return flag indicating good versions were found (boolean) - """ - from install import BlackLists, PlatformsBlackLists - - # determine the platform dependent black list - if isWindowsPlatform(): - PlatformBlackLists = PlatformsBlackLists["windows"] - elif isLinuxPlatform(): - PlatformBlackLists = PlatformsBlackLists["linux"] - else: - PlatformBlackLists = PlatformsBlackLists["mac"] - - # check version of sip - try: - import sipconfig - sipVersion = sipconfig.Configuration().sip_version_str - # always assume, that snapshots are good - if "snapshot" not in sipVersion: - # check for blacklisted versions - for vers in BlackLists["sip"] + PlatformBlackLists["sip"]: - if vers == sipVersion: - print('Sorry, sip version {0} is not compatible with eric5.'\ - .format(vers)) - print('Please install another version.') - return False - except ImportError: - pass - - # check version of PyQt - from PyQt4.QtCore import PYQT_VERSION_STR - pyqtVersion = PYQT_VERSION_STR - # always assume, that snapshots are good - if "snapshot" not in pyqtVersion: - # check for blacklisted versions - for vers in BlackLists["PyQt4"] + PlatformBlackLists["PyQt4"]: - if vers == pyqtVersion: - print('Sorry, PyQt4 version {0} is not compatible with eric5.'\ - .format(vers)) - print('Please install another version.') - return False - - # check version of QScintilla - from PyQt4.Qsci import QSCINTILLA_VERSION_STR - scintillaVersion = QSCINTILLA_VERSION_STR - # always assume, that snapshots are new enough - if "snapshot" not in scintillaVersion: - # check for blacklisted versions - for vers in BlackLists["QScintilla2"] + PlatformBlackLists["QScintilla2"]: - if vers == scintillaVersion: - print('Sorry, QScintilla2 version {0} is not compatible with eric5.'\ - .format(vers)) - print('Please install another version.') - return False - - return True - - def toBool(dataStr): """ Module function to convert a string to a boolean value.
--- a/eric5.e4p Mon Oct 01 19:55:49 2012 +0200 +++ b/eric5.e4p Tue Oct 02 19:53:31 2012 +0200 @@ -24,12 +24,10 @@ <Source>Helpviewer/__init__.py</Source> <Source>UI/PixmapCache.py</Source> <Source>UI/__init__.py</Source> - <Source>Utilities/Startup.py</Source> <Source>Utilities/__init__.py</Source> <Source>UI/Info.py</Source> <Source>Tools/UIPreviewer.py</Source> <Source>Tools/__init__.py</Source> - <Source>Utilities/SingleApplication.py</Source> <Source>Tools/TRSingleApplication.py</Source> <Source>Tools/TRPreviewer.py</Source> <Source>PyUnit/UnittestDialog.py</Source> @@ -1045,6 +1043,10 @@ <Source>Helpviewer/Network/FileAccessHandler.py</Source> <Source>E5Network/E5Ftp.py</Source> <Source>E5Network/E5UrlInfo.py</Source> + <Source>Globals/AppInfo.py</Source> + <Source>Toolbox/__init__.py</Source> + <Source>Toolbox/SingleApplication.py</Source> + <Source>Toolbox/Startup.py</Source> </Sources> <Forms> <Form>PyUnit/UnittestDialog.ui</Form>
--- a/eric5.py Mon Oct 01 19:55:49 2012 +0200 +++ b/eric5.py Tue Oct 02 19:53:31 2012 +0200 @@ -18,7 +18,7 @@ import time import logging -from PyQt4.QtCore import qWarning, QLibraryInfo, QTimer, qVersion +from PyQt4.QtCore import qWarning, QLibraryInfo, QTimer from PyQt4.QtGui import QApplication, QErrorMessage # some global variables needed to start the application @@ -36,9 +36,9 @@ for arg in sys.argv: if arg.startswith("--config="): - import Utilities + import Globals configDir = arg.replace("--config=", "") - Utilities.setConfigDir(configDir) + Globals.setConfigDir(configDir) sys.argv.remove(arg) break @@ -49,20 +49,6 @@ sys.path.insert(2, os.path.join(os.path.dirname(__file__), "ThirdParty", "Pygments")) from E5Gui.E5Application import E5Application -# TODO: is this really needed for Qt5? At the moment it seems so. -if qVersion() >= "5.0.0": - gapp = E5Application([]) - -from UI.Info import BugAddress -from UI.SplashScreen import SplashScreen, NoneSplashScreen -from E5Gui.E5SingleApplication import E5SingleApplicationClient -##from E5Gui.E5Application import E5Application - -import Utilities -from Utilities import Startup - -logging.debug("Importing Preferences") -import Preferences def handleSingleApplication(ddindex): @@ -71,6 +57,8 @@ @param ddindex index of a '--' option in the options list """ + from E5Gui.E5SingleApplication import E5SingleApplicationClient + client = E5SingleApplicationClient() res = client.connect() if res > 0: @@ -100,8 +88,12 @@ @param excValue exception value @param tracebackobj traceback object """ + from UI.Info import BugAddress + import Utilities + import Globals + separator = '-' * 80 - logFile = os.path.join(Utilities.getConfigDir(), "eric5_error.log") + logFile = os.path.join(Globals.getConfigDir(), "eric5_error.log") notice = \ """An unhandled exception occurred. Please report the problem\n"""\ """using the error reporting dialog or via email to <{0}>.\n"""\ @@ -157,6 +149,9 @@ """ Main entry point into the application. """ + from Globals import AppInfo + import Globals + global args, mainWindow, splash, restartArgs sys.excepthook = excepthook @@ -172,18 +167,25 @@ ("--", "indicate that there are options for the program to be debugged"), ("", "(everything after that is considered arguments for this program)") ] - appinfo = Startup.makeAppInfo(sys.argv, + appinfo = AppInfo.makeAppInfo(sys.argv, "Eric5", "[project | files... [--] [debug-options]]", "A Python IDE", options) - ddindex = Startup.handleArgs(sys.argv, appinfo) - if not Utilities.checkBlacklistedVersions(): + if not Globals.checkBlacklistedVersions(): sys.exit(100) app = E5Application(sys.argv) + import Utilities + from Toolbox import Startup + + ddindex = Startup.handleArgs(sys.argv, appinfo) + + logging.debug("Importing Preferences") + import Preferences + if Preferences.getUI("SingleApplicationMode"): handleSingleApplication(ddindex) @@ -194,6 +196,7 @@ Startup.initializeResourceSearchPath() # generate and show a splash window, if not suppressed + from UI.SplashScreen import SplashScreen, NoneSplashScreen if "--nosplash" in sys.argv and sys.argv.index("--nosplash") < ddindex: del sys.argv[sys.argv.index("--nosplash")] splash = NoneSplashScreen()
--- a/eric5_compare.py Mon Oct 01 19:55:49 2012 +0200 +++ b/eric5_compare.py Tue Oct 02 19:53:31 2012 +0200 @@ -16,13 +16,15 @@ for arg in sys.argv: if arg.startswith("--config="): - import Utilities + import Globals configDir = arg.replace("--config=", "") - Utilities.setConfigDir(configDir) + Globals.setConfigDir(configDir) sys.argv.remove(arg) break -from Utilities import Startup +from Globals import AppInfo + +from Toolbox import Startup def createMainWidget(argv): @@ -50,7 +52,7 @@ ("--config=configDir", "use the given directory as the one containing the config files"), ] - appinfo = Startup.makeAppInfo(sys.argv, + appinfo = AppInfo.makeAppInfo(sys.argv, "Eric5 Compare", "", "Simple graphical compare tool",
--- a/eric5_configure.py Mon Oct 01 19:55:49 2012 +0200 +++ b/eric5_configure.py Tue Oct 02 19:53:31 2012 +0200 @@ -15,9 +15,9 @@ for arg in sys.argv: if arg.startswith("--config="): - import Utilities + import Globals configDir = arg.replace("--config=", "") - Utilities.setConfigDir(configDir) + Globals.setConfigDir(configDir) sys.argv.remove(arg) break @@ -27,7 +27,9 @@ except ImportError: sys.path.insert(2, os.path.join(os.path.dirname(__file__), "ThirdParty", "Pygments")) -from Utilities import Startup +from Globals import AppInfo + +from Toolbox import Startup def createMainWidget(argv): @@ -52,7 +54,7 @@ ("--config=configDir", "use the given directory as the one containing the config files"), ] - appinfo = Startup.makeAppInfo(sys.argv, + appinfo = AppInfo.makeAppInfo(sys.argv, "Eric5 Configure", "", "Configuration editor for eric5",
--- a/eric5_diff.py Mon Oct 01 19:55:49 2012 +0200 +++ b/eric5_diff.py Tue Oct 02 19:53:31 2012 +0200 @@ -16,13 +16,15 @@ for arg in sys.argv: if arg.startswith("--config="): - import Utilities + import Globals configDir = arg.replace("--config=", "") - Utilities.setConfigDir(configDir) + Globals.setConfigDir(configDir) sys.argv.remove(arg) break -from Utilities import Startup +from Globals import AppInfo + +from Toolbox import Startup def createMainWidget(argv): @@ -44,7 +46,7 @@ ("--config=configDir", "use the given directory as the one containing the config files"), ] - appinfo = Startup.makeAppInfo(sys.argv, + appinfo = AppInfo.makeAppInfo(sys.argv, "Eric5 Diff", "", "Simple graphical diff tool",
--- a/eric5_editor.py Mon Oct 01 19:55:49 2012 +0200 +++ b/eric5_editor.py Tue Oct 02 19:53:31 2012 +0200 @@ -17,9 +17,9 @@ for arg in sys.argv: if arg.startswith("--config="): - import Utilities + import Globals configDir = arg.replace("--config=", "") - Utilities.setConfigDir(configDir) + Globals.setConfigDir(configDir) sys.argv.remove(arg) break @@ -29,7 +29,9 @@ except ImportError: sys.path.insert(2, os.path.join(os.path.dirname(__file__), "ThirdParty", "Pygments")) -from Utilities import Startup +from Globals import AppInfo + +from Toolbox import Startup def createMainWidget(argv): @@ -55,7 +57,7 @@ "use the given directory as the one containing the config files"), ("", "name of file to edit") ] - appinfo = Startup.makeAppInfo(sys.argv, + appinfo = AppInfo.makeAppInfo(sys.argv, "Eric5 Editor", "", "Simplified version of the eric5 editor",
--- a/eric5_iconeditor.py Mon Oct 01 19:55:49 2012 +0200 +++ b/eric5_iconeditor.py Tue Oct 02 19:53:31 2012 +0200 @@ -16,13 +16,15 @@ for arg in sys.argv: if arg.startswith("--config="): - import Utilities + import Globals configDir = arg.replace("--config=", "") - Utilities.setConfigDir(configDir) + Globals.setConfigDir(configDir) sys.argv.remove(arg) break -from Utilities import Startup +from Globals import AppInfo + +from Toolbox import Startup def createMainWidget(argv): @@ -52,7 +54,7 @@ "use the given directory as the one containing the config files"), ("", "name of file to edit") ] - appinfo = Startup.makeAppInfo(sys.argv, + appinfo = AppInfo.makeAppInfo(sys.argv, "Eric5 Icon Editor", "", "Little tool to edit icon files.",
--- a/eric5_plugininstall.py Mon Oct 01 19:55:49 2012 +0200 +++ b/eric5_plugininstall.py Tue Oct 02 19:53:31 2012 +0200 @@ -14,13 +14,15 @@ for arg in sys.argv: if arg.startswith("--config="): - import Utilities + import Globals configDir = arg.replace("--config=", "") - Utilities.setConfigDir(configDir) + Globals.setConfigDir(configDir) sys.argv.remove(arg) break -from Utilities import Startup +from Globals import AppInfo + +from Toolbox import Startup def createMainWidget(argv): @@ -43,7 +45,7 @@ "use the given directory as the one containing the config files"), ("", "names of plugins to install") ] - appinfo = Startup.makeAppInfo(sys.argv, + appinfo = AppInfo.makeAppInfo(sys.argv, "Eric5 Plugin Installer", "", "Plugin installation utility for eric5",
--- a/eric5_pluginrepository.py Mon Oct 01 19:55:49 2012 +0200 +++ b/eric5_pluginrepository.py Tue Oct 02 19:53:31 2012 +0200 @@ -14,13 +14,15 @@ for arg in sys.argv: if arg.startswith("--config="): - import Utilities + import Globals configDir = arg.replace("--config=", "") - Utilities.setConfigDir(configDir) + Globals.setConfigDir(configDir) sys.argv.remove(arg) break -from Utilities import Startup +from Globals import AppInfo + +from Toolbox import Startup def createMainWidget(argv): @@ -42,7 +44,7 @@ ("--config=configDir", "use the given directory as the one containing the config files"), ] - appinfo = Startup.makeAppInfo(sys.argv, + appinfo = AppInfo.makeAppInfo(sys.argv, "Eric5 Plugin Repository", "", "Utility to show the contents of the eric5"
--- a/eric5_pluginuninstall.py Mon Oct 01 19:55:49 2012 +0200 +++ b/eric5_pluginuninstall.py Tue Oct 02 19:53:31 2012 +0200 @@ -14,13 +14,15 @@ for arg in sys.argv: if arg.startswith("--config="): - import Utilities + import Globals configDir = arg.replace("--config=", "") - Utilities.setConfigDir(configDir) + Globals.setConfigDir(configDir) sys.argv.remove(arg) break -from Utilities import Startup +from Globals import AppInfo + +from Toolbox import Startup def createMainWidget(argv): @@ -42,7 +44,7 @@ ("--config=configDir", "use the given directory as the one containing the config files"), ] - appinfo = Startup.makeAppInfo(sys.argv, + appinfo = AppInfo.makeAppInfo(sys.argv, "Eric5 Plugin Uninstaller", "", "Plugin uninstallation utility for eric5",
--- a/eric5_qregexp.py Mon Oct 01 19:55:49 2012 +0200 +++ b/eric5_qregexp.py Tue Oct 02 19:53:31 2012 +0200 @@ -16,13 +16,15 @@ for arg in sys.argv: if arg.startswith("--config="): - import Utilities + import Globals configDir = arg.replace("--config=", "") - Utilities.setConfigDir(configDir) + Globals.setConfigDir(configDir) sys.argv.remove(arg) break -from Utilities import Startup +from Globals import AppInfo + +from Toolbox import Startup def createMainWidget(argv): @@ -45,7 +47,7 @@ ("--config=configDir", "use the given directory as the one containing the config files"), ] - appinfo = Startup.makeAppInfo(sys.argv, + appinfo = AppInfo.makeAppInfo(sys.argv, "Eric5 QRegExp", "", "Regexp editor for Qt's QRegExp class",
--- a/eric5_re.py Mon Oct 01 19:55:49 2012 +0200 +++ b/eric5_re.py Tue Oct 02 19:53:31 2012 +0200 @@ -16,13 +16,15 @@ for arg in sys.argv: if arg.startswith("--config="): - import Utilities + import Globals configDir = arg.replace("--config=", "") - Utilities.setConfigDir(configDir) + Globals.setConfigDir(configDir) sys.argv.remove(arg) break -from Utilities import Startup +from Globals import AppInfo + +from Toolbox import Startup def createMainWidget(argv): @@ -45,7 +47,7 @@ ("--config=configDir", "use the given directory as the one containing the config files"), ] - appinfo = Startup.makeAppInfo(sys.argv, + appinfo = AppInfo.makeAppInfo(sys.argv, "Eric5 RE", "", "Regexp editor for the Python re module",
--- a/eric5_snap.py Mon Oct 01 19:55:49 2012 +0200 +++ b/eric5_snap.py Tue Oct 02 19:53:31 2012 +0200 @@ -15,13 +15,15 @@ for arg in sys.argv: if arg.startswith("--config="): - import Utilities + import Globals configDir = arg.replace("--config=", "") - Utilities.setConfigDir(configDir) + Globals.setConfigDir(configDir) sys.argv.remove(arg) break -from Utilities import Startup +from Globals import AppInfo + +from Toolbox import Startup def createMainWidget(argv): @@ -43,7 +45,7 @@ ("--config=configDir", "use the given directory as the one containing the config files"), ] - appinfo = Startup.makeAppInfo(sys.argv, + appinfo = AppInfo.makeAppInfo(sys.argv, "Eric5 Snap", "", "Simple utility to do snapshots of the screen.",
--- a/eric5_sqlbrowser.py Mon Oct 01 19:55:49 2012 +0200 +++ b/eric5_sqlbrowser.py Tue Oct 02 19:53:31 2012 +0200 @@ -15,13 +15,15 @@ for arg in sys.argv: if arg.startswith("--config="): - import Utilities + import Globals configDir = arg.replace("--config=", "") - Utilities.setConfigDir(configDir) + Globals.setConfigDir(configDir) sys.argv.remove(arg) break -from Utilities import Startup +from Globals import AppInfo + +from Toolbox import Startup def createMainWidget(argv): @@ -50,7 +52,7 @@ ("--config=configDir", "use the given directory as the one containing the config files"), ] - appinfo = Startup.makeAppInfo(sys.argv, + appinfo = AppInfo.makeAppInfo(sys.argv, "Eric5 SQL Browser", "connection", "SQL browser",
--- a/eric5_tray.py Mon Oct 01 19:55:49 2012 +0200 +++ b/eric5_tray.py Tue Oct 02 19:53:31 2012 +0200 @@ -16,13 +16,15 @@ for arg in sys.argv: if arg.startswith("--config="): - import Utilities + import Globals configDir = arg.replace("--config=", "") - Utilities.setConfigDir(configDir) + Globals.setConfigDir(configDir) sys.argv.remove(arg) break -from Utilities import Startup +from Globals import AppInfo + +from Toolbox import Startup def createMainWidget(argv): @@ -44,7 +46,7 @@ ("--config=configDir", "use the given directory as the one containing the config files"), ] - appinfo = Startup.makeAppInfo(sys.argv, + appinfo = AppInfo.makeAppInfo(sys.argv, "Eric5 Tray", "", "Traystarter for eric5",
--- a/eric5_trpreviewer.py Mon Oct 01 19:55:49 2012 +0200 +++ b/eric5_trpreviewer.py Tue Oct 02 19:53:31 2012 +0200 @@ -16,16 +16,18 @@ for arg in sys.argv: if arg.startswith("--config="): - import Utilities + import Globals configDir = arg.replace("--config=", "") - Utilities.setConfigDir(configDir) + Globals.setConfigDir(configDir) sys.argv.remove(arg) break from E5Gui.E5Application import E5Application from Tools.TRSingleApplication import TRSingleApplicationClient -from Utilities import Startup +from Globals import AppInfo + +from Toolbox import Startup def createMainWidget(argv): @@ -54,7 +56,7 @@ ("--config=configDir", "use the given directory as the one containing the config files"), ] - appinfo = Startup.makeAppInfo(sys.argv, + appinfo = AppInfo.makeAppInfo(sys.argv, "Eric5 TR Previewer", "file", "TR file previewer",
--- a/eric5_uipreviewer.py Mon Oct 01 19:55:49 2012 +0200 +++ b/eric5_uipreviewer.py Tue Oct 02 19:53:31 2012 +0200 @@ -16,13 +16,15 @@ for arg in sys.argv: if arg.startswith("--config="): - import Utilities + import Globals configDir = arg.replace("--config=", "") - Utilities.setConfigDir(configDir) + Globals.setConfigDir(configDir) sys.argv.remove(arg) break -from Utilities import Startup +from Globals import AppInfo + +from Toolbox import Startup def createMainWidget(argv): @@ -51,7 +53,7 @@ ("--config=configDir", "use the given directory as the one containing the config files"), ] - appinfo = Startup.makeAppInfo(sys.argv, + appinfo = AppInfo.makeAppInfo(sys.argv, "Eric5 UI Previewer", "file", "UI file previewer",
--- a/eric5_unittest.py Mon Oct 01 19:55:49 2012 +0200 +++ b/eric5_unittest.py Tue Oct 02 19:53:31 2012 +0200 @@ -16,13 +16,15 @@ for arg in sys.argv: if arg.startswith("--config="): - import Utilities + import Globals configDir = arg.replace("--config=", "") - Utilities.setConfigDir(configDir) + Globals.setConfigDir(configDir) sys.argv.remove(arg) break -from Utilities import Startup +from Globals import AppInfo + +from Toolbox import Startup def createMainWidget(argv): @@ -48,7 +50,7 @@ ("--config=configDir", "use the given directory as the one containing the config files"), ] - appinfo = Startup.makeAppInfo(sys.argv, + appinfo = AppInfo.makeAppInfo(sys.argv, "Eric5 Unittest", "file", "Graphical unit test application",
--- a/eric5_webbrowser.py Mon Oct 01 19:55:49 2012 +0200 +++ b/eric5_webbrowser.py Tue Oct 02 19:53:31 2012 +0200 @@ -17,9 +17,9 @@ for arg in sys.argv: if arg.startswith("--config="): - import Utilities + import Globals configDir = arg.replace("--config=", "") - Utilities.setConfigDir(configDir) + Globals.setConfigDir(configDir) sys.argv.remove(arg) break @@ -29,8 +29,10 @@ except ImportError: sys.path.insert(2, os.path.join(os.path.dirname(__file__), "ThirdParty", "Pygments")) -from Utilities import Startup -import Utilities +import Globals +from Globals import AppInfo + +from Toolbox import Startup def createMainWidget(argv): @@ -68,13 +70,13 @@ "use the given directory as the one containing the config files"), ("--search=word", "search for the given word") ] - appinfo = Startup.makeAppInfo(sys.argv, + appinfo = AppInfo.makeAppInfo(sys.argv, "eric5 Web Browser", "file", "web browser", options) - if not Utilities.checkBlacklistedVersions(): + if not Globals.checkBlacklistedVersions(): sys.exit(100) res = Startup.simpleAppStartup(sys.argv,