'Get widget by index.
If no tabs and index specified the current active widget is returned.'

def get_widget(self, index=None, path=None, tabs=None):

    if (index and tabs):
        return tabs.widget(index)
    elif (path and tabs):
        return tabs.widget(index)
    elif self.plugin:
        index = self.plugins_instances.index(self.plugin)
        return self.plugins_tabs[index][0].currentWidget()
    else:
        return self.plugins_tabs[0][0].currentWidget()
