Exemple #1
0
    def initGui(self):
        # Create action that will start plugin configuration
        self.action = QAction(
            QIcon(":/plugins/ymactools2/YMAC_icon.png"),
            u"YMAC Tools for YMAC v 2.x", self.iface.mainWindow())
        # connect the action to the run method
        self.action.triggered.connect(self.run)

        # Add toolbar button and menu item
        self.iface.addToolBarIcon(self.action)
        self.iface.addPluginToMenu(u"&YMAC Tools 2", self.action)

        self.iface.newProjectCreated.connect(self.newProject)
        self.iface.projectRead.connect(self.loadProject)
        QgsMapLayerRegistry.instance().layersAdded.connect(self.layersAdded)

        Tools.loadWMSPresets()
        Tools.loadWFSPresets()
        DockableWindow.getDockable(True)
Exemple #2
0
 def run(self):
     DockableWindow.getDockable()