Updates the item with the new data value.
        
        :param      editor  | <QtGui.QWidget>
                    model   | <QtGui.QModel>
                    index   | <QtGui.QModelIndex>
1505
def setModelData(self, editor, model, index):
        
        value = editor.currentText()
        model.setData(index, wrapVariant(value))
72705
def save_current(self):
        
        if self.current_widget() is not None:
            editor = self.current_widget()
            self._save(editor)
836415
def updateitem(self, key, new_val):
        
        if key not in self._position:
            raise KeyError(key)
        self[key] = new_val
1136290
void updateEditorValues(CmsEntity previous, CmsEntity updated) {

        if (!m_isDirectEdit && updated.getId().equals(m_entityId)) {
            // only apply the changes to the same locale entity
            updateEditorValues(previous, updated, getEntity(), Collections.<String> emptyList());
        }
    }
1143852
def on_edit_grid(self, event):
        """"""
        if not self.changes:
            self.changes = {event.Row}
        else:
            self.changes.add(event.Row)
        #self.changes = True
        try:
            editor = event.GetControl()
            editor.Bind(wx.EVT_KEY_DOWN, self.onEditorKey)
        except AttributeError:
            # if it's a EVT_GRID_EDITOR_SHOWN, it doesn't have the GetControl method
            pass
463277
def setEditorData(self, spinBox, index):
        
        if index.isValid():
            value = index.model().data(index, QtCore.Qt.EditRole)
            spinBox.setValue(value)
1097295
def set_current_editor(self, editor, update):
        """"""
        editor_id = editor.get_id()
        if editor_id in list(self.editor_ids.values()):
            item = self.editor_items[editor_id]
            if not self.freeze:
                self.scrollToItem(item)
                self.root_item_selected(item)
                self.__hide_or_show_root_items(item)
            if update:
                self.save_expanded_state()
                tree_cache = self.editor_tree_cache[editor_id]
                self.populate_branch(editor, item, tree_cache)
                self.restore_expanded_state()
        else:
            root_item = FileRootItem(editor.fname, self, editor.is_python())
            root_item.set_text(fullpath=self.show_fullpath)
            tree_cache = self.populate_branch(editor, root_item)
            self.__hide_or_show_root_items(root_item)
            self.root_item_selected(root_item)
            self.editor_items[editor_id] = root_item
            self.editor_tree_cache[editor_id] = tree_cache
            self.resizeColumnToContents(0)
        if editor not in self.editor_ids:
            self.editor_ids[editor] = editor_id
            self.ordered_editor_ids.append(editor_id)
            self.__sort_toplevel_items()
        self.current_editor = editor
1094674
def _update_index(self):
         
        d = self.declaration
        self.index = self.view.model.index(d.row, d.column)
        if self.delegate:
            self._refresh_count += 1
            timed_call(self._loading_interval, self._update_delegate)
1030260
function updateWordCount (editor) {
    var word_count   = $('.entry-word-count');
    var editor_value = editor.getValue ();

    if (editor_value.length) {
      if (editor_value.match(/\S+/g) === null) {
        word_count.html ('0 words');
      } else {
        word_count.html (editor_value.match(/\S+/g).length + ' words');
      }
    }
  }
554399
def refresh_plugin(self):
        """"""
        if self.tabwidget.count():
            editor = self.tabwidget.currentWidget()
        else:
            editor = None
        self.find_widget.set_editor(editor)
1020988
public void updateItem (T item)
    {
        if (_items == null) {
            return;
        }
        int idx = _items.indexOf(item);
        if (idx == -1) {
            _items.add(0, item);
        } else {
            _items.set(idx, item);
        }
    }
981887
def update_event(self, hint, obj):
        """"""

        tree = self.treeview
        data = obj
        item = self.get_item_by_data(obj)
        if item:
            if data.get_id() != tree.item(item, 'text'):
                tree.item(item, text=data.get_id())
            # if tree.parent(item) != '' and 'layout' in data:
            if tree.parent(item) != '':
                row = data.get_layout_property('row')
                col = data.get_layout_property('column')
                values = tree.item(item, 'values')
                if (row != values[1] or col != values[2]):
                    values = (data.get_class(), row, col)
                tree.item(item, values=values)
            self.draw_widget(item)
            self.app.set_changed()
14524
function (e, editor) {
        if (ko.isWriteableObservable(model)) {
            var editorValue = editor.html.get();
            var current = model();
            if (current !== editorValue) {
                model(editorValue);
            }
        }
    }
400914
def setEditorData(self, editor, index):
        """"""
        text = from_qvariant(index.model().data(index, Qt.DisplayRole), str)
        editor.setText(text)
733048
def add_item(self, item):
        

        self.beginInsertRows(QtCore.QModelIndex(),
                             self.rowCount(),
                             self.rowCount())

        item["parent"] = self
        item = Item(**item)
        self.items.append(item)
        self.endInsertRows()

        item.__datachanged__.connect(self._dataChanged)

        return item
546499
def createEditor(self, parent, column, op, value):
        
        try:
            cls = self._operatorMap[nativestring(op)].cls
        except KeyError, AttributeError:
            return None
        
        # create the new editor
        if cls:
            widget = cls(parent)
            widget.setAttribute(Qt.WA_DeleteOnClose)
            projexui.setWidgetValue(widget, value)
            return widget
        
        return None
514693
def add_editor_tab(self, editor):
        

        index = self.Script_Editor_tabWidget.addTab(editor, editor.get_file_short_name())
        LOGGER.debug("> Assigning '{0}' editor to '{1}' tab index.".format(editor, index))
        self.Script_Editor_tabWidget.setCurrentIndex(index)
        self.__set_tab_title(index)

        # Signals / Slots.
        editor.patterns_replaced.connect(self.__editor__patterns_replaced)
        editor.title_changed.connect(self.__editor__title_changed)
        editor.file_loaded.connect(self.__editor__file_loaded)
        editor.file_saved.connect(self.__editor__file_saved)
        editor.language_changed.connect(self.__editor__language_changed)
        editor.modification_changed.connect(self.__editor__modification_changed)
        editor.cursorPositionChanged.connect(
            self.Editor_Status_editorStatus._EditorStatus__editor__cursorPositionChanged)
        return index