void CroppingLabel::setEditable(bool editable) { this->editable = editable; if (editable) setCursor(Qt::PointingHandCursor); else unsetCursor(); }
void GTextBrowserItem::hoverEnterEvent( QGraphicsSceneHoverEvent *e ) { GWidgetItem::hoverEnterEvent( e ); qDebug( "TextBrowser hover enter %s", _item->cursor().data() ); if ( _item->cursor()=="auto" ) { qDebug( "unset cursor" ); if ( hasCursor() ) unsetCursor(); } else setCursor( PHI::toCursorShape( _item->cursor() ) ); }
void MaskablePixmapWidget::setClickable(bool clickable) { this->clickable = clickable; if (clickable) setCursor(Qt::PointingHandCursor); else unsetCursor(); }
void Drawer::mouseMoveEvent(QMouseEvent* event) { unsetCursor(); if (world) cursorMovedTime = world->getTime(); if (event->buttons().testFlag(panningButton) && panning) { panningPositionCurrent = event->posF(); event->accept(); } }
void SVPlotMainWindow::load() { QStringList fileNames = QFileDialog::getOpenFileNames(this, "Open file ...", config().recentDirectory()); setCursor(Qt::WaitCursor); foreach (const QString& fileName, fileNames) load(fileName); unsetCursor(); }
// ... void GLWidget::disableTracking() { // If current cursor is the click cursor, update mouse cursor (POP on the cursor stack). if (cursor().shape() == cursorClick.shape()) { unsetCursor(); } // Deactivate mouse tracking even while not clicking. setMouseTracking(false); // Deactivate keyboard tracking. flagGrabKeyboard = false; releaseKeyboard(); // Using a private flag since this call seems not working! }
void RDTreeWidget::leaveEvent(QEvent *e) { unsetCursor(); clearHovers(invisibleRootItem(), NULL); emit leave(e); QTreeWidget::leaveEvent(e); }
void Letter::setClickable(bool clickable) { m_clickable = clickable; if (m_clickable) { setCursor(Qt::PointingHandCursor); setColor(Qt::white); } else { unsetCursor(); setColor(QColor("#aaa")); } }
void VCLabel::mouseReleaseEvent(QMouseEvent* e) { if (_app->mode() == App::Design) { unsetCursor(); m_resizeMode = false; setMouseTracking(false); } }
//Searching bool TextEdit::search(const QString& text, bool next) { if(next) //search next { QTextCursor cursor(textCursor().block().next()); setTextCursor(cursor); } else unsetCursor(); //new search return find(text); }
void KoResourceSelector::mouseMoveEvent( QMouseEvent * event ) { QStyleOptionComboBox option; option.initFrom( this ); QRect r = style()->subControlRect( QStyle::CC_ComboBox, &option, QStyle::SC_ComboBoxEditField, this ); if (r.contains(event->pos())) setCursor(Qt::PointingHandCursor); else unsetCursor(); }
void Selection::hoverMoveEvent(QGraphicsSceneHoverEvent * event) { if(isReadOnly()) return; if(rect().adjusted(THRESHOLD, THRESHOLD, -THRESHOLD, -THRESHOLD).contains(event->pos())) unsetCursor(); else setResizeCursor(event->pos()); }
void samplv1widget_filt::mouseReleaseEvent ( QMouseEvent *pMouseEvent ) { QFrame::mouseReleaseEvent(pMouseEvent); if (m_bDragging) { dragCurve(pMouseEvent->pos()); m_bDragging = false; unsetCursor(); } }
void CVisSystemCanvasNote::hoverLeaveEvent(QGraphicsSceneHoverEvent* he) { if(d->cursorShape != Qt::ArrowCursor) { unsetCursor(); d->cursorShape = Qt::ArrowCursor; } d->mouseOver = false; update(); Q_UNUSED(he); }
void qxgeditScale::mouseReleaseEvent ( QMouseEvent *pMouseEvent ) { QFrame::mouseReleaseEvent(pMouseEvent); dragNode(pMouseEvent->pos()); if (m_iDragNode >= 0) { m_iDragNode = -1; unsetCursor(); } }
void VideoDock::mouseMoveEvent(QMouseEvent *e) { if (QWidget *internalW = internalWidget()) { if (internalW->cursor().shape() == Qt::BlankCursor && ++pixels == 25) unsetCursor(internalW); hideCursorTim.start(g_hideCursorTimeout); } if (e) DockWidget::mouseMoveEvent(e); }
void VideoDock::leaveEvent(QEvent *e) { hideCursorTim.stop(); if (QWidget *internalW = internalWidget()) { if (internalW->cursor().shape() == Qt::BlankCursor) unsetCursor(internalW); } pixels = 0; DockWidget::leaveEvent(e); }
void Player::handleCursor(QMediaPlayer::MediaStatus status) { #ifndef QT_NO_CURSOR if (status == QMediaPlayer::LoadingMedia || status == QMediaPlayer::BufferingMedia || status == QMediaPlayer::StalledMedia) setCursor(QCursor(Qt::BusyCursor)); else unsetCursor(); #endif }
/*! \fn ViewerWidget::mouseReleaseEvent(QMouseEvent* e) */ void ViewerWidget::mouseReleaseEvent(QMouseEvent*) { timerMouseMove.start(2000); unsetCursor(); if (texture->setSize(QSize(0,0))) { //load full resolution image downloadTex(texture); } updateGL(); }
void WeatherButton::slotSettingsChanged( int category ) { if ( category != KApplication::SETTINGS_MOUSE ) return; bool changeCursor = KGlobalSettings::changeCursorOverIcon(); if ( changeCursor ) setCursor( KCursor::handCursor() ); else unsetCursor(); }
void ScanDialog::slotThreadDone(const KUrl& url, bool success) { if (!success) KMessageBox::error(0, i18n("Cannot save \"%1\" file", url.fileName())); if (iface()) iface()->refreshImages( KUrl::List(url) ); unsetCursor(); setEnabled(true); }
void PlayField::stopDrag() { if (!dragInProgress_) return; unsetCursor(); update(x2pixel(highlightX_), y2pixel(highlightY_), size_, size_); update(x2pixel(dragX_), y2pixel(dragY_), size_, size_); dragInProgress_ = false; }
void GRolloverButton::hoverLeaveEvent( QGraphicsSceneHoverEvent *e ) { GLabelItem::hoverLeaveEvent( e ); if ( _images.count() ) _pixLabel->setPixmap( _images.value( 0 ) ); QPalette pal=palette(); if ( _rolloverTextColor.isValid() ) pal.setColor( QPalette::WindowText, _color ); if ( _rolloverBackgroundColor.isValid() ) pal.setColor( QPalette::Window, _outlineColor ); setPalette( pal ); unsetCursor(); update(); }
void KItemListHeaderWidget::hoverMoveEvent(QGraphicsSceneHoverEvent* event) { QGraphicsWidget::hoverMoveEvent(event); const QPointF& pos = event->pos(); updateHoveredRoleIndex(pos); if (m_hoveredRoleIndex >= 0 && isAboveRoleGrip(pos, m_hoveredRoleIndex)) { setCursor(Qt::SplitHCursor); } else { unsetCursor(); } }
void QgsGeometryCheckerFixDialog::fixError() { mResolutionsBox->setEnabled( false ); mFixBtn->setVisible( false ); mSkipBtn->setVisible( false ); setCursor( Qt::WaitCursor ); QgsGeometryCheckError* error = mErrors.first(); mChecker->fixError( error, mRadioGroup->checkedId() ); unsetCursor(); mStatusLabel->setText( error->resolutionMessage() ); if ( error->status() == QgsGeometryCheckError::StatusFixed ) { mStatusLabel->setText( tr( "<b>Fixed:</b> %1" ).arg( error->resolutionMessage() ) ); } else if ( error->status() == QgsGeometryCheckError::StatusFixFailed ) { mStatusLabel->setText( tr( "<span color=\"red\"><b>Fixed failed:</b> %1</span>" ).arg( error->resolutionMessage() ) ); } else if ( error->status() == QgsGeometryCheckError::StatusObsolete ) { mStatusLabel->setText( tr( "<b>Error is obsolete</b>" ) ); } mErrors.removeFirst(); while ( !mErrors.isEmpty() && mErrors.first()->status() >= QgsGeometryCheckError::StatusFixed ) { mErrors.removeFirst(); } mProgressBar->setValue( mProgressBar->maximum() - mErrors.size() ); if ( mErrors.isEmpty() ) { mButtonBox->addButton( QDialogButtonBox::Close ); mNextBtn->setVisible( false ); mFixBtn->setVisible( false ); mSkipBtn->setVisible( false ); mButtonBox->button( QDialogButtonBox::Abort )->setVisible( false ); } else { mNextBtn->setVisible( true ); mNextBtn->setFocus(); } adjustSize(); emit currentErrorChanged( error ); mIface->mapCanvas()->refresh(); }
/*! \fn ViewerWidget::mouseMoveEvent(QMouseEvent* e) */ void ViewerWidget::mouseMoveEvent(QMouseEvent* e) { int mdelta; if ( e->buttons() == Qt::LeftButton ) { //panning QPoint diff = e->pos()-startdrag; texture->move(diff); updateGL(); startdrag = e->pos(); } else if ( e->buttons() == Qt::RightButton ) { //zooming // //if mouse pointer reached upper or lower boder, special treatment in order //to keep zooming enabled in that special case if ( previous_pos.y() == e->y() ) { if ( e->y() == 0 ) { // mouse pointer is at upper edge, therefore assume zoom in mdelta = 1; } else { // mouse pointer is as lower edge, therefore assume zoom out mdelta = -1; } } else { // mouse pointer is in the middle of the screen, normal operation mdelta = previous_pos.y()-e->y(); } zoom(mdelta, startdrag, zoomfactor_mousemove ); previous_pos = e->pos(); } else { //no key is pressed while moving mouse //don't do anything if ctrl is pressed if (timerMouseMove.isActive()) { //ctrl is not pressed, no zooming, therefore restore and hide cursor in 2 sec unsetCursor(); timerMouseMove.start(2000); } } return; }
void VCXYPad::mouseReleaseEvent(QMouseEvent* e) { if (mode() == Doc::Operate) { /* Mouse moves the XY point in operate mode */ setMouseTracking(false); unsetCursor(); VCWidget::mouseReleaseEvent(e); } VCWidget::mouseReleaseEvent(e); }
void CTrackerMainWindow::applySettings() { setCursor(Qt::WaitCursor); setEnabled(false); ui.lStatus->setText("Initializing..."); setupUDP(); setupFOB(); updateRotation(); ui.btnApply->setEnabled(true); setEnabled(true); unsetCursor(); }
void KBounceGameWidget::closeGame() { if ( m_state != BeforeFirstGame && m_state != GameOver ) { closeLevel(); unsetCursor(); m_state = GameOver; emit stateChanged( m_state ); emit gameOver(); redraw(); } }
void GLWidget::changeEvent(QEvent *event) { switch (event->type()) { case QEvent::WindowStateChange: // Hide cursor if the window is fullscreen, otherwise show it if (windowState() == Qt::WindowFullScreen) setCursor(Qt::BlankCursor); else unsetCursor(); break; default: break; } }