eric6.Toolbox.Startup
Module implementing some startup helper funcions.
Global Attributes
application |
loaded_translators |
Classes
Functions
handleArgs |
Module function to handle the always present commandline options. |
initializeResourceSearchPath |
Module function to initialize the default mime source factory. |
loadTranslatorForLocale |
Module function to find and load a specific translation. |
loadTranslators |
Module function to load all required translations. |
setLibraryPaths |
Module function to set the Qt library paths correctly for windows systems. |
simpleAppStartup |
Module function to start up an application that doesn't need a specialized start up. |
usage |
Module function to show the usage information. |
version |
Module function to show the version information. |
handleArgs
handleArgs(argv, appinfo)
Module function to handle the always present commandline options.
- argv
-
list of commandline parameters (list of strings)
- appinfo
-
dictionary describing the application
- Returns:
-
index of the '--' option (integer). This is used to tell
the application, that all additional options don't belong to
the application.
initializeResourceSearchPath
initializeResourceSearchPath()
Module function to initialize the default mime source factory.
loadTranslatorForLocale
loadTranslatorForLocale(dirs, tn)
Module function to find and load a specific translation.
- dirs
-
Searchpath for the translations. (list of strings)
- tn
-
The translation to be loaded. (string)
- Returns:
-
Tuple of a status flag and the loaded translator
(int, QTranslator)
loadTranslators
loadTranslators(qtTransDir, app, translationFiles=())
Module function to load all required translations.
- qtTransDir
-
directory of the Qt translations files (string)
- app
-
reference to the application object (QApplication)
- translationFiles
-
tuple of additional translations to
be loaded (tuple of strings)
- Returns:
-
the requested locale (string)
setLibraryPaths
setLibraryPaths()
Module function to set the Qt library paths correctly for windows systems.
simpleAppStartup
simpleAppStartup(argv, appinfo, mwFactory, quitOnLastWindowClosed=True, app=None, raiseIt=True, installErrorHandler=False)
Module function to start up an application that doesn't need a specialized
start up.
This function is used by all of eric6's helper programs.
- argv
-
list of commandline parameters (list of strings)
- appinfo
-
dictionary describing the application
- mwFactory
-
factory function generating the main widget. This
function must accept the following parameter.
- argv
- list of commandline parameters (list of strings)
- quitOnLastWindowClosed=
-
flag indicating to quit the application,
if the last window was closed (boolean)
- app=
-
reference to the application object (QApplication or None)
- raiseIt=
-
flag indicating to raise the generated application
window (boolean)
- installErrorHandler=
-
flag indicating to install an error
handler dialog (boolean)
- Returns:
-
exit result (integer)
usage
usage(appinfo, optlen=12)
Module function to show the usage information.
- appinfo
-
dictionary describing the application
- optlen
-
length of the field for the commandline option (integer)
version
version(appinfo)
Module function to show the version information.
- appinfo
-
dictionary describing the application