void LineEdit::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) { ungrabKeyboard(); d->mState = PrivateLineEdit::NORMAL; setCursor(Qt::ArrowCursor); update(); }
long GUISUMOAbstractView::onKeyRelease(FXObject* o, FXSelector sel, void* data) { FXEvent* e = (FXEvent*) data; if ((e->state & ALTMASK) == 0) { ungrabKeyboard(); setDefaultCursor(getApp()->getDefaultCursor(DEF_ARROW_CURSOR)); } return FXGLCanvas::onKeyRelease(o, sel, data); }
void QAttribute::setSelected(bool selected) { this->selct = selected; Repaint(); if (selected){ grabRefer->EnableGrabber(this,0); grabKeyboard(); } else{ grabRefer->DisableGrabber(); ungrabKeyboard(); } }
void cleanUp(AppInfo *app) { cancelInputTimeout(app); XDestroyWindow(app->dpy, app->dialog->dialogWindow); destroyGCs(app); destroyDialog(app); if (app->buf) { memset(app->buf, 0, app->bufSize); } freeIf(app->buf); ungrabPointer(app); ungrabKeyboard(app); ungrabServer(app); }
void QGraphicsItemResizable::mousePressEvent(QGraphicsSceneMouseEvent *event) { ispressed = true; if (select) select = false; else select = true; if (select) grabKeyboard(); else ungrabKeyboard(); first = event->scenePos();// prendo la posizione isResize = isnear(first);// vedo se è in basso a destra if (isResize) QApplication::setOverrideCursor(QCursor(Qt::SizeFDiagCursor));// setto il cursore di resize else QApplication::setOverrideCursor(QCursor(Qt::DragMoveCursor));// setto il cursore di spostamento prepareGeometryChange(); update(boundingRect()); }