예제 #1
0
 def testGetIconSvg(self):
     """
     Tests get_icon svg path
     """
     self.assertTrue(GuiUtils.get_icon_svg('icon.svg'))
     self.assertIn('icon.svg', GuiUtils.get_icon_svg('icon.svg'))
     self.assertFalse(GuiUtils.get_icon_svg('not_an_icon.svg'))
예제 #2
0
    def initGui(self):
        """Create the menu entries and toolbar icons inside the QGIS GUI."""

        icon_path = GuiUtils.get_icon_svg('icon.svg')
        self.add_action(icon_path,
                        text=self.tr('QQuake'),
                        callback=self.run,
                        parent=self.iface.mainWindow())

        # will be set False in run()
        self.first_start = True