本文整理汇总了C++中MidiDevice::inRoutes方法的典型用法代码示例。如果您正苦于以下问题:C++ MidiDevice::inRoutes方法的具体用法?C++ MidiDevice::inRoutes怎么用?C++ MidiDevice::inRoutes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MidiDevice
的用法示例。
在下文中一共展示了MidiDevice::inRoutes方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: rbClicked
//.........这里部分代码省略.........
if (dev->deviceType() == MidiDevice::JACK_MIDI)
{
if (dev->openFlags() & 1)
{
item->tableWidget()->item(item->row(), DEVCOL_OUTROUTES)->setText(tr("out"));
}
else
{
item->tableWidget()->item(item->row(), DEVCOL_OUTROUTES)->setText("");
}
}
return;
case DEVCOL_INROUTES:
case DEVCOL_OUTROUTES:
{
if (!checkAudioDevice())
return;
if (audioDevice->deviceType() != AudioDevice::JACK_AUDIO) //Only if Jack is running.
return;
if (!dev)
return;
// Only Jack midi devices.
if (dev->deviceType() != MidiDevice::JACK_MIDI)
return;
if (!(dev->openFlags() & ((col == DEVCOL_OUTROUTES) ? 1 : 2)))
return;
RouteList* rl = (col == DEVCOL_OUTROUTES) ? dev->outRoutes() : dev->inRoutes(); // p3.3.55
QMenu* pup = 0;
int gid = 0;
std::list<QString> sl;
pup = new QMenu(this);
//A temporary Route to us for matching later
QString currentRoute("");
bool routeSelected = false;
_redisplay:
pup->clear();
gid = 0;
// Jack input ports if device is writable, and jack output ports if device is readable.
sl = (col == DEVCOL_OUTROUTES) ? audioDevice->inputPorts(true, _showAliases) : audioDevice->outputPorts(true, _showAliases);
QAction* act;
act = pup->addAction(tr("Show first aliases"));
act->setData(gid);
act->setCheckable(true);
act->setChecked(_showAliases == 0);
++gid;
act = pup->addAction(tr("Show second aliases"));
act->setData(gid);
act->setCheckable(true);
act->setChecked(_showAliases == 1);
++gid;
pup->addSeparator();
for (std::list<QString>::iterator ip = sl.begin(); ip != sl.end(); ++ip)
{