def paintIndex(widget):
    """
    Returns the index of the current paint operation
    Args:
        widget (PaintWidget): PaintWidget object calling the function
    Returns:
        (int): Index of the painting operation
    """
    paintType = ""
    for key in widget.fx.paintOptions:
        if widget.optionWidgets[key].isChecked():
            paintType = key
    return widget.fx.paintOptions.index(paintType)