本文整理汇总了C++中PropertyPtr类的典型用法代码示例。如果您正苦于以下问题:C++ PropertyPtr类的具体用法?C++ PropertyPtr怎么用?C++ PropertyPtr使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了PropertyPtr类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: InitialiseProperty
void PropertyPanelControl::InitialiseProperty(PropertyPtr _property, int& _height)
{
std::string type = _property->getType()->getType();
PropertyControl* control = nullptr;
for (VectorPairControl::iterator child = mPropertyControls.begin(); child != mPropertyControls.end(); child ++)
{
if ((*child).first == type && !(*child).second->getRoot()->getVisible())
{
control = (*child).second;
control->getRoot()->setVisible(true);
break;
}
}
if (control == nullptr)
{
control = components::FactoryManager::GetInstance().CreateItem<PropertyControl>(_property->getType()->getType());
if (control != nullptr)
{
control->Initialise(this, mScrollView, "");
mPropertyControls.push_back(std::make_pair(_property->getType()->getType(), control));
}
}
if (control != nullptr)
{
control->setProperty(_property);
control->getRoot()->setPosition(0, _height);
_height += control->getRoot()->getHeight() + mDistance;
}
}
示例3: populateGuiFromConfiguration
void ImageSyncApp::populateGuiFromConfiguration()
{
PropertyPtr property = configurationFile_->value( "destinationDirectory", DESTINATION_DIRECTORY );
mainWindowContent_->textEditDestination->setText( !property ? "" : property->asString() );
property = configurationFile_->value( "sourceDirectory", SOURCE_DIRECTORY );
mainWindowContent_->textEditSource->setText( !property ? "" : property->asString() );
}
示例4: initialise
void UniqueNamePropertyInitialisator::initialise(PropertyPtr _property)
{
DataPtr parent = DataUtility::getSelectedParentDataByType(_property->getOwner()->getType()->getName());
if (parent == nullptr)
return;
std::string name = DataUtility::getUniqueName(parent, "unnamed_");
_property->setValue(name);
}
示例5: onServiceAdded
void UsReconstructionImplService::onServiceAdded(ReconstructionMethodService* service)
{
QStringList range = mParams->getAlgorithmAdapter()->getValueRange();
range << service->getName();
mParams->getAlgorithmAdapter()->setValueRange(range);
// select algo if none selected
PropertyPtr algoName = mParams->getParameter("Algorithm");
if (algoName->getValueAsVariant().value<QString>().isEmpty())
algoName->setValueFromVariant(service->getName());
}
示例6: 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());
}
}
示例7: 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()));
}
}
示例8: PropertyMatching
PageProgression Package::PageProgressionDirection() const
{
PropertyPtr prop = PropertyMatching("page-progression-direction");
if ( prop )
{
if ( prop->Value() == "ltr" )
return PageProgression::LeftToRight;
else if ( prop->Value() == "rtl" )
return PageProgression::RightToLeft;
}
return PageProgression::Default;
}
示例9: getProperty
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);
}
}
示例10: 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);
}
示例11: 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);
}
}
示例12: initialise
void TexturePropertyInitialisator::initialise(PropertyPtr _property)
{
if (SettingsManager::getInstance().getValue<bool>("Settings/SaveLastTexture"))
{
std::string texture = SettingsManager::getInstance().getValue("Resources/LastTextureName");
_property->setValue(texture);
}
}
示例13: d
Statement::Statement(ResourcePtr subject, PropertyPtr predicate,
NodePtr object) : d(new StatementPrivate)
{
d->model = subject->model().d;
d->subjectID = subject->id();
d->predicateID = predicate->id();
d->objectID = object->id();
}
示例14: setType
void Data::setType(DataTypePtr _value)
{
mType = _value;
mProperties.clear();
if (mType != nullptr)
{
const DataType::VectorProperty& properties = mType->getProperties();
for (DataType::VectorProperty::const_iterator property = properties.begin(); property != properties.end(); property++)
{
PropertyPtr data = Property::CreateInstance(*property, mWeakThis.lock());
data->initialise();
mProperties[(*property)->getName()] = data;
}
}
}
示例15: getProperty
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);
}
}