Override Qt method
964716
def flags(self, index):
        """"""
        column = index.column()

        if index.isValid():
            if column in [C.COL_START, C.COL_END]:
#                return Qt.ItemFlags(Qt.ItemIsEnabled | Qt.ItemIsSelectable)
                return Qt.ItemFlags(Qt.ItemIsEnabled)
            else:
                return Qt.ItemFlags(Qt.ItemIsEnabled | Qt.ItemIsSelectable)
#                return Qt.ItemFlags(Qt.ItemIsEnabled)
        else:
            return Qt.ItemFlags(Qt.ItemIsEnabled)
594985
def handle_qt
      unless tc.qt.check_once
        puts '### WARN: QT prerequisites not complete!'
      end
      @settings['ADD_CFLAGS'] += tc.qt.cflags
      @settings['ADD_CXXFLAGS'] += tc.qt.cflags
      @settings['ADD_LDFLAGS'] += tc.qt.ldflags
      @settings['ADD_LIBS'] += tc.qt.libs
    end
961457
private boolean overridingMethodFound(ExecutableElement method) {
        TypeElement containingClass = utils.getEnclosingTypeElement(method);
        for (ExecutableElement listmethod : methlist) {
            if (containingClass == utils.getEnclosingTypeElement(listmethod)) {
                // it's the same method.
                return true;
            }
            TypeElement te = utils.overriddenClass(listmethod);
            if (te == null) {
                continue;
            }
            if (te == containingClass || utils.isSubclassOf(te, containingClass)) {
                return true;
            }
        }
        return false;
    }
15229
function overrideConfig() {
    _.merge(Elixir.config, require(path.join(process.cwd(), 'elixirConfig.js')));
}
386871
def override(self, obj):
        """"""
        for field in obj.__class__.export_fields:
            setattr(self, field, getattr(obj, field))
1011464
function override (server) {
  ['trace', 'log', 'info', 'warn', 'error'].forEach(method => {
    const target = method === 'log' ? 'debug' : method
    console[method] = wrapper.bind(undefined, server, target)
  })
}
1357937
def contextMenuEvent(self, event):
        
        menu = QtWidgets.QTextEdit.createStandardContextMenu(self)

        # create max.lines spin box:
        w = QtWidgets.QWidget()
        l = QtWidgets.QHBoxLayout()
        w.setLayout(l)
        e = QtWidgets.QSpinBox()
        e.setRange(1, 1e6)
        e.setValue(self.MAXLINES)
        e.valueChanged.connect(self.document().setMaximumBlockCount)
        l.addWidget(QtWidgets.QLabel('Max. lines'))
        l.addWidget(e)

        # add spinbox to menu:
        a = QtWidgets.QWidgetAction(self)
        a.setDefaultWidget(w)
        menu.addAction(a)

        menu.exec_(event.globalPos())
464354
def action2button(action, autoraise=True, text_beside_icon=False, parent=None):
    """"""
    if parent is None:
        parent = action.parent()
    button = QToolButton(parent)
    button.setDefaultAction(action)
    button.setAutoRaise(autoraise)
    if text_beside_icon:
        button.setToolButtonStyle(Qt.ToolButtonTextBesideIcon)
    return button
743703
def setup(self, fname):
        """"""
        combo_label = QLabel(_("Select a run configuration:"))
        self.combo = QComboBox()
        self.combo.setMaxVisibleItems(20)
        self.combo.setSizeAdjustPolicy(QComboBox.AdjustToMinimumContentsLength)
        self.combo.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed)
        
        self.stack = QStackedWidget()

        configurations = _get_run_configurations()
        for index, (filename, options) in enumerate(configurations):
            if fname == filename:
                break
        else:
            # There is no run configuration for script *fname*:
            # creating a temporary configuration that will be kept only if
            # dialog changes are accepted by the user
            configurations.insert(0, (fname, RunConfiguration(fname).get()))
            index = 0
        for filename, options in configurations:
            widget = RunConfigOptions(self)
            widget.set(options)
            self.combo.addItem(filename)
            self.stack.addWidget(widget)
        self.combo.currentIndexChanged.connect(self.stack.setCurrentIndex)
        self.combo.setCurrentIndex(index)

        self.add_widgets(combo_label, self.combo, 10, self.stack)
        self.add_button_box(QDialogButtonBox.Ok|QDialogButtonBox.Cancel)

        self.setWindowTitle(_("Run configuration per file"))
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)
1083901
def mousePressEvent(self, event):
        """"""
        # Raise the main application window on click
        self.parent.raise_()
        self.raise_()

        if event.button() == Qt.RightButton:
            pass
884308
def keyPressEvent(self, event):
        """"""
        event, text, key, ctrl, shift = restore_keyevent(event)

        if key == Qt.Key_Slash and self.isVisible():
            self.show_find_widget.emit()
242864
def qteIsMiniApplet(self, obj):
        
        try:
            ret = obj._qteAdmin.isMiniApplet
        except AttributeError:
            ret = False

        return ret
810429
def _none():
    """"""

    Mock = type("Mock", (), {"__getattr__": lambda Qt, attr: None})

    Qt.__binding__ = "None"
    Qt.__qt_version__ = "0.0.0"
    Qt.__binding_version__ = "0.0.0"
    Qt.QtCompat.loadUi = lambda uifile, baseinstance=None: None
    Qt.QtCompat.setSectionResizeMode = lambda *args, **kwargs: None

    for submodule in _common_members.keys():
        setattr(Qt, submodule, Mock())
        setattr(Qt, "_" + submodule, Mock())
1337539
def keyPressEvent(self, event):
        
        if event.key() == Qt.Key_Return or event.key() == Qt.Key_Enter:
            if self.add_current_text_if_valid():
                self.selected()
                self.hide_completer()
        elif event.key() == Qt.Key_Escape:
            self.set_current_text(self.selected_text)
            self.hide_completer()
        else:
            QComboBox.keyPressEvent(self, event)
4244
def override(self, value):
        """"""
        if self._value is not value:
            return _ScopedValueOverrideContext(self, value)
        else:
            return empty_context
243200
def override(self, key, value):
        
        keys = key.split('.')
        if len(keys) > 1:
            if keys[0] != "plugins":
                raise AttributeError("no such setting: %r" % key)
            self.plugins.override(keys[1:], value)
        else:
            self.overrides[key] = value
            self._uncache(key)