def closeEvent(self, event):
        event.accept()
        if not self._proxy_ref:
            return
        proxy = self._proxy_ref()
        d = proxy.declaration
        d_event = CloseEvent()
        d.closing(d_event)
        if d_event.is_accepted():
            deferredCall(finalize_close, d)
        else:
            event.ignore()

    #--------------------------------------------------------------------------
    # Public API
    #--------------------------------------------------------------------------
Return an index into the Enum given a value.
dataset/ETHPy150Open nucleic/enaml/enaml/qt/qt_main_window.py/QCustomMainWindow.closeEvent--crossover with--dataset/ETHPy150Open openstack/nova/nova/objects/fields.py/ResourceClassField.index