void SystemsSettingsEditor::ShowDialog()
{
	QPushButton * sender = dynamic_cast<QPushButton *>(QObject::sender());
	DVASSERT(sender);

	QtPropertyDataDavaVariant* propertyToChange = buttonsMap[sender].property;
	STATE_FLAGS_MAP* propFlagsMap = buttonsMap[sender].flagsMap;

	DVASSERT(propertyToChange);
	DVASSERT(propFlagsMap);
	uint32 oldValue  = ResolveMapToUint(*propFlagsMap);
	SettingsStateDialog dialog(propFlagsMap,this);
	dialog.exec();
	
	if(dialog.result() != QDialog::Accepted )
	{
		return;
	}
	uint32 newValue = ResolveMapToUint(*propFlagsMap);
	if(newValue == oldValue)
	{
		return;
	}
	
	propertyToChange->AddAllowedValue(DAVA::VariantType((int32)newValue), ResolveMapToString(*propFlagsMap).c_str());
	propertyToChange->SetVariantValue(DAVA::VariantType((int32)newValue));
	propertyToChange->SetValue(QVariant((int32)newValue));
	
}
void QtPropertyDataIntrospection::ChildNeedUpdate()
{
	QMapIterator<QtPropertyDataDavaVariant*, const DAVA::IntrospectionMember *> i = QMapIterator<QtPropertyDataDavaVariant*, const DAVA::IntrospectionMember *>(childVariantMembers);

	while(i.hasNext())
	{
		i.next();

		QtPropertyDataDavaVariant *childData = i.key();
		DAVA::VariantType childCurValue = i.value()->Value(object);

		if(childCurValue != childData->GetVariantValue())
		{
			childData->SetVariantValue(childCurValue);
		}

	}
}