本文整理汇总了C++中PathObject::path方法的典型用法代码示例。如果您正苦于以下问题:C++ PathObject::path方法的具体用法?C++ PathObject::path怎么用?C++ PathObject::path使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PathObject
的用法示例。
在下文中一共展示了PathObject::path方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: oscAction
void MuseScore::oscAction()
{
PathObject* pathObject = qobject_cast<PathObject*>(sender());
QString path = pathObject->path().mid(9);
QAction* a = getAction(path.toLocal8Bit().data());
a->trigger();
}
示例2: oscMuteChannel
void MuseScore::oscMuteChannel(double val)
{
if(!cs)
return;
PathObject* po = (PathObject*) sender();
int i = po->path().mid(5).toInt() - 1;
QList<MidiMapping>* mms = cs->midiMapping();
if( i >= 0 && i < mms->size()) {
MidiMapping mm = mms->at(i);
Channel* channel = mm.articulation;
channel->mute = (val==0.0f ? false : true);
if (mixer)
mixer->partEdit(i)->mute->setCheckState(val==0.0f ? Qt::Unchecked:Qt::Checked);
}
}
示例3: oscPanChannel
void MuseScore::oscPanChannel(double val)
{
if(!cs)
return;
PathObject* po = (PathObject*) sender();
int i = po->path().mid(4).toInt() - 1;
QList<MidiMapping>* mms = cs->midiMapping();
if( i >= 0 && i < mms->size()) {
MidiMapping mm = mms->at(i);
Channel* channel = mm.articulation;
int iv = lrint((val + 1) * 64);
seq->setController(channel->channel, CTRL_PANPOT, iv);
channel->volume = iv;
if (mixer)
mixer->partEdit(i)->pan->setValue(iv);
}
}
示例4: oscVolChannel
void MuseScore::oscVolChannel(double val)
{
if(!cs)
return;
PathObject* po = (PathObject*) sender();
int i = po->path().mid(4).toInt() - 1;
QList<MidiMapping>* mms = cs->midiMapping();
if( i >= 0 && i < mms->size()) {
MidiMapping mm = mms->at(i);
Channel* channel = mm.articulation;
int iv = lrint(val*127);
seq->setController(channel->channel, CTRL_VOLUME, iv);
channel->volume = iv;
if (iledit)
iledit->partEdit(i)->volume->setValue(iv);
}
}