示例#1
0
 def __init__( self, iface ):
     """initialize the plugin"""
     global control 
     try:
         control
     except NameError:
         control = TimeManagerControl(iface)
示例#2
0
 def __init__( self, iface ):
     """initialize the plugin"""
     global control
     try:
         control
     except NameError:
         try:
             lang=locale.getdefaultlocale()[0].split("_")[0]
         except:
             lang="en" # could not get locale, OSX may have this bug
             
         self.change_i18n(lang)
         control = TimeManagerControl(iface)
示例#3
0
 def __init__( self, iface ):
     """initialize the plugin"""
     global control
     try:
         control
     except NameError:
         try:
             overrideLocale = bool(QSettings().value("locale/overrideFlag", False))
             if not overrideLocale:
                 lang = QLocale.system().name().split("_")[0]
             else:
                 lang = QSettings().value("locale/userLocale", "").split("_")[0]
         except:
             lang="en" # could not get locale, OSX may have this bug
         info("Plugin language loaded: {}".format(lang))
         self.change_i18n(lang)
         control = TimeManagerControl(iface)
示例#4
0
 def __init__(self, iface):
     """initialize the plugin"""
     self.iface = iface
     self.control = TimeManagerControl(self.iface)