本文整理汇总了C++中QErrorMessage::setModal方法的典型用法代码示例。如果您正苦于以下问题:C++ QErrorMessage::setModal方法的具体用法?C++ QErrorMessage::setModal怎么用?C++ QErrorMessage::setModal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QErrorMessage
的用法示例。
在下文中一共展示了QErrorMessage::setModal方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setPresetBehaviour
void CParticleSystemPage::setPresetBehaviour(int index)
{
updateLifeMgtPresets();
if (index == _Node->getPSPointer()->getBehaviourType()) return;
if (index == NL3D::CParticleSystem::SpellFX ||
index == NL3D::CParticleSystem::SpawnedEnvironmentFX)
{
NL3D::CPSLocatedBindable *lb;
if (!_Node->getPSPointer()->canFinish(&lb))
{
_ui.presetBehaviourComboBox->setCurrentIndex(_Node->getPSPointer()->getBehaviourType());
QErrorMessage *errorMessage = new QErrorMessage();
errorMessage->setModal(true);
if (!lb)
{
errorMessage->showMessage(tr("Can't perform operation : the system is flagged with 'No max nb steps' or uses the preset 'Spell FX', "
"and thus, should have a finite duration. Please remove that flag first."));
errorMessage->exec();
}
else
{
errorMessage->showMessage(tr("The system must have a finite duration for this setting! Please check that the following object "
"doesn't live forever or doesn't create a loop in the system :") + QString(lb->getName().c_str()));
errorMessage->exec();
}
delete errorMessage;
return;
}
}
_Node->getPSPointer()->activatePresetBehaviour((NL3D::CParticleSystem::TPresetBehaviour) index);
updateLifeMgtPresets();
updateModifiedFlag();
}
示例2: setNoMaxNBSteps
void CParticleSystemPage::setNoMaxNBSteps(bool state)
{
_ui.maxStepsWidget->setEnabled(!state);
if (state == _Node->getPSPointer()->getBypassMaxNumIntegrationSteps()) return;
if (state && !_Node->getPSPointer()->canFinish())
{
QErrorMessage *errorMessage = new QErrorMessage();
errorMessage->setModal(true);
errorMessage->showMessage(tr("The system must have a finite duration for this setting! Please check that."));
errorMessage->exec();
delete errorMessage;
_ui.maxStepsWidget->setEnabled(state);
_ui.noMaxNBStepsCheckBox->setChecked(!state);
return;
}
_Node->getPSPointer()->setBypassMaxNumIntegrationSteps(state);
updateModifiedFlag();
}