示例#1
0
    def delete(self):
        db = Database()

        if self._id is None:
            raise ModuleCoreException(ModuleCoreException.get_msg(2))

        Action.delete_actions_with_widget(self)

        View.delete_mappings_with_widget(self)

        css_manager = CSSManager()
        css_manager.delete_definitions_with_widget(self)

        stmnt = "DELETE FROM WIDGETS WHERE WGT_ID = ? ;"
        db.query(stmnt,(self._id,),commit=True)
        PokeManager.add_activity(ActivityType.WIDGET)