本文整理汇总了C++中PropertyPtr::getValue方法的典型用法代码示例。如果您正苦于以下问题:C++ PropertyPtr::getValue方法的具体用法?C++ PropertyPtr::getValue怎么用?C++ PropertyPtr::getValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PropertyPtr
的用法示例。
在下文中一共展示了PropertyPtr::getValue方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: notifyChangeDataSelector
void GroupTextureController::notifyChangeDataSelector(DataPtr _data, bool _changeOnlySelection)
{
mParentData = _data;
if (mParentData != nullptr && mParentData->getType()->getName() != mParentTypeName)
mParentData = nullptr;
std::string texture;
PropertyPtr property = PropertyUtility::getPropertyByName("Group", "Texture");
if (property != nullptr)
{
texture = property->getValue();
if (!property->eventChangeProperty.exist(this, &GroupTextureController::notifyChangeProperty))
property->eventChangeProperty.connect(this, &GroupTextureController::notifyChangeProperty);
}
std::string coord;
property = PropertyUtility::getPropertyByName("Group", "Size");
if (property != nullptr)
{
coord = property->getValue();
if (!property->eventChangeProperty.exist(this, &GroupTextureController::notifyChangeProperty))
property->eventChangeProperty.connect(this, &GroupTextureController::notifyChangeProperty);
}
mControl->setTextureValue(texture);
updateCoords(coord);
}
示例2: notifyChangeProperty
void GroupTextureController::notifyChangeProperty(PropertyPtr _sender)
{
if (!mActivated || !PropertyUtility::isDataSelected(_sender->getOwner()))
return;
if (_sender->getOwner()->getType()->getName() == "Group")
{
if (_sender->getType()->getName() == "Texture")
mControl->setTextureValue(_sender->getValue());
else if (_sender->getType()->getName() == "Size")
updateCoords(_sender->getValue());
}
}
示例3: getProperty
void PropertyInt2ListControl::updateProperty()
{
PropertyPtr proper = getProperty();
if (proper != nullptr)
{
mList->setEnabled(!proper->getType()->getReadOnly());
std::string value = getValue();
if (value != proper->getValue())
setValue(proper->getValue());
}
else
{
mList->removeAllItems();
mList->setEnabled(false);
}
}
示例4: updateProperty
void PropertyIntControl::updateProperty()
{
PropertyPtr proper = getProperty();
if (proper != nullptr)
{
mEdit->setEnabled(!proper->getType()->getReadOnly());
if (mEdit->getOnlyText() != proper->getValue())
mEdit->setCaption(proper->getValue());
bool validate = isValidate();
setColour(validate);
}
else
{
mEdit->setCaption("");
mEdit->setEnabled(false);
}
}
示例5: notifyChangeProperty
void FontTextureController::notifyChangeProperty(PropertyPtr _sender)
{
if (!mActivated || !PropertyUtility::isDataSelected(_sender->getOwner()))
return;
if (_sender->getOwner()->getType()->getName() == "Font")
{
if (_sender->getType()->getName() == "FontName")
updateTexture(_sender->getValue());
}
}
示例6: storeRegionValues
void ChangeSkinSizeAction::storeRegionValues(DataPtr _skinData, VectorPairProperty& _store)
{
const Data::VectorData& childs = _skinData->getChilds();
for (Data::VectorData::const_iterator child = childs.begin(); child != childs.end(); child++)
{
if ((*child)->getType()->getName() != "Region")
continue;
PropertyPtr property = (*child)->getProperty("Coord");
_store.push_back(std::make_pair(property, property->getValue()));
}
}
示例7: notifyChangeDataSelector
void IndexTextureController::notifyChangeDataSelector(DataPtr _data, bool _changeOnlySelection)
{
mParentData = _data;
if (mParentData != nullptr && mParentData->getType()->getName() != mParentTypeName)
mParentData = nullptr;
std::string texture;
PropertyPtr property = PropertyUtility::getPropertyByName("Group", "Texture");
if (property != nullptr)
{
texture = property->getValue();
if (!property->eventChangeProperty.exist(this, &IndexTextureController::notifyChangeProperty))
property->eventChangeProperty.connect(this, &IndexTextureController::notifyChangeProperty);
}
std::string coord;
property = PropertyUtility::getPropertyByName("Group", "Size");
if (property != nullptr)
{
coord = property->getValue();
if (!property->eventChangeProperty.exist(this, &IndexTextureController::notifyChangeProperty))
property->eventChangeProperty.connect(this, &IndexTextureController::notifyChangeProperty);
}
if (mParentData != nullptr)
{
for (Data::VectorData::const_iterator child = mParentData->getChilds().begin(); child != mParentData->getChilds().end(); child ++)
{
property = (*child)->getProperty("Point");
if (!property->eventChangeProperty.exist(this, &IndexTextureController::notifyChangeProperty))
property->eventChangeProperty.connect(this, &IndexTextureController::notifyChangeProperty);
}
}
mControl->setTextureValue(texture);
updateCoords(coord);
}
示例8: updateProperty
void PropertyBoolControl::updateProperty()
{
PropertyPtr proper = getProperty();
if (proper != nullptr)
{
mComboBox->setEnabled(!proper->getType()->getReadOnly());
size_t index = getComboIndex(proper->getValue());
mComboBox->setIndexSelected(index);
}
else
{
mComboBox->setIndexSelected(MyGUI::ITEM_NONE);
mComboBox->setEnabled(false);
}
}
示例9: notifyChangeDataSelector
void FontTextureController::notifyChangeDataSelector(DataPtr _data, bool _changeOnlySelection)
{
mParentData = _data;
if (mParentData != nullptr && mParentData->getType()->getName() != mParentTypeName)
mParentData = nullptr;
std::string texture;
PropertyPtr property = PropertyUtility::getPropertyByName("Font", "FontName");
if (property != nullptr)
{
texture = property->getValue();
}
updateTexture(texture);
}