- Timestamp:
- Feb 11, 2010, 11:19:06 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/vendor/nokia/qt/4.6.1 merged eligible /branches/vendor/nokia/qt/current merged eligible /branches/vendor/trolltech/qt/current 3-149
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/tools/shared/qtpropertybrowser/qtvariantproperty.cpp
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the tools applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 52 52 #endif 53 53 54 #if QT_VERSION >= 0x04040055 54 QT_BEGIN_NAMESPACE 56 #endif57 55 58 56 class QtEnumPropertyType … … 70 68 }; 71 69 72 #if QT_VERSION >= 0x04040073 70 QT_END_NAMESPACE 74 #endif75 71 76 72 Q_DECLARE_METATYPE(QtEnumPropertyType) … … 78 74 Q_DECLARE_METATYPE(QtGroupPropertyType) 79 75 80 #if QT_VERSION >= 0x04040081 76 QT_BEGIN_NAMESPACE 82 #endif83 77 84 78 /*! … … 195 189 */ 196 190 QtVariantProperty::QtVariantProperty(QtVariantPropertyManager *manager) 197 : QtProperty(manager), d_ptr(new QtVariantPropertyPrivate(manager)) 198 { 199 191 : QtProperty(manager), d_ptr(new QtVariantPropertyPrivate(manager)) 192 { 200 193 } 201 194 … … 207 200 QtVariantProperty::~QtVariantProperty() 208 201 { 209 delete d_ptr;210 202 } 211 203 … … 919 911 */ 920 912 QtVariantPropertyManager::QtVariantPropertyManager(QObject *parent) 921 : QtAbstractPropertyManager(parent) 922 { 923 d_ptr = new QtVariantPropertyManagerPrivate; 913 : QtAbstractPropertyManager(parent), d_ptr(new QtVariantPropertyManagerPrivate) 914 { 924 915 d_ptr->q_ptr = this; 925 916 … … 936 927 d_ptr->m_typeToAttributeToAttributeType[QVariant::Int][d_ptr->m_singleStepAttribute] = QVariant::Int; 937 928 d_ptr->m_typeToValueType[QVariant::Int] = QVariant::Int; 938 connect(intPropertyManager, SIGNAL(valueChanged(QtProperty *,int)),939 this, SLOT(slotValueChanged(QtProperty *,int)));940 connect(intPropertyManager, SIGNAL(rangeChanged(QtProperty *, int,int)),941 this, SLOT(slotRangeChanged(QtProperty *, int,int)));942 connect(intPropertyManager, SIGNAL(singleStepChanged(QtProperty *,int)),943 this, SLOT(slotSingleStepChanged(QtProperty *,int)));929 connect(intPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), 930 this, SLOT(slotValueChanged(QtProperty*,int))); 931 connect(intPropertyManager, SIGNAL(rangeChanged(QtProperty*,int,int)), 932 this, SLOT(slotRangeChanged(QtProperty*,int,int))); 933 connect(intPropertyManager, SIGNAL(singleStepChanged(QtProperty*,int)), 934 this, SLOT(slotSingleStepChanged(QtProperty*,int))); 944 935 // DoublePropertyManager 945 936 QtDoublePropertyManager *doublePropertyManager = new QtDoublePropertyManager(this); … … 954 945 QVariant::Int; 955 946 d_ptr->m_typeToValueType[QVariant::Double] = QVariant::Double; 956 connect(doublePropertyManager, SIGNAL(valueChanged(QtProperty *,double)),957 this, SLOT(slotValueChanged(QtProperty *,double)));958 connect(doublePropertyManager, SIGNAL(rangeChanged(QtProperty *, double,double)),959 this, SLOT(slotRangeChanged(QtProperty *, double,double)));960 connect(doublePropertyManager, SIGNAL(singleStepChanged(QtProperty *,double)),961 this, SLOT(slotSingleStepChanged(QtProperty *,double)));962 connect(doublePropertyManager, SIGNAL(decimalsChanged(QtProperty *,int)),963 this, SLOT(slotDecimalsChanged(QtProperty *,int)));947 connect(doublePropertyManager, SIGNAL(valueChanged(QtProperty*,double)), 948 this, SLOT(slotValueChanged(QtProperty*,double))); 949 connect(doublePropertyManager, SIGNAL(rangeChanged(QtProperty*,double,double)), 950 this, SLOT(slotRangeChanged(QtProperty*,double,double))); 951 connect(doublePropertyManager, SIGNAL(singleStepChanged(QtProperty*,double)), 952 this, SLOT(slotSingleStepChanged(QtProperty*,double))); 953 connect(doublePropertyManager, SIGNAL(decimalsChanged(QtProperty*,int)), 954 this, SLOT(slotDecimalsChanged(QtProperty*,int))); 964 955 // BoolPropertyManager 965 956 QtBoolPropertyManager *boolPropertyManager = new QtBoolPropertyManager(this); 966 957 d_ptr->m_typeToPropertyManager[QVariant::Bool] = boolPropertyManager; 967 958 d_ptr->m_typeToValueType[QVariant::Bool] = QVariant::Bool; 968 connect(boolPropertyManager, SIGNAL(valueChanged(QtProperty *,bool)),969 this, SLOT(slotValueChanged(QtProperty *,bool)));959 connect(boolPropertyManager, SIGNAL(valueChanged(QtProperty*,bool)), 960 this, SLOT(slotValueChanged(QtProperty*,bool))); 970 961 // StringPropertyManager 971 962 QtStringPropertyManager *stringPropertyManager = new QtStringPropertyManager(this); … … 974 965 d_ptr->m_typeToAttributeToAttributeType[QVariant::String][d_ptr->m_regExpAttribute] = 975 966 QVariant::RegExp; 976 connect(stringPropertyManager, SIGNAL(valueChanged(QtProperty *, const QString &)),977 this, SLOT(slotValueChanged(QtProperty *, const QString &)));978 connect(stringPropertyManager, SIGNAL(regExpChanged(QtProperty *, const QRegExp &)),979 this, SLOT(slotRegExpChanged(QtProperty *, const QRegExp &)));967 connect(stringPropertyManager, SIGNAL(valueChanged(QtProperty*,QString)), 968 this, SLOT(slotValueChanged(QtProperty*,QString))); 969 connect(stringPropertyManager, SIGNAL(regExpChanged(QtProperty*,QRegExp)), 970 this, SLOT(slotRegExpChanged(QtProperty*,QRegExp))); 980 971 // DatePropertyManager 981 972 QtDatePropertyManager *datePropertyManager = new QtDatePropertyManager(this); … … 986 977 d_ptr->m_typeToAttributeToAttributeType[QVariant::Date][d_ptr->m_maximumAttribute] = 987 978 QVariant::Date; 988 connect(datePropertyManager, SIGNAL(valueChanged(QtProperty *, const QDate &)),989 this, SLOT(slotValueChanged(QtProperty *, const QDate &)));990 connect(datePropertyManager, SIGNAL(rangeChanged(QtProperty *, const QDate &, const QDate &)),991 this, SLOT(slotRangeChanged(QtProperty *, const QDate &, const QDate &)));979 connect(datePropertyManager, SIGNAL(valueChanged(QtProperty*,QDate)), 980 this, SLOT(slotValueChanged(QtProperty*,QDate))); 981 connect(datePropertyManager, SIGNAL(rangeChanged(QtProperty*,QDate,QDate)), 982 this, SLOT(slotRangeChanged(QtProperty*,QDate,QDate))); 992 983 // TimePropertyManager 993 984 QtTimePropertyManager *timePropertyManager = new QtTimePropertyManager(this); 994 985 d_ptr->m_typeToPropertyManager[QVariant::Time] = timePropertyManager; 995 986 d_ptr->m_typeToValueType[QVariant::Time] = QVariant::Time; 996 connect(timePropertyManager, SIGNAL(valueChanged(QtProperty *, const QTime &)),997 this, SLOT(slotValueChanged(QtProperty *, const QTime &)));987 connect(timePropertyManager, SIGNAL(valueChanged(QtProperty*,QTime)), 988 this, SLOT(slotValueChanged(QtProperty*,QTime))); 998 989 // DateTimePropertyManager 999 990 QtDateTimePropertyManager *dateTimePropertyManager = new QtDateTimePropertyManager(this); 1000 991 d_ptr->m_typeToPropertyManager[QVariant::DateTime] = dateTimePropertyManager; 1001 992 d_ptr->m_typeToValueType[QVariant::DateTime] = QVariant::DateTime; 1002 connect(dateTimePropertyManager, SIGNAL(valueChanged(QtProperty *, const QDateTime &)),1003 this, SLOT(slotValueChanged(QtProperty *, const QDateTime &)));993 connect(dateTimePropertyManager, SIGNAL(valueChanged(QtProperty*,QDateTime)), 994 this, SLOT(slotValueChanged(QtProperty*,QDateTime))); 1004 995 // KeySequencePropertyManager 1005 996 QtKeySequencePropertyManager *keySequencePropertyManager = new QtKeySequencePropertyManager(this); 1006 997 d_ptr->m_typeToPropertyManager[QVariant::KeySequence] = keySequencePropertyManager; 1007 998 d_ptr->m_typeToValueType[QVariant::KeySequence] = QVariant::KeySequence; 1008 connect(keySequencePropertyManager, SIGNAL(valueChanged(QtProperty *, const QKeySequence &)),1009 this, SLOT(slotValueChanged(QtProperty *, const QKeySequence &)));999 connect(keySequencePropertyManager, SIGNAL(valueChanged(QtProperty*,QKeySequence)), 1000 this, SLOT(slotValueChanged(QtProperty*,QKeySequence))); 1010 1001 // CharPropertyManager 1011 1002 QtCharPropertyManager *charPropertyManager = new QtCharPropertyManager(this); 1012 1003 d_ptr->m_typeToPropertyManager[QVariant::Char] = charPropertyManager; 1013 1004 d_ptr->m_typeToValueType[QVariant::Char] = QVariant::Char; 1014 connect(charPropertyManager, SIGNAL(valueChanged(QtProperty *, const QChar &)),1015 this, SLOT(slotValueChanged(QtProperty *, const QChar &)));1005 connect(charPropertyManager, SIGNAL(valueChanged(QtProperty*,QChar)), 1006 this, SLOT(slotValueChanged(QtProperty*,QChar))); 1016 1007 // LocalePropertyManager 1017 1008 QtLocalePropertyManager *localePropertyManager = new QtLocalePropertyManager(this); 1018 1009 d_ptr->m_typeToPropertyManager[QVariant::Locale] = localePropertyManager; 1019 1010 d_ptr->m_typeToValueType[QVariant::Locale] = QVariant::Locale; 1020 connect(localePropertyManager, SIGNAL(valueChanged(QtProperty *, const QLocale &)),1021 this, SLOT(slotValueChanged(QtProperty *, const QLocale &)));1022 connect(localePropertyManager->subEnumPropertyManager(), SIGNAL(valueChanged(QtProperty *,int)),1023 this, SLOT(slotValueChanged(QtProperty *,int)));1024 connect(localePropertyManager, SIGNAL(propertyInserted(QtProperty *, QtProperty *, QtProperty*)),1025 this, SLOT(slotPropertyInserted(QtProperty *, QtProperty *, QtProperty*)));1026 connect(localePropertyManager, SIGNAL(propertyRemoved(QtProperty *, QtProperty*)),1027 this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty*)));1011 connect(localePropertyManager, SIGNAL(valueChanged(QtProperty*,QLocale)), 1012 this, SLOT(slotValueChanged(QtProperty*,QLocale))); 1013 connect(localePropertyManager->subEnumPropertyManager(), SIGNAL(valueChanged(QtProperty*,int)), 1014 this, SLOT(slotValueChanged(QtProperty*,int))); 1015 connect(localePropertyManager, SIGNAL(propertyInserted(QtProperty*,QtProperty*,QtProperty*)), 1016 this, SLOT(slotPropertyInserted(QtProperty*,QtProperty*,QtProperty*))); 1017 connect(localePropertyManager, SIGNAL(propertyRemoved(QtProperty*,QtProperty*)), 1018 this, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); 1028 1019 // PointPropertyManager 1029 1020 QtPointPropertyManager *pointPropertyManager = new QtPointPropertyManager(this); 1030 1021 d_ptr->m_typeToPropertyManager[QVariant::Point] = pointPropertyManager; 1031 1022 d_ptr->m_typeToValueType[QVariant::Point] = QVariant::Point; 1032 connect(pointPropertyManager, SIGNAL(valueChanged(QtProperty *, const QPoint &)),1033 this, SLOT(slotValueChanged(QtProperty *, const QPoint &)));1034 connect(pointPropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty *,int)),1035 this, SLOT(slotValueChanged(QtProperty *,int)));1036 connect(pointPropertyManager, SIGNAL(propertyInserted(QtProperty *, QtProperty *, QtProperty*)),1037 this, SLOT(slotPropertyInserted(QtProperty *, QtProperty *, QtProperty*)));1038 connect(pointPropertyManager, SIGNAL(propertyRemoved(QtProperty *, QtProperty*)),1039 this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty*)));1023 connect(pointPropertyManager, SIGNAL(valueChanged(QtProperty*,QPoint)), 1024 this, SLOT(slotValueChanged(QtProperty*,QPoint))); 1025 connect(pointPropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty*,int)), 1026 this, SLOT(slotValueChanged(QtProperty*,int))); 1027 connect(pointPropertyManager, SIGNAL(propertyInserted(QtProperty*,QtProperty*,QtProperty*)), 1028 this, SLOT(slotPropertyInserted(QtProperty*,QtProperty*,QtProperty*))); 1029 connect(pointPropertyManager, SIGNAL(propertyRemoved(QtProperty*,QtProperty*)), 1030 this, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); 1040 1031 // PointFPropertyManager 1041 1032 QtPointFPropertyManager *pointFPropertyManager = new QtPointFPropertyManager(this); … … 1044 1035 d_ptr->m_typeToAttributeToAttributeType[QVariant::PointF][d_ptr->m_decimalsAttribute] = 1045 1036 QVariant::Int; 1046 connect(pointFPropertyManager, SIGNAL(valueChanged(QtProperty *, const QPointF &)),1047 this, SLOT(slotValueChanged(QtProperty *, const QPointF &)));1048 connect(pointFPropertyManager, SIGNAL(decimalsChanged(QtProperty *,int)),1049 this, SLOT(slotDecimalsChanged(QtProperty *,int)));1050 connect(pointFPropertyManager->subDoublePropertyManager(), SIGNAL(valueChanged(QtProperty *,double)),1051 this, SLOT(slotValueChanged(QtProperty *,double)));1052 connect(pointFPropertyManager, SIGNAL(propertyInserted(QtProperty *, QtProperty *, QtProperty*)),1053 this, SLOT(slotPropertyInserted(QtProperty *, QtProperty *, QtProperty*)));1054 connect(pointFPropertyManager, SIGNAL(propertyRemoved(QtProperty *, QtProperty*)),1055 this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty*)));1037 connect(pointFPropertyManager, SIGNAL(valueChanged(QtProperty*,QPointF)), 1038 this, SLOT(slotValueChanged(QtProperty*,QPointF))); 1039 connect(pointFPropertyManager, SIGNAL(decimalsChanged(QtProperty*,int)), 1040 this, SLOT(slotDecimalsChanged(QtProperty*,int))); 1041 connect(pointFPropertyManager->subDoublePropertyManager(), SIGNAL(valueChanged(QtProperty*,double)), 1042 this, SLOT(slotValueChanged(QtProperty*,double))); 1043 connect(pointFPropertyManager, SIGNAL(propertyInserted(QtProperty*,QtProperty*,QtProperty*)), 1044 this, SLOT(slotPropertyInserted(QtProperty*,QtProperty*,QtProperty*))); 1045 connect(pointFPropertyManager, SIGNAL(propertyRemoved(QtProperty*,QtProperty*)), 1046 this, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); 1056 1047 // SizePropertyManager 1057 1048 QtSizePropertyManager *sizePropertyManager = new QtSizePropertyManager(this); … … 1062 1053 d_ptr->m_typeToAttributeToAttributeType[QVariant::Size][d_ptr->m_maximumAttribute] = 1063 1054 QVariant::Size; 1064 connect(sizePropertyManager, SIGNAL(valueChanged(QtProperty *, const QSize &)),1065 this, SLOT(slotValueChanged(QtProperty *, const QSize &)));1066 connect(sizePropertyManager, SIGNAL(rangeChanged(QtProperty *, const QSize &, const QSize &)),1067 this, SLOT(slotRangeChanged(QtProperty *, const QSize &, const QSize &)));1068 connect(sizePropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty *,int)),1069 this, SLOT(slotValueChanged(QtProperty *,int)));1070 connect(sizePropertyManager->subIntPropertyManager(), SIGNAL(rangeChanged(QtProperty *, int,int)),1071 this, SLOT(slotRangeChanged(QtProperty *, int,int)));1072 connect(sizePropertyManager, SIGNAL(propertyInserted(QtProperty *, QtProperty *, QtProperty*)),1073 this, SLOT(slotPropertyInserted(QtProperty *, QtProperty *, QtProperty*)));1074 connect(sizePropertyManager, SIGNAL(propertyRemoved(QtProperty *, QtProperty*)),1075 this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty*)));1055 connect(sizePropertyManager, SIGNAL(valueChanged(QtProperty*,QSize)), 1056 this, SLOT(slotValueChanged(QtProperty*,QSize))); 1057 connect(sizePropertyManager, SIGNAL(rangeChanged(QtProperty*,QSize,QSize)), 1058 this, SLOT(slotRangeChanged(QtProperty*,QSize,QSize))); 1059 connect(sizePropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty*,int)), 1060 this, SLOT(slotValueChanged(QtProperty*,int))); 1061 connect(sizePropertyManager->subIntPropertyManager(), SIGNAL(rangeChanged(QtProperty*,int,int)), 1062 this, SLOT(slotRangeChanged(QtProperty*,int,int))); 1063 connect(sizePropertyManager, SIGNAL(propertyInserted(QtProperty*,QtProperty*,QtProperty*)), 1064 this, SLOT(slotPropertyInserted(QtProperty*,QtProperty*,QtProperty*))); 1065 connect(sizePropertyManager, SIGNAL(propertyRemoved(QtProperty*,QtProperty*)), 1066 this, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); 1076 1067 // SizeFPropertyManager 1077 1068 QtSizeFPropertyManager *sizeFPropertyManager = new QtSizeFPropertyManager(this); … … 1084 1075 d_ptr->m_typeToAttributeToAttributeType[QVariant::SizeF][d_ptr->m_decimalsAttribute] = 1085 1076 QVariant::Int; 1086 connect(sizeFPropertyManager, SIGNAL(valueChanged(QtProperty *, const QSizeF &)),1087 this, SLOT(slotValueChanged(QtProperty *, const QSizeF &)));1088 connect(sizeFPropertyManager, SIGNAL(rangeChanged(QtProperty *, const QSizeF &, const QSizeF &)),1089 this, SLOT(slotRangeChanged(QtProperty *, const QSizeF &, const QSizeF &)));1090 connect(sizeFPropertyManager, SIGNAL(decimalsChanged(QtProperty *,int)),1091 this, SLOT(slotDecimalsChanged(QtProperty *,int)));1092 connect(sizeFPropertyManager->subDoublePropertyManager(), SIGNAL(valueChanged(QtProperty *,double)),1093 this, SLOT(slotValueChanged(QtProperty *,double)));1094 connect(sizeFPropertyManager->subDoublePropertyManager(), SIGNAL(rangeChanged(QtProperty *, double,double)),1095 this, SLOT(slotRangeChanged(QtProperty *, double,double)));1096 connect(sizeFPropertyManager, SIGNAL(propertyInserted(QtProperty *, QtProperty *, QtProperty*)),1097 this, SLOT(slotPropertyInserted(QtProperty *, QtProperty *, QtProperty*)));1098 connect(sizeFPropertyManager, SIGNAL(propertyRemoved(QtProperty *, QtProperty*)),1099 this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty*)));1077 connect(sizeFPropertyManager, SIGNAL(valueChanged(QtProperty*,QSizeF)), 1078 this, SLOT(slotValueChanged(QtProperty*,QSizeF))); 1079 connect(sizeFPropertyManager, SIGNAL(rangeChanged(QtProperty*,QSizeF,QSizeF)), 1080 this, SLOT(slotRangeChanged(QtProperty*,QSizeF,QSizeF))); 1081 connect(sizeFPropertyManager, SIGNAL(decimalsChanged(QtProperty*,int)), 1082 this, SLOT(slotDecimalsChanged(QtProperty*,int))); 1083 connect(sizeFPropertyManager->subDoublePropertyManager(), SIGNAL(valueChanged(QtProperty*,double)), 1084 this, SLOT(slotValueChanged(QtProperty*,double))); 1085 connect(sizeFPropertyManager->subDoublePropertyManager(), SIGNAL(rangeChanged(QtProperty*,double,double)), 1086 this, SLOT(slotRangeChanged(QtProperty*,double,double))); 1087 connect(sizeFPropertyManager, SIGNAL(propertyInserted(QtProperty*,QtProperty*,QtProperty*)), 1088 this, SLOT(slotPropertyInserted(QtProperty*,QtProperty*,QtProperty*))); 1089 connect(sizeFPropertyManager, SIGNAL(propertyRemoved(QtProperty*,QtProperty*)), 1090 this, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); 1100 1091 // RectPropertyManager 1101 1092 QtRectPropertyManager *rectPropertyManager = new QtRectPropertyManager(this); … … 1104 1095 d_ptr->m_typeToAttributeToAttributeType[QVariant::Rect][d_ptr->m_constraintAttribute] = 1105 1096 QVariant::Rect; 1106 connect(rectPropertyManager, SIGNAL(valueChanged(QtProperty *, const QRect &)),1107 this, SLOT(slotValueChanged(QtProperty *, const QRect &)));1108 connect(rectPropertyManager, SIGNAL(constraintChanged(QtProperty *, const QRect &)),1109 this, SLOT(slotConstraintChanged(QtProperty *, const QRect &)));1110 connect(rectPropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty *,int)),1111 this, SLOT(slotValueChanged(QtProperty *,int)));1112 connect(rectPropertyManager->subIntPropertyManager(), SIGNAL(rangeChanged(QtProperty *, int,int)),1113 this, SLOT(slotRangeChanged(QtProperty *, int,int)));1114 connect(rectPropertyManager, SIGNAL(propertyInserted(QtProperty *, QtProperty *, QtProperty*)),1115 this, SLOT(slotPropertyInserted(QtProperty *, QtProperty *, QtProperty*)));1116 connect(rectPropertyManager, SIGNAL(propertyRemoved(QtProperty *, QtProperty*)),1117 this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty*)));1097 connect(rectPropertyManager, SIGNAL(valueChanged(QtProperty*,QRect)), 1098 this, SLOT(slotValueChanged(QtProperty*,QRect))); 1099 connect(rectPropertyManager, SIGNAL(constraintChanged(QtProperty*,QRect)), 1100 this, SLOT(slotConstraintChanged(QtProperty*,QRect))); 1101 connect(rectPropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty*,int)), 1102 this, SLOT(slotValueChanged(QtProperty*,int))); 1103 connect(rectPropertyManager->subIntPropertyManager(), SIGNAL(rangeChanged(QtProperty*,int,int)), 1104 this, SLOT(slotRangeChanged(QtProperty*,int,int))); 1105 connect(rectPropertyManager, SIGNAL(propertyInserted(QtProperty*,QtProperty*,QtProperty*)), 1106 this, SLOT(slotPropertyInserted(QtProperty*,QtProperty*,QtProperty*))); 1107 connect(rectPropertyManager, SIGNAL(propertyRemoved(QtProperty*,QtProperty*)), 1108 this, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); 1118 1109 // RectFPropertyManager 1119 1110 QtRectFPropertyManager *rectFPropertyManager = new QtRectFPropertyManager(this); … … 1124 1115 d_ptr->m_typeToAttributeToAttributeType[QVariant::RectF][d_ptr->m_decimalsAttribute] = 1125 1116 QVariant::Int; 1126 connect(rectFPropertyManager, SIGNAL(valueChanged(QtProperty *, const QRectF &)),1127 this, SLOT(slotValueChanged(QtProperty *, const QRectF &)));1128 connect(rectFPropertyManager, SIGNAL(constraintChanged(QtProperty *, const QRectF &)),1129 this, SLOT(slotConstraintChanged(QtProperty *, const QRectF &)));1130 connect(rectFPropertyManager, SIGNAL(decimalsChanged(QtProperty *,int)),1131 this, SLOT(slotDecimalsChanged(QtProperty *,int)));1132 connect(rectFPropertyManager->subDoublePropertyManager(), SIGNAL(valueChanged(QtProperty *,double)),1133 this, SLOT(slotValueChanged(QtProperty *,double)));1134 connect(rectFPropertyManager->subDoublePropertyManager(), SIGNAL(rangeChanged(QtProperty *, double,double)),1135 this, SLOT(slotRangeChanged(QtProperty *, double,double)));1136 connect(rectFPropertyManager, SIGNAL(propertyInserted(QtProperty *, QtProperty *, QtProperty*)),1137 this, SLOT(slotPropertyInserted(QtProperty *, QtProperty *, QtProperty*)));1138 connect(rectFPropertyManager, SIGNAL(propertyRemoved(QtProperty *, QtProperty*)),1139 this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty*)));1117 connect(rectFPropertyManager, SIGNAL(valueChanged(QtProperty*,QRectF)), 1118 this, SLOT(slotValueChanged(QtProperty*,QRectF))); 1119 connect(rectFPropertyManager, SIGNAL(constraintChanged(QtProperty*,QRectF)), 1120 this, SLOT(slotConstraintChanged(QtProperty*,QRectF))); 1121 connect(rectFPropertyManager, SIGNAL(decimalsChanged(QtProperty*,int)), 1122 this, SLOT(slotDecimalsChanged(QtProperty*,int))); 1123 connect(rectFPropertyManager->subDoublePropertyManager(), SIGNAL(valueChanged(QtProperty*,double)), 1124 this, SLOT(slotValueChanged(QtProperty*,double))); 1125 connect(rectFPropertyManager->subDoublePropertyManager(), SIGNAL(rangeChanged(QtProperty*,double,double)), 1126 this, SLOT(slotRangeChanged(QtProperty*,double,double))); 1127 connect(rectFPropertyManager, SIGNAL(propertyInserted(QtProperty*,QtProperty*,QtProperty*)), 1128 this, SLOT(slotPropertyInserted(QtProperty*,QtProperty*,QtProperty*))); 1129 connect(rectFPropertyManager, SIGNAL(propertyRemoved(QtProperty*,QtProperty*)), 1130 this, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); 1140 1131 // ColorPropertyManager 1141 1132 QtColorPropertyManager *colorPropertyManager = new QtColorPropertyManager(this); 1142 1133 d_ptr->m_typeToPropertyManager[QVariant::Color] = colorPropertyManager; 1143 1134 d_ptr->m_typeToValueType[QVariant::Color] = QVariant::Color; 1144 connect(colorPropertyManager, SIGNAL(valueChanged(QtProperty *, const QColor &)),1145 this, SLOT(slotValueChanged(QtProperty *, const QColor &)));1146 connect(colorPropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty *,int)),1147 this, SLOT(slotValueChanged(QtProperty *,int)));1148 connect(colorPropertyManager, SIGNAL(propertyInserted(QtProperty *, QtProperty *, QtProperty*)),1149 this, SLOT(slotPropertyInserted(QtProperty *, QtProperty *, QtProperty*)));1150 connect(colorPropertyManager, SIGNAL(propertyRemoved(QtProperty *, QtProperty*)),1151 this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty*)));1135 connect(colorPropertyManager, SIGNAL(valueChanged(QtProperty*,QColor)), 1136 this, SLOT(slotValueChanged(QtProperty*,QColor))); 1137 connect(colorPropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty*,int)), 1138 this, SLOT(slotValueChanged(QtProperty*,int))); 1139 connect(colorPropertyManager, SIGNAL(propertyInserted(QtProperty*,QtProperty*,QtProperty*)), 1140 this, SLOT(slotPropertyInserted(QtProperty*,QtProperty*,QtProperty*))); 1141 connect(colorPropertyManager, SIGNAL(propertyRemoved(QtProperty*,QtProperty*)), 1142 this, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); 1152 1143 // EnumPropertyManager 1153 1144 int enumId = enumTypeId(); … … 1159 1150 d_ptr->m_typeToAttributeToAttributeType[enumId][d_ptr->m_enumIconsAttribute] = 1160 1151 iconMapTypeId(); 1161 connect(enumPropertyManager, SIGNAL(valueChanged(QtProperty *,int)),1162 this, SLOT(slotValueChanged(QtProperty *,int)));1163 connect(enumPropertyManager, SIGNAL(enumNamesChanged(QtProperty *, const QStringList &)),1164 this, SLOT(slotEnumNamesChanged(QtProperty *, const QStringList &)));1165 connect(enumPropertyManager, SIGNAL(enumIconsChanged(QtProperty *, const QMap<int, QIcon> &)),1166 this, SLOT(slotEnumIconsChanged(QtProperty *, const QMap<int, QIcon> &)));1152 connect(enumPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), 1153 this, SLOT(slotValueChanged(QtProperty*,int))); 1154 connect(enumPropertyManager, SIGNAL(enumNamesChanged(QtProperty*,QStringList)), 1155 this, SLOT(slotEnumNamesChanged(QtProperty*,QStringList))); 1156 connect(enumPropertyManager, SIGNAL(enumIconsChanged(QtProperty*,QMap<int,QIcon>)), 1157 this, SLOT(slotEnumIconsChanged(QtProperty*,QMap<int,QIcon>))); 1167 1158 // SizePolicyPropertyManager 1168 1159 QtSizePolicyPropertyManager *sizePolicyPropertyManager = new QtSizePolicyPropertyManager(this); 1169 1160 d_ptr->m_typeToPropertyManager[QVariant::SizePolicy] = sizePolicyPropertyManager; 1170 1161 d_ptr->m_typeToValueType[QVariant::SizePolicy] = QVariant::SizePolicy; 1171 connect(sizePolicyPropertyManager, SIGNAL(valueChanged(QtProperty *, const QSizePolicy &)),1172 this, SLOT(slotValueChanged(QtProperty *, const QSizePolicy &)));1173 connect(sizePolicyPropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty *,int)),1174 this, SLOT(slotValueChanged(QtProperty *,int)));1175 connect(sizePolicyPropertyManager->subIntPropertyManager(), SIGNAL(rangeChanged(QtProperty *, int,int)),1176 this, SLOT(slotRangeChanged(QtProperty *, int,int)));1177 connect(sizePolicyPropertyManager->subEnumPropertyManager(), SIGNAL(valueChanged(QtProperty *,int)),1178 this, SLOT(slotValueChanged(QtProperty *,int)));1162 connect(sizePolicyPropertyManager, SIGNAL(valueChanged(QtProperty*,QSizePolicy)), 1163 this, SLOT(slotValueChanged(QtProperty*,QSizePolicy))); 1164 connect(sizePolicyPropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty*,int)), 1165 this, SLOT(slotValueChanged(QtProperty*,int))); 1166 connect(sizePolicyPropertyManager->subIntPropertyManager(), SIGNAL(rangeChanged(QtProperty*,int,int)), 1167 this, SLOT(slotRangeChanged(QtProperty*,int,int))); 1168 connect(sizePolicyPropertyManager->subEnumPropertyManager(), SIGNAL(valueChanged(QtProperty*,int)), 1169 this, SLOT(slotValueChanged(QtProperty*,int))); 1179 1170 connect(sizePolicyPropertyManager->subEnumPropertyManager(), 1180 SIGNAL(enumNamesChanged(QtProperty *, const QStringList &)),1181 this, SLOT(slotEnumNamesChanged(QtProperty *, const QStringList &)));1182 connect(sizePolicyPropertyManager, SIGNAL(propertyInserted(QtProperty *, QtProperty *, QtProperty*)),1183 this, SLOT(slotPropertyInserted(QtProperty *, QtProperty *, QtProperty*)));1184 connect(sizePolicyPropertyManager, SIGNAL(propertyRemoved(QtProperty *, QtProperty*)),1185 this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty*)));1171 SIGNAL(enumNamesChanged(QtProperty*,QStringList)), 1172 this, SLOT(slotEnumNamesChanged(QtProperty*,QStringList))); 1173 connect(sizePolicyPropertyManager, SIGNAL(propertyInserted(QtProperty*,QtProperty*,QtProperty*)), 1174 this, SLOT(slotPropertyInserted(QtProperty*,QtProperty*,QtProperty*))); 1175 connect(sizePolicyPropertyManager, SIGNAL(propertyRemoved(QtProperty*,QtProperty*)), 1176 this, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); 1186 1177 // FontPropertyManager 1187 1178 QtFontPropertyManager *fontPropertyManager = new QtFontPropertyManager(this); 1188 1179 d_ptr->m_typeToPropertyManager[QVariant::Font] = fontPropertyManager; 1189 1180 d_ptr->m_typeToValueType[QVariant::Font] = QVariant::Font; 1190 connect(fontPropertyManager, SIGNAL(valueChanged(QtProperty *, const QFont &)),1191 this, SLOT(slotValueChanged(QtProperty *, const QFont &)));1192 connect(fontPropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty *,int)),1193 this, SLOT(slotValueChanged(QtProperty *,int)));1194 connect(fontPropertyManager->subIntPropertyManager(), SIGNAL(rangeChanged(QtProperty *, int,int)),1195 this, SLOT(slotRangeChanged(QtProperty *, int,int)));1196 connect(fontPropertyManager->subEnumPropertyManager(), SIGNAL(valueChanged(QtProperty *,int)),1197 this, SLOT(slotValueChanged(QtProperty *,int)));1181 connect(fontPropertyManager, SIGNAL(valueChanged(QtProperty*,QFont)), 1182 this, SLOT(slotValueChanged(QtProperty*,QFont))); 1183 connect(fontPropertyManager->subIntPropertyManager(), SIGNAL(valueChanged(QtProperty*,int)), 1184 this, SLOT(slotValueChanged(QtProperty*,int))); 1185 connect(fontPropertyManager->subIntPropertyManager(), SIGNAL(rangeChanged(QtProperty*,int,int)), 1186 this, SLOT(slotRangeChanged(QtProperty*,int,int))); 1187 connect(fontPropertyManager->subEnumPropertyManager(), SIGNAL(valueChanged(QtProperty*,int)), 1188 this, SLOT(slotValueChanged(QtProperty*,int))); 1198 1189 connect(fontPropertyManager->subEnumPropertyManager(), 1199 SIGNAL(enumNamesChanged(QtProperty *, const QStringList &)),1200 this, SLOT(slotEnumNamesChanged(QtProperty *, const QStringList &)));1201 connect(fontPropertyManager->subBoolPropertyManager(), SIGNAL(valueChanged(QtProperty *,bool)),1202 this, SLOT(slotValueChanged(QtProperty *,bool)));1203 connect(fontPropertyManager, SIGNAL(propertyInserted(QtProperty *, QtProperty *, QtProperty*)),1204 this, SLOT(slotPropertyInserted(QtProperty *, QtProperty *, QtProperty*)));1205 connect(fontPropertyManager, SIGNAL(propertyRemoved(QtProperty *, QtProperty*)),1206 this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty*)));1190 SIGNAL(enumNamesChanged(QtProperty*,QStringList)), 1191 this, SLOT(slotEnumNamesChanged(QtProperty*,QStringList))); 1192 connect(fontPropertyManager->subBoolPropertyManager(), SIGNAL(valueChanged(QtProperty*,bool)), 1193 this, SLOT(slotValueChanged(QtProperty*,bool))); 1194 connect(fontPropertyManager, SIGNAL(propertyInserted(QtProperty*,QtProperty*,QtProperty*)), 1195 this, SLOT(slotPropertyInserted(QtProperty*,QtProperty*,QtProperty*))); 1196 connect(fontPropertyManager, SIGNAL(propertyRemoved(QtProperty*,QtProperty*)), 1197 this, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); 1207 1198 // CursorPropertyManager 1208 1199 QtCursorPropertyManager *cursorPropertyManager = new QtCursorPropertyManager(this); 1209 1200 d_ptr->m_typeToPropertyManager[QVariant::Cursor] = cursorPropertyManager; 1210 1201 d_ptr->m_typeToValueType[QVariant::Cursor] = QVariant::Cursor; 1211 connect(cursorPropertyManager, SIGNAL(valueChanged(QtProperty *, const QCursor &)),1212 this, SLOT(slotValueChanged(QtProperty *, const QCursor &)));1202 connect(cursorPropertyManager, SIGNAL(valueChanged(QtProperty*,QCursor)), 1203 this, SLOT(slotValueChanged(QtProperty*,QCursor))); 1213 1204 // FlagPropertyManager 1214 1205 int flagId = flagTypeId(); … … 1218 1209 d_ptr->m_typeToAttributeToAttributeType[flagId][d_ptr->m_flagNamesAttribute] = 1219 1210 QVariant::StringList; 1220 connect(flagPropertyManager, SIGNAL(valueChanged(QtProperty *,int)),1221 this, SLOT(slotValueChanged(QtProperty *,int)));1222 connect(flagPropertyManager, SIGNAL(flagNamesChanged(QtProperty *, const QStringList &)),1223 this, SLOT(slotFlagNamesChanged(QtProperty *, const QStringList &)));1224 connect(flagPropertyManager->subBoolPropertyManager(), SIGNAL(valueChanged(QtProperty *,bool)),1225 this, SLOT(slotValueChanged(QtProperty *,bool)));1226 connect(flagPropertyManager, SIGNAL(propertyInserted(QtProperty *, QtProperty *, QtProperty*)),1227 this, SLOT(slotPropertyInserted(QtProperty *, QtProperty *, QtProperty*)));1228 connect(flagPropertyManager, SIGNAL(propertyRemoved(QtProperty *, QtProperty*)),1229 this, SLOT(slotPropertyRemoved(QtProperty *, QtProperty*)));1211 connect(flagPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), 1212 this, SLOT(slotValueChanged(QtProperty*,int))); 1213 connect(flagPropertyManager, SIGNAL(flagNamesChanged(QtProperty*,QStringList)), 1214 this, SLOT(slotFlagNamesChanged(QtProperty*,QStringList))); 1215 connect(flagPropertyManager->subBoolPropertyManager(), SIGNAL(valueChanged(QtProperty*,bool)), 1216 this, SLOT(slotValueChanged(QtProperty*,bool))); 1217 connect(flagPropertyManager, SIGNAL(propertyInserted(QtProperty*,QtProperty*,QtProperty*)), 1218 this, SLOT(slotPropertyInserted(QtProperty*,QtProperty*,QtProperty*))); 1219 connect(flagPropertyManager, SIGNAL(propertyRemoved(QtProperty*,QtProperty*)), 1220 this, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); 1230 1221 // FlagPropertyManager 1231 1222 int groupId = groupTypeId(); … … 1241 1232 { 1242 1233 clear(); 1243 delete d_ptr;1244 1234 } 1245 1235 … … 1936 1926 */ 1937 1927 QtVariantEditorFactory::QtVariantEditorFactory(QObject *parent) 1938 : QtAbstractEditorFactory<QtVariantPropertyManager>(parent) 1939 { 1940 d_ptr = new QtVariantEditorFactoryPrivate(); 1928 : QtAbstractEditorFactory<QtVariantPropertyManager>(parent), d_ptr(new QtVariantEditorFactoryPrivate()) 1929 { 1941 1930 d_ptr->q_ptr = this; 1942 1931 … … 2000 1989 QtVariantEditorFactory::~QtVariantEditorFactory() 2001 1990 { 2002 delete d_ptr;2003 1991 } 2004 1992 … … 2276 2264 } 2277 2265 2278 #if QT_VERSION >= 0x0404002279 2266 QT_END_NAMESPACE 2280 #endif2281 2267 2282 2268 #include "moc_qtvariantproperty.cpp"
Note:
See TracChangeset
for help on using the changeset viewer.