'Reimplement Qt method'

def dropEvent(self, event):

    event.ignore()
    action = event.dropAction()
    if (action not in (Qt.MoveAction, Qt.CopyAction)):
        return
    dst = self.get_filename(self.indexAt(event.pos()))
    (yes_to_all, no_to_all) = (None, None)
    src_list = [to_text_string(url.toString()) for url in event.mimeData().urls()]
    if (len(src_list) > 1):
        buttons = ((((QMessageBox.Yes | QMessageBox.YesAll) | QMessageBox.No) | QMessageBox.NoAll) | QMessageBox.Cancel)
    else:
        buttons = (QMessageBox.Yes | QMessageBox.No)
    for src in src_list:
        if (src == dst):
            continue
        dst_fname = osp.join(dst, osp.basename(src))
        if osp.exists(dst_fname):
            if ((yes_to_all is not None) or (no_to_all is not None)):
                if no_to_all:
                    continue
            elif osp.isfile(dst_fname):
                answer = QMessageBox.warning(self, _('Project    explorer'), (_('File    <b>%s</b>    already    exists.<br>Do    you    want    to    overwrite    it?') % dst_fname), buttons)
                if (answer == QMessageBox.No):
                    continue
                elif (answer == QMessageBox.Cancel):
                    break
                elif (answer == QMessageBox.YesAll):
                    yes_to_all = True
                elif (answer == QMessageBox.NoAll):
                    no_to_all = True
                    continue
            else:
                QMessageBox.critical(self, _('Project    explorer'), (_('Folder    <b>%s</b>    already    exists.') % dst_fname), QMessageBox.Ok)
                event.setDropAction(Qt.CopyAction)
                return
        try:
            if (action == Qt.CopyAction):
                if osp.isfile(src):
                    shutil.copy(src, dst)
                else:
                    shutil.copytree(src, dst)
            else:
                if osp.isfile(src):
                    misc.move_file(src, dst)
                else:
                    shutil.move(src, dst)
                self.parent_widget.removed.emit(src)
        except EnvironmentError as error:
            if (action == Qt.CopyAction):
                action_str = _('copy')
            else:
                action_str = _('move')
            QMessageBox.critical(self, _('Project    Explorer'), (_('<b>Unable    to    %s    <i>%s</i></b><br><br>Error    message:<br>%s') % (action_str, src, to_text_string(error))))
