本文整理汇总了C++中Attributes::getYsValue方法的典型用法代码示例。如果您正苦于以下问题:C++ Attributes::getYsValue方法的具体用法?C++ Attributes::getYsValue怎么用?C++ Attributes::getYsValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Attributes
的用法示例。
在下文中一共展示了Attributes::getYsValue方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: decode
bool AgentObserverMap::decode(QDataStream &in, TypesOfSubjects subject)
{
bool ret = false;
QString msg;
in >> msg;
// qDebug() << msg.split(PROTOCOL_SEPARATOR, QString::SkipEmptyParts);
Attributes * attrib = 0;
if (subject == TObsTrajectory)
{
attrib = getMapAttributes()->value("trajectory");
}
else
{
//@RAIAN: Neighborhood
if(subject == TObsCell)
{
attrib = getMapAttributes()->value(className);
}
//@RAIAN: FIM
else
{
// // ((subjectType == TObsAgent) || (subjectType == TObsAutomaton))
// attrib = getMapAttributes()->value("currentState" + className);
foreach (Attributes *attr, getMapAttributes()->values())
{
if (attr->getClassName() == className)
{
attrib = attr;
break;
}
}
}
}
if (attrib)
{
if (cleanImage)
attrib->clear();
ret = getProtocolDecoder().decode(msg, *attrib->getXsValue(), *attrib->getYsValue());
// getPainterWidget()->plotMap(attrib);
}
qApp->processEvents();
return ret;
}
示例2: draw
bool ObserverMap::draw(QDataStream &state)
{
bool decoded = false;
QString msg;
state >> msg;
QList<Attributes *> listAttribs = mapAttributes->values();
Attributes * attrib = 0;
connectTreeLayerSlot(false);
for (int i = 0; i < listAttribs.size(); i++)
{
attrib = listAttribs.at(i);
if (attrib->getType() == TObsCell)
{
attrib->clear();
decoded = protocolDecoder->decode(msg, *attrib->getXsValue(), *attrib->getYsValue());
if (decoded)
painterWidget->plotMap(attrib);
}
qApp->processEvents();
}
connectTreeLayerSlot(true);
// cria a legenda e exibe na tela
//@RAIAN: Troquei esta comparacao porque nao estava criando a legenda da segunda camada (No meu caso, a vizinhanca)
//if (/*decoded &&*/ legendWindow && (builtLegend < 1))
if ((legendWindow) && (builtLegend < mapAttributes->size()))
{
//@RAIAN: FIM
connectTreeLayerSlot(false);
legendWindow->makeLegend();
showLayerLegend();
painterWidget->replotMap();
connectTreeLayerSlot(true);
// exibe o zoom de janela
zoomWindow();
builtLegend++;
}
return decoded;
}