Filters the chart widget for the resize event to modify this scenes
        rect.
        
        :param      object | <QObject>
                    event | <QEvent>
193273
def eventFilter( self, object, event ):
        
        if ( event.type() != event.Resize ):
            return False
        
        size     = event.size()
        w        = size.width()
        h        = size.height()
        hpolicy  = Qt.ScrollBarAlwaysOff
        vpolicy  = Qt.ScrollBarAlwaysOff
        
        if ( self._minimumHeight != -1 and h < self._minimumHeight ):
            h      = self._minimumHeight
            vpolicy = Qt.ScrollBarAsNeeded
            
        if ( self._maximumHeight != -1 and self._maximumHeight < h ):
            h      = self._maximumHeight
            vpolicy = Qt.ScrollBarAsNeeded
        
        if ( self._minimumWidth != -1 and w < self._minimumWidth ):
            w      = self._minimumWidth
            hpolicy = Qt.ScrollBarAsNeeded
            
        if ( self._maximumWidth != -1 and self._maximumWidth < w ):
            w      = self._maximumWidth
            hpolicy = Qt.ScrollBarAsNeeded
        
        hruler = self.horizontalRuler()
        vruler = self.verticalRuler()
        
        hlen = hruler.minLength(Qt.Horizontal)
        vlen = hruler.minLength(Qt.Vertical)
        
        offset_w = 0
        offset_h = 0
        
#        if ( hlen > w ):
#            w        = hlen
#            hpolicy  = Qt.ScrollBarAlwaysOn
#            offset_h = 25
#        
#        if ( vlen > h ):
#            h        = vlen
#            vpolicy  = Qt.ScrollBarAlwaysOn
#            offset_w = 25
        
        self.setSceneRect(0, 0, w - offset_w, h - offset_h)
        object.setVerticalScrollBarPolicy(vpolicy)
        object.setHorizontalScrollBarPolicy(hpolicy)
        
        return False
1138940
def on_resize(self, event):
        
        self._update_transforms()
        
        if self._central_widget is not None:
            self._central_widget.size = self.size
            
        if len(self._vp_stack) == 0:
            self.context.set_viewport(0, 0, *self.physical_size)
1114012
def resizeEvent(self, event):
        
        super(XChart, self).resizeEvent(event)
        
        if self.isVisible():
            self.recalculate()
566107
def on_widget__configure_event(self, widget, event):
        '''
        
        '''
        if event.x < 0 and event.y < 0:
            # Widget has not been allocated a size yet, so do nothing.
            return
        self.resize(event.width, event.height)
106601
def resizeEvent( self, event ):
        
        super(XLineEdit, self).resizeEvent(event)
        self.adjustButtons()
330972
def wheelEvent(self, event):
        

        if event.modifiers() == Qt.ControlModifier:
            if event.delta() == 120:
                self.zoom_in()
            elif event.delta() == -120:
                self.zoom_out()
            event.ignore()
        else:
            QPlainTextEdit.wheelEvent(self, event)
880759
def eventFilter(self, widget, event):
        
        if event.type() == QEvent.KeyPress:
            key = event.key()
            shift = event.modifiers() & Qt.ShiftModifier

            if key == Qt.Key_Return:
                if shift:
                    self.return_shift_pressed.emit()
                else:
                    self.return_pressed.emit()

            if key == Qt.Key_Tab:
                if self.search_text.hasFocus():
                    self.replace_text.set_current_text(
                        self.search_text.currentText())
                self.focusNextChild()

        return super(FindReplace, self).eventFilter(widget, event)
191896
def resizeEvent(self, event):
        
        self.resized.emit()
        return super(WizardDialog, self).resizeEvent(event)
871947
def OnResizeGrid(self, event):
        """"""

        shape = min(event.shape[2], 2**30)
        self.SetItemCount(shape)
        event.Skip()
1049466
def resizeEvent(self, event):
        """"""
        self._viewIsDirty = True
        super(StimulusView, self).resizeEvent(event)
503133
def eventFilter(self, object, event):
        
        index = self.indexOf(object)
        pressed = event.type() == event.KeyPress
        released = event.type() == event.KeyRelease
        
        if index == -1 or \
           not (pressed or released) or \
           self.isEditorHandlingBlocked():
            return super(XSerialEdit, self).eventFilter(object, event)
        
        text = nativestring(event.text()).strip()
        
        # handle Ctrl+C (copy)
        if event.key() == QtCore.Qt.Key_C and \
           event.modifiers() == QtCore.Qt.ControlModifier and \
           pressed:
            self.copy()
            return True
        
        # handle Ctrl+X (cut)
        elif event.key() == QtCore.Qt.Key_X and \
             event.modifiers() == QtCore.Qt.ControlModifier and \
             pressed:
            if not self.isReadOnly():
                self.cut()
            return True
        
        # handle Ctrl+A (select all)
        elif event.key() == QtCore.Qt.Key_A and \
             event.modifiers() == QtCore.Qt.ControlModifier and \
             pressed:
            self.selectAll()
            return True
        
        # handle Ctrl+V (paste)
        elif event.key() == QtCore.Qt.Key_V and \
             event.modifiers() == QtCore.Qt.ControlModifier and \
             pressed:
            if not self.isReadOnly():
                self.paste()
            return True
        
        # ignore tab movements
        elif event.key() in (QtCore.Qt.Key_Tab, QtCore.Qt.Key_Backtab):
            pass
        
        # delete all selected text
        elif event.key() == QtCore.Qt.Key_Backspace:
            sel_text = self.selectedText()
            if sel_text and not self.isReadOnly():
                self.clearSelection()
                return True
        
        # ignore modified keys
        elif not released:
            return super(XSerialEdit, self).eventFilter(object, event)
        
        # move to the previous editor
        elif object.cursorPosition() == 0:
            if event.key() in (QtCore.Qt.Key_Backspace, QtCore.Qt.Key_Left):
                self.goBack()
        
        # move to next editor
        elif object.cursorPosition() == object.maxLength():
            valid_chars = string.ascii_letters + string.digits
            valid_text = text != '' and text in valid_chars
            
            if valid_text or event.key() == QtCore.Qt.Key_Right:
                self.goForward()
        
        return super(XSerialEdit, self).eventFilter(object, event)
