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