Starts a new drag event for this tree widget.  Overloading from the
        default QTreeWidget class to define a better pixmap option when
        dragging many items.
        
        :param      supportedActions | <QtCore.Qt.DragActions>
974833
def startDrag( self, supportedActions ):
        
        if ( not self.useDragPixmaps() ):
            return super(XTreeWidget, self).startDrag(supportedActions)
        
        filt  = lambda x: x.flags() & QtCore.Qt.ItemIsDragEnabled
        items = filter(filt, self.selectedItems())
        if ( not items ):
            return
        
        data = self.mimeData(items)
        if ( not data ):
            return
        
        if ( len(items) > 1 ):
            pixmap = self.dragMultiPixmap()
        else:
            pixmap = self.dragSinglePixmap()
        
        # create the drag event
        drag = QtGui.QDrag(self)
        drag.setMimeData(data)
        drag.setPixmap(pixmap)
        
        drag.exec_(supportedActions, QtCore.Qt.MoveAction)
1294533
def dragMoveEvent(self, event):
        """"""
        if mimedata2url(event.mimeData()):
            event.setDropAction(Qt.CopyAction)
            event.accept()
        else:
            event.ignore()
668085
private void hookDraggableViewListener() {
    draggableView.setDraggableListener(new DraggableListener() {
      @Override public void onMaximized() {
        startVideo();
      }

      //Empty
      @Override public void onMinimized() {
        //Empty
      }

      @Override public void onClosedToLeft() {
        pauseVideo();
      }

      @Override public void onClosedToRight() {
        pauseVideo();
      }
    });
  }
213768
function addAction(action, ctrl) {
      this.addActionIcon(action, ctrl);
      if (!this.actionExists(action, ctrl)) {
        ctrl.actionListService.requiredActionsList.splice(action.index, 0, action.name);
        ctrl.actionListService.actionsToIndex[action.name] = action.index;
        ctrl.actionListService.onToggle[action.name] = action.onToggle;
        ctrl.actionListService.actionsToDisplay.unshift(action.name);
      }
    }
526521
def create_action(parent, text, shortcut=None, icon=None, tip=None,
                  toggled=None, triggered=None, data=None, menurole=None,
                  context=Qt.WindowShortcut):
    """"""
    action = QAction(text, parent)
    if triggered is not None:
        action.triggered.connect(triggered)
    if toggled is not None:
        action.toggled.connect(toggled)
        action.setCheckable(True)
    if icon is not None:
        action.setIcon(icon)
    if shortcut is not None:
        action.setShortcut(shortcut)
    if tip is not None:
        action.setToolTip(tip)
        action.setStatusTip(tip)
    if data is not None:
        action.setData(to_qvariant(data))
    if menurole is not None:
        action.setMenuRole(menurole)
    #TODO: Hard-code all shortcuts and choose context=Qt.WidgetShortcut
    # (this will avoid calling shortcuts from another dockwidget
    #  since the context thing doesn't work quite well with these widgets)
    action.setShortcutContext(context)
    return action
157950
@Override
    protected  void pushToSystem(HashMap<String, Object> cacheData, int supportedActions) {
        MouseInput.getInstance().notifyDragStart();
        ((MonocleApplication) Application.GetApplication()).enterDnDEventLoop();
        actionPerformed(Clipboard.ACTION_COPY_OR_MOVE);
    }
1333712
def _createAction(self, widget, iconFileName, text, shortcut, slot):
        
        icon = qutepart.getIcon(iconFileName)
        action = QAction(icon, text, widget)
        action.setShortcut(QKeySequence(shortcut))
        action.setShortcutContext(Qt.WidgetShortcut)
        action.triggered.connect(slot)

        widget.addAction(action)

        return action
425817
def _create_action(
            self,
            icon_name: Optional[str],
            title: str,
            slot_function: Callable[[None], None],
            tool_tip: Optional[str]=None)-> QAction:
        
        action = QAction(title, self)
        if icon_name:
            action.setIcon(QIcon.fromTheme(icon_name))
        action.triggered.connect(slot_function)
        if tool_tip:
            action.setToolTip(tool_tip)
        return action
740426
def hook_drag(self):
        
        widget = self.widget
        widget.mousePressEvent = self.mousePressEvent
        widget.mouseMoveEvent = self.mouseMoveEvent
        widget.mouseReleaseEvent = self.mouseReleaseEvent
250764
function (options) {
            if (!isObject(options)) {
                options = {};
            }

            this.options = extend({}, defaultOptions.base);

            var i,
                actions = ['drag', 'drop', 'resize', 'gesture'],
                methods = ['draggable', 'dropzone', 'resizable', 'gesturable'],
                perActions = extend(extend({}, defaultOptions.perAction), options[action] || {});

            for (i = 0; i < actions.length; i++) {
                var action = actions[i];

                this.options[action] = extend({}, defaultOptions[action]);

                this.setPerAction(action, perActions);

                this[methods[i]](options[action]);
            }

            var settings = [
                    'accept', 'actionChecker', 'allowFrom', 'deltaSource',
                    'dropChecker', 'ignoreFrom', 'origin', 'preventDefault',
                    'rectChecker', 'styleCursor'
                ];

            for (i = 0, len = settings.length; i < len; i++) {
                var setting = settings[i];

                this.options[setting] = defaultOptions.base[setting];

                if (setting in options) {
                    this[setting](options[setting]);
                }
            }

            return this;
        }
312567
def dropEvent( self, event ):
        
        filt = self.dragDropFilter()
        if not filt:
            super(XTreeWidget, self).dropEvent(event)
            return
        
        filt(self, event)
425491
function start(event, element, activate, context) {
    if (isObject(activate)) {
      context = activate;
      activate = false;
    }

    // do not move connections or the root element
    if (element.waypoints || !element.parent) {
      return;
    }

    var referencePoint = mid(element);

    dragging.init(event, referencePoint, 'shape.move', {
      cursor: 'grabbing',
      autoActivate: activate,
      data: {
        shape: element,
        context: context || {}
      }
    });

    // we've handled the event
    return true;
  }
1070190
@Override
  public boolean onTouchEvent(MotionEvent event) {
    FLog.v(TAG, "onTouchEvent: action: ", event.getAction());
    if (mIsEnabled && mIsGestureZoomEnabled) {
      return mGestureDetector.onTouchEvent(event);
    }
    return false;
  }
1130474
def _on_action_triggered(self):
        
        action = self.sender()
        assert isinstance(action, QtWidgets.QAction)
        path = action.data()
        self.open_requested.emit(path)
        self.update_actions()
452215
def insert_action(self, action, prev_action):
        
        if isinstance(prev_action, QtWidgets.QAction):
            index = self._actions.index(prev_action)
        else:
            index = prev_action
        action.setShortcutContext(QtCore.Qt.WidgetShortcut)
        self._actions.insert(index, action)
750805
function() {
    if (!this._shape.dragging) {
      this._shape.dragging = new L.Handler.PathDrag(this._shape);
    }
    this._shape.dragging.enable();
    this._shape
      .on('dragstart', this._onStartDragFeature, this)
      .on('dragend', this._onStopDragFeature, this);
  }
209212
def action(action_callback=None, **kwargs):
    

    if action_callback is None:
        return lambda fn: action(fn, **kwargs)
    else:
        return Action(action_callback, **kwargs).decorate_module(action_callback)