Convert the class name of a macro class to macro name.

        The name mangling inserts a '-' character after every capital
        letter and then lowers the entire string.

        Example: if the class name of ``macroCls`` is 'ThisIsAMacro'
        then this method will return 'this-is-a-macro', ie. every
        capital letter (except the first) will be prefixed with a
        hyphen and changed to lower case.

        The method returns the name mangled macro name or **None**
        if an error occurred.

        |Args|

        * ``macroCls`` (**QtmacsMacro**): ``QtmacsMacro``- or derived
          class (not an instance!)

        |Returns|

        **str**: the name mangled string or **None** if an error occurred.

        |Raises|

        * **QtmacsArgumentError** if at least one argument has an invalid type.

def qteMacroNameMangling(self, macroCls):
        """
        Convert the class name of a macro class to macro name.

        The name mangling inserts a '-' character after every capital
        letter and then lowers the entire string.

        Example: if the class name of ``macroCls`` is 'ThisIsAMacro'
        then this method will return 'this-is-a-macro', ie. every
        capital letter (except the first) will be prefixed with a
        hyphen and changed to lower case.

        The method returns the name mangled macro name or **None**
        if an error occurred.

        |Args|

        * ``macroCls`` (**QtmacsMacro**): ``QtmacsMacro``- or derived
          class (not an instance!)

        |Returns|

        **str**: the name mangled string or **None** if an error occurred.

        |Raises|

        * **QtmacsArgumentError** if at least one argument has an invalid type.
        """
        # Replace camel bump as hyphenated lower case string.
        macroName = re.sub(r"([A-Z])", r'-\1', macroCls.__name__)

        # If the first character of the class name was a
        # capital letter (likely) then the above substitution would have
        # resulted in a leading hyphen. Remove it.
        if macroName[0] == '-':
            macroName = macroName[1:]

        # Return the lower case string.
        return macroName.lower()