280759
def resize(self, width, height):
        ''
        self.canvas.SetInitialSize(wx.Size(width, height))
        self.window.GetSizer().Fit(self.window)
1191103
def eventFilter(self, object, event):
        
        try:
            is_lineedit = object == self.lineEdit()
        except RuntimeError:
            is_lineedit = False
        
        try:
            is_nav = object == self._navigator
        except RuntimeError:
            is_nav = False
        
        if not (is_nav or is_lineedit):
            return super(XOrbColumnNavigatorBox, self).eventFilter(object, event)
        
        if event.type() == event.KeyPress:
            # accept lookup
            if event.key() in (Qt.Key_Enter, Qt.Key_Return, Qt.Key_Tab):
                self.acceptColumn()
                event.accept()
                return True
                
            # cancel lookup
            elif event.key() == Qt.Key_Escape:
                self.hidePopup()
                event.accept()
                return True
            
            # update the search info
            else:
                self.lineEdit().keyPressEvent(event)
                event.accept()
                return True
        
        elif is_nav and event.type() == event.Show:
            object.resizeToContents()
            object.horizontalScrollBar().setValue(0)
            
        elif event.type() == event.KeyRelease:
            self.lineEdit().keyReleaseEvent(event)
            self.navigator().blockSignals(True)
            self.navigator().setCurrentSchemaPath(self.lineEdit().text())
            self.navigator().blockSignals(False)
            event.accept()
            return True
        
        elif event.type() == event.MouseButtonPress:
            local_pos = object.mapFromGlobal(event.globalPos())
            in_widget = object.rect().contains(local_pos)
            
            if not in_widget:
                self.hidePopup()
                event.accept()
                return True
            
        return super(XOrbColumnNavigatorBox, self).eventFilter(object, event)
1221514
def eventFilter(self, watchedObject, event):
        
        if event.type() == QtCore.QEvent.KeyPress:
            key = event.key()
            if key in (Qt.Key_Tab, Qt.Key_Backtab):
                self.commitAndClose()
                return True
            else:
                return False

        return super(AbstractCtiEditor, self).eventFilter(watchedObject, event)
902449
function () {
            var chart = this,
              reflow = function (e) {
                  chart.reflow(e);
              };


            addEvent(win, 'resize', reflow);
            addEvent(chart, 'destroy', function () {
                removeEvent(win, 'resize', reflow);
            });
        }
302339
def resizeEvent(self, event):
        
        value = self.config.value
        self.idx_fig.fitInView(value['x_min'],
                               value['y_min'],
                               value['x_max'] - value['x_min'],
                               value['y_max'] - value['y_min'])
416604
function () {
            var _this = this;

            window.addEventListener(
                'resize',
                function () {
                    _this.onResize(event);
                },
                false
            );

            this._canvas.addEventListener(
                'dblclick',
                function(event) {
                    return _this.onDoubleClick(event);
                }
            );

            this._canvas.addEventListener(
                'mousedown',
                function (event) {
                    _this.onMouseDown(event);
                }
            );

            this._canvas.addEventListener(
                'mouseup',
                function (event) {
                    _this.onMouseUp(event);
                }
            );

            window.addEventListener(
                'mouseup',
                function (event) {
                    _this.onMouseUp(event);
                }
            );

            this._canvas.addEventListener(
                'mousemove',
                function (event) {
                    _this.onMouseMove(event);
                }
            );

            this._canvas.addEventListener(
                'mousewheel',
                function (event) {
                    event.stopPropagation();
                    event.preventDefault();
                    _this.onMouseWheel(event);
                    return false;
                },
                false
            );

            document.addEventListener(
                'keydown',
                function (e) {
                    var keyCode = e.keyCode || e.which;

                    // Handle escape key
                    if (keyCode === 13) {
                        _this._onSave(
                            _this.getSoftcropData()
                        );
                        e.preventDefault();
                        e.stopPropagation();
                        return false;
                    }

                    if (keyCode === 27) {
                        _this._onCancel();
                        e.preventDefault();
                        e.stopPropagation();
                        return false;
                    }

                    // Handle tab key
                    if (keyCode === 9) {
                        var crops = _this._image.getSoftCrops();
                        var current;
                        for (var n = 0; n < crops.length; n++) {
                            if (_this._crop === crops[n]) {
                                current = n;
                                break;
                            }
                        }

                        if (typeof current != 'undefined') {
                            n += (!e.shiftKey) ? 1 : -1;

                            if (n < 0) {
                                n = crops.length - 1;
                            }
                            else if (n + 1 > crops.length) {
                                n = 0;
                            }
                            _this.setActiveCrop(crops[n]);
                        }

                        e.preventDefault();
                        e.stopPropagation();
                        return false;
                    }
                },
                false
            );
        }