Emits the record clicked signal for the given item, provided the
        signals are not currently blocked.
        
        :param      item | <QTreeWidgetItem>
939
def emitRecordMiddleClicked(self, item):
        
        # emit that the record has been double clicked
        if isinstance(item, XOrbRecordItem) and not self.signalsBlocked():
            self.recordMiddleClicked.emit(item.record())
595765
function(item) {
      var t = this,
          now = Date.now(),
          msSinceLastSend = now - t.lastSendTime;

      // Queue the item
      t.queue.push(item);

      // Send the bundle?
      if (msSinceLastSend > t.interval) {
        // It's been a while since the last send.  Send it now.
        t._send();
      }
      else {
        // Start the timer if it's not already running
        if (!t.timer) {
          t.timer = setTimeout(function(){
            t._send();
          }, t.interval - msSinceLastSend);
        }
      }
    }
639105
def add(self, item):
        
        if self._is_stringable(item) or self._is_qstring(item):
            self.items.append(PlainText(item))
        elif isinstance(item, MessageElement):
            self.items.append(item)
        elif item is None or (hasattr(item, 'isNull') and item.isNull()):
            self.items.append(PlainText(
                tr('Null (None) found from the data.')))
        elif isinstance(item, tuple) or isinstance(item, list):
            for i in item:
                # Recursive call
                self.add(i)
        else:
            raise InvalidMessageItemError(item, item.__class__)
1248833
def _notify_single_item(self, item):
        """"""
        # channels that this individual item has already triggered
        # (dont want to trigger them again)
        triggered_channels = set()
        for key_set in self.watch_keys:
            # only pluck keys if they exist
            plucked = {
                key_name: item[key_name]
                for key_name in key_set if key_name in item
            }
            route_keys = expand_dict_as_keys(plucked)
            for route in route_keys:
                channels = self.get_route_items(route) or {}
                LOG.debug('route table match: %s -> %s', route, channels)
                if not channels:
                    LOG.debug(
                        'no subscribers for message.\nkey %s\nroutes: %s',
                        route,
                        self._routes
                    )
                for channel in channels:
                    if channel in triggered_channels:
                        LOG.debug('skipping dispatch to %s', channel)
                        continue
                    LOG.debug('routing dispatch to %s: %s', channel, item)
                    try:
                        channel.notify(item) and triggered_channels.add(channel)
                    except Exception:  # noqa
                        LOG.exception('Channel notification failed')
        return triggered_channels
1276355
def unselect_item(self, item):
        
        self.queue_draw_item(item)
        if item.model in self._selection:
            with self._suppress_selection_events():
                self._selection.remove(item.model)
            self.emit('selection-changed', self._get_selected_items())
408950
def emitDataChanged(self, treeItem):  # TODO: move to BaseTreeItem?
        
        indexLeft, indexRight = self.indexTupleFromItem(treeItem)
        checkItem = self.getItem(indexLeft)
        assert checkItem is treeItem, "{} != {}".format(checkItem, treeItem) # TODO: remove
        self.dataChanged.emit(indexLeft, indexRight)
456200
def on_select(self, item, action):
        

        if not isinstance(item, int):
            item = self.items.index(item)

        self._on_select[item] = action
931240
@Override
    public void onItemClick(int row, int column) {
        EditItemDialog.newInstance(
                row,
                column,
                mCsvFileDataSource.getColumnHeaderData(column),
                mCsvFileDataSource.getItemData(row, column))
                .show(getChildFragmentManager(), EditItemDialog.class.getSimpleName());
    }
515770
void onItemClick(MouseEvents.ClickEvent event, Object itemId, Object propertyId) {

        setValue(null);
        select(itemId);
        if (event.getButton().equals(MouseButton.RIGHT) || (propertyId == null)) {
            m_menu.setEntries(
                getMenuEntries(),
                Collections.singleton((((CmsPublishJobBase)getValue()).getPublishHistoryId()).getStringValue()));
            m_menu.openForTable(event, itemId, propertyId, CmsQueuedTable.this);
        } else if (event.getButton().equals(MouseButton.LEFT) && PROP_RESOURCES.equals(propertyId)) {
            showResourceDialog(((CmsPublishJobBase)getValue()).getPublishHistoryId().getStringValue());
        } else if (event.getButton().equals(MouseButton.LEFT) && PROP_PROJECT.equals(propertyId)) {
            if (!(getValue() instanceof CmsPublishJobEnqueued)) {
                showReportDialog((((CmsPublishJobBase)getValue()).getPublishHistoryId().getStringValue()));
            }
        }
    }
