def run(self):
   plugin = currentPlugin()
   #update the plugin list first! The plugin could be removed from the list if was temporarily broken.
   updateAvailablePlugins()
   #try to load from scratch the plugin saved in QSettings if not loaded
   if not plugins.has_key(plugin):
     try:
       loadPlugin(plugin)
       startPlugin(plugin)
     except:
       pass
   updateAvailablePlugins()
   #give one chance for correct (not a loop)
   if not plugins.has_key(plugin):
     self.configure()
     plugin = currentPlugin()
   if plugins.has_key(plugin):
     reloadPlugin(plugin)
예제 #2
0
 def run(self):
     plugin = currentPlugin()
     #update the plugin list first! The plugin could be removed from the list if was temporarily broken.
     updateAvailablePlugins()
     #try to load from scratch the plugin saved in QSettings if not loaded
     if not plugins.has_key(plugin):
         try:
             loadPlugin(plugin)
             startPlugin(plugin)
         except:
             pass
     updateAvailablePlugins()
     #give one chance for correct (not a loop)
     if not plugins.has_key(plugin):
         self.configure()
         plugin = currentPlugin()
     if plugins.has_key(plugin):
         reloadPlugin(plugin)
  def __init__(self, parent):
    QDialog.__init__(self)
    self.iface = parent
    self.setupUi(self)
    self.plugins = plugins.keys()
    self.plugins.sort()
    #update the plugin list first! The plugin could be removed from the list if was temporarily broken.
    #Still doesn't work in every case. TODO?: try to load from scratch the plugin saved in QSettings if doesn't exist
    plugin = currentPlugin()
    updateAvailablePlugins()
    #if not plugins.has_key(plugin):
      #try:
        #loadPlugin(plugin)
        #startPlugin(plugin)
      #except:
        #pass
    #updateAvailablePlugins()

    for plugin in self.plugins:
      self.comboPlugin.addItem(plugin)
    plugin = currentPlugin()
    if plugins.has_key(plugin):
      self.comboPlugin.setCurrentIndex(self.plugins.index(plugin))
예제 #4
0
    def __init__(self, parent):
        QDialog.__init__(self)
        self.iface = parent
        self.setupUi(self)
        self.plugins = plugins.keys()
        self.plugins.sort()
        #update the plugin list first! The plugin could be removed from the list if was temporarily broken.
        #Still doesn't work in every case. TODO?: try to load from scratch the plugin saved in QSettings if doesn't exist
        plugin = currentPlugin()
        updateAvailablePlugins()
        #if not plugins.has_key(plugin):
        #try:
        #loadPlugin(plugin)
        #startPlugin(plugin)
        #except:
        #pass
        #updateAvailablePlugins()

        for plugin in self.plugins:
            self.comboPlugin.addItem(plugin)
        plugin = currentPlugin()
        if plugins.has_key(plugin):
            self.comboPlugin.setCurrentIndex(self.plugins.index(plugin))