void Fader::mousePressEvent(QMouseEvent *ev) { if ( ev->button() == Qt::LeftButton && ev->modifiers() == Qt::ShiftModifier ){ MidiSenseWidget midiSense( this, true, this->getAction() ); midiSense.exec(); } }
void Knob::mousePressEvent(QMouseEvent *ev) { if ( ev->button() == Qt::LeftButton && ev->modifiers() == Qt::ShiftModifier ){ MidiSenseWidget midiSense( this, true, this->getAction() ); midiSense.exec(); } setCursor( QCursor( Qt::SizeVerCursor ) ); m_fMousePressValue = m_fValue; m_fMousePressY = ev->y(); }
void Rotary::mousePressEvent(QMouseEvent *ev) { setCursor( QCursor( Qt::SizeVerCursor ) ); m_fMousePressValue = m_fValue; m_fMousePressY = ev->y(); if ( m_bShowValueToolTip ) { char tmp[20]; sprintf( tmp, "%#.2f", m_fValue ); m_pValueToolTip->showTip( mapToGlobal( QPoint( -38, 1 ) ), QString( tmp ) ); } if ( ev->button() == Qt::LeftButton && ev->modifiers() == Qt::ShiftModifier ){ MidiSenseWidget midiSense( this, true, this->getAction() ); midiSense.exec(); } }
void Button::mousePressEvent(QMouseEvent*ev) { /* * Shift + Left-Click activate the midi learn widget */ if ( ev->button() == Qt::LeftButton && (ev->modifiers() & Qt::ShiftModifier) ){ MidiSenseWidget midiSense( this, true, this->getAction() ); midiSense.exec(); return; } m_bPressed = true; update(); emit mousePress(this); if ( ev->button() == Qt::LeftButton && __enable_press_hold) { m_timerTimeout = 2000; buttonPressed_timer_timeout(); } }
void ToggleButton::mousePressEvent(QMouseEvent *ev) { if ( ev->button() == Qt::LeftButton && ev->modifiers() == Qt::ShiftModifier ){ MidiSenseWidget midiSense( this, true, this->getAction() ); midiSense.exec(); return; } if (ev->button() == Qt::RightButton) { emit rightClicked(this); } else { if (m_bPressed) { m_bPressed = false; } else { m_bPressed = true; } update(); emit clicked(this); } }