# eric7.Toolbox.Startup

Module implementing some startup helper funcions.

### Global Attributes

application
loaded_translators

### Classes

None

### Functions

getDefaultIconPaths | Module function to determine the default icon paths.
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.
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.

## 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

## 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

Return:
  index of the '--' option (integer). This is used to tell the application, that all additional options don't belong to the application.

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
  Searchpath for the translations. (list of strings)
tn
  The translation to be loaded. (string)

Return:
  Tuple of a status flag and the loaded translator (int, QTranslator)

Up

## 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)

Return:
  the requested locale (string)

Up

## setLibraryPaths

setLibraryPaths()

Module function to set the Qt library paths correctly.

Up

## 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 eric'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)

Return:
  exit result (integer)

Up

## 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)

Up

## version

version(appinfo)

Module function to show the version information.

appinfo
  dictionary describing the application

Up