本文整理汇总了C++中JoyDPadButton::setIgnoreEventState方法的典型用法代码示例。如果您正苦于以下问题:C++ JoyDPadButton::setIgnoreEventState方法的具体用法?C++ JoyDPadButton::setIgnoreEventState怎么用?C++ JoyDPadButton::setIgnoreEventState使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JoyDPadButton
的用法示例。
在下文中一共展示了JoyDPadButton::setIgnoreEventState方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setIgnoreEventState
void SetJoystick::setIgnoreEventState(bool ignore)
{
QHashIterator<int, JoyButton*> iter(buttons);
while (iter.hasNext())
{
JoyButton *button = iter.next().value();
if (button)
{
button->setIgnoreEventState(ignore);
}
}
QHashIterator<int, JoyAxis*> iter2(axes);
while (iter2.hasNext())
{
JoyAxis *axis = iter2.next().value();
if (axis)
{
JoyAxisButton *naxisbutton = axis->getNAxisButton();
naxisbutton->setIgnoreEventState(ignore);
JoyAxisButton *paxisbutton = axis->getPAxisButton();
paxisbutton->setIgnoreEventState(ignore);
}
}
QHashIterator<int, JoyDPad*> iter3(hats);
while (iter3.hasNext())
{
JoyDPad *dpad = iter3.next().value();
if (dpad)
{
QHash<int, JoyDPadButton*>* dpadbuttons = dpad->getButtons();
QHashIterator<int, JoyDPadButton*> iterdpadbuttons(*dpadbuttons);
while (iterdpadbuttons.hasNext())
{
JoyDPadButton *dpadbutton = iterdpadbuttons.next().value();
if (dpadbutton)
{
dpadbutton->setIgnoreEventState(ignore);
}
}
}
}
QHashIterator<int, JoyControlStick*> iter4(sticks);
while (iter4.hasNext())
{
JoyControlStick *stick = iter4.next().value();
if (stick)
{
QHash<JoyControlStick::JoyStickDirections, JoyControlStickButton*> *stickButtons = stick->getButtons();
QHashIterator<JoyControlStick::JoyStickDirections, JoyControlStickButton*> iterstickbuttons(*stickButtons);
while (iterstickbuttons.hasNext())
{
JoyControlStickButton *stickbutton = iterstickbuttons.next().value();
stickbutton->setIgnoreEventState(ignore);
}
}
}
QHashIterator<int, VDPad*> iter5(vdpads);
while (iter5.hasNext())
{
VDPad *vdpad = iter5.next().value();
if (vdpad)
{
QHash<int, JoyDPadButton*>* dpadbuttons = vdpad->getButtons();
QHashIterator<int, JoyDPadButton*> itervdpadbuttons(*dpadbuttons);
while (itervdpadbuttons.hasNext())
{
JoyDPadButton *dpadbutton = itervdpadbuttons.next().value();
dpadbutton->setIgnoreEventState(ignore);
}
}
}
}