Registers given action name, optional arguments like a parent, icon, slot etc ... can be given.

        :param name: Action to register.
        :type name: unicode
        :param \*\*kwargs: Keywords arguments.
        :type \*\*kwargs: \*\*
        :return: Action.
        :rtype: QAction

def register_action(self, name, **kwargs):
        """
        Registers given action name, optional arguments like a parent, icon, slot etc ... can be given.

        :param name: Action to register.
        :type name: unicode
        :param \*\*kwargs: Keywords arguments.
        :type \*\*kwargs: \*\*
        :return: Action.
        :rtype: QAction
        """

        settings = foundations.data_structures.Structure(**{"parent": None,
                                                            "text": None,
                                                            "icon": None,
                                                            "icon_text": None,
                                                            "checkable": None,
                                                            "checked": None,
                                                            "status_tip": None,
                                                            "whats_this": None,
                                                            "tool_tip": None,
                                                            "shortcut": None,
                                                            "shortcut_context": None,
                                                            "slot": None})
        settings.update(kwargs)

        name = self.__normalize_name(name)
        category = foundations.namespace.get_namespace(name)
        name = foundations.namespace.remove_namespace(name)

        action = QAction(name, settings.parent or self)
        self.add_to_category(category, name, action)

        settings.text and action.setText(settings.text)
        settings.icon and action.setIcon(settings.icon)
        settings.icon_text and action.setIconText(settings.icon_text)
        settings.checkable and action.setCheckable(settings.checkable)
        settings.checked and action.set_checked(settings.checked)
        settings.status_tip and action.setStatusTip(settings.status_tip)
        settings.whats_this and action.setWhatsThis(settings.whats_this)
        settings.tool_tip and action.setToolTip(settings.tool_tip)
        settings.shortcut and action.setShortcut(QKeySequence(settings.shortcut))
        settings.shortcut_context and action.setShortcutContext(settings.shortcut_context)
        if settings.slot:
            self.__actions_signals_slots[action] = settings.slot
            action.triggered.connect(settings.slot)
        return action