885 d_ptr->m_creatingProperty =
false;
886 d_ptr->m_creatingSubProperties =
false;
887 d_ptr->m_destroyingSubProperties =
false;
888 d_ptr->m_propertyType = 0;
891 auto *intPropertyManager =
new QtIntPropertyManager(
this);
892 d_ptr->m_typeToPropertyManager[QMetaType::Int] = intPropertyManager;
893 d_ptr->m_typeToAttributeToAttributeType[QMetaType::Int][d_ptr->m_minimumAttribute] = QMetaType::Int;
894 d_ptr->m_typeToAttributeToAttributeType[QMetaType::Int][d_ptr->m_maximumAttribute] = QMetaType::Int;
895 d_ptr->m_typeToAttributeToAttributeType[QMetaType::Int][d_ptr->m_singleStepAttribute] = QMetaType::Int;
896 d_ptr->m_typeToValueType[QMetaType::Int] = QMetaType::Int;
897 connect(intPropertyManager, &QtIntPropertyManager::valueChanged,
898 this, [
this](QtProperty *property,
int value)
899 { d_ptr->slotValueChanged(property, value); });
901 this, [
this](
QtProperty *property,
int min,
int max)
902 { d_ptr->slotRangeChanged(property, min, max); });
905 { d_ptr->slotSingleStepChanged(property, value); });
907 auto *doublePropertyManager =
new QtDoublePropertyManager(
this);
908 d_ptr->m_typeToPropertyManager[QMetaType::Double] = doublePropertyManager;
909 d_ptr->m_typeToAttributeToAttributeType[QMetaType::Double][d_ptr->m_minimumAttribute] =
911 d_ptr->m_typeToAttributeToAttributeType[QMetaType::Double][d_ptr->m_maximumAttribute] =
913 d_ptr->m_typeToAttributeToAttributeType[QMetaType::Double][d_ptr->m_singleStepAttribute] =
915 d_ptr->m_typeToAttributeToAttributeType[QMetaType::Double][d_ptr->m_decimalsAttribute] =
917 d_ptr->m_typeToValueType[QMetaType::Double] = QMetaType::Double;
918 connect(doublePropertyManager, &QtDoublePropertyManager::valueChanged,
919 this, [
this](QtProperty *property,
double value)
920 { d_ptr->slotValueChanged(property, value); });
922 this, [
this](
QtProperty *property,
double min,
double max)
923 { d_ptr->slotRangeChanged(property, min, max); });
925 this, [
this](
QtProperty *property,
double value)
926 { d_ptr->slotSingleStepChanged(property, value); });
929 { d_ptr->slotDecimalsChanged(property, value); });
931 auto *boolPropertyManager =
new QtBoolPropertyManager(
this);
932 d_ptr->m_typeToPropertyManager[QMetaType::Bool] = boolPropertyManager;
933 d_ptr->m_typeToValueType[QMetaType::Bool] = QMetaType::Bool;
934 connect(boolPropertyManager, &QtBoolPropertyManager::valueChanged,
935 this, [
this](QtProperty *property,
bool value)
936 { d_ptr->slotValueChanged(property, value); });
938 auto *stringPropertyManager =
new QtStringPropertyManager(
this);
939 d_ptr->m_typeToPropertyManager[QMetaType::QString] = stringPropertyManager;
940 d_ptr->m_typeToValueType[QMetaType::QString] = QMetaType::QString;
941 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QString][d_ptr->m_regExpAttribute] =
942 QMetaType::QRegularExpression;
943 connect(stringPropertyManager, &QtStringPropertyManager::valueChanged,
944 this, [
this](QtProperty *property,
const QString &value)
945 { d_ptr->slotValueChanged(property, value); });
947 this, [
this](
QtProperty *property,
const QRegularExpression &value)
948 { d_ptr->slotRegExpChanged(property, value); });
950 auto *datePropertyManager =
new QtDatePropertyManager(
this);
951 d_ptr->m_typeToPropertyManager[QMetaType::QDate] = datePropertyManager;
952 d_ptr->m_typeToValueType[QMetaType::QDate] = QMetaType::QDate;
953 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QDate][d_ptr->m_minimumAttribute] =
955 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QDate][d_ptr->m_maximumAttribute] =
957 connect(datePropertyManager, &QtDatePropertyManager::valueChanged,
958 this, [
this](QtProperty *property,
const QDate &value)
959 { d_ptr->slotValueChanged(property, value); });
961 this, [
this](
QtProperty *property,
const QDate &min,
const QDate &max)
962 { d_ptr->slotRangeChanged(property, min, max); });
964 auto *timePropertyManager =
new QtTimePropertyManager(
this);
965 d_ptr->m_typeToPropertyManager[QMetaType::QTime] = timePropertyManager;
966 d_ptr->m_typeToValueType[QMetaType::QTime] = QMetaType::QTime;
967 connect(timePropertyManager, &QtTimePropertyManager::valueChanged,
968 this, [
this](QtProperty *property,
const QTime &value)
969 { d_ptr->slotValueChanged(property, value); });
971 auto *dateTimePropertyManager =
new QtDateTimePropertyManager(
this);
972 d_ptr->m_typeToPropertyManager[QMetaType::QDateTime] = dateTimePropertyManager;
973 d_ptr->m_typeToValueType[QMetaType::QDateTime] = QMetaType::QDateTime;
974 connect(dateTimePropertyManager, &QtDateTimePropertyManager::valueChanged,
975 this, [
this](QtProperty *property,
const QDateTime &value)
976 { d_ptr->slotValueChanged(property, value); });
978 auto *keySequencePropertyManager =
new QtKeySequencePropertyManager(
this);
979 d_ptr->m_typeToPropertyManager[QMetaType::QKeySequence] = keySequencePropertyManager;
980 d_ptr->m_typeToValueType[QMetaType::QKeySequence] = QMetaType::QKeySequence;
981 connect(keySequencePropertyManager, &QtKeySequencePropertyManager::valueChanged,
982 this, [
this](QtProperty *property,
const QKeySequence &value)
983 { d_ptr->slotValueChanged(property, value); });
985 auto *charPropertyManager =
new QtCharPropertyManager(
this);
986 d_ptr->m_typeToPropertyManager[QMetaType::QChar] = charPropertyManager;
987 d_ptr->m_typeToValueType[QMetaType::QChar] = QMetaType::QChar;
988 connect(charPropertyManager, &QtCharPropertyManager::valueChanged,
989 this, [
this](QtProperty *property,
const QChar &value)
990 { d_ptr->slotValueChanged(property, value); });
992 auto *localePropertyManager =
new QtLocalePropertyManager(
this);
993 d_ptr->m_typeToPropertyManager[QMetaType::QLocale] = localePropertyManager;
994 d_ptr->m_typeToValueType[QMetaType::QLocale] = QMetaType::QLocale;
995 connect(localePropertyManager, &QtLocalePropertyManager::valueChanged,
996 this, [
this](QtProperty *property,
const QLocale &value)
997 { d_ptr->slotValueChanged(property, value); });
998 connect(localePropertyManager->subEnumPropertyManager(), &QtEnumPropertyManager::valueChanged,
999 this, [
this](QtProperty *property,
int value)
1000 { d_ptr->slotValueChanged(property, value); });
1001 connect(localePropertyManager, &QtAbstractPropertyManager::propertyInserted,
1002 this, [
this](QtProperty *property, QtProperty *parent, QtProperty *after)
1003 { d_ptr->slotPropertyInserted(property, parent, after); });
1006 { d_ptr->slotPropertyRemoved(property, parent); });
1008 auto *pointPropertyManager =
new QtPointPropertyManager(
this);
1009 d_ptr->m_typeToPropertyManager[QMetaType::QPoint] = pointPropertyManager;
1010 d_ptr->m_typeToValueType[QMetaType::QPoint] = QMetaType::QPoint;
1011 connect(pointPropertyManager, &QtPointPropertyManager::valueChanged,
1012 this, [
this](QtProperty *property, QPoint value)
1013 { d_ptr->slotValueChanged(property, value); });
1014 connect(pointPropertyManager->subIntPropertyManager(), &QtIntPropertyManager::valueChanged,
1015 this, [
this](QtProperty *property,
int value)
1016 { d_ptr->slotValueChanged(property, value); });
1017 connect(pointPropertyManager, &QtAbstractPropertyManager::propertyInserted,
1018 this, [
this](QtProperty *property, QtProperty *parent, QtProperty *after)
1019 { d_ptr->slotPropertyInserted(property, parent, after); });
1022 { d_ptr->slotPropertyRemoved(property, parent); });
1024 auto *pointFPropertyManager =
new QtPointFPropertyManager(
this);
1025 d_ptr->m_typeToPropertyManager[QMetaType::QPointF] = pointFPropertyManager;
1026 d_ptr->m_typeToValueType[QMetaType::QPointF] = QMetaType::QPointF;
1027 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QPointF][d_ptr->m_decimalsAttribute] =
1029 connect(pointFPropertyManager, &QtPointFPropertyManager::valueChanged,
1030 this, [
this](QtProperty *property, QPointF value)
1031 { d_ptr->slotValueChanged(property, value); });
1033 this, [
this](
QtProperty *property,
int value)
1034 { d_ptr->slotDecimalsChanged(property, value); });
1035 connect(pointFPropertyManager->subDoublePropertyManager(), &QtDoublePropertyManager::valueChanged,
1036 this, [
this](QtProperty *property,
double value)
1037 { d_ptr->slotValueChanged(property, value); });
1038 connect(pointFPropertyManager, &QtAbstractPropertyManager::propertyInserted,
1039 this, [
this](QtProperty *property, QtProperty *parent, QtProperty *after)
1040 { d_ptr->slotPropertyInserted(property, parent, after); });
1043 { d_ptr->slotPropertyRemoved(property, parent); });
1045 auto *sizePropertyManager =
new QtSizePropertyManager(
this);
1046 d_ptr->m_typeToPropertyManager[QMetaType::QSize] = sizePropertyManager;
1047 d_ptr->m_typeToValueType[QMetaType::QSize] = QMetaType::QSize;
1048 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QSize][d_ptr->m_minimumAttribute] =
1050 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QSize][d_ptr->m_maximumAttribute] =
1052 connect(sizePropertyManager, &QtSizePropertyManager::valueChanged,
1053 this, [
this](QtProperty *property, QSize value)
1054 { d_ptr->slotValueChanged(property, value); });
1055 connect(sizePropertyManager, &QtSizePropertyManager::rangeChanged,
1056 this, [
this](
QtProperty *property, QSize min, QSize max)
1057 { d_ptr->slotRangeChanged(property, min, max); });
1058 connect(sizePropertyManager->subIntPropertyManager(), &QtIntPropertyManager::valueChanged,
1059 this, [
this](QtProperty *property,
int value)
1060 { d_ptr->slotValueChanged(property, value); });
1062 this, [
this](
QtProperty *property,
int min,
int max)
1063 { d_ptr->slotRangeChanged(property, min, max); });
1064 connect(sizePropertyManager, &QtAbstractPropertyManager::propertyInserted,
1065 this, [
this](QtProperty *property, QtProperty *parent, QtProperty *after)
1066 { d_ptr->slotPropertyInserted(property, parent, after); });
1069 { d_ptr->slotPropertyRemoved(property, parent); });
1071 auto *sizeFPropertyManager =
new QtSizeFPropertyManager(
this);
1072 d_ptr->m_typeToPropertyManager[QMetaType::QSizeF] = sizeFPropertyManager;
1073 d_ptr->m_typeToValueType[QMetaType::QSizeF] = QMetaType::QSizeF;
1074 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QSizeF][d_ptr->m_minimumAttribute] =
1076 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QSizeF][d_ptr->m_maximumAttribute] =
1078 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QSizeF][d_ptr->m_decimalsAttribute] =
1080 connect(sizeFPropertyManager, &QtSizeFPropertyManager::valueChanged,
1081 this, [
this](QtProperty *property,
const QSizeF &value)
1082 { d_ptr->slotValueChanged(property, value); });
1083 connect(sizeFPropertyManager, &QtSizeFPropertyManager::rangeChanged,
1084 this, [
this](
QtProperty *property,
const QSizeF &min,
const QSizeF &max)
1085 { d_ptr->slotRangeChanged(property, min, max); });
1086 connect(sizeFPropertyManager->subDoublePropertyManager(), &QtDoublePropertyManager::valueChanged,
1087 this, [
this](QtProperty *property,
double value)
1088 { d_ptr->slotValueChanged(property, value); });
1090 this, [
this](
QtProperty *property,
double min,
double max)
1091 { d_ptr->slotRangeChanged(property, min, max); });
1092 connect(sizeFPropertyManager, &QtAbstractPropertyManager::propertyInserted,
1093 this, [
this](QtProperty *property, QtProperty *parent, QtProperty *after)
1094 { d_ptr->slotPropertyInserted(property, parent, after); });
1097 { d_ptr->slotPropertyRemoved(property, parent); });
1099 auto *rectPropertyManager =
new QtRectPropertyManager(
this);
1100 d_ptr->m_typeToPropertyManager[QMetaType::QRect] = rectPropertyManager;
1101 d_ptr->m_typeToValueType[QMetaType::QRect] = QMetaType::QRect;
1102 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QRect][d_ptr->m_constraintAttribute] =
1104 connect(rectPropertyManager, &QtRectPropertyManager::valueChanged,
1105 this, [
this](QtProperty *property, QRect value)
1106 { d_ptr->slotValueChanged(property, value); });
1107 connect(rectPropertyManager, &QtRectPropertyManager::constraintChanged,
1108 this, [
this](
QtProperty *property, QRect value)
1109 { d_ptr->slotConstraintChanged(property, value); });
1110 connect(rectPropertyManager->subIntPropertyManager(), &QtIntPropertyManager::valueChanged,
1111 this, [
this](QtProperty *property,
int value)
1112 { d_ptr->slotValueChanged(property, value); });
1114 this, [
this](
QtProperty *property,
int min,
int max)
1115 { d_ptr->slotRangeChanged(property, min, max); });
1116 connect(rectPropertyManager, &QtAbstractPropertyManager::propertyInserted,
1117 this, [
this](QtProperty *property, QtProperty *parent, QtProperty *after)
1118 { d_ptr->slotPropertyInserted(property, parent, after); });
1121 { d_ptr->slotPropertyRemoved(property, parent); });
1123 auto *rectFPropertyManager =
new QtRectFPropertyManager(
this);
1124 d_ptr->m_typeToPropertyManager[QMetaType::QRectF] = rectFPropertyManager;
1125 d_ptr->m_typeToValueType[QMetaType::QRectF] = QMetaType::QRectF;
1126 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QRectF][d_ptr->m_constraintAttribute] =
1128 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QRectF][d_ptr->m_decimalsAttribute] =
1130 connect(rectFPropertyManager, &QtRectFPropertyManager::valueChanged,
1131 this, [
this](QtProperty *property,
const QRectF &value)
1132 { d_ptr->slotValueChanged(property, value); });
1133 connect(rectFPropertyManager, &QtRectFPropertyManager::constraintChanged,
1134 this, [
this](
QtProperty *property,
const QRectF &value)
1135 { d_ptr->slotConstraintChanged(property, value); });
1136 connect(rectFPropertyManager->subDoublePropertyManager(), &QtDoublePropertyManager::valueChanged,
1137 this, [
this](QtProperty *property,
double value)
1138 { d_ptr->slotValueChanged(property, value); });
1140 this, [
this](
QtProperty *property,
double min,
double max)
1141 { d_ptr->slotRangeChanged(property, min, max); });
1142 connect(rectFPropertyManager, &QtAbstractPropertyManager::propertyInserted,
1143 this, [
this](QtProperty *property, QtProperty *parent, QtProperty *after)
1144 { d_ptr->slotPropertyInserted(property, parent, after); });
1147 { d_ptr->slotPropertyRemoved(property, parent); });
1149 auto *colorPropertyManager =
new QtColorPropertyManager(
this);
1150 d_ptr->m_typeToPropertyManager[QMetaType::QColor] = colorPropertyManager;
1151 d_ptr->m_typeToValueType[QMetaType::QColor] = QMetaType::QColor;
1152 connect(colorPropertyManager, &QtColorPropertyManager::valueChanged,
1153 this, [
this](QtProperty *property,
const QColor &value)
1154 { d_ptr->slotValueChanged(property, value); });
1155 connect(colorPropertyManager->subIntPropertyManager(), &QtIntPropertyManager::valueChanged,
1156 this, [
this](QtProperty *property,
int value)
1157 { d_ptr->slotValueChanged(property, value); });
1158 connect(colorPropertyManager, &QtAbstractPropertyManager::propertyInserted,
1159 this, [
this](QtProperty *property, QtProperty *parent, QtProperty *after)
1160 { d_ptr->slotPropertyInserted(property, parent, after); });
1163 { d_ptr->slotPropertyRemoved(property, parent); });
1166 auto *enumPropertyManager =
new QtEnumPropertyManager(
this);
1167 d_ptr->m_typeToPropertyManager[enumId] = enumPropertyManager;
1168 d_ptr->m_typeToValueType[enumId] = QMetaType::Int;
1169 d_ptr->m_typeToAttributeToAttributeType[enumId][d_ptr->m_enumNamesAttribute] =
1170 QMetaType::QStringList;
1171 d_ptr->m_typeToAttributeToAttributeType[enumId][d_ptr->m_enumIconsAttribute] =
1173 connect(enumPropertyManager, &QtEnumPropertyManager::valueChanged,
1174 this, [
this](QtProperty *property,
int value)
1175 { d_ptr->slotValueChanged(property, value); });
1176 connect(enumPropertyManager, &QtEnumPropertyManager::enumNamesChanged,
1177 this, [
this](
QtProperty *property,
const QStringList &value)
1178 { d_ptr->slotEnumNamesChanged(property, value); });
1179 connect(enumPropertyManager, &QtEnumPropertyManager::enumIconsChanged,
1180 this, [
this](
QtProperty *property,
const QMap<
int,QIcon> &value)
1181 { d_ptr->slotEnumIconsChanged(property, value); });
1183 auto *sizePolicyPropertyManager =
new QtSizePolicyPropertyManager(
this);
1184 d_ptr->m_typeToPropertyManager[QMetaType::QSizePolicy] = sizePolicyPropertyManager;
1185 d_ptr->m_typeToValueType[QMetaType::QSizePolicy] = QMetaType::QSizePolicy;
1186 connect(sizePolicyPropertyManager, &QtSizePolicyPropertyManager::valueChanged,
1187 this, [
this](QtProperty *property, QSizePolicy value)
1188 { d_ptr->slotValueChanged(property, value); });
1189 connect(sizePolicyPropertyManager->subIntPropertyManager(), &QtIntPropertyManager::valueChanged,
1190 this, [
this](QtProperty *property,
int value)
1191 { d_ptr->slotValueChanged(property, value); });
1193 this, [
this](
QtProperty *property,
int min,
int max)
1194 { d_ptr->slotRangeChanged(property, min, max); });
1195 connect(sizePolicyPropertyManager->subEnumPropertyManager(), &QtEnumPropertyManager::valueChanged,
1196 this, [
this](QtProperty *property,
int value)
1197 { d_ptr->slotValueChanged(property, value); });
1198 connect(sizePolicyPropertyManager->subEnumPropertyManager(), &QtEnumPropertyManager::enumNamesChanged,
1199 this, [
this](
QtProperty *property,
const QStringList &value)
1200 { d_ptr->slotEnumNamesChanged(property, value); });
1201 connect(sizePolicyPropertyManager, &QtAbstractPropertyManager::propertyInserted,
1202 this, [
this](QtProperty *property, QtProperty *parent, QtProperty *after)
1203 { d_ptr->slotPropertyInserted(property, parent, after); });
1206 { d_ptr->slotPropertyRemoved(property, parent); });
1208 auto *fontPropertyManager =
new QtFontPropertyManager(
this);
1209 d_ptr->m_typeToPropertyManager[QMetaType::QFont] = fontPropertyManager;
1210 d_ptr->m_typeToValueType[QMetaType::QFont] = QMetaType::QFont;
1211 connect(fontPropertyManager, &QtFontPropertyManager::valueChanged,
1212 this, [
this](QtProperty *property,
const QFont &value)
1213 { d_ptr->slotValueChanged(property, value); });
1214 connect(fontPropertyManager->subIntPropertyManager(), &QtIntPropertyManager::valueChanged,
1215 this, [
this](QtProperty *property,
int value)
1216 { d_ptr->slotValueChanged(property, value); });
1218 this, [
this](
QtProperty *property,
int min,
int max)
1219 { d_ptr->slotRangeChanged(property, min, max); });
1220 connect(fontPropertyManager->subEnumPropertyManager(), &QtEnumPropertyManager::valueChanged,
1221 this, [
this](QtProperty *property,
int value)
1222 { d_ptr->slotValueChanged(property, value); });
1223 connect(fontPropertyManager->subEnumPropertyManager(), &QtEnumPropertyManager::enumNamesChanged,
1224 this, [
this](
QtProperty *property,
const QStringList &value)
1225 { d_ptr->slotEnumNamesChanged(property, value); });
1226 connect(fontPropertyManager->subBoolPropertyManager(), &QtBoolPropertyManager::valueChanged,
1227 this, [
this](QtProperty *property,
bool value)
1228 { d_ptr->slotValueChanged(property, value); });
1229 connect(fontPropertyManager, &QtAbstractPropertyManager::propertyInserted,
1230 this, [
this](QtProperty *property, QtProperty *parent, QtProperty *after)
1231 { d_ptr->slotPropertyInserted(property, parent, after); });
1234 { d_ptr->slotPropertyRemoved(property, parent); });
1236 auto *cursorPropertyManager =
new QtCursorPropertyManager(
this);
1237 d_ptr->m_typeToPropertyManager[QMetaType::QCursor] = cursorPropertyManager;
1238 d_ptr->m_typeToValueType[QMetaType::QCursor] = QMetaType::QCursor;
1239 connect(cursorPropertyManager, &QtCursorPropertyManager::valueChanged,
1240 this, [
this](QtProperty *property,
const QCursor &value)
1241 { d_ptr->slotValueChanged(property, value); });
1244 auto *flagPropertyManager =
new QtFlagPropertyManager(
this);
1245 d_ptr->m_typeToPropertyManager[flagId] = flagPropertyManager;
1246 d_ptr->m_typeToValueType[flagId] = QMetaType::Int;
1247 d_ptr->m_typeToAttributeToAttributeType[flagId][d_ptr->m_flagNamesAttribute] =
1248 QMetaType::QStringList;
1249 connect(flagPropertyManager, &QtFlagPropertyManager::valueChanged,
1250 this, [
this](QtProperty *property,
const QColor &value)
1251 { d_ptr->slotValueChanged(property, value); });
1252 connect(flagPropertyManager, &QtFlagPropertyManager::flagNamesChanged,
1253 this, [
this](
QtProperty *property,
const QStringList &value)
1254 { d_ptr->slotFlagNamesChanged(property, value); });
1255 connect(flagPropertyManager->subBoolPropertyManager(), &QtBoolPropertyManager::valueChanged,
1256 this, [
this](QtProperty *property,
bool value)
1257 { d_ptr->slotValueChanged(property, value); });
1258 connect(flagPropertyManager, &QtAbstractPropertyManager::propertyInserted,
1259 this, [
this](QtProperty *property, QtProperty *parent, QtProperty *after)
1260 { d_ptr->slotPropertyInserted(property, parent, after); });
1263 { d_ptr->slotPropertyRemoved(property, parent); });
1266 auto *groupPropertyManager =
new QtGroupPropertyManager(
this);
1267 d_ptr->m_typeToPropertyManager[groupId] = groupPropertyManager;
1268 d_ptr->m_typeToValueType[groupId] = QMetaType::UnknownType;
1694 const QString &attribute,
const QVariant &value)
1696 QVariant oldAttr = attributeValue(property, attribute);
1697 if (!oldAttr.isValid())
1700 int attrType = value.userType();
1704 if (attrType != attributeType(propertyType(property), attribute) &&
1705 !value.canConvert(QMetaType(attrType)))
1708 QtProperty *internProp = propertyToWrappedProperty()->value(property,
nullptr);
1709 if (internProp ==
nullptr)
1713 if (
auto *intManager = qobject_cast<QtIntPropertyManager *>(manager)) {
1714 if (attribute == d_ptr->m_maximumAttribute)
1715 intManager->setMaximum(internProp, qvariant_cast<
int>(value));
1716 else if (attribute == d_ptr->m_minimumAttribute)
1717 intManager->setMinimum(internProp, qvariant_cast<
int>(value));
1718 else if (attribute == d_ptr->m_singleStepAttribute)
1719 intManager->setSingleStep(internProp, qvariant_cast<
int>(value));
1721 }
else if (
auto *doubleManager = qobject_cast<QtDoublePropertyManager *>(manager)) {
1722 if (attribute == d_ptr->m_maximumAttribute)
1723 doubleManager->setMaximum(internProp, qvariant_cast<
double>(value));
1724 if (attribute == d_ptr->m_minimumAttribute)
1725 doubleManager->setMinimum(internProp, qvariant_cast<
double>(value));
1726 if (attribute == d_ptr->m_singleStepAttribute)
1727 doubleManager->setSingleStep(internProp, qvariant_cast<
double>(value));
1728 if (attribute == d_ptr->m_decimalsAttribute)
1729 doubleManager->setDecimals(internProp, qvariant_cast<
int>(value));
1731 }
else if (
auto *stringManager = qobject_cast<QtStringPropertyManager *>(manager)) {
1732 if (attribute == d_ptr->m_regExpAttribute)
1733 stringManager->setRegExp(internProp, qvariant_cast<QRegularExpression>(value));
1735 }
else if (
auto *dateManager = qobject_cast<QtDatePropertyManager *>(manager)) {
1736 if (attribute == d_ptr->m_maximumAttribute)
1737 dateManager->setMaximum(internProp, qvariant_cast<QDate>(value));
1738 if (attribute == d_ptr->m_minimumAttribute)
1739 dateManager->setMinimum(internProp, qvariant_cast<QDate>(value));
1741 }
else if (
auto *pointFManager = qobject_cast<QtPointFPropertyManager *>(manager)) {
1742 if (attribute == d_ptr->m_decimalsAttribute)
1743 pointFManager->setDecimals(internProp, qvariant_cast<
int>(value));
1745 }
else if (
auto *sizeManager = qobject_cast<QtSizePropertyManager *>(manager)) {
1746 if (attribute == d_ptr->m_maximumAttribute)
1747 sizeManager->setMaximum(internProp, qvariant_cast<QSize>(value));
1748 if (attribute == d_ptr->m_minimumAttribute)
1749 sizeManager->setMinimum(internProp, qvariant_cast<QSize>(value));
1751 }
else if (
auto *sizeFManager = qobject_cast<QtSizeFPropertyManager *>(manager)) {
1752 if (attribute == d_ptr->m_maximumAttribute)
1753 sizeFManager->setMaximum(internProp, qvariant_cast<QSizeF>(value));
1754 if (attribute == d_ptr->m_minimumAttribute)
1755 sizeFManager->setMinimum(internProp, qvariant_cast<QSizeF>(value));
1756 if (attribute == d_ptr->m_decimalsAttribute)
1757 sizeFManager->setDecimals(internProp, qvariant_cast<
int>(value));
1759 }
else if (
auto *rectManager = qobject_cast<QtRectPropertyManager *>(manager)) {
1760 if (attribute == d_ptr->m_constraintAttribute)
1761 rectManager->setConstraint(internProp, qvariant_cast<QRect>(value));
1763 }
else if (
auto *rectFManager = qobject_cast<QtRectFPropertyManager *>(manager)) {
1764 if (attribute == d_ptr->m_constraintAttribute)
1765 rectFManager->setConstraint(internProp, qvariant_cast<QRectF>(value));
1766 if (attribute == d_ptr->m_decimalsAttribute)
1767 rectFManager->setDecimals(internProp, qvariant_cast<
int>(value));
1769 }
else if (
auto *enumManager = qobject_cast<QtEnumPropertyManager *>(manager)) {
1770 if (attribute == d_ptr->m_enumNamesAttribute)
1771 enumManager->setEnumNames(internProp, qvariant_cast<QStringList>(value));
1772 if (attribute == d_ptr->m_enumIconsAttribute)
1773 enumManager->setEnumIcons(internProp, qvariant_cast<QtIconMap>(value));
1775 }
else if (
auto *flagManager = qobject_cast<QtFlagPropertyManager *>(manager)) {
1776 if (attribute == d_ptr->m_flagNamesAttribute)
1777 flagManager->setFlagNames(internProp, qvariant_cast<QStringList>(value));
2038 const auto intPropertyManagers = manager->findChildren<QtIntPropertyManager *>();
2039 for (QtIntPropertyManager *manager : intPropertyManagers)
2040 d_ptr->m_spinBoxFactory->addPropertyManager(manager);
2042 const auto doublePropertyManagers = manager->findChildren<QtDoublePropertyManager *>();
2043 for (QtDoublePropertyManager *manager : doublePropertyManagers)
2044 d_ptr->m_doubleSpinBoxFactory->addPropertyManager(manager);
2046 const auto boolPropertyManagers = manager->findChildren<QtBoolPropertyManager *>();
2047 for (QtBoolPropertyManager *manager : boolPropertyManagers)
2048 d_ptr->m_checkBoxFactory->addPropertyManager(manager);
2050 const auto stringPropertyManagers = manager->findChildren<QtStringPropertyManager *>();
2051 for (QtStringPropertyManager *manager : stringPropertyManagers)
2052 d_ptr->m_lineEditFactory->addPropertyManager(manager);
2054 const auto datePropertyManagers = manager->findChildren<QtDatePropertyManager *>();
2055 for (QtDatePropertyManager *manager : datePropertyManagers)
2056 d_ptr->m_dateEditFactory->addPropertyManager(manager);
2058 const auto timePropertyManagers = manager->findChildren<QtTimePropertyManager *>();
2059 for (QtTimePropertyManager *manager : timePropertyManagers)
2060 d_ptr->m_timeEditFactory->addPropertyManager(manager);
2062 const auto dateTimePropertyManagers = manager->findChildren<QtDateTimePropertyManager *>();
2063 for (QtDateTimePropertyManager *manager : dateTimePropertyManagers)
2064 d_ptr->m_dateTimeEditFactory->addPropertyManager(manager);
2066 const auto keySequencePropertyManagers = manager->findChildren<QtKeySequencePropertyManager *>();
2067 for (QtKeySequencePropertyManager *manager : keySequencePropertyManagers)
2068 d_ptr->m_keySequenceEditorFactory->addPropertyManager(manager);
2070 const auto charPropertyManagers = manager->findChildren<QtCharPropertyManager *>();
2071 for (QtCharPropertyManager *manager : charPropertyManagers)
2072 d_ptr->m_charEditorFactory->addPropertyManager(manager);
2074 const auto localePropertyManagers = manager->findChildren<QtLocalePropertyManager *>();
2075 for (QtLocalePropertyManager *manager : localePropertyManagers)
2076 d_ptr->m_comboBoxFactory->addPropertyManager(manager->subEnumPropertyManager());
2078 const auto pointPropertyManagers = manager->findChildren<QtPointPropertyManager *>();
2079 for (QtPointPropertyManager *manager : pointPropertyManagers)
2080 d_ptr->m_spinBoxFactory->addPropertyManager(manager->subIntPropertyManager());
2082 const auto pointFPropertyManagers = manager->findChildren<QtPointFPropertyManager *>();
2083 for (QtPointFPropertyManager *manager : pointFPropertyManagers)
2084 d_ptr->m_doubleSpinBoxFactory->addPropertyManager(manager->subDoublePropertyManager());
2086 const auto sizePropertyManagers = manager->findChildren<QtSizePropertyManager *>();
2087 for (QtSizePropertyManager *manager : sizePropertyManagers)
2088 d_ptr->m_spinBoxFactory->addPropertyManager(manager->subIntPropertyManager());
2090 const auto sizeFPropertyManagers = manager->findChildren<QtSizeFPropertyManager *>();
2091 for (QtSizeFPropertyManager *manager : sizeFPropertyManagers)
2092 d_ptr->m_doubleSpinBoxFactory->addPropertyManager(manager->subDoublePropertyManager());
2094 const auto rectPropertyManagers = manager->findChildren<QtRectPropertyManager *>();
2095 for (QtRectPropertyManager *manager : rectPropertyManagers)
2096 d_ptr->m_spinBoxFactory->addPropertyManager(manager->subIntPropertyManager());
2098 const auto rectFPropertyManagers = manager->findChildren<QtRectFPropertyManager *>();
2099 for (QtRectFPropertyManager *manager : rectFPropertyManagers)
2100 d_ptr->m_doubleSpinBoxFactory->addPropertyManager(manager->subDoublePropertyManager());
2102 const auto colorPropertyManagers = manager->findChildren<QtColorPropertyManager *>();
2103 for (QtColorPropertyManager *manager : colorPropertyManagers) {
2104 d_ptr->m_colorEditorFactory->addPropertyManager(manager);
2105 d_ptr->m_spinBoxFactory->addPropertyManager(manager->subIntPropertyManager());
2108 const auto enumPropertyManagers = manager->findChildren<QtEnumPropertyManager *>();
2109 for (QtEnumPropertyManager *manager : enumPropertyManagers)
2110 d_ptr->m_comboBoxFactory->addPropertyManager(manager);
2112 const auto sizePolicyPropertyManagers = manager->findChildren<QtSizePolicyPropertyManager *>();
2113 for (QtSizePolicyPropertyManager *manager : sizePolicyPropertyManagers) {
2114 d_ptr->m_spinBoxFactory->addPropertyManager(manager->subIntPropertyManager());
2115 d_ptr->m_comboBoxFactory->addPropertyManager(manager->subEnumPropertyManager());
2118 const auto fontPropertyManagers = manager->findChildren<QtFontPropertyManager *>();
2119 for (QtFontPropertyManager *manager : fontPropertyManagers) {
2120 d_ptr->m_fontEditorFactory->addPropertyManager(manager);
2121 d_ptr->m_spinBoxFactory->addPropertyManager(manager->subIntPropertyManager());
2122 d_ptr->m_comboBoxFactory->addPropertyManager(manager->subEnumPropertyManager());
2123 d_ptr->m_checkBoxFactory->addPropertyManager(manager->subBoolPropertyManager());
2126 const auto cursorPropertyManagers = manager->findChildren<QtCursorPropertyManager *>();
2127 for (QtCursorPropertyManager *manager : cursorPropertyManagers)
2128 d_ptr->m_cursorEditorFactory->addPropertyManager(manager);
2130 const auto flagPropertyManagers = manager->findChildren<QtFlagPropertyManager *>();
2131 for (QtFlagPropertyManager *manager : flagPropertyManagers)
2132 d_ptr->m_checkBoxFactory->addPropertyManager(manager->subBoolPropertyManager());
2157 const auto intPropertyManagers = manager->findChildren<QtIntPropertyManager *>();
2158 for (QtIntPropertyManager *manager : intPropertyManagers)
2159 d_ptr->m_spinBoxFactory->removePropertyManager(manager);
2161 const auto doublePropertyManagers = manager->findChildren<QtDoublePropertyManager *>();
2162 for (QtDoublePropertyManager *manager : doublePropertyManagers)
2163 d_ptr->m_doubleSpinBoxFactory->removePropertyManager(manager);
2165 const auto boolPropertyManagers = manager->findChildren<QtBoolPropertyManager *>();
2166 for (QtBoolPropertyManager *manager : boolPropertyManagers)
2167 d_ptr->m_checkBoxFactory->removePropertyManager(manager);
2169 const auto stringPropertyManagers = manager->findChildren<QtStringPropertyManager *>();
2170 for (QtStringPropertyManager *manager : stringPropertyManagers)
2171 d_ptr->m_lineEditFactory->removePropertyManager(manager);
2173 const auto datePropertyManagers = manager->findChildren<QtDatePropertyManager *>();
2174 for (QtDatePropertyManager *manager : datePropertyManagers)
2175 d_ptr->m_dateEditFactory->removePropertyManager(manager);
2177 const auto timePropertyManagers = manager->findChildren<QtTimePropertyManager *>();
2178 for (QtTimePropertyManager *manager : timePropertyManagers)
2179 d_ptr->m_timeEditFactory->removePropertyManager(manager);
2181 const auto dateTimePropertyManagers = manager->findChildren<QtDateTimePropertyManager *>();
2182 for (QtDateTimePropertyManager *manager : dateTimePropertyManagers)
2183 d_ptr->m_dateTimeEditFactory->removePropertyManager(manager);
2185 const auto keySequencePropertyManagers = manager->findChildren<QtKeySequencePropertyManager *>();
2186 for (QtKeySequencePropertyManager *manager : keySequencePropertyManagers)
2187 d_ptr->m_keySequenceEditorFactory->removePropertyManager(manager);
2189 const auto charPropertyManagers = manager->findChildren<QtCharPropertyManager *>();
2190 for (QtCharPropertyManager *manager : charPropertyManagers)
2191 d_ptr->m_charEditorFactory->removePropertyManager(manager);
2193 const auto localePropertyManagers = manager->findChildren<QtLocalePropertyManager *>();
2194 for (QtLocalePropertyManager *manager : localePropertyManagers)
2195 d_ptr->m_comboBoxFactory->removePropertyManager(manager->subEnumPropertyManager());
2197 const auto pointPropertyManagers = manager->findChildren<QtPointPropertyManager *>();
2198 for (QtPointPropertyManager *manager : pointPropertyManagers)
2199 d_ptr->m_spinBoxFactory->removePropertyManager(manager->subIntPropertyManager());
2201 const auto pointFPropertyManagers = manager->findChildren<QtPointFPropertyManager *>();
2202 for (QtPointFPropertyManager *manager : pointFPropertyManagers)
2203 d_ptr->m_doubleSpinBoxFactory->removePropertyManager(manager->subDoublePropertyManager());
2205 const auto sizePropertyManagers = manager->findChildren<QtSizePropertyManager *>();
2206 for (QtSizePropertyManager *manager : sizePropertyManagers)
2207 d_ptr->m_spinBoxFactory->removePropertyManager(manager->subIntPropertyManager());
2209 const auto sizeFPropertyManagers = manager->findChildren<QtSizeFPropertyManager *>();
2210 for (QtSizeFPropertyManager *manager : sizeFPropertyManagers)
2211 d_ptr->m_doubleSpinBoxFactory->removePropertyManager(manager->subDoublePropertyManager());
2213 const auto rectPropertyManagers = manager->findChildren<QtRectPropertyManager *>();
2214 for (QtRectPropertyManager *manager : rectPropertyManagers)
2215 d_ptr->m_spinBoxFactory->removePropertyManager(manager->subIntPropertyManager());
2217 const auto rectFPropertyManagers = manager->findChildren<QtRectFPropertyManager *>();
2218 for (QtRectFPropertyManager *manager : rectFPropertyManagers)
2219 d_ptr->m_doubleSpinBoxFactory->removePropertyManager(manager->subDoublePropertyManager());
2221 const auto colorPropertyManagers = manager->findChildren<QtColorPropertyManager *>();
2222 for (QtColorPropertyManager *manager : colorPropertyManagers) {
2223 d_ptr->m_colorEditorFactory->removePropertyManager(manager);
2224 d_ptr->m_spinBoxFactory->removePropertyManager(manager->subIntPropertyManager());
2227 const auto enumPropertyManagers = manager->findChildren<QtEnumPropertyManager *>();
2228 for (QtEnumPropertyManager *manager : enumPropertyManagers)
2229 d_ptr->m_comboBoxFactory->removePropertyManager(manager);
2231 const auto sizePolicyPropertyManagers = manager->findChildren<QtSizePolicyPropertyManager *>();
2232 for (QtSizePolicyPropertyManager *manager : sizePolicyPropertyManagers) {
2233 d_ptr->m_spinBoxFactory->removePropertyManager(manager->subIntPropertyManager());
2234 d_ptr->m_comboBoxFactory->removePropertyManager(manager->subEnumPropertyManager());
2237 const auto fontPropertyManagers = manager->findChildren<QtFontPropertyManager *>();
2238 for (QtFontPropertyManager *manager : fontPropertyManagers) {
2239 d_ptr->m_fontEditorFactory->removePropertyManager(manager);
2240 d_ptr->m_spinBoxFactory->removePropertyManager(manager->subIntPropertyManager());
2241 d_ptr->m_comboBoxFactory->removePropertyManager(manager->subEnumPropertyManager());
2242 d_ptr->m_checkBoxFactory->removePropertyManager(manager->subBoolPropertyManager());
2245 const auto cursorPropertyManagers = manager->findChildren<QtCursorPropertyManager *>();
2246 for (QtCursorPropertyManager *manager : cursorPropertyManagers)
2247 d_ptr->m_cursorEditorFactory->removePropertyManager(manager);
2249 const auto flagPropertyManagers = manager->findChildren<QtFlagPropertyManager *>();
2250 for (QtFlagPropertyManager *manager : flagPropertyManagers)
2251 d_ptr->m_checkBoxFactory->removePropertyManager(manager->subBoolPropertyManager());