コード例 #1
0
void JointManager::findAndPutView(std::vector<std::string>  &jointList, std::string jointName, std::string label
									, int row, PosVelEffView::Alignment alignment, int id, bool shiftMirrored)
{
	for (unsigned i = 0; i < jointList.size(); i++)
	{
		if(jointList.at(i) == jointName)
		{
			PosVelEffView *view = new PosVelEffView(alignment, jointList.at(i), id, this);
			view->setOnShiftMirrored(shiftMirrored);
				
			connect(view, SIGNAL(positionChanged()), this, SLOT(handlePositionChanged()));
			connect(view, SIGNAL(velocityChanged()), this, SLOT(handleVelocityChanged()));
			connect(view, SIGNAL(effortChanged()), this, SLOT(handleEffortChanged()));
			
			connect(view, SIGNAL(changeForID(int,PosVelEffView::Field,float))
					, this, SLOT(handleChangeForID(int,PosVelEffView::Field,float)));
			
			if(alignment == PosVelEffView::LEFT || alignment == PosVelEffView::NO_PAIR)
				jointsLayout->addWidget(view, row, 0);
			else
				jointsLayout->addWidget(view, row, 2);
			
			QLabel *nameLabel = new QLabel();
			nameLabel->setAlignment(Qt::AlignCenter);
			nameLabel->setText(QString::fromStdString(label));

			jointsLayout->addWidget(nameLabel, row, 1);	
			jointViews.push_back(view);
			return;
		}
	}
コード例 #2
0
void QQuickTouchPoint::setVelocity(const QVector2D &velocity)
{
    if (_velocity == velocity)
        return;
    _velocity = velocity;
    emit velocityChanged();
}
コード例 #3
0
void QDeclarativeAudioListener::setVelocity(const QVector3D &velocity)
{
#ifdef DEBUG_AUDIOENGINE
    qDebug() << "QDeclarativeAudioListener::setVelocity";
#endif
    m_engine->engine()->setListenerVelocity(velocity);
    emit velocityChanged();
}
コード例 #4
0
void PosVelEffView::handleVelocityChanged()
{
	velocityHistory->valueChanged(velocitySpin->value());
	velocityChanged();

	if(isShiftPressed() && id != connectedID)
		changeForID(connectedID, PosVelEffView::VELOCITY, velocitySpin->value());
}
コード例 #5
0
/*!
    \qmlproperty real SmoothedAnimation::velocity

    This property holds the average velocity allowed when tracking the 'to' value.

    The default velocity of SmoothedAnimation is 200 units/second.

    Setting this to -1 disables the velocity value.
*/
void QDeclarativeSmoothedAnimation::setVelocity(qreal v)
{
    Q_D(QDeclarativeSmoothedAnimation);
    if (d->anim->velocity == v)
        return;

    d->anim->velocity = v;
    emit velocityChanged();
}
コード例 #6
0
void PosVelEffView::setField(Field field, float value)
{
	if(field == PosVelEffView::POSITION)
	{
		setPosition(value);
		positionChanged();
		return;
	}
	else if(field == PosVelEffView::EFFORT)
	{
		setEffort(value);
		effortChanged();
		return;
	}
	else if(field == PosVelEffView::VELOCITY)
	{
		setVelocity(value);
		velocityChanged();
		return;
	}
}
コード例 #7
0
ファイル: moc_controller.cpp プロジェクト: iHSU/music-genius
int Controller::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QToolBox::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: channelChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 1: velocityChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 2: base_octaveChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 3: transposeChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 4: enableEdit((*reinterpret_cast< bool(*)>(_a[1]))); break;
        case 5: durationChanged((*reinterpret_cast< QAction*(*)>(_a[1]))); break;
        case 6: pauseFlag((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 7: dotEnable((*reinterpret_cast< bool(*)>(_a[1]))); break;
        case 8: setCurrentChannel((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 9: setCurrentVelocity((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 10: setCurrentBase_octave((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 11: setCurrentTranspose((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 12: setCurrentSpeed((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 13: setCurrentMeter((*reinterpret_cast< Meter(*)>(_a[1]))); break;
        case 14: setCurrentKey((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 15: on_btn_note_dot_clicked((*reinterpret_cast< bool(*)>(_a[1]))); break;
        case 16: on_btn_run_clicked(); break;
        case 17: on_slider_speed_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 18: on_slider_meter_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 19: on_slider_key_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 20: on_slider_transpose_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 21: on_slider_base_octave_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 22: on_slider_channel_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 23: on_slider_velocity_valueChanged((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 24: durationCheck((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 25: pauseCheck((*reinterpret_cast< int(*)>(_a[1]))); break;
        default: ;
        }
        _id -= 26;
    }
    return _id;
}