本文整理汇总了C++中ToggleButton::getComponentID方法的典型用法代码示例。如果您正苦于以下问题:C++ ToggleButton::getComponentID方法的具体用法?C++ ToggleButton::getComponentID怎么用?C++ ToggleButton::getComponentID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ToggleButton
的用法示例。
在下文中一共展示了ToggleButton::getComponentID方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: id
bool
SettingsWindow::fieldsAreValid(void)
{
ODL_ENTER(); //####
int badCount = 0;
String badArgs;
String primaryChannel;
// Counterintuitively, we check the values from the descriptors first, before checking the
// endpoint, port or tag values.
_argsToUse.clear();
for (size_t ii = 0, maxf = _standardFields.size(); maxf > ii; ++ii)
{
FormField * aField = _standardFields[static_cast<int>(ii)];
if (aField && (! aField->validateField(_argsToUse)))
{
if (0 < badArgs.length())
{
badArgs += "\n";
}
badArgs += aField->getName();
++badCount;
}
}
if (0 == badCount)
{
// Add the extra arguments here.
for (size_t ii = 0, maxf = _extraFields.size(); maxf > ii; ++ii)
{
FormField * aField = _extraFields[static_cast<int>(ii)];
_argsToUse.add(aField->getText());
}
}
if (_canSetEndpoint)
{
if (_endpointField->validateField())
{
_endpointToUse = _endpointField->getText();
}
else
{
if (0 < badArgs.length())
{
badArgs += "\n";
}
badArgs += "Endpoint";
++badCount;
}
}
if (_canSetPort)
{
if (_portField->validateField())
{
_portToUse = _portField->getText();
}
else
{
if (0 < badArgs.length())
{
badArgs += "\n";
}
badArgs += "Port";
++badCount;
}
}
if (_canSetTag)
{
_tagToUse = _tagField->getText();
}
if (_canUseModifier)
{
// Determine which of the radio buttons has been selected.
for (int ii = 0, maxb = _tagModifierGroup->getNumChildComponents(); maxb > ii; ++ii)
{
ToggleButton * tb =
reinterpret_cast<ToggleButton *>(_tagModifierGroup->getChildComponent(ii));
if (tb && tb->getToggleState())
{
string id(tb->getComponentID().toStdString());
const char * startPtr = id.c_str();
char * endPtr;
int intValue = static_cast<int>(strtol(startPtr, &endPtr, 10));
if ((startPtr != endPtr) && (! *endPtr))
{
_tagModifierCount = intValue;
}
else
{
_tagModifierCount = 0;
}
}
}
}
if (0 < badCount)
{
String message1((1 < badCount) ? "arguments are" : "argument is");
//.........这里部分代码省略.........