556087
def show_data(self, item):
        
        child, cookie = self.mainview_tree.GetFirstChild(item)
        child_list = []
        while child.IsOk():
            child_list.append(child)
            child, cookie = self.mainview_tree.GetNextChild(item, cookie)

        lc = self.nodeview_lc
        lc.DeleteAllItems()
        for i, child in enumerate(child_list):
            text = self.mainview_tree.GetItemText(child)
            try:
                k, v = [s.strip() for s in text.split(':')]
            except ValueError:
                k, v = text, '...'
            idx = lc.InsertItem(MAXNROW, v)
            lc.SetItem(idx, 1, k)
1184825
function(item) {
      var self = this;
      var items = Array.isArray(item) ? item : [item];
      var added = false;
      _.each(items, function(item) {
        if(!_.contains(self.items, item)) {
          self.items.push(item);
          if(item && item.klass == 'Instance') {
            item.once('delete', function() {
              self.remove(item);
            });
          };
          added = true;
        }
      });
      if(added) {
        self.emit('add');
        self.emit('change:size');
        self.emit('change');
      }
      return self;
    }
88018
public boolean onItemClick(IDrawerItem selectedDrawerItem) {
        //We only need to clear if the new item is selectable
        if (selectedDrawerItem.isSelectable()) {
            //crossfade if we are cross faded
            if (mCrossFader != null) {
                if (mCrossFader.isCrossfaded()) {
                    mCrossFader.crossfade();
                }
            }
            //update everything
            setSelection(selectedDrawerItem.getIdentifier());

            return false;
        } else {
            return true;
        }
    }
850151
@SuppressWarnings("unchecked")
    public void addItemEventListener(@SuppressWarnings("rawtypes") ItemEventListener listener) {
        StanzaListener conListener = new ItemEventTranslator(listener);
        itemEventToListenerMap.put(listener, conListener);
        pubSubManager.getConnection().addSyncStanzaListener(conListener, new EventContentFilter(EventElementType.items.toString(), "item"));
    }
885472
def on_item_toggled(self, index, state=None):
        """"""
        if not index.data(model.IsIdle):
            return self.info("Cannot toggle")

        if not index.data(model.IsOptional):
            return self.info("This item is mandatory")

        if state is None:
            state = not index.data(model.IsChecked)

        index.model().setData(index, state, model.IsChecked)

        # Withdraw option to publish if no instances are toggled
        play = self.findChild(QtWidgets.QWidget, "Play")
        validate = self.findChild(QtWidgets.QWidget, "Validate")
        any_instances = any(index.data(model.IsChecked)
                            for index in self.data["models"]["instances"])
        play.setEnabled(any_instances)
        validate.setEnabled(any_instances)

        # Emit signals
        if index.data(model.Type) == "instance":
            instance = self.data["models"]["instances"].items[index.row()]
            util.defer(
                100, lambda: self.controller.emit_(
                    signal="instanceToggled",
                    kwargs={"new_value": state,
                            "old_value": not state,
                            "instance": instance}))

        if index.data(model.Type) == "plugin":
            util.defer(
                100, lambda: self.controller.emit_(
                    signal="pluginToggled",
                    kwargs={"new_value": state,
                            "old_value": not state,
                            "plugin": index.data(model.Object)}))
362458
def put (self, item):
        
        with self.mutex:
            self._put(item)
            self.not_empty.notify()
833624
public static <T> void fire(final HasItemAddedOnInitHandlers<T> source, T item) {
        if (TYPE != null) {
            ItemAddedOnInitEvent<T> event = new ItemAddedOnInitEvent<T>(item);
            source.fireEvent(event);
        }
    }
626984
def print_item_callback(item):
    """"""
    print('&listen [{}, {}={}]'.format(
        item.get('cmd', ''),
        item.get('id', ''),
        item.get('data', '')))