'Bind widget to a QMainWindow instance.'

def __init__(self, main=None):

    BasePluginWidget.__init__(self, main)
    assert (self.CONF_SECTION is not None)
    (check_compatibility, message) = self.check_compatibility()
    if (not check_compatibility):
        self.show_compatibility_message(message)
    self.PLUGIN_PATH = os.path.dirname(inspect.getfile(self.__class__))
    self.main = main
    self.default_margins = None
    self.plugin_actions = None
    self.dockwidget = None
    self.mainwindow = None
    self.ismaximized = False
    self.isvisible = False
    try:
        self.shortcut = CONF.get('shortcuts', ('_/switch    to    %s' % self.CONF_SECTION))
    except configparser.NoOptionError:
        pass
    self.toggle_view_action = None
