Handles dopped content event.

        :param event: Content dropped event.
        :type event: QEvent
199141
def __handle_dropped_content(self, event):
        

        if not event.mimeData().hasUrls():
            return

        urls = event.mimeData().urls()

        self.__engine.start_processing("Loading Files ...", len(urls))
        for url in event.mimeData().urls():
            path = foundations.strings.to_string(url.path())
            LOGGER.debug("> Handling dropped '{0}' file.".format(path))
            path = (platform.system() == "Windows" or platform.system() == "Microsoft") and \
                   re.search(r"^\/[A-Z]:", path) and path[1:] or path
            self.load_path(path) and self.restore_development_layout()
            self.__engine.step_processing()
        self.__engine.stop_processing()
280130
@Override
    public void handleEvent(Event event) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
            Tr.event(this, tc, "Received event: " + event.getTopic());
        }
        // if (event.getTopic().equals(PURGE_EVENT)) {
        this.sessionMgr.startPurge();
        // }
    }
609732
def on_moved(self, event):
        
        self.on_deleted(events.FileDeletedEvent(event.src_path))
        self.on_created(events.FileCreatedEvent(event.dest_path))
57492
def handle(self, event):
        
        callback = getattr(self, 'on_{event}'.format(event=event.event), None)
        callback(event)
86319
public void handleEvent(Event event) {
        String topic = event.getTopic();
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "Received event topic: " + topic);
        }
        HttpInboundLink link = event.getProperty(CallbackIDs.CALLBACK_HTTPICL.getName(), HttpInboundLink.class);
        if (null != link) {
            if (tc.isEventEnabled()) {
                Tr.event(tc, "Processing request on new thread; " + link);
            }
            link.ready(link.getVirtualConnection());
        } else {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                Tr.event(tc, "Unable to process pipelined request with null link");
            }
        }
    }
790447
def _handle_event(self, connection, event):
        
        with self.mutex:
            matching_handlers = sorted(
                self.handlers.get("all_events", [])
                + self.handlers.get(event.type, [])
            )
            for handler in matching_handlers:
                result = handler.callback(connection, event)
                if result == "NO MORE":
                    return
1252523
@SuppressWarnings("unused")
    private void discard(IRTMPEvent event) {
        if (event instanceof IStreamData<?>) {
            log.debug("Discarding: {}", ((IStreamData<?>) event).toString());
            IoBuffer data = ((IStreamData<?>) event).getData();
            if (data != null) {
                log.trace("Freeing discarded event data");
                data.free();
                data = null;
            }
        }
        event.setHeader(null);
    }
657098
def dropEvent(self, event: QDropEvent):
        items = [item for item in self.items(event.scenePos()) if isinstance(item, GraphicsItem) and item.acceptDrops()]
        item = None if len(items) == 0 else items[0]
        if len(event.mimeData().urls()) > 0:
            self.files_dropped.emit(event.mimeData().urls())

        indexes = list(event.mimeData().text().split("/")[:-1])

        group_nodes = []
        file_nodes = []
        for index in indexes:
            try:
                row, column, parent = map(int, index.split(","))
                if parent == -1:
                    parent = self.tree_root_item
                else:
                    parent = self.tree_root_item.child(parent)
                node = parent.child(row)
                if node.is_group:
                    group_nodes.append(node)
                else:
                    file_nodes.append(node)
            except ValueError:
                continue

        # Which Nodes to add?
        nodes_to_add = []
        
        for group_node in group_nodes:
            nodes_to_add.extend(group_node.children)
        nodes_to_add.extend([file_node for file_node in file_nodes if file_node not in nodes_to_add])
        protocols_to_add = [node.protocol for node in nodes_to_add]

        ref_item = item
        position = None if ref_item is None else item.drop_indicator_position
        self.add_protocols(ref_item, position, protocols_to_add)
        super().dropEvent(event)
