880 d_ptr->m_creatingProperty =
false;
881 d_ptr->m_creatingSubProperties =
false;
882 d_ptr->m_destroyingSubProperties =
false;
883 d_ptr->m_propertyType = 0;
886 auto *intPropertyManager =
new QtIntPropertyManager(
this);
887 d_ptr->m_typeToPropertyManager[QMetaType::Int] = intPropertyManager;
888 d_ptr->m_typeToAttributeToAttributeType[QMetaType::Int][d_ptr->m_minimumAttribute] = QMetaType::Int;
889 d_ptr->m_typeToAttributeToAttributeType[QMetaType::Int][d_ptr->m_maximumAttribute] = QMetaType::Int;
890 d_ptr->m_typeToAttributeToAttributeType[QMetaType::Int][d_ptr->m_singleStepAttribute] = QMetaType::Int;
891 d_ptr->m_typeToValueType[QMetaType::Int] = QMetaType::Int;
892 connect(intPropertyManager, &QtIntPropertyManager::valueChanged,
894 { d_ptr->slotValueChanged(property, value); });
896 this, [
this](
QtProperty *property,
int min,
int max)
897 { d_ptr->slotRangeChanged(property, min, max); });
900 { d_ptr->slotSingleStepChanged(property, value); });
902 auto *doublePropertyManager =
new QtDoublePropertyManager(
this);
903 d_ptr->m_typeToPropertyManager[QMetaType::Double] = doublePropertyManager;
904 d_ptr->m_typeToAttributeToAttributeType[QMetaType::Double][d_ptr->m_minimumAttribute] =
906 d_ptr->m_typeToAttributeToAttributeType[QMetaType::Double][d_ptr->m_maximumAttribute] =
908 d_ptr->m_typeToAttributeToAttributeType[QMetaType::Double][d_ptr->m_singleStepAttribute] =
910 d_ptr->m_typeToAttributeToAttributeType[QMetaType::Double][d_ptr->m_decimalsAttribute] =
912 d_ptr->m_typeToValueType[QMetaType::Double] = QMetaType::Double;
913 connect(doublePropertyManager, &QtDoublePropertyManager::valueChanged,
914 this, [
this](
QtProperty *property,
double value)
915 { d_ptr->slotValueChanged(property, value); });
917 this, [
this](
QtProperty *property,
double min,
double max)
918 { d_ptr->slotRangeChanged(property, min, max); });
920 this, [
this](
QtProperty *property,
double value)
921 { d_ptr->slotSingleStepChanged(property, value); });
924 { d_ptr->slotDecimalsChanged(property, value); });
926 auto *boolPropertyManager =
new QtBoolPropertyManager(
this);
927 d_ptr->m_typeToPropertyManager[QMetaType::Bool] = boolPropertyManager;
928 d_ptr->m_typeToValueType[QMetaType::Bool] = QMetaType::Bool;
929 connect(boolPropertyManager, &QtBoolPropertyManager::valueChanged,
930 this, [
this](
QtProperty *property,
bool value)
931 { d_ptr->slotValueChanged(property, value); });
933 auto *stringPropertyManager =
new QtStringPropertyManager(
this);
934 d_ptr->m_typeToPropertyManager[QMetaType::QString] = stringPropertyManager;
935 d_ptr->m_typeToValueType[QMetaType::QString] = QMetaType::QString;
936 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QString][d_ptr->m_regExpAttribute] =
937 QMetaType::QRegularExpression;
938 connect(stringPropertyManager, &QtStringPropertyManager::valueChanged,
939 this, [
this](
QtProperty *property,
const QString &value)
940 { d_ptr->slotValueChanged(property, value); });
942 this, [
this](
QtProperty *property,
const QRegularExpression &value)
943 { d_ptr->slotRegExpChanged(property, value); });
945 auto *datePropertyManager =
new QtDatePropertyManager(
this);
946 d_ptr->m_typeToPropertyManager[QMetaType::QDate] = datePropertyManager;
947 d_ptr->m_typeToValueType[QMetaType::QDate] = QMetaType::QDate;
948 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QDate][d_ptr->m_minimumAttribute] =
950 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QDate][d_ptr->m_maximumAttribute] =
952 connect(datePropertyManager, &QtDatePropertyManager::valueChanged,
953 this, [
this](
QtProperty *property,
const QDate &value)
954 { d_ptr->slotValueChanged(property, value); });
956 this, [
this](
QtProperty *property,
const QDate &min,
const QDate &max)
957 { d_ptr->slotRangeChanged(property, min, max); });
959 auto *timePropertyManager =
new QtTimePropertyManager(
this);
960 d_ptr->m_typeToPropertyManager[QMetaType::QTime] = timePropertyManager;
961 d_ptr->m_typeToValueType[QMetaType::QTime] = QMetaType::QTime;
962 connect(timePropertyManager, &QtTimePropertyManager::valueChanged,
963 this, [
this](
QtProperty *property,
const QTime &value)
964 { d_ptr->slotValueChanged(property, value); });
966 auto *dateTimePropertyManager =
new QtDateTimePropertyManager(
this);
967 d_ptr->m_typeToPropertyManager[QMetaType::QDateTime] = dateTimePropertyManager;
968 d_ptr->m_typeToValueType[QMetaType::QDateTime] = QMetaType::QDateTime;
969 connect(dateTimePropertyManager, &QtDateTimePropertyManager::valueChanged,
970 this, [
this](
QtProperty *property,
const QDateTime &value)
971 { d_ptr->slotValueChanged(property, value); });
973 auto *keySequencePropertyManager =
new QtKeySequencePropertyManager(
this);
974 d_ptr->m_typeToPropertyManager[QMetaType::QKeySequence] = keySequencePropertyManager;
975 d_ptr->m_typeToValueType[QMetaType::QKeySequence] = QMetaType::QKeySequence;
976 connect(keySequencePropertyManager, &QtKeySequencePropertyManager::valueChanged,
977 this, [
this](
QtProperty *property,
const QKeySequence &value)
978 { d_ptr->slotValueChanged(property, value); });
980 auto *charPropertyManager =
new QtCharPropertyManager(
this);
981 d_ptr->m_typeToPropertyManager[QMetaType::QChar] = charPropertyManager;
982 d_ptr->m_typeToValueType[QMetaType::QChar] = QMetaType::QChar;
983 connect(charPropertyManager, &QtCharPropertyManager::valueChanged,
984 this, [
this](
QtProperty *property,
const QChar &value)
985 { d_ptr->slotValueChanged(property, value); });
987 auto *localePropertyManager =
new QtLocalePropertyManager(
this);
988 d_ptr->m_typeToPropertyManager[QMetaType::QLocale] = localePropertyManager;
989 d_ptr->m_typeToValueType[QMetaType::QLocale] = QMetaType::QLocale;
990 connect(localePropertyManager, &QtLocalePropertyManager::valueChanged,
991 this, [
this](
QtProperty *property,
const QLocale &value)
992 { d_ptr->slotValueChanged(property, value); });
993 connect(localePropertyManager->subEnumPropertyManager(), &QtEnumPropertyManager::valueChanged,
995 { d_ptr->slotValueChanged(property, value); });
996 connect(localePropertyManager, &QtAbstractPropertyManager::propertyInserted,
998 { d_ptr->slotPropertyInserted(property, parent, after); });
1001 { d_ptr->slotPropertyRemoved(property, parent); });
1003 auto *pointPropertyManager =
new QtPointPropertyManager(
this);
1004 d_ptr->m_typeToPropertyManager[QMetaType::QPoint] = pointPropertyManager;
1005 d_ptr->m_typeToValueType[QMetaType::QPoint] = QMetaType::QPoint;
1006 connect(pointPropertyManager, &QtPointPropertyManager::valueChanged,
1007 this, [
this](
QtProperty *property, QPoint value)
1008 { d_ptr->slotValueChanged(property, value); });
1009 connect(pointPropertyManager->subIntPropertyManager(), &QtIntPropertyManager::valueChanged,
1010 this, [
this](
QtProperty *property,
int value)
1011 { d_ptr->slotValueChanged(property, value); });
1012 connect(pointPropertyManager, &QtAbstractPropertyManager::propertyInserted,
1014 { d_ptr->slotPropertyInserted(property, parent, after); });
1017 { d_ptr->slotPropertyRemoved(property, parent); });
1019 auto *pointFPropertyManager =
new QtPointFPropertyManager(
this);
1020 d_ptr->m_typeToPropertyManager[QMetaType::QPointF] = pointFPropertyManager;
1021 d_ptr->m_typeToValueType[QMetaType::QPointF] = QMetaType::QPointF;
1022 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QPointF][d_ptr->m_decimalsAttribute] =
1024 connect(pointFPropertyManager, &QtPointFPropertyManager::valueChanged,
1025 this, [
this](
QtProperty *property, QPointF value)
1026 { d_ptr->slotValueChanged(property, value); });
1028 this, [
this](
QtProperty *property,
int value)
1029 { d_ptr->slotDecimalsChanged(property, value); });
1030 connect(pointFPropertyManager->subDoublePropertyManager(), &QtDoublePropertyManager::valueChanged,
1031 this, [
this](
QtProperty *property,
double value)
1032 { d_ptr->slotValueChanged(property, value); });
1033 connect(pointFPropertyManager, &QtAbstractPropertyManager::propertyInserted,
1035 { d_ptr->slotPropertyInserted(property, parent, after); });
1038 { d_ptr->slotPropertyRemoved(property, parent); });
1040 auto *sizePropertyManager =
new QtSizePropertyManager(
this);
1041 d_ptr->m_typeToPropertyManager[QMetaType::QSize] = sizePropertyManager;
1042 d_ptr->m_typeToValueType[QMetaType::QSize] = QMetaType::QSize;
1043 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QSize][d_ptr->m_minimumAttribute] =
1045 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QSize][d_ptr->m_maximumAttribute] =
1047 connect(sizePropertyManager, &QtSizePropertyManager::valueChanged,
1048 this, [
this](
QtProperty *property, QSize value)
1049 { d_ptr->slotValueChanged(property, value); });
1050 connect(sizePropertyManager, &QtSizePropertyManager::rangeChanged,
1051 this, [
this](
QtProperty *property, QSize min, QSize max)
1052 { d_ptr->slotRangeChanged(property, min, max); });
1053 connect(sizePropertyManager->subIntPropertyManager(), &QtIntPropertyManager::valueChanged,
1054 this, [
this](
QtProperty *property,
int value)
1055 { d_ptr->slotValueChanged(property, value); });
1057 this, [
this](
QtProperty *property,
int min,
int max)
1058 { d_ptr->slotRangeChanged(property, min, max); });
1059 connect(sizePropertyManager, &QtAbstractPropertyManager::propertyInserted,
1061 { d_ptr->slotPropertyInserted(property, parent, after); });
1064 { d_ptr->slotPropertyRemoved(property, parent); });
1066 auto *sizeFPropertyManager =
new QtSizeFPropertyManager(
this);
1067 d_ptr->m_typeToPropertyManager[QMetaType::QSizeF] = sizeFPropertyManager;
1068 d_ptr->m_typeToValueType[QMetaType::QSizeF] = QMetaType::QSizeF;
1069 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QSizeF][d_ptr->m_minimumAttribute] =
1071 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QSizeF][d_ptr->m_maximumAttribute] =
1073 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QSizeF][d_ptr->m_decimalsAttribute] =
1075 connect(sizeFPropertyManager, &QtSizeFPropertyManager::valueChanged,
1076 this, [
this](
QtProperty *property,
const QSizeF &value)
1077 { d_ptr->slotValueChanged(property, value); });
1078 connect(sizeFPropertyManager, &QtSizeFPropertyManager::rangeChanged,
1079 this, [
this](
QtProperty *property,
const QSizeF &min,
const QSizeF &max)
1080 { d_ptr->slotRangeChanged(property, min, max); });
1081 connect(sizeFPropertyManager->subDoublePropertyManager(), &QtDoublePropertyManager::valueChanged,
1082 this, [
this](
QtProperty *property,
double value)
1083 { d_ptr->slotValueChanged(property, value); });
1085 this, [
this](
QtProperty *property,
double min,
double max)
1086 { d_ptr->slotRangeChanged(property, min, max); });
1087 connect(sizeFPropertyManager, &QtAbstractPropertyManager::propertyInserted,
1089 { d_ptr->slotPropertyInserted(property, parent, after); });
1092 { d_ptr->slotPropertyRemoved(property, parent); });
1094 auto *rectPropertyManager =
new QtRectPropertyManager(
this);
1095 d_ptr->m_typeToPropertyManager[QMetaType::QRect] = rectPropertyManager;
1096 d_ptr->m_typeToValueType[QMetaType::QRect] = QMetaType::QRect;
1097 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QRect][d_ptr->m_constraintAttribute] =
1099 connect(rectPropertyManager, &QtRectPropertyManager::valueChanged,
1100 this, [
this](
QtProperty *property, QRect value)
1101 { d_ptr->slotValueChanged(property, value); });
1102 connect(rectPropertyManager, &QtRectPropertyManager::constraintChanged,
1103 this, [
this](
QtProperty *property, QRect value)
1104 { d_ptr->slotConstraintChanged(property, value); });
1105 connect(rectPropertyManager->subIntPropertyManager(), &QtIntPropertyManager::valueChanged,
1106 this, [
this](
QtProperty *property,
int value)
1107 { d_ptr->slotValueChanged(property, value); });
1109 this, [
this](
QtProperty *property,
int min,
int max)
1110 { d_ptr->slotRangeChanged(property, min, max); });
1111 connect(rectPropertyManager, &QtAbstractPropertyManager::propertyInserted,
1113 { d_ptr->slotPropertyInserted(property, parent, after); });
1116 { d_ptr->slotPropertyRemoved(property, parent); });
1118 auto *rectFPropertyManager =
new QtRectFPropertyManager(
this);
1119 d_ptr->m_typeToPropertyManager[QMetaType::QRectF] = rectFPropertyManager;
1120 d_ptr->m_typeToValueType[QMetaType::QRectF] = QMetaType::QRectF;
1121 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QRectF][d_ptr->m_constraintAttribute] =
1123 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QRectF][d_ptr->m_decimalsAttribute] =
1125 connect(rectFPropertyManager, &QtRectFPropertyManager::valueChanged,
1126 this, [
this](
QtProperty *property,
const QRectF &value)
1127 { d_ptr->slotValueChanged(property, value); });
1128 connect(rectFPropertyManager, &QtRectFPropertyManager::constraintChanged,
1129 this, [
this](
QtProperty *property,
const QRectF &value)
1130 { d_ptr->slotConstraintChanged(property, value); });
1131 connect(rectFPropertyManager->subDoublePropertyManager(), &QtDoublePropertyManager::valueChanged,
1132 this, [
this](
QtProperty *property,
double value)
1133 { d_ptr->slotValueChanged(property, value); });
1135 this, [
this](
QtProperty *property,
double min,
double max)
1136 { d_ptr->slotRangeChanged(property, min, max); });
1137 connect(rectFPropertyManager, &QtAbstractPropertyManager::propertyInserted,
1139 { d_ptr->slotPropertyInserted(property, parent, after); });
1142 { d_ptr->slotPropertyRemoved(property, parent); });
1144 auto *colorPropertyManager =
new QtColorPropertyManager(
this);
1145 d_ptr->m_typeToPropertyManager[QMetaType::QColor] = colorPropertyManager;
1146 d_ptr->m_typeToValueType[QMetaType::QColor] = QMetaType::QColor;
1147 connect(colorPropertyManager, &QtColorPropertyManager::valueChanged,
1148 this, [
this](
QtProperty *property,
const QColor &value)
1149 { d_ptr->slotValueChanged(property, value); });
1150 connect(colorPropertyManager->subIntPropertyManager(), &QtIntPropertyManager::valueChanged,
1151 this, [
this](
QtProperty *property,
int value)
1152 { d_ptr->slotValueChanged(property, value); });
1153 connect(colorPropertyManager, &QtAbstractPropertyManager::propertyInserted,
1155 { d_ptr->slotPropertyInserted(property, parent, after); });
1158 { d_ptr->slotPropertyRemoved(property, parent); });
1161 auto *enumPropertyManager =
new QtEnumPropertyManager(
this);
1162 d_ptr->m_typeToPropertyManager[enumId] = enumPropertyManager;
1163 d_ptr->m_typeToValueType[enumId] = QMetaType::Int;
1164 d_ptr->m_typeToAttributeToAttributeType[enumId][d_ptr->m_enumNamesAttribute] =
1165 QMetaType::QStringList;
1166 d_ptr->m_typeToAttributeToAttributeType[enumId][d_ptr->m_enumIconsAttribute] =
1168 connect(enumPropertyManager, &QtEnumPropertyManager::valueChanged,
1169 this, [
this](
QtProperty *property,
int value)
1170 { d_ptr->slotValueChanged(property, value); });
1171 connect(enumPropertyManager, &QtEnumPropertyManager::enumNamesChanged,
1172 this, [
this](
QtProperty *property,
const QStringList &value)
1173 { d_ptr->slotEnumNamesChanged(property, value); });
1174 connect(enumPropertyManager, &QtEnumPropertyManager::enumIconsChanged,
1175 this, [
this](
QtProperty *property,
const QMap<
int,QIcon> &value)
1176 { d_ptr->slotEnumIconsChanged(property, value); });
1178 auto *sizePolicyPropertyManager =
new QtSizePolicyPropertyManager(
this);
1179 d_ptr->m_typeToPropertyManager[QMetaType::QSizePolicy] = sizePolicyPropertyManager;
1180 d_ptr->m_typeToValueType[QMetaType::QSizePolicy] = QMetaType::QSizePolicy;
1181 connect(sizePolicyPropertyManager, &QtSizePolicyPropertyManager::valueChanged,
1182 this, [
this](
QtProperty *property, QSizePolicy value)
1183 { d_ptr->slotValueChanged(property, value); });
1184 connect(sizePolicyPropertyManager->subIntPropertyManager(), &QtIntPropertyManager::valueChanged,
1185 this, [
this](
QtProperty *property,
int value)
1186 { d_ptr->slotValueChanged(property, value); });
1188 this, [
this](
QtProperty *property,
int min,
int max)
1189 { d_ptr->slotRangeChanged(property, min, max); });
1190 connect(sizePolicyPropertyManager->subEnumPropertyManager(), &QtEnumPropertyManager::valueChanged,
1191 this, [
this](
QtProperty *property,
int value)
1192 { d_ptr->slotValueChanged(property, value); });
1193 connect(sizePolicyPropertyManager->subEnumPropertyManager(), &QtEnumPropertyManager::enumNamesChanged,
1194 this, [
this](
QtProperty *property,
const QStringList &value)
1195 { d_ptr->slotEnumNamesChanged(property, value); });
1196 connect(sizePolicyPropertyManager, &QtAbstractPropertyManager::propertyInserted,
1198 { d_ptr->slotPropertyInserted(property, parent, after); });
1201 { d_ptr->slotPropertyRemoved(property, parent); });
1203 auto *fontPropertyManager =
new QtFontPropertyManager(
this);
1204 d_ptr->m_typeToPropertyManager[QMetaType::QFont] = fontPropertyManager;
1205 d_ptr->m_typeToValueType[QMetaType::QFont] = QMetaType::QFont;
1206 connect(fontPropertyManager, &QtFontPropertyManager::valueChanged,
1207 this, [
this](
QtProperty *property,
const QFont &value)
1208 { d_ptr->slotValueChanged(property, value); });
1209 connect(fontPropertyManager->subIntPropertyManager(), &QtIntPropertyManager::valueChanged,
1210 this, [
this](
QtProperty *property,
int value)
1211 { d_ptr->slotValueChanged(property, value); });
1213 this, [
this](
QtProperty *property,
int min,
int max)
1214 { d_ptr->slotRangeChanged(property, min, max); });
1215 connect(fontPropertyManager->subEnumPropertyManager(), &QtEnumPropertyManager::valueChanged,
1216 this, [
this](
QtProperty *property,
int value)
1217 { d_ptr->slotValueChanged(property, value); });
1218 connect(fontPropertyManager->subEnumPropertyManager(), &QtEnumPropertyManager::enumNamesChanged,
1219 this, [
this](
QtProperty *property,
const QStringList &value)
1220 { d_ptr->slotEnumNamesChanged(property, value); });
1221 connect(fontPropertyManager->subBoolPropertyManager(), &QtBoolPropertyManager::valueChanged,
1222 this, [
this](
QtProperty *property,
bool value)
1223 { d_ptr->slotValueChanged(property, value); });
1224 connect(fontPropertyManager, &QtAbstractPropertyManager::propertyInserted,
1226 { d_ptr->slotPropertyInserted(property, parent, after); });
1229 { d_ptr->slotPropertyRemoved(property, parent); });
1231 auto *cursorPropertyManager =
new QtCursorPropertyManager(
this);
1232 d_ptr->m_typeToPropertyManager[QMetaType::QCursor] = cursorPropertyManager;
1233 d_ptr->m_typeToValueType[QMetaType::QCursor] = QMetaType::QCursor;
1234 connect(cursorPropertyManager, &QtCursorPropertyManager::valueChanged,
1235 this, [
this](
QtProperty *property,
const QCursor &value)
1236 { d_ptr->slotValueChanged(property, value); });
1239 auto *flagPropertyManager =
new QtFlagPropertyManager(
this);
1240 d_ptr->m_typeToPropertyManager[flagId] = flagPropertyManager;
1241 d_ptr->m_typeToValueType[flagId] = QMetaType::Int;
1242 d_ptr->m_typeToAttributeToAttributeType[flagId][d_ptr->m_flagNamesAttribute] =
1243 QMetaType::QStringList;
1244 connect(flagPropertyManager, &QtFlagPropertyManager::valueChanged,
1245 this, [
this](
QtProperty *property,
const QColor &value)
1246 { d_ptr->slotValueChanged(property, value); });
1247 connect(flagPropertyManager, &QtFlagPropertyManager::flagNamesChanged,
1248 this, [
this](
QtProperty *property,
const QStringList &value)
1249 { d_ptr->slotFlagNamesChanged(property, value); });
1250 connect(flagPropertyManager->subBoolPropertyManager(), &QtBoolPropertyManager::valueChanged,
1251 this, [
this](
QtProperty *property,
bool value)
1252 { d_ptr->slotValueChanged(property, value); });
1253 connect(flagPropertyManager, &QtAbstractPropertyManager::propertyInserted,
1255 { d_ptr->slotPropertyInserted(property, parent, after); });
1258 { d_ptr->slotPropertyRemoved(property, parent); });
1261 auto *groupPropertyManager =
new QtGroupPropertyManager(
this);
1262 d_ptr->m_typeToPropertyManager[groupId] = groupPropertyManager;
1263 d_ptr->m_typeToValueType[groupId] = QMetaType::UnknownType;
1685 const QString &attribute,
const QVariant &value)
1687 QVariant oldAttr = attributeValue(property, attribute);
1688 if (!oldAttr.isValid())
1691 int attrType = value.userType();
1695 if (attrType != attributeType(propertyType(property), attribute) &&
1696 !value.canConvert(QMetaType(attrType)))
1699 QtProperty *internProp = propertyToWrappedProperty()->value(property,
nullptr);
1700 if (internProp ==
nullptr)
1704 if (
auto *intManager = qobject_cast<QtIntPropertyManager *>(manager)) {
1705 if (attribute == d_ptr->m_maximumAttribute)
1706 intManager->setMaximum(internProp, qvariant_cast<
int>(value));
1707 else if (attribute == d_ptr->m_minimumAttribute)
1708 intManager->setMinimum(internProp, qvariant_cast<
int>(value));
1709 else if (attribute == d_ptr->m_singleStepAttribute)
1710 intManager->setSingleStep(internProp, qvariant_cast<
int>(value));
1712 }
else if (
auto *doubleManager = qobject_cast<QtDoublePropertyManager *>(manager)) {
1713 if (attribute == d_ptr->m_maximumAttribute)
1714 doubleManager->setMaximum(internProp, qvariant_cast<
double>(value));
1715 if (attribute == d_ptr->m_minimumAttribute)
1716 doubleManager->setMinimum(internProp, qvariant_cast<
double>(value));
1717 if (attribute == d_ptr->m_singleStepAttribute)
1718 doubleManager->setSingleStep(internProp, qvariant_cast<
double>(value));
1719 if (attribute == d_ptr->m_decimalsAttribute)
1720 doubleManager->setDecimals(internProp, qvariant_cast<
int>(value));
1722 }
else if (
auto *stringManager = qobject_cast<QtStringPropertyManager *>(manager)) {
1723 if (attribute == d_ptr->m_regExpAttribute)
1724 stringManager->setRegExp(internProp, qvariant_cast<QRegularExpression>(value));
1726 }
else if (
auto *dateManager = qobject_cast<QtDatePropertyManager *>(manager)) {
1727 if (attribute == d_ptr->m_maximumAttribute)
1728 dateManager->setMaximum(internProp, qvariant_cast<QDate>(value));
1729 if (attribute == d_ptr->m_minimumAttribute)
1730 dateManager->setMinimum(internProp, qvariant_cast<QDate>(value));
1732 }
else if (
auto *pointFManager = qobject_cast<QtPointFPropertyManager *>(manager)) {
1733 if (attribute == d_ptr->m_decimalsAttribute)
1734 pointFManager->setDecimals(internProp, qvariant_cast<
int>(value));
1736 }
else if (
auto *sizeManager = qobject_cast<QtSizePropertyManager *>(manager)) {
1737 if (attribute == d_ptr->m_maximumAttribute)
1738 sizeManager->setMaximum(internProp, qvariant_cast<QSize>(value));
1739 if (attribute == d_ptr->m_minimumAttribute)
1740 sizeManager->setMinimum(internProp, qvariant_cast<QSize>(value));
1742 }
else if (
auto *sizeFManager = qobject_cast<QtSizeFPropertyManager *>(manager)) {
1743 if (attribute == d_ptr->m_maximumAttribute)
1744 sizeFManager->setMaximum(internProp, qvariant_cast<QSizeF>(value));
1745 if (attribute == d_ptr->m_minimumAttribute)
1746 sizeFManager->setMinimum(internProp, qvariant_cast<QSizeF>(value));
1747 if (attribute == d_ptr->m_decimalsAttribute)
1748 sizeFManager->setDecimals(internProp, qvariant_cast<
int>(value));
1750 }
else if (
auto *rectManager = qobject_cast<QtRectPropertyManager *>(manager)) {
1751 if (attribute == d_ptr->m_constraintAttribute)
1752 rectManager->setConstraint(internProp, qvariant_cast<QRect>(value));
1754 }
else if (
auto *rectFManager = qobject_cast<QtRectFPropertyManager *>(manager)) {
1755 if (attribute == d_ptr->m_constraintAttribute)
1756 rectFManager->setConstraint(internProp, qvariant_cast<QRectF>(value));
1757 if (attribute == d_ptr->m_decimalsAttribute)
1758 rectFManager->setDecimals(internProp, qvariant_cast<
int>(value));
1760 }
else if (
auto *enumManager = qobject_cast<QtEnumPropertyManager *>(manager)) {
1761 if (attribute == d_ptr->m_enumNamesAttribute)
1762 enumManager->setEnumNames(internProp, qvariant_cast<QStringList>(value));
1763 if (attribute == d_ptr->m_enumIconsAttribute)
1764 enumManager->setEnumIcons(internProp, qvariant_cast<QtIconMap>(value));
1766 }
else if (
auto *flagManager = qobject_cast<QtFlagPropertyManager *>(manager)) {
1767 if (attribute == d_ptr->m_flagNamesAttribute)
1768 flagManager->setFlagNames(internProp, qvariant_cast<QStringList>(value));
2027 const auto intPropertyManagers = manager->findChildren<QtIntPropertyManager *>();
2028 for (QtIntPropertyManager *manager : intPropertyManagers)
2029 d_ptr->m_spinBoxFactory->addPropertyManager(manager);
2031 const auto doublePropertyManagers = manager->findChildren<QtDoublePropertyManager *>();
2032 for (QtDoublePropertyManager *manager : doublePropertyManagers)
2033 d_ptr->m_doubleSpinBoxFactory->addPropertyManager(manager);
2035 const auto boolPropertyManagers = manager->findChildren<QtBoolPropertyManager *>();
2036 for (QtBoolPropertyManager *manager : boolPropertyManagers)
2037 d_ptr->m_checkBoxFactory->addPropertyManager(manager);
2039 const auto stringPropertyManagers = manager->findChildren<QtStringPropertyManager *>();
2040 for (QtStringPropertyManager *manager : stringPropertyManagers)
2041 d_ptr->m_lineEditFactory->addPropertyManager(manager);
2043 const auto datePropertyManagers = manager->findChildren<QtDatePropertyManager *>();
2044 for (QtDatePropertyManager *manager : datePropertyManagers)
2045 d_ptr->m_dateEditFactory->addPropertyManager(manager);
2047 const auto timePropertyManagers = manager->findChildren<QtTimePropertyManager *>();
2048 for (QtTimePropertyManager *manager : timePropertyManagers)
2049 d_ptr->m_timeEditFactory->addPropertyManager(manager);
2051 const auto dateTimePropertyManagers = manager->findChildren<QtDateTimePropertyManager *>();
2052 for (QtDateTimePropertyManager *manager : dateTimePropertyManagers)
2053 d_ptr->m_dateTimeEditFactory->addPropertyManager(manager);
2055 const auto keySequencePropertyManagers = manager->findChildren<QtKeySequencePropertyManager *>();
2056 for (QtKeySequencePropertyManager *manager : keySequencePropertyManagers)
2057 d_ptr->m_keySequenceEditorFactory->addPropertyManager(manager);
2059 const auto charPropertyManagers = manager->findChildren<QtCharPropertyManager *>();
2060 for (QtCharPropertyManager *manager : charPropertyManagers)
2061 d_ptr->m_charEditorFactory->addPropertyManager(manager);
2063 const auto localePropertyManagers = manager->findChildren<QtLocalePropertyManager *>();
2064 for (QtLocalePropertyManager *manager : localePropertyManagers)
2065 d_ptr->m_comboBoxFactory->addPropertyManager(manager->subEnumPropertyManager());
2067 const auto pointPropertyManagers = manager->findChildren<QtPointPropertyManager *>();
2068 for (QtPointPropertyManager *manager : pointPropertyManagers)
2069 d_ptr->m_spinBoxFactory->addPropertyManager(manager->subIntPropertyManager());
2071 const auto pointFPropertyManagers = manager->findChildren<QtPointFPropertyManager *>();
2072 for (QtPointFPropertyManager *manager : pointFPropertyManagers)
2073 d_ptr->m_doubleSpinBoxFactory->addPropertyManager(manager->subDoublePropertyManager());
2075 const auto sizePropertyManagers = manager->findChildren<QtSizePropertyManager *>();
2076 for (QtSizePropertyManager *manager : sizePropertyManagers)
2077 d_ptr->m_spinBoxFactory->addPropertyManager(manager->subIntPropertyManager());
2079 const auto sizeFPropertyManagers = manager->findChildren<QtSizeFPropertyManager *>();
2080 for (QtSizeFPropertyManager *manager : sizeFPropertyManagers)
2081 d_ptr->m_doubleSpinBoxFactory->addPropertyManager(manager->subDoublePropertyManager());
2083 const auto rectPropertyManagers = manager->findChildren<QtRectPropertyManager *>();
2084 for (QtRectPropertyManager *manager : rectPropertyManagers)
2085 d_ptr->m_spinBoxFactory->addPropertyManager(manager->subIntPropertyManager());
2087 const auto rectFPropertyManagers = manager->findChildren<QtRectFPropertyManager *>();
2088 for (QtRectFPropertyManager *manager : rectFPropertyManagers)
2089 d_ptr->m_doubleSpinBoxFactory->addPropertyManager(manager->subDoublePropertyManager());
2091 const auto colorPropertyManagers = manager->findChildren<QtColorPropertyManager *>();
2092 for (QtColorPropertyManager *manager : colorPropertyManagers) {
2093 d_ptr->m_colorEditorFactory->addPropertyManager(manager);
2094 d_ptr->m_spinBoxFactory->addPropertyManager(manager->subIntPropertyManager());
2097 const auto enumPropertyManagers = manager->findChildren<QtEnumPropertyManager *>();
2098 for (QtEnumPropertyManager *manager : enumPropertyManagers)
2099 d_ptr->m_comboBoxFactory->addPropertyManager(manager);
2101 const auto sizePolicyPropertyManagers = manager->findChildren<QtSizePolicyPropertyManager *>();
2102 for (QtSizePolicyPropertyManager *manager : sizePolicyPropertyManagers) {
2103 d_ptr->m_spinBoxFactory->addPropertyManager(manager->subIntPropertyManager());
2104 d_ptr->m_comboBoxFactory->addPropertyManager(manager->subEnumPropertyManager());
2107 const auto fontPropertyManagers = manager->findChildren<QtFontPropertyManager *>();
2108 for (QtFontPropertyManager *manager : fontPropertyManagers) {
2109 d_ptr->m_fontEditorFactory->addPropertyManager(manager);
2110 d_ptr->m_spinBoxFactory->addPropertyManager(manager->subIntPropertyManager());
2111 d_ptr->m_comboBoxFactory->addPropertyManager(manager->subEnumPropertyManager());
2112 d_ptr->m_checkBoxFactory->addPropertyManager(manager->subBoolPropertyManager());
2115 const auto cursorPropertyManagers = manager->findChildren<QtCursorPropertyManager *>();
2116 for (QtCursorPropertyManager *manager : cursorPropertyManagers)
2117 d_ptr->m_cursorEditorFactory->addPropertyManager(manager);
2119 const auto flagPropertyManagers = manager->findChildren<QtFlagPropertyManager *>();
2120 for (QtFlagPropertyManager *manager : flagPropertyManagers)
2121 d_ptr->m_checkBoxFactory->addPropertyManager(manager->subBoolPropertyManager());
2146 const auto intPropertyManagers = manager->findChildren<QtIntPropertyManager *>();
2147 for (QtIntPropertyManager *manager : intPropertyManagers)
2148 d_ptr->m_spinBoxFactory->removePropertyManager(manager);
2150 const auto doublePropertyManagers = manager->findChildren<QtDoublePropertyManager *>();
2151 for (QtDoublePropertyManager *manager : doublePropertyManagers)
2152 d_ptr->m_doubleSpinBoxFactory->removePropertyManager(manager);
2154 const auto boolPropertyManagers = manager->findChildren<QtBoolPropertyManager *>();
2155 for (QtBoolPropertyManager *manager : boolPropertyManagers)
2156 d_ptr->m_checkBoxFactory->removePropertyManager(manager);
2158 const auto stringPropertyManagers = manager->findChildren<QtStringPropertyManager *>();
2159 for (QtStringPropertyManager *manager : stringPropertyManagers)
2160 d_ptr->m_lineEditFactory->removePropertyManager(manager);
2162 const auto datePropertyManagers = manager->findChildren<QtDatePropertyManager *>();
2163 for (QtDatePropertyManager *manager : datePropertyManagers)
2164 d_ptr->m_dateEditFactory->removePropertyManager(manager);
2166 const auto timePropertyManagers = manager->findChildren<QtTimePropertyManager *>();
2167 for (QtTimePropertyManager *manager : timePropertyManagers)
2168 d_ptr->m_timeEditFactory->removePropertyManager(manager);
2170 const auto dateTimePropertyManagers = manager->findChildren<QtDateTimePropertyManager *>();
2171 for (QtDateTimePropertyManager *manager : dateTimePropertyManagers)
2172 d_ptr->m_dateTimeEditFactory->removePropertyManager(manager);
2174 const auto keySequencePropertyManagers = manager->findChildren<QtKeySequencePropertyManager *>();
2175 for (QtKeySequencePropertyManager *manager : keySequencePropertyManagers)
2176 d_ptr->m_keySequenceEditorFactory->removePropertyManager(manager);
2178 const auto charPropertyManagers = manager->findChildren<QtCharPropertyManager *>();
2179 for (QtCharPropertyManager *manager : charPropertyManagers)
2180 d_ptr->m_charEditorFactory->removePropertyManager(manager);
2182 const auto localePropertyManagers = manager->findChildren<QtLocalePropertyManager *>();
2183 for (QtLocalePropertyManager *manager : localePropertyManagers)
2184 d_ptr->m_comboBoxFactory->removePropertyManager(manager->subEnumPropertyManager());
2186 const auto pointPropertyManagers = manager->findChildren<QtPointPropertyManager *>();
2187 for (QtPointPropertyManager *manager : pointPropertyManagers)
2188 d_ptr->m_spinBoxFactory->removePropertyManager(manager->subIntPropertyManager());
2190 const auto pointFPropertyManagers = manager->findChildren<QtPointFPropertyManager *>();
2191 for (QtPointFPropertyManager *manager : pointFPropertyManagers)
2192 d_ptr->m_doubleSpinBoxFactory->removePropertyManager(manager->subDoublePropertyManager());
2194 const auto sizePropertyManagers = manager->findChildren<QtSizePropertyManager *>();
2195 for (QtSizePropertyManager *manager : sizePropertyManagers)
2196 d_ptr->m_spinBoxFactory->removePropertyManager(manager->subIntPropertyManager());
2198 const auto sizeFPropertyManagers = manager->findChildren<QtSizeFPropertyManager *>();
2199 for (QtSizeFPropertyManager *manager : sizeFPropertyManagers)
2200 d_ptr->m_doubleSpinBoxFactory->removePropertyManager(manager->subDoublePropertyManager());
2202 const auto rectPropertyManagers = manager->findChildren<QtRectPropertyManager *>();
2203 for (QtRectPropertyManager *manager : rectPropertyManagers)
2204 d_ptr->m_spinBoxFactory->removePropertyManager(manager->subIntPropertyManager());
2206 const auto rectFPropertyManagers = manager->findChildren<QtRectFPropertyManager *>();
2207 for (QtRectFPropertyManager *manager : rectFPropertyManagers)
2208 d_ptr->m_doubleSpinBoxFactory->removePropertyManager(manager->subDoublePropertyManager());
2210 const auto colorPropertyManagers = manager->findChildren<QtColorPropertyManager *>();
2211 for (QtColorPropertyManager *manager : colorPropertyManagers) {
2212 d_ptr->m_colorEditorFactory->removePropertyManager(manager);
2213 d_ptr->m_spinBoxFactory->removePropertyManager(manager->subIntPropertyManager());
2216 const auto enumPropertyManagers = manager->findChildren<QtEnumPropertyManager *>();
2217 for (QtEnumPropertyManager *manager : enumPropertyManagers)
2218 d_ptr->m_comboBoxFactory->removePropertyManager(manager);
2220 const auto sizePolicyPropertyManagers = manager->findChildren<QtSizePolicyPropertyManager *>();
2221 for (QtSizePolicyPropertyManager *manager : sizePolicyPropertyManagers) {
2222 d_ptr->m_spinBoxFactory->removePropertyManager(manager->subIntPropertyManager());
2223 d_ptr->m_comboBoxFactory->removePropertyManager(manager->subEnumPropertyManager());
2226 const auto fontPropertyManagers = manager->findChildren<QtFontPropertyManager *>();
2227 for (QtFontPropertyManager *manager : fontPropertyManagers) {
2228 d_ptr->m_fontEditorFactory->removePropertyManager(manager);
2229 d_ptr->m_spinBoxFactory->removePropertyManager(manager->subIntPropertyManager());
2230 d_ptr->m_comboBoxFactory->removePropertyManager(manager->subEnumPropertyManager());
2231 d_ptr->m_checkBoxFactory->removePropertyManager(manager->subBoolPropertyManager());
2234 const auto cursorPropertyManagers = manager->findChildren<QtCursorPropertyManager *>();
2235 for (QtCursorPropertyManager *manager : cursorPropertyManagers)
2236 d_ptr->m_cursorEditorFactory->removePropertyManager(manager);
2238 const auto flagPropertyManagers = manager->findChildren<QtFlagPropertyManager *>();
2239 for (QtFlagPropertyManager *manager : flagPropertyManagers)
2240 d_ptr->m_checkBoxFactory->removePropertyManager(manager->subBoolPropertyManager());