883 d_ptr->m_creatingProperty =
false;
884 d_ptr->m_creatingSubProperties =
false;
885 d_ptr->m_destroyingSubProperties =
false;
886 d_ptr->m_propertyType = 0;
889 auto *intPropertyManager =
new QtIntPropertyManager(
this);
890 d_ptr->m_typeToPropertyManager[QMetaType::Int] = intPropertyManager;
891 d_ptr->m_typeToAttributeToAttributeType[QMetaType::Int][d_ptr->m_minimumAttribute] = QMetaType::Int;
892 d_ptr->m_typeToAttributeToAttributeType[QMetaType::Int][d_ptr->m_maximumAttribute] = QMetaType::Int;
893 d_ptr->m_typeToAttributeToAttributeType[QMetaType::Int][d_ptr->m_singleStepAttribute] = QMetaType::Int;
894 d_ptr->m_typeToValueType[QMetaType::Int] = QMetaType::Int;
895 connect(intPropertyManager, &QtIntPropertyManager::valueChanged,
896 this, [
this](QtProperty *property,
int value)
897 { d_ptr->slotValueChanged(property, value); });
899 this, [
this](
QtProperty *property,
int min,
int max)
900 { d_ptr->slotRangeChanged(property, min, max); });
903 { d_ptr->slotSingleStepChanged(property, value); });
905 auto *doublePropertyManager =
new QtDoublePropertyManager(
this);
906 d_ptr->m_typeToPropertyManager[QMetaType::Double] = doublePropertyManager;
907 d_ptr->m_typeToAttributeToAttributeType[QMetaType::Double][d_ptr->m_minimumAttribute] =
909 d_ptr->m_typeToAttributeToAttributeType[QMetaType::Double][d_ptr->m_maximumAttribute] =
911 d_ptr->m_typeToAttributeToAttributeType[QMetaType::Double][d_ptr->m_singleStepAttribute] =
913 d_ptr->m_typeToAttributeToAttributeType[QMetaType::Double][d_ptr->m_decimalsAttribute] =
915 d_ptr->m_typeToValueType[QMetaType::Double] = QMetaType::Double;
916 connect(doublePropertyManager, &QtDoublePropertyManager::valueChanged,
917 this, [
this](QtProperty *property,
double value)
918 { d_ptr->slotValueChanged(property, value); });
920 this, [
this](
QtProperty *property,
double min,
double max)
921 { d_ptr->slotRangeChanged(property, min, max); });
923 this, [
this](
QtProperty *property,
double value)
924 { d_ptr->slotSingleStepChanged(property, value); });
927 { d_ptr->slotDecimalsChanged(property, value); });
929 auto *boolPropertyManager =
new QtBoolPropertyManager(
this);
930 d_ptr->m_typeToPropertyManager[QMetaType::Bool] = boolPropertyManager;
931 d_ptr->m_typeToValueType[QMetaType::Bool] = QMetaType::Bool;
932 connect(boolPropertyManager, &QtBoolPropertyManager::valueChanged,
933 this, [
this](QtProperty *property,
bool value)
934 { d_ptr->slotValueChanged(property, value); });
936 auto *stringPropertyManager =
new QtStringPropertyManager(
this);
937 d_ptr->m_typeToPropertyManager[QMetaType::QString] = stringPropertyManager;
938 d_ptr->m_typeToValueType[QMetaType::QString] = QMetaType::QString;
939 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QString][d_ptr->m_regExpAttribute] =
940 QMetaType::QRegularExpression;
941 connect(stringPropertyManager, &QtStringPropertyManager::valueChanged,
942 this, [
this](QtProperty *property,
const QString &value)
943 { d_ptr->slotValueChanged(property, value); });
945 this, [
this](
QtProperty *property,
const QRegularExpression &value)
946 { d_ptr->slotRegExpChanged(property, value); });
948 auto *datePropertyManager =
new QtDatePropertyManager(
this);
949 d_ptr->m_typeToPropertyManager[QMetaType::QDate] = datePropertyManager;
950 d_ptr->m_typeToValueType[QMetaType::QDate] = QMetaType::QDate;
951 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QDate][d_ptr->m_minimumAttribute] =
953 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QDate][d_ptr->m_maximumAttribute] =
955 connect(datePropertyManager, &QtDatePropertyManager::valueChanged,
956 this, [
this](QtProperty *property,
const QDate &value)
957 { d_ptr->slotValueChanged(property, value); });
959 this, [
this](
QtProperty *property,
const QDate &min,
const QDate &max)
960 { d_ptr->slotRangeChanged(property, min, max); });
962 auto *timePropertyManager =
new QtTimePropertyManager(
this);
963 d_ptr->m_typeToPropertyManager[QMetaType::QTime] = timePropertyManager;
964 d_ptr->m_typeToValueType[QMetaType::QTime] = QMetaType::QTime;
965 connect(timePropertyManager, &QtTimePropertyManager::valueChanged,
966 this, [
this](QtProperty *property,
const QTime &value)
967 { d_ptr->slotValueChanged(property, value); });
969 auto *dateTimePropertyManager =
new QtDateTimePropertyManager(
this);
970 d_ptr->m_typeToPropertyManager[QMetaType::QDateTime] = dateTimePropertyManager;
971 d_ptr->m_typeToValueType[QMetaType::QDateTime] = QMetaType::QDateTime;
972 connect(dateTimePropertyManager, &QtDateTimePropertyManager::valueChanged,
973 this, [
this](QtProperty *property,
const QDateTime &value)
974 { d_ptr->slotValueChanged(property, value); });
976 auto *keySequencePropertyManager =
new QtKeySequencePropertyManager(
this);
977 d_ptr->m_typeToPropertyManager[QMetaType::QKeySequence] = keySequencePropertyManager;
978 d_ptr->m_typeToValueType[QMetaType::QKeySequence] = QMetaType::QKeySequence;
979 connect(keySequencePropertyManager, &QtKeySequencePropertyManager::valueChanged,
980 this, [
this](QtProperty *property,
const QKeySequence &value)
981 { d_ptr->slotValueChanged(property, value); });
983 auto *charPropertyManager =
new QtCharPropertyManager(
this);
984 d_ptr->m_typeToPropertyManager[QMetaType::QChar] = charPropertyManager;
985 d_ptr->m_typeToValueType[QMetaType::QChar] = QMetaType::QChar;
986 connect(charPropertyManager, &QtCharPropertyManager::valueChanged,
987 this, [
this](QtProperty *property,
const QChar &value)
988 { d_ptr->slotValueChanged(property, value); });
990 auto *localePropertyManager =
new QtLocalePropertyManager(
this);
991 d_ptr->m_typeToPropertyManager[QMetaType::QLocale] = localePropertyManager;
992 d_ptr->m_typeToValueType[QMetaType::QLocale] = QMetaType::QLocale;
993 connect(localePropertyManager, &QtLocalePropertyManager::valueChanged,
994 this, [
this](QtProperty *property,
const QLocale &value)
995 { d_ptr->slotValueChanged(property, value); });
996 connect(localePropertyManager->subEnumPropertyManager(), &QtEnumPropertyManager::valueChanged,
997 this, [
this](QtProperty *property,
int value)
998 { d_ptr->slotValueChanged(property, value); });
999 connect(localePropertyManager, &QtAbstractPropertyManager::propertyInserted,
1000 this, [
this](QtProperty *property, QtProperty *parent, QtProperty *after)
1001 { d_ptr->slotPropertyInserted(property, parent, after); });
1004 { d_ptr->slotPropertyRemoved(property, parent); });
1006 auto *pointPropertyManager =
new QtPointPropertyManager(
this);
1007 d_ptr->m_typeToPropertyManager[QMetaType::QPoint] = pointPropertyManager;
1008 d_ptr->m_typeToValueType[QMetaType::QPoint] = QMetaType::QPoint;
1009 connect(pointPropertyManager, &QtPointPropertyManager::valueChanged,
1010 this, [
this](QtProperty *property, QPoint value)
1011 { d_ptr->slotValueChanged(property, value); });
1012 connect(pointPropertyManager->subIntPropertyManager(), &QtIntPropertyManager::valueChanged,
1013 this, [
this](QtProperty *property,
int value)
1014 { d_ptr->slotValueChanged(property, value); });
1015 connect(pointPropertyManager, &QtAbstractPropertyManager::propertyInserted,
1016 this, [
this](QtProperty *property, QtProperty *parent, QtProperty *after)
1017 { d_ptr->slotPropertyInserted(property, parent, after); });
1020 { d_ptr->slotPropertyRemoved(property, parent); });
1022 auto *pointFPropertyManager =
new QtPointFPropertyManager(
this);
1023 d_ptr->m_typeToPropertyManager[QMetaType::QPointF] = pointFPropertyManager;
1024 d_ptr->m_typeToValueType[QMetaType::QPointF] = QMetaType::QPointF;
1025 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QPointF][d_ptr->m_decimalsAttribute] =
1027 connect(pointFPropertyManager, &QtPointFPropertyManager::valueChanged,
1028 this, [
this](QtProperty *property, QPointF value)
1029 { d_ptr->slotValueChanged(property, value); });
1031 this, [
this](
QtProperty *property,
int value)
1032 { d_ptr->slotDecimalsChanged(property, value); });
1033 connect(pointFPropertyManager->subDoublePropertyManager(), &QtDoublePropertyManager::valueChanged,
1034 this, [
this](QtProperty *property,
double value)
1035 { d_ptr->slotValueChanged(property, value); });
1036 connect(pointFPropertyManager, &QtAbstractPropertyManager::propertyInserted,
1037 this, [
this](QtProperty *property, QtProperty *parent, QtProperty *after)
1038 { d_ptr->slotPropertyInserted(property, parent, after); });
1041 { d_ptr->slotPropertyRemoved(property, parent); });
1043 auto *sizePropertyManager =
new QtSizePropertyManager(
this);
1044 d_ptr->m_typeToPropertyManager[QMetaType::QSize] = sizePropertyManager;
1045 d_ptr->m_typeToValueType[QMetaType::QSize] = QMetaType::QSize;
1046 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QSize][d_ptr->m_minimumAttribute] =
1048 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QSize][d_ptr->m_maximumAttribute] =
1050 connect(sizePropertyManager, &QtSizePropertyManager::valueChanged,
1051 this, [
this](QtProperty *property, QSize value)
1052 { d_ptr->slotValueChanged(property, value); });
1053 connect(sizePropertyManager, &QtSizePropertyManager::rangeChanged,
1054 this, [
this](
QtProperty *property, QSize min, QSize max)
1055 { d_ptr->slotRangeChanged(property, min, max); });
1056 connect(sizePropertyManager->subIntPropertyManager(), &QtIntPropertyManager::valueChanged,
1057 this, [
this](QtProperty *property,
int value)
1058 { d_ptr->slotValueChanged(property, value); });
1060 this, [
this](
QtProperty *property,
int min,
int max)
1061 { d_ptr->slotRangeChanged(property, min, max); });
1062 connect(sizePropertyManager, &QtAbstractPropertyManager::propertyInserted,
1063 this, [
this](QtProperty *property, QtProperty *parent, QtProperty *after)
1064 { d_ptr->slotPropertyInserted(property, parent, after); });
1067 { d_ptr->slotPropertyRemoved(property, parent); });
1069 auto *sizeFPropertyManager =
new QtSizeFPropertyManager(
this);
1070 d_ptr->m_typeToPropertyManager[QMetaType::QSizeF] = sizeFPropertyManager;
1071 d_ptr->m_typeToValueType[QMetaType::QSizeF] = QMetaType::QSizeF;
1072 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QSizeF][d_ptr->m_minimumAttribute] =
1074 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QSizeF][d_ptr->m_maximumAttribute] =
1076 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QSizeF][d_ptr->m_decimalsAttribute] =
1078 connect(sizeFPropertyManager, &QtSizeFPropertyManager::valueChanged,
1079 this, [
this](QtProperty *property,
const QSizeF &value)
1080 { d_ptr->slotValueChanged(property, value); });
1081 connect(sizeFPropertyManager, &QtSizeFPropertyManager::rangeChanged,
1082 this, [
this](
QtProperty *property,
const QSizeF &min,
const QSizeF &max)
1083 { d_ptr->slotRangeChanged(property, min, max); });
1084 connect(sizeFPropertyManager->subDoublePropertyManager(), &QtDoublePropertyManager::valueChanged,
1085 this, [
this](QtProperty *property,
double value)
1086 { d_ptr->slotValueChanged(property, value); });
1088 this, [
this](
QtProperty *property,
double min,
double max)
1089 { d_ptr->slotRangeChanged(property, min, max); });
1090 connect(sizeFPropertyManager, &QtAbstractPropertyManager::propertyInserted,
1091 this, [
this](QtProperty *property, QtProperty *parent, QtProperty *after)
1092 { d_ptr->slotPropertyInserted(property, parent, after); });
1095 { d_ptr->slotPropertyRemoved(property, parent); });
1097 auto *rectPropertyManager =
new QtRectPropertyManager(
this);
1098 d_ptr->m_typeToPropertyManager[QMetaType::QRect] = rectPropertyManager;
1099 d_ptr->m_typeToValueType[QMetaType::QRect] = QMetaType::QRect;
1100 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QRect][d_ptr->m_constraintAttribute] =
1102 connect(rectPropertyManager, &QtRectPropertyManager::valueChanged,
1103 this, [
this](QtProperty *property, QRect value)
1104 { d_ptr->slotValueChanged(property, value); });
1105 connect(rectPropertyManager, &QtRectPropertyManager::constraintChanged,
1106 this, [
this](
QtProperty *property, QRect value)
1107 { d_ptr->slotConstraintChanged(property, value); });
1108 connect(rectPropertyManager->subIntPropertyManager(), &QtIntPropertyManager::valueChanged,
1109 this, [
this](QtProperty *property,
int value)
1110 { d_ptr->slotValueChanged(property, value); });
1112 this, [
this](
QtProperty *property,
int min,
int max)
1113 { d_ptr->slotRangeChanged(property, min, max); });
1114 connect(rectPropertyManager, &QtAbstractPropertyManager::propertyInserted,
1115 this, [
this](QtProperty *property, QtProperty *parent, QtProperty *after)
1116 { d_ptr->slotPropertyInserted(property, parent, after); });
1119 { d_ptr->slotPropertyRemoved(property, parent); });
1121 auto *rectFPropertyManager =
new QtRectFPropertyManager(
this);
1122 d_ptr->m_typeToPropertyManager[QMetaType::QRectF] = rectFPropertyManager;
1123 d_ptr->m_typeToValueType[QMetaType::QRectF] = QMetaType::QRectF;
1124 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QRectF][d_ptr->m_constraintAttribute] =
1126 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QRectF][d_ptr->m_decimalsAttribute] =
1128 connect(rectFPropertyManager, &QtRectFPropertyManager::valueChanged,
1129 this, [
this](QtProperty *property,
const QRectF &value)
1130 { d_ptr->slotValueChanged(property, value); });
1131 connect(rectFPropertyManager, &QtRectFPropertyManager::constraintChanged,
1132 this, [
this](
QtProperty *property,
const QRectF &value)
1133 { d_ptr->slotConstraintChanged(property, value); });
1134 connect(rectFPropertyManager->subDoublePropertyManager(), &QtDoublePropertyManager::valueChanged,
1135 this, [
this](QtProperty *property,
double value)
1136 { d_ptr->slotValueChanged(property, value); });
1138 this, [
this](
QtProperty *property,
double min,
double max)
1139 { d_ptr->slotRangeChanged(property, min, max); });
1140 connect(rectFPropertyManager, &QtAbstractPropertyManager::propertyInserted,
1141 this, [
this](QtProperty *property, QtProperty *parent, QtProperty *after)
1142 { d_ptr->slotPropertyInserted(property, parent, after); });
1145 { d_ptr->slotPropertyRemoved(property, parent); });
1147 auto *colorPropertyManager =
new QtColorPropertyManager(
this);
1148 d_ptr->m_typeToPropertyManager[QMetaType::QColor] = colorPropertyManager;
1149 d_ptr->m_typeToValueType[QMetaType::QColor] = QMetaType::QColor;
1150 connect(colorPropertyManager, &QtColorPropertyManager::valueChanged,
1151 this, [
this](QtProperty *property,
const QColor &value)
1152 { d_ptr->slotValueChanged(property, value); });
1153 connect(colorPropertyManager->subIntPropertyManager(), &QtIntPropertyManager::valueChanged,
1154 this, [
this](QtProperty *property,
int value)
1155 { d_ptr->slotValueChanged(property, value); });
1156 connect(colorPropertyManager, &QtAbstractPropertyManager::propertyInserted,
1157 this, [
this](QtProperty *property, QtProperty *parent, QtProperty *after)
1158 { d_ptr->slotPropertyInserted(property, parent, after); });
1161 { d_ptr->slotPropertyRemoved(property, parent); });
1164 auto *enumPropertyManager =
new QtEnumPropertyManager(
this);
1165 d_ptr->m_typeToPropertyManager[enumId] = enumPropertyManager;
1166 d_ptr->m_typeToValueType[enumId] = QMetaType::Int;
1167 d_ptr->m_typeToAttributeToAttributeType[enumId][d_ptr->m_enumNamesAttribute] =
1168 QMetaType::QStringList;
1169 d_ptr->m_typeToAttributeToAttributeType[enumId][d_ptr->m_enumIconsAttribute] =
1171 connect(enumPropertyManager, &QtEnumPropertyManager::valueChanged,
1172 this, [
this](QtProperty *property,
int value)
1173 { d_ptr->slotValueChanged(property, value); });
1174 connect(enumPropertyManager, &QtEnumPropertyManager::enumNamesChanged,
1175 this, [
this](
QtProperty *property,
const QStringList &value)
1176 { d_ptr->slotEnumNamesChanged(property, value); });
1177 connect(enumPropertyManager, &QtEnumPropertyManager::enumIconsChanged,
1178 this, [
this](
QtProperty *property,
const QMap<
int,QIcon> &value)
1179 { d_ptr->slotEnumIconsChanged(property, value); });
1181 auto *sizePolicyPropertyManager =
new QtSizePolicyPropertyManager(
this);
1182 d_ptr->m_typeToPropertyManager[QMetaType::QSizePolicy] = sizePolicyPropertyManager;
1183 d_ptr->m_typeToValueType[QMetaType::QSizePolicy] = QMetaType::QSizePolicy;
1184 connect(sizePolicyPropertyManager, &QtSizePolicyPropertyManager::valueChanged,
1185 this, [
this](QtProperty *property, QSizePolicy value)
1186 { d_ptr->slotValueChanged(property, value); });
1187 connect(sizePolicyPropertyManager->subIntPropertyManager(), &QtIntPropertyManager::valueChanged,
1188 this, [
this](QtProperty *property,
int value)
1189 { d_ptr->slotValueChanged(property, value); });
1191 this, [
this](
QtProperty *property,
int min,
int max)
1192 { d_ptr->slotRangeChanged(property, min, max); });
1193 connect(sizePolicyPropertyManager->subEnumPropertyManager(), &QtEnumPropertyManager::valueChanged,
1194 this, [
this](QtProperty *property,
int value)
1195 { d_ptr->slotValueChanged(property, value); });
1196 connect(sizePolicyPropertyManager->subEnumPropertyManager(), &QtEnumPropertyManager::enumNamesChanged,
1197 this, [
this](
QtProperty *property,
const QStringList &value)
1198 { d_ptr->slotEnumNamesChanged(property, value); });
1199 connect(sizePolicyPropertyManager, &QtAbstractPropertyManager::propertyInserted,
1200 this, [
this](QtProperty *property, QtProperty *parent, QtProperty *after)
1201 { d_ptr->slotPropertyInserted(property, parent, after); });
1204 { d_ptr->slotPropertyRemoved(property, parent); });
1206 auto *fontPropertyManager =
new QtFontPropertyManager(
this);
1207 d_ptr->m_typeToPropertyManager[QMetaType::QFont] = fontPropertyManager;
1208 d_ptr->m_typeToValueType[QMetaType::QFont] = QMetaType::QFont;
1209 connect(fontPropertyManager, &QtFontPropertyManager::valueChanged,
1210 this, [
this](QtProperty *property,
const QFont &value)
1211 { d_ptr->slotValueChanged(property, value); });
1212 connect(fontPropertyManager->subIntPropertyManager(), &QtIntPropertyManager::valueChanged,
1213 this, [
this](QtProperty *property,
int value)
1214 { d_ptr->slotValueChanged(property, value); });
1216 this, [
this](
QtProperty *property,
int min,
int max)
1217 { d_ptr->slotRangeChanged(property, min, max); });
1218 connect(fontPropertyManager->subEnumPropertyManager(), &QtEnumPropertyManager::valueChanged,
1219 this, [
this](QtProperty *property,
int value)
1220 { d_ptr->slotValueChanged(property, value); });
1221 connect(fontPropertyManager->subEnumPropertyManager(), &QtEnumPropertyManager::enumNamesChanged,
1222 this, [
this](
QtProperty *property,
const QStringList &value)
1223 { d_ptr->slotEnumNamesChanged(property, value); });
1224 connect(fontPropertyManager->subBoolPropertyManager(), &QtBoolPropertyManager::valueChanged,
1225 this, [
this](QtProperty *property,
bool value)
1226 { d_ptr->slotValueChanged(property, value); });
1227 connect(fontPropertyManager, &QtAbstractPropertyManager::propertyInserted,
1228 this, [
this](QtProperty *property, QtProperty *parent, QtProperty *after)
1229 { d_ptr->slotPropertyInserted(property, parent, after); });
1232 { d_ptr->slotPropertyRemoved(property, parent); });
1234 auto *cursorPropertyManager =
new QtCursorPropertyManager(
this);
1235 d_ptr->m_typeToPropertyManager[QMetaType::QCursor] = cursorPropertyManager;
1236 d_ptr->m_typeToValueType[QMetaType::QCursor] = QMetaType::QCursor;
1237 connect(cursorPropertyManager, &QtCursorPropertyManager::valueChanged,
1238 this, [
this](QtProperty *property,
const QCursor &value)
1239 { d_ptr->slotValueChanged(property, value); });
1242 auto *flagPropertyManager =
new QtFlagPropertyManager(
this);
1243 d_ptr->m_typeToPropertyManager[flagId] = flagPropertyManager;
1244 d_ptr->m_typeToValueType[flagId] = QMetaType::Int;
1245 d_ptr->m_typeToAttributeToAttributeType[flagId][d_ptr->m_flagNamesAttribute] =
1246 QMetaType::QStringList;
1247 connect(flagPropertyManager, &QtFlagPropertyManager::valueChanged,
1248 this, [
this](QtProperty *property,
const QColor &value)
1249 { d_ptr->slotValueChanged(property, value); });
1250 connect(flagPropertyManager, &QtFlagPropertyManager::flagNamesChanged,
1251 this, [
this](
QtProperty *property,
const QStringList &value)
1252 { d_ptr->slotFlagNamesChanged(property, value); });
1253 connect(flagPropertyManager->subBoolPropertyManager(), &QtBoolPropertyManager::valueChanged,
1254 this, [
this](QtProperty *property,
bool value)
1255 { d_ptr->slotValueChanged(property, value); });
1256 connect(flagPropertyManager, &QtAbstractPropertyManager::propertyInserted,
1257 this, [
this](QtProperty *property, QtProperty *parent, QtProperty *after)
1258 { d_ptr->slotPropertyInserted(property, parent, after); });
1261 { d_ptr->slotPropertyRemoved(property, parent); });
1264 auto *groupPropertyManager =
new QtGroupPropertyManager(
this);
1265 d_ptr->m_typeToPropertyManager[groupId] = groupPropertyManager;
1266 d_ptr->m_typeToValueType[groupId] = QMetaType::UnknownType;
1688 const QString &attribute,
const QVariant &value)
1690 QVariant oldAttr = attributeValue(property, attribute);
1691 if (!oldAttr.isValid())
1694 int attrType = value.userType();
1698 if (attrType != attributeType(propertyType(property), attribute) &&
1699 !value.canConvert(QMetaType(attrType)))
1702 QtProperty *internProp = propertyToWrappedProperty()->value(property,
nullptr);
1703 if (internProp ==
nullptr)
1707 if (
auto *intManager = qobject_cast<QtIntPropertyManager *>(manager)) {
1708 if (attribute == d_ptr->m_maximumAttribute)
1709 intManager->setMaximum(internProp, qvariant_cast<
int>(value));
1710 else if (attribute == d_ptr->m_minimumAttribute)
1711 intManager->setMinimum(internProp, qvariant_cast<
int>(value));
1712 else if (attribute == d_ptr->m_singleStepAttribute)
1713 intManager->setSingleStep(internProp, qvariant_cast<
int>(value));
1715 }
else if (
auto *doubleManager = qobject_cast<QtDoublePropertyManager *>(manager)) {
1716 if (attribute == d_ptr->m_maximumAttribute)
1717 doubleManager->setMaximum(internProp, qvariant_cast<
double>(value));
1718 if (attribute == d_ptr->m_minimumAttribute)
1719 doubleManager->setMinimum(internProp, qvariant_cast<
double>(value));
1720 if (attribute == d_ptr->m_singleStepAttribute)
1721 doubleManager->setSingleStep(internProp, qvariant_cast<
double>(value));
1722 if (attribute == d_ptr->m_decimalsAttribute)
1723 doubleManager->setDecimals(internProp, qvariant_cast<
int>(value));
1725 }
else if (
auto *stringManager = qobject_cast<QtStringPropertyManager *>(manager)) {
1726 if (attribute == d_ptr->m_regExpAttribute)
1727 stringManager->setRegExp(internProp, qvariant_cast<QRegularExpression>(value));
1729 }
else if (
auto *dateManager = qobject_cast<QtDatePropertyManager *>(manager)) {
1730 if (attribute == d_ptr->m_maximumAttribute)
1731 dateManager->setMaximum(internProp, qvariant_cast<QDate>(value));
1732 if (attribute == d_ptr->m_minimumAttribute)
1733 dateManager->setMinimum(internProp, qvariant_cast<QDate>(value));
1735 }
else if (
auto *pointFManager = qobject_cast<QtPointFPropertyManager *>(manager)) {
1736 if (attribute == d_ptr->m_decimalsAttribute)
1737 pointFManager->setDecimals(internProp, qvariant_cast<
int>(value));
1739 }
else if (
auto *sizeManager = qobject_cast<QtSizePropertyManager *>(manager)) {
1740 if (attribute == d_ptr->m_maximumAttribute)
1741 sizeManager->setMaximum(internProp, qvariant_cast<QSize>(value));
1742 if (attribute == d_ptr->m_minimumAttribute)
1743 sizeManager->setMinimum(internProp, qvariant_cast<QSize>(value));
1745 }
else if (
auto *sizeFManager = qobject_cast<QtSizeFPropertyManager *>(manager)) {
1746 if (attribute == d_ptr->m_maximumAttribute)
1747 sizeFManager->setMaximum(internProp, qvariant_cast<QSizeF>(value));
1748 if (attribute == d_ptr->m_minimumAttribute)
1749 sizeFManager->setMinimum(internProp, qvariant_cast<QSizeF>(value));
1750 if (attribute == d_ptr->m_decimalsAttribute)
1751 sizeFManager->setDecimals(internProp, qvariant_cast<
int>(value));
1753 }
else if (
auto *rectManager = qobject_cast<QtRectPropertyManager *>(manager)) {
1754 if (attribute == d_ptr->m_constraintAttribute)
1755 rectManager->setConstraint(internProp, qvariant_cast<QRect>(value));
1757 }
else if (
auto *rectFManager = qobject_cast<QtRectFPropertyManager *>(manager)) {
1758 if (attribute == d_ptr->m_constraintAttribute)
1759 rectFManager->setConstraint(internProp, qvariant_cast<QRectF>(value));
1760 if (attribute == d_ptr->m_decimalsAttribute)
1761 rectFManager->setDecimals(internProp, qvariant_cast<
int>(value));
1763 }
else if (
auto *enumManager = qobject_cast<QtEnumPropertyManager *>(manager)) {
1764 if (attribute == d_ptr->m_enumNamesAttribute)
1765 enumManager->setEnumNames(internProp, qvariant_cast<QStringList>(value));
1766 if (attribute == d_ptr->m_enumIconsAttribute)
1767 enumManager->setEnumIcons(internProp, qvariant_cast<QtIconMap>(value));
1769 }
else if (
auto *flagManager = qobject_cast<QtFlagPropertyManager *>(manager)) {
1770 if (attribute == d_ptr->m_flagNamesAttribute)
1771 flagManager->setFlagNames(internProp, qvariant_cast<QStringList>(value));
2030 const auto intPropertyManagers = manager->findChildren<QtIntPropertyManager *>();
2031 for (QtIntPropertyManager *manager : intPropertyManagers)
2032 d_ptr->m_spinBoxFactory->addPropertyManager(manager);
2034 const auto doublePropertyManagers = manager->findChildren<QtDoublePropertyManager *>();
2035 for (QtDoublePropertyManager *manager : doublePropertyManagers)
2036 d_ptr->m_doubleSpinBoxFactory->addPropertyManager(manager);
2038 const auto boolPropertyManagers = manager->findChildren<QtBoolPropertyManager *>();
2039 for (QtBoolPropertyManager *manager : boolPropertyManagers)
2040 d_ptr->m_checkBoxFactory->addPropertyManager(manager);
2042 const auto stringPropertyManagers = manager->findChildren<QtStringPropertyManager *>();
2043 for (QtStringPropertyManager *manager : stringPropertyManagers)
2044 d_ptr->m_lineEditFactory->addPropertyManager(manager);
2046 const auto datePropertyManagers = manager->findChildren<QtDatePropertyManager *>();
2047 for (QtDatePropertyManager *manager : datePropertyManagers)
2048 d_ptr->m_dateEditFactory->addPropertyManager(manager);
2050 const auto timePropertyManagers = manager->findChildren<QtTimePropertyManager *>();
2051 for (QtTimePropertyManager *manager : timePropertyManagers)
2052 d_ptr->m_timeEditFactory->addPropertyManager(manager);
2054 const auto dateTimePropertyManagers = manager->findChildren<QtDateTimePropertyManager *>();
2055 for (QtDateTimePropertyManager *manager : dateTimePropertyManagers)
2056 d_ptr->m_dateTimeEditFactory->addPropertyManager(manager);
2058 const auto keySequencePropertyManagers = manager->findChildren<QtKeySequencePropertyManager *>();
2059 for (QtKeySequencePropertyManager *manager : keySequencePropertyManagers)
2060 d_ptr->m_keySequenceEditorFactory->addPropertyManager(manager);
2062 const auto charPropertyManagers = manager->findChildren<QtCharPropertyManager *>();
2063 for (QtCharPropertyManager *manager : charPropertyManagers)
2064 d_ptr->m_charEditorFactory->addPropertyManager(manager);
2066 const auto localePropertyManagers = manager->findChildren<QtLocalePropertyManager *>();
2067 for (QtLocalePropertyManager *manager : localePropertyManagers)
2068 d_ptr->m_comboBoxFactory->addPropertyManager(manager->subEnumPropertyManager());
2070 const auto pointPropertyManagers = manager->findChildren<QtPointPropertyManager *>();
2071 for (QtPointPropertyManager *manager : pointPropertyManagers)
2072 d_ptr->m_spinBoxFactory->addPropertyManager(manager->subIntPropertyManager());
2074 const auto pointFPropertyManagers = manager->findChildren<QtPointFPropertyManager *>();
2075 for (QtPointFPropertyManager *manager : pointFPropertyManagers)
2076 d_ptr->m_doubleSpinBoxFactory->addPropertyManager(manager->subDoublePropertyManager());
2078 const auto sizePropertyManagers = manager->findChildren<QtSizePropertyManager *>();
2079 for (QtSizePropertyManager *manager : sizePropertyManagers)
2080 d_ptr->m_spinBoxFactory->addPropertyManager(manager->subIntPropertyManager());
2082 const auto sizeFPropertyManagers = manager->findChildren<QtSizeFPropertyManager *>();
2083 for (QtSizeFPropertyManager *manager : sizeFPropertyManagers)
2084 d_ptr->m_doubleSpinBoxFactory->addPropertyManager(manager->subDoublePropertyManager());
2086 const auto rectPropertyManagers = manager->findChildren<QtRectPropertyManager *>();
2087 for (QtRectPropertyManager *manager : rectPropertyManagers)
2088 d_ptr->m_spinBoxFactory->addPropertyManager(manager->subIntPropertyManager());
2090 const auto rectFPropertyManagers = manager->findChildren<QtRectFPropertyManager *>();
2091 for (QtRectFPropertyManager *manager : rectFPropertyManagers)
2092 d_ptr->m_doubleSpinBoxFactory->addPropertyManager(manager->subDoublePropertyManager());
2094 const auto colorPropertyManagers = manager->findChildren<QtColorPropertyManager *>();
2095 for (QtColorPropertyManager *manager : colorPropertyManagers) {
2096 d_ptr->m_colorEditorFactory->addPropertyManager(manager);
2097 d_ptr->m_spinBoxFactory->addPropertyManager(manager->subIntPropertyManager());
2100 const auto enumPropertyManagers = manager->findChildren<QtEnumPropertyManager *>();
2101 for (QtEnumPropertyManager *manager : enumPropertyManagers)
2102 d_ptr->m_comboBoxFactory->addPropertyManager(manager);
2104 const auto sizePolicyPropertyManagers = manager->findChildren<QtSizePolicyPropertyManager *>();
2105 for (QtSizePolicyPropertyManager *manager : sizePolicyPropertyManagers) {
2106 d_ptr->m_spinBoxFactory->addPropertyManager(manager->subIntPropertyManager());
2107 d_ptr->m_comboBoxFactory->addPropertyManager(manager->subEnumPropertyManager());
2110 const auto fontPropertyManagers = manager->findChildren<QtFontPropertyManager *>();
2111 for (QtFontPropertyManager *manager : fontPropertyManagers) {
2112 d_ptr->m_fontEditorFactory->addPropertyManager(manager);
2113 d_ptr->m_spinBoxFactory->addPropertyManager(manager->subIntPropertyManager());
2114 d_ptr->m_comboBoxFactory->addPropertyManager(manager->subEnumPropertyManager());
2115 d_ptr->m_checkBoxFactory->addPropertyManager(manager->subBoolPropertyManager());
2118 const auto cursorPropertyManagers = manager->findChildren<QtCursorPropertyManager *>();
2119 for (QtCursorPropertyManager *manager : cursorPropertyManagers)
2120 d_ptr->m_cursorEditorFactory->addPropertyManager(manager);
2122 const auto flagPropertyManagers = manager->findChildren<QtFlagPropertyManager *>();
2123 for (QtFlagPropertyManager *manager : flagPropertyManagers)
2124 d_ptr->m_checkBoxFactory->addPropertyManager(manager->subBoolPropertyManager());
2149 const auto intPropertyManagers = manager->findChildren<QtIntPropertyManager *>();
2150 for (QtIntPropertyManager *manager : intPropertyManagers)
2151 d_ptr->m_spinBoxFactory->removePropertyManager(manager);
2153 const auto doublePropertyManagers = manager->findChildren<QtDoublePropertyManager *>();
2154 for (QtDoublePropertyManager *manager : doublePropertyManagers)
2155 d_ptr->m_doubleSpinBoxFactory->removePropertyManager(manager);
2157 const auto boolPropertyManagers = manager->findChildren<QtBoolPropertyManager *>();
2158 for (QtBoolPropertyManager *manager : boolPropertyManagers)
2159 d_ptr->m_checkBoxFactory->removePropertyManager(manager);
2161 const auto stringPropertyManagers = manager->findChildren<QtStringPropertyManager *>();
2162 for (QtStringPropertyManager *manager : stringPropertyManagers)
2163 d_ptr->m_lineEditFactory->removePropertyManager(manager);
2165 const auto datePropertyManagers = manager->findChildren<QtDatePropertyManager *>();
2166 for (QtDatePropertyManager *manager : datePropertyManagers)
2167 d_ptr->m_dateEditFactory->removePropertyManager(manager);
2169 const auto timePropertyManagers = manager->findChildren<QtTimePropertyManager *>();
2170 for (QtTimePropertyManager *manager : timePropertyManagers)
2171 d_ptr->m_timeEditFactory->removePropertyManager(manager);
2173 const auto dateTimePropertyManagers = manager->findChildren<QtDateTimePropertyManager *>();
2174 for (QtDateTimePropertyManager *manager : dateTimePropertyManagers)
2175 d_ptr->m_dateTimeEditFactory->removePropertyManager(manager);
2177 const auto keySequencePropertyManagers = manager->findChildren<QtKeySequencePropertyManager *>();
2178 for (QtKeySequencePropertyManager *manager : keySequencePropertyManagers)
2179 d_ptr->m_keySequenceEditorFactory->removePropertyManager(manager);
2181 const auto charPropertyManagers = manager->findChildren<QtCharPropertyManager *>();
2182 for (QtCharPropertyManager *manager : charPropertyManagers)
2183 d_ptr->m_charEditorFactory->removePropertyManager(manager);
2185 const auto localePropertyManagers = manager->findChildren<QtLocalePropertyManager *>();
2186 for (QtLocalePropertyManager *manager : localePropertyManagers)
2187 d_ptr->m_comboBoxFactory->removePropertyManager(manager->subEnumPropertyManager());
2189 const auto pointPropertyManagers = manager->findChildren<QtPointPropertyManager *>();
2190 for (QtPointPropertyManager *manager : pointPropertyManagers)
2191 d_ptr->m_spinBoxFactory->removePropertyManager(manager->subIntPropertyManager());
2193 const auto pointFPropertyManagers = manager->findChildren<QtPointFPropertyManager *>();
2194 for (QtPointFPropertyManager *manager : pointFPropertyManagers)
2195 d_ptr->m_doubleSpinBoxFactory->removePropertyManager(manager->subDoublePropertyManager());
2197 const auto sizePropertyManagers = manager->findChildren<QtSizePropertyManager *>();
2198 for (QtSizePropertyManager *manager : sizePropertyManagers)
2199 d_ptr->m_spinBoxFactory->removePropertyManager(manager->subIntPropertyManager());
2201 const auto sizeFPropertyManagers = manager->findChildren<QtSizeFPropertyManager *>();
2202 for (QtSizeFPropertyManager *manager : sizeFPropertyManagers)
2203 d_ptr->m_doubleSpinBoxFactory->removePropertyManager(manager->subDoublePropertyManager());
2205 const auto rectPropertyManagers = manager->findChildren<QtRectPropertyManager *>();
2206 for (QtRectPropertyManager *manager : rectPropertyManagers)
2207 d_ptr->m_spinBoxFactory->removePropertyManager(manager->subIntPropertyManager());
2209 const auto rectFPropertyManagers = manager->findChildren<QtRectFPropertyManager *>();
2210 for (QtRectFPropertyManager *manager : rectFPropertyManagers)
2211 d_ptr->m_doubleSpinBoxFactory->removePropertyManager(manager->subDoublePropertyManager());
2213 const auto colorPropertyManagers = manager->findChildren<QtColorPropertyManager *>();
2214 for (QtColorPropertyManager *manager : colorPropertyManagers) {
2215 d_ptr->m_colorEditorFactory->removePropertyManager(manager);
2216 d_ptr->m_spinBoxFactory->removePropertyManager(manager->subIntPropertyManager());
2219 const auto enumPropertyManagers = manager->findChildren<QtEnumPropertyManager *>();
2220 for (QtEnumPropertyManager *manager : enumPropertyManagers)
2221 d_ptr->m_comboBoxFactory->removePropertyManager(manager);
2223 const auto sizePolicyPropertyManagers = manager->findChildren<QtSizePolicyPropertyManager *>();
2224 for (QtSizePolicyPropertyManager *manager : sizePolicyPropertyManagers) {
2225 d_ptr->m_spinBoxFactory->removePropertyManager(manager->subIntPropertyManager());
2226 d_ptr->m_comboBoxFactory->removePropertyManager(manager->subEnumPropertyManager());
2229 const auto fontPropertyManagers = manager->findChildren<QtFontPropertyManager *>();
2230 for (QtFontPropertyManager *manager : fontPropertyManagers) {
2231 d_ptr->m_fontEditorFactory->removePropertyManager(manager);
2232 d_ptr->m_spinBoxFactory->removePropertyManager(manager->subIntPropertyManager());
2233 d_ptr->m_comboBoxFactory->removePropertyManager(manager->subEnumPropertyManager());
2234 d_ptr->m_checkBoxFactory->removePropertyManager(manager->subBoolPropertyManager());
2237 const auto cursorPropertyManagers = manager->findChildren<QtCursorPropertyManager *>();
2238 for (QtCursorPropertyManager *manager : cursorPropertyManagers)
2239 d_ptr->m_cursorEditorFactory->removePropertyManager(manager);
2241 const auto flagPropertyManagers = manager->findChildren<QtFlagPropertyManager *>();
2242 for (QtFlagPropertyManager *manager : flagPropertyManagers)
2243 d_ptr->m_checkBoxFactory->removePropertyManager(manager->subBoolPropertyManager());