903476
def closeEvent(self, event):
        
        if self.inimodel.get_edited():
            r = self.doc_modified_prompt()
            if r == QtGui.QMessageBox.Yes:
                event.accept()
            else:
                event.ignore()
        else:
            event.accept()
1323002
function (event) {
            var toBeDisposed = false;
            if (!event.$DomEvent) {
                event = new aria.DomEvent(event);
                toBeDisposed = true;
            }

            event.isSpecialKey = true;
            event.ctrlKey = true;
            event.charCode = 0;

            this._dom_onkeydown.call(this, event);

            if (toBeDisposed) {
                event.$dispose();
            }
        }
425129
def event(self, event):
        
        if event.type() == QEvent.KeyPress:
            if (event.key() == Qt.Key_Tab or event.key() == Qt.Key_Space):
                text = self.text()
                cursor = self.cursorPosition()
                # fix to include in "undo/redo" history
                if cursor != 0 and text[cursor-1] == ' ':
                    text = text[:cursor-1] + ROW_SEPARATOR + ' ' +\
                        text[cursor:]
                else:
                    text = text[:cursor] + ' ' + text[cursor:]
                self.setCursorPosition(cursor)
                self.setText(text)
                self.setCursorPosition(cursor + 1)
                return False
        return QWidget.event(self, event)
62932
function handleErrorEvent(event) {
        var data = getData(event);
        if (data) {
            viewerAPI.fire('realtimeerror', { error: data.message });
            if (data.close) {
                realtime.destroy();
            }
        }
    }
276225
public void postEvent (DEvent event)
    {
        if (_tevent != null) {
            _tevent.postEvent(event);

        } else if (_omgr != null) {
            _omgr.postEvent(event);

        } else {
            log.info("Dropping event for non- or no longer managed object", "oid", getOid(),
                     "class", getClass().getName(), "event", event);
        }
    }
1243513
def childEvent(self, event):    
        
        super(AbstractDragView, self).childEvent(event)
        if event.type() == QtCore.QEvent.ChildRemoved:
            # hack to catch drop offs   
            if self.originalPos is not None:
                selected = self.limbo_component
                self.model().insertItem(self.originalPos, selected)
                self.originalPos = None
                self.dragStartPosition = None
                self.viewport().update()
648976
def event(self, event):
        """"""
        if event.type() == QtCore.QEvent.Close:
            modifiers = self.app.queryKeyboardModifiers()
            shift_pressed = QtCore.Qt.ShiftModifier & modifiers
            states = self.app.controller.states

            if shift_pressed:
                print("Force quitted..")
                self.app.controller.host.emit("pyblishQmlCloseForced")
                event.accept()

            elif any(state in states for state in ("ready", "finished")):
                self.app.controller.host.emit("pyblishQmlClose")
                event.accept()

            else:
                print("Not ready, hold SHIFT to force an exit")
                event.ignore()

        return super(Window, self).event(event)
1143255
def focusOutEvent(self, event):
        
        self.clicked_outside = True
        return super(QLineEdit, self).focusOutEvent(event)
15314
function (event) {
                var
                    reader = event.target,
                    buffer,
                    len,
                    result,
                    idx;
                _gpfAssert(reader === this._reader, "Unexpected change of reader");
                if (reader.error) {
                    gpfFireEvent.call(this,
                        gpfI.IReadableStream.ERROR,
                        {
                            // According to W3C
                            // http://www.w3.org/TR/domcore/#interface-domerror
                            error: {
                                name: reader.error.name,
                                message: reader.error.message
                            }
                        },
                        this._eventsHandler
                    );
                } else if (reader.readyState === FileReader.DONE) {
                    buffer = new Int8Array(reader.result);
                    len = buffer.length;
                    result = [];
                    for (idx = 0; idx < len; ++idx) {
                        result.push(buffer[idx]);
                    }
                    gpfFireEvent.call(this, gpfI.IReadableStream.EVENT_DATA, {buffer: result}, this._eventsHandler);
                }
            }