# eric7.Toolbox.Startup

Module implementing some startup helper funcions.

### Global Attributes

application
loaded_translators

### Classes

None

### Functions

appStartup | Module function to start up an application that doesn't need a specialized start up.
getDefaultIconPaths | Module function to determine the default icon paths.
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.

## appStartup

appStartup(args, 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 eric's helper programs.

args (argparse.Namespace)
  namespace object created by ArgumentParser.parse_args() containing the parsed command line arguments
mwFactory (function)
  factory function generating the main widget. This function must accept the following parameter.
  args
    parsed command line arguments (argparse.Namespace)
quitOnLastWindowClosed (bool)
  flag indicating to quit the application, if the last window was closed
app (QApplication or None)
  reference to the application object
raiseIt (bool)
  flag indicating to raise the generated application window
installErrorHandler (bool)
  flag indicating to install an error handler dialog

Return:
  exit result

Return Type:
  int

Up

## getDefaultIconPaths

getDefaultIconPaths(application)

Module function to determine the default icon paths.

application (EricApplication)
  reference to the application object

Return:
  list of default icon paths

Return Type:
  list of str

Up

## initializeResourceSearchPath

initializeResourceSearchPath(application)

Module function to initialize the default mime source factory.

application (EricApplication)
  reference to the application object

Up

## loadTranslatorForLocale

loadTranslatorForLocale(dirs, tn)

Module function to find and load a specific translation.

dirs (list of str)
  searchpath for the translations
tn (str)
  translation to be loaded

Return:
  tuple containing a status flag and the loaded translator

Return Type:
  tuple of (int, QTranslator)

Up

## loadTranslators

loadTranslators(qtTransDir, app, translationFiles=())

Module function to load all required translations.

qtTransDir (str)
  directory of the Qt translations files
app (QApplication)
  reference to the application object
translationFiles (tuple of str)
  tuple of additional translations to be loaded

Return:
  the requested locale

Return Type:
  str

Up

## setLibraryPaths

setLibraryPaths()

Module function to set the Qt library paths correctly.

Up