881 d_ptr->m_creatingProperty =
false;
882 d_ptr->m_creatingSubProperties =
false;
883 d_ptr->m_destroyingSubProperties =
false;
884 d_ptr->m_propertyType = 0;
887 auto *intPropertyManager =
new QtIntPropertyManager(
this);
888 d_ptr->m_typeToPropertyManager[QMetaType::Int] = intPropertyManager;
889 d_ptr->m_typeToAttributeToAttributeType[QMetaType::Int][d_ptr->m_minimumAttribute] = QMetaType::Int;
890 d_ptr->m_typeToAttributeToAttributeType[QMetaType::Int][d_ptr->m_maximumAttribute] = QMetaType::Int;
891 d_ptr->m_typeToAttributeToAttributeType[QMetaType::Int][d_ptr->m_singleStepAttribute] = QMetaType::Int;
892 d_ptr->m_typeToValueType[QMetaType::Int] = QMetaType::Int;
893 connect(intPropertyManager, &QtIntPropertyManager::valueChanged,
895 { d_ptr->slotValueChanged(property, value); });
897 this, [
this](
QtProperty *property,
int min,
int max)
898 { d_ptr->slotRangeChanged(property, min, max); });
901 { d_ptr->slotSingleStepChanged(property, value); });
903 auto *doublePropertyManager =
new QtDoublePropertyManager(
this);
904 d_ptr->m_typeToPropertyManager[QMetaType::Double] = doublePropertyManager;
905 d_ptr->m_typeToAttributeToAttributeType[QMetaType::Double][d_ptr->m_minimumAttribute] =
907 d_ptr->m_typeToAttributeToAttributeType[QMetaType::Double][d_ptr->m_maximumAttribute] =
909 d_ptr->m_typeToAttributeToAttributeType[QMetaType::Double][d_ptr->m_singleStepAttribute] =
911 d_ptr->m_typeToAttributeToAttributeType[QMetaType::Double][d_ptr->m_decimalsAttribute] =
913 d_ptr->m_typeToValueType[QMetaType::Double] = QMetaType::Double;
914 connect(doublePropertyManager, &QtDoublePropertyManager::valueChanged,
915 this, [
this](
QtProperty *property,
double value)
916 { d_ptr->slotValueChanged(property, value); });
918 this, [
this](
QtProperty *property,
double min,
double max)
919 { d_ptr->slotRangeChanged(property, min, max); });
921 this, [
this](
QtProperty *property,
double value)
922 { d_ptr->slotSingleStepChanged(property, value); });
925 { d_ptr->slotDecimalsChanged(property, value); });
927 auto *boolPropertyManager =
new QtBoolPropertyManager(
this);
928 d_ptr->m_typeToPropertyManager[QMetaType::Bool] = boolPropertyManager;
929 d_ptr->m_typeToValueType[QMetaType::Bool] = QMetaType::Bool;
930 connect(boolPropertyManager, &QtBoolPropertyManager::valueChanged,
931 this, [
this](
QtProperty *property,
bool value)
932 { d_ptr->slotValueChanged(property, value); });
934 auto *stringPropertyManager =
new QtStringPropertyManager(
this);
935 d_ptr->m_typeToPropertyManager[QMetaType::QString] = stringPropertyManager;
936 d_ptr->m_typeToValueType[QMetaType::QString] = QMetaType::QString;
937 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QString][d_ptr->m_regExpAttribute] =
938 QMetaType::QRegularExpression;
939 connect(stringPropertyManager, &QtStringPropertyManager::valueChanged,
940 this, [
this](
QtProperty *property,
const QString &value)
941 { d_ptr->slotValueChanged(property, value); });
943 this, [
this](
QtProperty *property,
const QRegularExpression &value)
944 { d_ptr->slotRegExpChanged(property, value); });
946 auto *datePropertyManager =
new QtDatePropertyManager(
this);
947 d_ptr->m_typeToPropertyManager[QMetaType::QDate] = datePropertyManager;
948 d_ptr->m_typeToValueType[QMetaType::QDate] = QMetaType::QDate;
949 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QDate][d_ptr->m_minimumAttribute] =
951 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QDate][d_ptr->m_maximumAttribute] =
953 connect(datePropertyManager, &QtDatePropertyManager::valueChanged,
954 this, [
this](
QtProperty *property,
const QDate &value)
955 { d_ptr->slotValueChanged(property, value); });
957 this, [
this](
QtProperty *property,
const QDate &min,
const QDate &max)
958 { d_ptr->slotRangeChanged(property, min, max); });
960 auto *timePropertyManager =
new QtTimePropertyManager(
this);
961 d_ptr->m_typeToPropertyManager[QMetaType::QTime] = timePropertyManager;
962 d_ptr->m_typeToValueType[QMetaType::QTime] = QMetaType::QTime;
963 connect(timePropertyManager, &QtTimePropertyManager::valueChanged,
964 this, [
this](
QtProperty *property,
const QTime &value)
965 { d_ptr->slotValueChanged(property, value); });
967 auto *dateTimePropertyManager =
new QtDateTimePropertyManager(
this);
968 d_ptr->m_typeToPropertyManager[QMetaType::QDateTime] = dateTimePropertyManager;
969 d_ptr->m_typeToValueType[QMetaType::QDateTime] = QMetaType::QDateTime;
970 connect(dateTimePropertyManager, &QtDateTimePropertyManager::valueChanged,
971 this, [
this](
QtProperty *property,
const QDateTime &value)
972 { d_ptr->slotValueChanged(property, value); });
974 auto *keySequencePropertyManager =
new QtKeySequencePropertyManager(
this);
975 d_ptr->m_typeToPropertyManager[QMetaType::QKeySequence] = keySequencePropertyManager;
976 d_ptr->m_typeToValueType[QMetaType::QKeySequence] = QMetaType::QKeySequence;
977 connect(keySequencePropertyManager, &QtKeySequencePropertyManager::valueChanged,
978 this, [
this](
QtProperty *property,
const QKeySequence &value)
979 { d_ptr->slotValueChanged(property, value); });
981 auto *charPropertyManager =
new QtCharPropertyManager(
this);
982 d_ptr->m_typeToPropertyManager[QMetaType::QChar] = charPropertyManager;
983 d_ptr->m_typeToValueType[QMetaType::QChar] = QMetaType::QChar;
984 connect(charPropertyManager, &QtCharPropertyManager::valueChanged,
985 this, [
this](
QtProperty *property,
const QChar &value)
986 { d_ptr->slotValueChanged(property, value); });
988 auto *localePropertyManager =
new QtLocalePropertyManager(
this);
989 d_ptr->m_typeToPropertyManager[QMetaType::QLocale] = localePropertyManager;
990 d_ptr->m_typeToValueType[QMetaType::QLocale] = QMetaType::QLocale;
991 connect(localePropertyManager, &QtLocalePropertyManager::valueChanged,
992 this, [
this](
QtProperty *property,
const QLocale &value)
993 { d_ptr->slotValueChanged(property, value); });
994 connect(localePropertyManager->subEnumPropertyManager(), &QtEnumPropertyManager::valueChanged,
996 { d_ptr->slotValueChanged(property, value); });
997 connect(localePropertyManager, &QtAbstractPropertyManager::propertyInserted,
999 { d_ptr->slotPropertyInserted(property, parent, after); });
1002 { d_ptr->slotPropertyRemoved(property, parent); });
1004 auto *pointPropertyManager =
new QtPointPropertyManager(
this);
1005 d_ptr->m_typeToPropertyManager[QMetaType::QPoint] = pointPropertyManager;
1006 d_ptr->m_typeToValueType[QMetaType::QPoint] = QMetaType::QPoint;
1007 connect(pointPropertyManager, &QtPointPropertyManager::valueChanged,
1008 this, [
this](
QtProperty *property, QPoint value)
1009 { d_ptr->slotValueChanged(property, value); });
1010 connect(pointPropertyManager->subIntPropertyManager(), &QtIntPropertyManager::valueChanged,
1011 this, [
this](
QtProperty *property,
int value)
1012 { d_ptr->slotValueChanged(property, value); });
1013 connect(pointPropertyManager, &QtAbstractPropertyManager::propertyInserted,
1015 { d_ptr->slotPropertyInserted(property, parent, after); });
1018 { d_ptr->slotPropertyRemoved(property, parent); });
1020 auto *pointFPropertyManager =
new QtPointFPropertyManager(
this);
1021 d_ptr->m_typeToPropertyManager[QMetaType::QPointF] = pointFPropertyManager;
1022 d_ptr->m_typeToValueType[QMetaType::QPointF] = QMetaType::QPointF;
1023 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QPointF][d_ptr->m_decimalsAttribute] =
1025 connect(pointFPropertyManager, &QtPointFPropertyManager::valueChanged,
1026 this, [
this](
QtProperty *property, QPointF value)
1027 { d_ptr->slotValueChanged(property, value); });
1029 this, [
this](
QtProperty *property,
int value)
1030 { d_ptr->slotDecimalsChanged(property, value); });
1031 connect(pointFPropertyManager->subDoublePropertyManager(), &QtDoublePropertyManager::valueChanged,
1032 this, [
this](
QtProperty *property,
double value)
1033 { d_ptr->slotValueChanged(property, value); });
1034 connect(pointFPropertyManager, &QtAbstractPropertyManager::propertyInserted,
1036 { d_ptr->slotPropertyInserted(property, parent, after); });
1039 { d_ptr->slotPropertyRemoved(property, parent); });
1041 auto *sizePropertyManager =
new QtSizePropertyManager(
this);
1042 d_ptr->m_typeToPropertyManager[QMetaType::QSize] = sizePropertyManager;
1043 d_ptr->m_typeToValueType[QMetaType::QSize] = QMetaType::QSize;
1044 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QSize][d_ptr->m_minimumAttribute] =
1046 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QSize][d_ptr->m_maximumAttribute] =
1048 connect(sizePropertyManager, &QtSizePropertyManager::valueChanged,
1049 this, [
this](
QtProperty *property, QSize value)
1050 { d_ptr->slotValueChanged(property, value); });
1051 connect(sizePropertyManager, &QtSizePropertyManager::rangeChanged,
1052 this, [
this](
QtProperty *property, QSize min, QSize max)
1053 { d_ptr->slotRangeChanged(property, min, max); });
1054 connect(sizePropertyManager->subIntPropertyManager(), &QtIntPropertyManager::valueChanged,
1055 this, [
this](
QtProperty *property,
int value)
1056 { d_ptr->slotValueChanged(property, value); });
1058 this, [
this](
QtProperty *property,
int min,
int max)
1059 { d_ptr->slotRangeChanged(property, min, max); });
1060 connect(sizePropertyManager, &QtAbstractPropertyManager::propertyInserted,
1062 { d_ptr->slotPropertyInserted(property, parent, after); });
1065 { d_ptr->slotPropertyRemoved(property, parent); });
1067 auto *sizeFPropertyManager =
new QtSizeFPropertyManager(
this);
1068 d_ptr->m_typeToPropertyManager[QMetaType::QSizeF] = sizeFPropertyManager;
1069 d_ptr->m_typeToValueType[QMetaType::QSizeF] = QMetaType::QSizeF;
1070 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QSizeF][d_ptr->m_minimumAttribute] =
1072 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QSizeF][d_ptr->m_maximumAttribute] =
1074 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QSizeF][d_ptr->m_decimalsAttribute] =
1076 connect(sizeFPropertyManager, &QtSizeFPropertyManager::valueChanged,
1077 this, [
this](
QtProperty *property,
const QSizeF &value)
1078 { d_ptr->slotValueChanged(property, value); });
1079 connect(sizeFPropertyManager, &QtSizeFPropertyManager::rangeChanged,
1080 this, [
this](
QtProperty *property,
const QSizeF &min,
const QSizeF &max)
1081 { d_ptr->slotRangeChanged(property, min, max); });
1082 connect(sizeFPropertyManager->subDoublePropertyManager(), &QtDoublePropertyManager::valueChanged,
1083 this, [
this](
QtProperty *property,
double value)
1084 { d_ptr->slotValueChanged(property, value); });
1086 this, [
this](
QtProperty *property,
double min,
double max)
1087 { d_ptr->slotRangeChanged(property, min, max); });
1088 connect(sizeFPropertyManager, &QtAbstractPropertyManager::propertyInserted,
1090 { d_ptr->slotPropertyInserted(property, parent, after); });
1093 { d_ptr->slotPropertyRemoved(property, parent); });
1095 auto *rectPropertyManager =
new QtRectPropertyManager(
this);
1096 d_ptr->m_typeToPropertyManager[QMetaType::QRect] = rectPropertyManager;
1097 d_ptr->m_typeToValueType[QMetaType::QRect] = QMetaType::QRect;
1098 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QRect][d_ptr->m_constraintAttribute] =
1100 connect(rectPropertyManager, &QtRectPropertyManager::valueChanged,
1101 this, [
this](
QtProperty *property, QRect value)
1102 { d_ptr->slotValueChanged(property, value); });
1103 connect(rectPropertyManager, &QtRectPropertyManager::constraintChanged,
1104 this, [
this](
QtProperty *property, QRect value)
1105 { d_ptr->slotConstraintChanged(property, value); });
1106 connect(rectPropertyManager->subIntPropertyManager(), &QtIntPropertyManager::valueChanged,
1107 this, [
this](
QtProperty *property,
int value)
1108 { d_ptr->slotValueChanged(property, value); });
1110 this, [
this](
QtProperty *property,
int min,
int max)
1111 { d_ptr->slotRangeChanged(property, min, max); });
1112 connect(rectPropertyManager, &QtAbstractPropertyManager::propertyInserted,
1114 { d_ptr->slotPropertyInserted(property, parent, after); });
1117 { d_ptr->slotPropertyRemoved(property, parent); });
1119 auto *rectFPropertyManager =
new QtRectFPropertyManager(
this);
1120 d_ptr->m_typeToPropertyManager[QMetaType::QRectF] = rectFPropertyManager;
1121 d_ptr->m_typeToValueType[QMetaType::QRectF] = QMetaType::QRectF;
1122 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QRectF][d_ptr->m_constraintAttribute] =
1124 d_ptr->m_typeToAttributeToAttributeType[QMetaType::QRectF][d_ptr->m_decimalsAttribute] =
1126 connect(rectFPropertyManager, &QtRectFPropertyManager::valueChanged,
1127 this, [
this](
QtProperty *property,
const QRectF &value)
1128 { d_ptr->slotValueChanged(property, value); });
1129 connect(rectFPropertyManager, &QtRectFPropertyManager::constraintChanged,
1130 this, [
this](
QtProperty *property,
const QRectF &value)
1131 { d_ptr->slotConstraintChanged(property, value); });
1132 connect(rectFPropertyManager->subDoublePropertyManager(), &QtDoublePropertyManager::valueChanged,
1133 this, [
this](
QtProperty *property,
double value)
1134 { d_ptr->slotValueChanged(property, value); });
1136 this, [
this](
QtProperty *property,
double min,
double max)
1137 { d_ptr->slotRangeChanged(property, min, max); });
1138 connect(rectFPropertyManager, &QtAbstractPropertyManager::propertyInserted,
1140 { d_ptr->slotPropertyInserted(property, parent, after); });
1143 { d_ptr->slotPropertyRemoved(property, parent); });
1145 auto *colorPropertyManager =
new QtColorPropertyManager(
this);
1146 d_ptr->m_typeToPropertyManager[QMetaType::QColor] = colorPropertyManager;
1147 d_ptr->m_typeToValueType[QMetaType::QColor] = QMetaType::QColor;
1148 connect(colorPropertyManager, &QtColorPropertyManager::valueChanged,
1149 this, [
this](
QtProperty *property,
const QColor &value)
1150 { d_ptr->slotValueChanged(property, value); });
1151 connect(colorPropertyManager->subIntPropertyManager(), &QtIntPropertyManager::valueChanged,
1152 this, [
this](
QtProperty *property,
int value)
1153 { d_ptr->slotValueChanged(property, value); });
1154 connect(colorPropertyManager, &QtAbstractPropertyManager::propertyInserted,
1156 { d_ptr->slotPropertyInserted(property, parent, after); });
1159 { d_ptr->slotPropertyRemoved(property, parent); });
1162 auto *enumPropertyManager =
new QtEnumPropertyManager(
this);
1163 d_ptr->m_typeToPropertyManager[enumId] = enumPropertyManager;
1164 d_ptr->m_typeToValueType[enumId] = QMetaType::Int;
1165 d_ptr->m_typeToAttributeToAttributeType[enumId][d_ptr->m_enumNamesAttribute] =
1166 QMetaType::QStringList;
1167 d_ptr->m_typeToAttributeToAttributeType[enumId][d_ptr->m_enumIconsAttribute] =
1169 connect(enumPropertyManager, &QtEnumPropertyManager::valueChanged,
1170 this, [
this](
QtProperty *property,
int value)
1171 { d_ptr->slotValueChanged(property, value); });
1172 connect(enumPropertyManager, &QtEnumPropertyManager::enumNamesChanged,
1173 this, [
this](
QtProperty *property,
const QStringList &value)
1174 { d_ptr->slotEnumNamesChanged(property, value); });
1175 connect(enumPropertyManager, &QtEnumPropertyManager::enumIconsChanged,
1176 this, [
this](
QtProperty *property,
const QMap<
int,QIcon> &value)
1177 { d_ptr->slotEnumIconsChanged(property, value); });
1179 auto *sizePolicyPropertyManager =
new QtSizePolicyPropertyManager(
this);
1180 d_ptr->m_typeToPropertyManager[QMetaType::QSizePolicy] = sizePolicyPropertyManager;
1181 d_ptr->m_typeToValueType[QMetaType::QSizePolicy] = QMetaType::QSizePolicy;
1182 connect(sizePolicyPropertyManager, &QtSizePolicyPropertyManager::valueChanged,
1183 this, [
this](
QtProperty *property, QSizePolicy value)
1184 { d_ptr->slotValueChanged(property, value); });
1185 connect(sizePolicyPropertyManager->subIntPropertyManager(), &QtIntPropertyManager::valueChanged,
1186 this, [
this](
QtProperty *property,
int value)
1187 { d_ptr->slotValueChanged(property, value); });
1189 this, [
this](
QtProperty *property,
int min,
int max)
1190 { d_ptr->slotRangeChanged(property, min, max); });
1191 connect(sizePolicyPropertyManager->subEnumPropertyManager(), &QtEnumPropertyManager::valueChanged,
1192 this, [
this](
QtProperty *property,
int value)
1193 { d_ptr->slotValueChanged(property, value); });
1194 connect(sizePolicyPropertyManager->subEnumPropertyManager(), &QtEnumPropertyManager::enumNamesChanged,
1195 this, [
this](
QtProperty *property,
const QStringList &value)
1196 { d_ptr->slotEnumNamesChanged(property, value); });
1197 connect(sizePolicyPropertyManager, &QtAbstractPropertyManager::propertyInserted,
1199 { d_ptr->slotPropertyInserted(property, parent, after); });
1202 { d_ptr->slotPropertyRemoved(property, parent); });
1204 auto *fontPropertyManager =
new QtFontPropertyManager(
this);
1205 d_ptr->m_typeToPropertyManager[QMetaType::QFont] = fontPropertyManager;
1206 d_ptr->m_typeToValueType[QMetaType::QFont] = QMetaType::QFont;
1207 connect(fontPropertyManager, &QtFontPropertyManager::valueChanged,
1208 this, [
this](
QtProperty *property,
const QFont &value)
1209 { d_ptr->slotValueChanged(property, value); });
1210 connect(fontPropertyManager->subIntPropertyManager(), &QtIntPropertyManager::valueChanged,
1211 this, [
this](
QtProperty *property,
int value)
1212 { d_ptr->slotValueChanged(property, value); });
1214 this, [
this](
QtProperty *property,
int min,
int max)
1215 { d_ptr->slotRangeChanged(property, min, max); });
1216 connect(fontPropertyManager->subEnumPropertyManager(), &QtEnumPropertyManager::valueChanged,
1217 this, [
this](
QtProperty *property,
int value)
1218 { d_ptr->slotValueChanged(property, value); });
1219 connect(fontPropertyManager->subEnumPropertyManager(), &QtEnumPropertyManager::enumNamesChanged,
1220 this, [
this](
QtProperty *property,
const QStringList &value)
1221 { d_ptr->slotEnumNamesChanged(property, value); });
1222 connect(fontPropertyManager->subBoolPropertyManager(), &QtBoolPropertyManager::valueChanged,
1223 this, [
this](
QtProperty *property,
bool value)
1224 { d_ptr->slotValueChanged(property, value); });
1225 connect(fontPropertyManager, &QtAbstractPropertyManager::propertyInserted,
1227 { d_ptr->slotPropertyInserted(property, parent, after); });
1230 { d_ptr->slotPropertyRemoved(property, parent); });
1232 auto *cursorPropertyManager =
new QtCursorPropertyManager(
this);
1233 d_ptr->m_typeToPropertyManager[QMetaType::QCursor] = cursorPropertyManager;
1234 d_ptr->m_typeToValueType[QMetaType::QCursor] = QMetaType::QCursor;
1235 connect(cursorPropertyManager, &QtCursorPropertyManager::valueChanged,
1236 this, [
this](
QtProperty *property,
const QCursor &value)
1237 { d_ptr->slotValueChanged(property, value); });
1240 auto *flagPropertyManager =
new QtFlagPropertyManager(
this);
1241 d_ptr->m_typeToPropertyManager[flagId] = flagPropertyManager;
1242 d_ptr->m_typeToValueType[flagId] = QMetaType::Int;
1243 d_ptr->m_typeToAttributeToAttributeType[flagId][d_ptr->m_flagNamesAttribute] =
1244 QMetaType::QStringList;
1245 connect(flagPropertyManager, &QtFlagPropertyManager::valueChanged,
1246 this, [
this](
QtProperty *property,
const QColor &value)
1247 { d_ptr->slotValueChanged(property, value); });
1248 connect(flagPropertyManager, &QtFlagPropertyManager::flagNamesChanged,
1249 this, [
this](
QtProperty *property,
const QStringList &value)
1250 { d_ptr->slotFlagNamesChanged(property, value); });
1251 connect(flagPropertyManager->subBoolPropertyManager(), &QtBoolPropertyManager::valueChanged,
1252 this, [
this](
QtProperty *property,
bool value)
1253 { d_ptr->slotValueChanged(property, value); });
1254 connect(flagPropertyManager, &QtAbstractPropertyManager::propertyInserted,
1256 { d_ptr->slotPropertyInserted(property, parent, after); });
1259 { d_ptr->slotPropertyRemoved(property, parent); });
1262 auto *groupPropertyManager =
new QtGroupPropertyManager(
this);
1263 d_ptr->m_typeToPropertyManager[groupId] = groupPropertyManager;
1264 d_ptr->m_typeToValueType[groupId] = QMetaType::UnknownType;
1686 const QString &attribute,
const QVariant &value)
1688 QVariant oldAttr = attributeValue(property, attribute);
1689 if (!oldAttr.isValid())
1692 int attrType = value.userType();
1696 if (attrType != attributeType(propertyType(property), attribute) &&
1697 !value.canConvert(QMetaType(attrType)))
1700 QtProperty *internProp = propertyToWrappedProperty()->value(property,
nullptr);
1701 if (internProp ==
nullptr)
1705 if (
auto *intManager = qobject_cast<QtIntPropertyManager *>(manager)) {
1706 if (attribute == d_ptr->m_maximumAttribute)
1707 intManager->setMaximum(internProp, qvariant_cast<
int>(value));
1708 else if (attribute == d_ptr->m_minimumAttribute)
1709 intManager->setMinimum(internProp, qvariant_cast<
int>(value));
1710 else if (attribute == d_ptr->m_singleStepAttribute)
1711 intManager->setSingleStep(internProp, qvariant_cast<
int>(value));
1713 }
else if (
auto *doubleManager = qobject_cast<QtDoublePropertyManager *>(manager)) {
1714 if (attribute == d_ptr->m_maximumAttribute)
1715 doubleManager->setMaximum(internProp, qvariant_cast<
double>(value));
1716 if (attribute == d_ptr->m_minimumAttribute)
1717 doubleManager->setMinimum(internProp, qvariant_cast<
double>(value));
1718 if (attribute == d_ptr->m_singleStepAttribute)
1719 doubleManager->setSingleStep(internProp, qvariant_cast<
double>(value));
1720 if (attribute == d_ptr->m_decimalsAttribute)
1721 doubleManager->setDecimals(internProp, qvariant_cast<
int>(value));
1723 }
else if (
auto *stringManager = qobject_cast<QtStringPropertyManager *>(manager)) {
1724 if (attribute == d_ptr->m_regExpAttribute)
1725 stringManager->setRegExp(internProp, qvariant_cast<QRegularExpression>(value));
1727 }
else if (
auto *dateManager = qobject_cast<QtDatePropertyManager *>(manager)) {
1728 if (attribute == d_ptr->m_maximumAttribute)
1729 dateManager->setMaximum(internProp, qvariant_cast<QDate>(value));
1730 if (attribute == d_ptr->m_minimumAttribute)
1731 dateManager->setMinimum(internProp, qvariant_cast<QDate>(value));
1733 }
else if (
auto *pointFManager = qobject_cast<QtPointFPropertyManager *>(manager)) {
1734 if (attribute == d_ptr->m_decimalsAttribute)
1735 pointFManager->setDecimals(internProp, qvariant_cast<
int>(value));
1737 }
else if (
auto *sizeManager = qobject_cast<QtSizePropertyManager *>(manager)) {
1738 if (attribute == d_ptr->m_maximumAttribute)
1739 sizeManager->setMaximum(internProp, qvariant_cast<QSize>(value));
1740 if (attribute == d_ptr->m_minimumAttribute)
1741 sizeManager->setMinimum(internProp, qvariant_cast<QSize>(value));
1743 }
else if (
auto *sizeFManager = qobject_cast<QtSizeFPropertyManager *>(manager)) {
1744 if (attribute == d_ptr->m_maximumAttribute)
1745 sizeFManager->setMaximum(internProp, qvariant_cast<QSizeF>(value));
1746 if (attribute == d_ptr->m_minimumAttribute)
1747 sizeFManager->setMinimum(internProp, qvariant_cast<QSizeF>(value));
1748 if (attribute == d_ptr->m_decimalsAttribute)
1749 sizeFManager->setDecimals(internProp, qvariant_cast<
int>(value));
1751 }
else if (
auto *rectManager = qobject_cast<QtRectPropertyManager *>(manager)) {
1752 if (attribute == d_ptr->m_constraintAttribute)
1753 rectManager->setConstraint(internProp, qvariant_cast<QRect>(value));
1755 }
else if (
auto *rectFManager = qobject_cast<QtRectFPropertyManager *>(manager)) {
1756 if (attribute == d_ptr->m_constraintAttribute)
1757 rectFManager->setConstraint(internProp, qvariant_cast<QRectF>(value));
1758 if (attribute == d_ptr->m_decimalsAttribute)
1759 rectFManager->setDecimals(internProp, qvariant_cast<
int>(value));
1761 }
else if (
auto *enumManager = qobject_cast<QtEnumPropertyManager *>(manager)) {
1762 if (attribute == d_ptr->m_enumNamesAttribute)
1763 enumManager->setEnumNames(internProp, qvariant_cast<QStringList>(value));
1764 if (attribute == d_ptr->m_enumIconsAttribute)
1765 enumManager->setEnumIcons(internProp, qvariant_cast<QtIconMap>(value));
1767 }
else if (
auto *flagManager = qobject_cast<QtFlagPropertyManager *>(manager)) {
1768 if (attribute == d_ptr->m_flagNamesAttribute)
1769 flagManager->setFlagNames(internProp, qvariant_cast<QStringList>(value));
2028 const auto intPropertyManagers = manager->findChildren<QtIntPropertyManager *>();
2029 for (QtIntPropertyManager *manager : intPropertyManagers)
2030 d_ptr->m_spinBoxFactory->addPropertyManager(manager);
2032 const auto doublePropertyManagers = manager->findChildren<QtDoublePropertyManager *>();
2033 for (QtDoublePropertyManager *manager : doublePropertyManagers)
2034 d_ptr->m_doubleSpinBoxFactory->addPropertyManager(manager);
2036 const auto boolPropertyManagers = manager->findChildren<QtBoolPropertyManager *>();
2037 for (QtBoolPropertyManager *manager : boolPropertyManagers)
2038 d_ptr->m_checkBoxFactory->addPropertyManager(manager);
2040 const auto stringPropertyManagers = manager->findChildren<QtStringPropertyManager *>();
2041 for (QtStringPropertyManager *manager : stringPropertyManagers)
2042 d_ptr->m_lineEditFactory->addPropertyManager(manager);
2044 const auto datePropertyManagers = manager->findChildren<QtDatePropertyManager *>();
2045 for (QtDatePropertyManager *manager : datePropertyManagers)
2046 d_ptr->m_dateEditFactory->addPropertyManager(manager);
2048 const auto timePropertyManagers = manager->findChildren<QtTimePropertyManager *>();
2049 for (QtTimePropertyManager *manager : timePropertyManagers)
2050 d_ptr->m_timeEditFactory->addPropertyManager(manager);
2052 const auto dateTimePropertyManagers = manager->findChildren<QtDateTimePropertyManager *>();
2053 for (QtDateTimePropertyManager *manager : dateTimePropertyManagers)
2054 d_ptr->m_dateTimeEditFactory->addPropertyManager(manager);
2056 const auto keySequencePropertyManagers = manager->findChildren<QtKeySequencePropertyManager *>();
2057 for (QtKeySequencePropertyManager *manager : keySequencePropertyManagers)
2058 d_ptr->m_keySequenceEditorFactory->addPropertyManager(manager);
2060 const auto charPropertyManagers = manager->findChildren<QtCharPropertyManager *>();
2061 for (QtCharPropertyManager *manager : charPropertyManagers)
2062 d_ptr->m_charEditorFactory->addPropertyManager(manager);
2064 const auto localePropertyManagers = manager->findChildren<QtLocalePropertyManager *>();
2065 for (QtLocalePropertyManager *manager : localePropertyManagers)
2066 d_ptr->m_comboBoxFactory->addPropertyManager(manager->subEnumPropertyManager());
2068 const auto pointPropertyManagers = manager->findChildren<QtPointPropertyManager *>();
2069 for (QtPointPropertyManager *manager : pointPropertyManagers)
2070 d_ptr->m_spinBoxFactory->addPropertyManager(manager->subIntPropertyManager());
2072 const auto pointFPropertyManagers = manager->findChildren<QtPointFPropertyManager *>();
2073 for (QtPointFPropertyManager *manager : pointFPropertyManagers)
2074 d_ptr->m_doubleSpinBoxFactory->addPropertyManager(manager->subDoublePropertyManager());
2076 const auto sizePropertyManagers = manager->findChildren<QtSizePropertyManager *>();
2077 for (QtSizePropertyManager *manager : sizePropertyManagers)
2078 d_ptr->m_spinBoxFactory->addPropertyManager(manager->subIntPropertyManager());
2080 const auto sizeFPropertyManagers = manager->findChildren<QtSizeFPropertyManager *>();
2081 for (QtSizeFPropertyManager *manager : sizeFPropertyManagers)
2082 d_ptr->m_doubleSpinBoxFactory->addPropertyManager(manager->subDoublePropertyManager());
2084 const auto rectPropertyManagers = manager->findChildren<QtRectPropertyManager *>();
2085 for (QtRectPropertyManager *manager : rectPropertyManagers)
2086 d_ptr->m_spinBoxFactory->addPropertyManager(manager->subIntPropertyManager());
2088 const auto rectFPropertyManagers = manager->findChildren<QtRectFPropertyManager *>();
2089 for (QtRectFPropertyManager *manager : rectFPropertyManagers)
2090 d_ptr->m_doubleSpinBoxFactory->addPropertyManager(manager->subDoublePropertyManager());
2092 const auto colorPropertyManagers = manager->findChildren<QtColorPropertyManager *>();
2093 for (QtColorPropertyManager *manager : colorPropertyManagers) {
2094 d_ptr->m_colorEditorFactory->addPropertyManager(manager);
2095 d_ptr->m_spinBoxFactory->addPropertyManager(manager->subIntPropertyManager());
2098 const auto enumPropertyManagers = manager->findChildren<QtEnumPropertyManager *>();
2099 for (QtEnumPropertyManager *manager : enumPropertyManagers)
2100 d_ptr->m_comboBoxFactory->addPropertyManager(manager);
2102 const auto sizePolicyPropertyManagers = manager->findChildren<QtSizePolicyPropertyManager *>();
2103 for (QtSizePolicyPropertyManager *manager : sizePolicyPropertyManagers) {
2104 d_ptr->m_spinBoxFactory->addPropertyManager(manager->subIntPropertyManager());
2105 d_ptr->m_comboBoxFactory->addPropertyManager(manager->subEnumPropertyManager());
2108 const auto fontPropertyManagers = manager->findChildren<QtFontPropertyManager *>();
2109 for (QtFontPropertyManager *manager : fontPropertyManagers) {
2110 d_ptr->m_fontEditorFactory->addPropertyManager(manager);
2111 d_ptr->m_spinBoxFactory->addPropertyManager(manager->subIntPropertyManager());
2112 d_ptr->m_comboBoxFactory->addPropertyManager(manager->subEnumPropertyManager());
2113 d_ptr->m_checkBoxFactory->addPropertyManager(manager->subBoolPropertyManager());
2116 const auto cursorPropertyManagers = manager->findChildren<QtCursorPropertyManager *>();
2117 for (QtCursorPropertyManager *manager : cursorPropertyManagers)
2118 d_ptr->m_cursorEditorFactory->addPropertyManager(manager);
2120 const auto flagPropertyManagers = manager->findChildren<QtFlagPropertyManager *>();
2121 for (QtFlagPropertyManager *manager : flagPropertyManagers)
2122 d_ptr->m_checkBoxFactory->addPropertyManager(manager->subBoolPropertyManager());
2147 const auto intPropertyManagers = manager->findChildren<QtIntPropertyManager *>();
2148 for (QtIntPropertyManager *manager : intPropertyManagers)
2149 d_ptr->m_spinBoxFactory->removePropertyManager(manager);
2151 const auto doublePropertyManagers = manager->findChildren<QtDoublePropertyManager *>();
2152 for (QtDoublePropertyManager *manager : doublePropertyManagers)
2153 d_ptr->m_doubleSpinBoxFactory->removePropertyManager(manager);
2155 const auto boolPropertyManagers = manager->findChildren<QtBoolPropertyManager *>();
2156 for (QtBoolPropertyManager *manager : boolPropertyManagers)
2157 d_ptr->m_checkBoxFactory->removePropertyManager(manager);
2159 const auto stringPropertyManagers = manager->findChildren<QtStringPropertyManager *>();
2160 for (QtStringPropertyManager *manager : stringPropertyManagers)
2161 d_ptr->m_lineEditFactory->removePropertyManager(manager);
2163 const auto datePropertyManagers = manager->findChildren<QtDatePropertyManager *>();
2164 for (QtDatePropertyManager *manager : datePropertyManagers)
2165 d_ptr->m_dateEditFactory->removePropertyManager(manager);
2167 const auto timePropertyManagers = manager->findChildren<QtTimePropertyManager *>();
2168 for (QtTimePropertyManager *manager : timePropertyManagers)
2169 d_ptr->m_timeEditFactory->removePropertyManager(manager);
2171 const auto dateTimePropertyManagers = manager->findChildren<QtDateTimePropertyManager *>();
2172 for (QtDateTimePropertyManager *manager : dateTimePropertyManagers)
2173 d_ptr->m_dateTimeEditFactory->removePropertyManager(manager);
2175 const auto keySequencePropertyManagers = manager->findChildren<QtKeySequencePropertyManager *>();
2176 for (QtKeySequencePropertyManager *manager : keySequencePropertyManagers)
2177 d_ptr->m_keySequenceEditorFactory->removePropertyManager(manager);
2179 const auto charPropertyManagers = manager->findChildren<QtCharPropertyManager *>();
2180 for (QtCharPropertyManager *manager : charPropertyManagers)
2181 d_ptr->m_charEditorFactory->removePropertyManager(manager);
2183 const auto localePropertyManagers = manager->findChildren<QtLocalePropertyManager *>();
2184 for (QtLocalePropertyManager *manager : localePropertyManagers)
2185 d_ptr->m_comboBoxFactory->removePropertyManager(manager->subEnumPropertyManager());
2187 const auto pointPropertyManagers = manager->findChildren<QtPointPropertyManager *>();
2188 for (QtPointPropertyManager *manager : pointPropertyManagers)
2189 d_ptr->m_spinBoxFactory->removePropertyManager(manager->subIntPropertyManager());
2191 const auto pointFPropertyManagers = manager->findChildren<QtPointFPropertyManager *>();
2192 for (QtPointFPropertyManager *manager : pointFPropertyManagers)
2193 d_ptr->m_doubleSpinBoxFactory->removePropertyManager(manager->subDoublePropertyManager());
2195 const auto sizePropertyManagers = manager->findChildren<QtSizePropertyManager *>();
2196 for (QtSizePropertyManager *manager : sizePropertyManagers)
2197 d_ptr->m_spinBoxFactory->removePropertyManager(manager->subIntPropertyManager());
2199 const auto sizeFPropertyManagers = manager->findChildren<QtSizeFPropertyManager *>();
2200 for (QtSizeFPropertyManager *manager : sizeFPropertyManagers)
2201 d_ptr->m_doubleSpinBoxFactory->removePropertyManager(manager->subDoublePropertyManager());
2203 const auto rectPropertyManagers = manager->findChildren<QtRectPropertyManager *>();
2204 for (QtRectPropertyManager *manager : rectPropertyManagers)
2205 d_ptr->m_spinBoxFactory->removePropertyManager(manager->subIntPropertyManager());
2207 const auto rectFPropertyManagers = manager->findChildren<QtRectFPropertyManager *>();
2208 for (QtRectFPropertyManager *manager : rectFPropertyManagers)
2209 d_ptr->m_doubleSpinBoxFactory->removePropertyManager(manager->subDoublePropertyManager());
2211 const auto colorPropertyManagers = manager->findChildren<QtColorPropertyManager *>();
2212 for (QtColorPropertyManager *manager : colorPropertyManagers) {
2213 d_ptr->m_colorEditorFactory->removePropertyManager(manager);
2214 d_ptr->m_spinBoxFactory->removePropertyManager(manager->subIntPropertyManager());
2217 const auto enumPropertyManagers = manager->findChildren<QtEnumPropertyManager *>();
2218 for (QtEnumPropertyManager *manager : enumPropertyManagers)
2219 d_ptr->m_comboBoxFactory->removePropertyManager(manager);
2221 const auto sizePolicyPropertyManagers = manager->findChildren<QtSizePolicyPropertyManager *>();
2222 for (QtSizePolicyPropertyManager *manager : sizePolicyPropertyManagers) {
2223 d_ptr->m_spinBoxFactory->removePropertyManager(manager->subIntPropertyManager());
2224 d_ptr->m_comboBoxFactory->removePropertyManager(manager->subEnumPropertyManager());
2227 const auto fontPropertyManagers = manager->findChildren<QtFontPropertyManager *>();
2228 for (QtFontPropertyManager *manager : fontPropertyManagers) {
2229 d_ptr->m_fontEditorFactory->removePropertyManager(manager);
2230 d_ptr->m_spinBoxFactory->removePropertyManager(manager->subIntPropertyManager());
2231 d_ptr->m_comboBoxFactory->removePropertyManager(manager->subEnumPropertyManager());
2232 d_ptr->m_checkBoxFactory->removePropertyManager(manager->subBoolPropertyManager());
2235 const auto cursorPropertyManagers = manager->findChildren<QtCursorPropertyManager *>();
2236 for (QtCursorPropertyManager *manager : cursorPropertyManagers)
2237 d_ptr->m_cursorEditorFactory->removePropertyManager(manager);
2239 const auto flagPropertyManagers = manager->findChildren<QtFlagPropertyManager *>();
2240 for (QtFlagPropertyManager *manager : flagPropertyManagers)
2241 d_ptr->m_checkBoxFactory->removePropertyManager(manager->subBoolPropertyManager());