- 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/qtpropertymanager.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 ** … … 62 62 #endif 63 63 64 #if QT_VERSION >= 0x04040065 64 QT_BEGIN_NAMESPACE 66 #endif67 65 68 66 template <class PrivateData, class Value> … … 422 420 }; 423 421 424 #if QT_VERSION < 0x040300425 426 static QList<QLocale::Country> countriesForLanguage(QLocale::Language language)427 {428 QList<QLocale::Country> countries;429 QLocale::Country country = QLocale::AnyCountry;430 while (country <= QLocale::LastCountry) {431 QLocale locale(language, country);432 if (locale.language() == language && !countries.contains(locale.country()))433 countries << locale.country();434 country = (QLocale::Country)((uint)country + 1); // ++country435 }436 return countries;437 }438 439 #endif440 441 422 static QList<QLocale::Country> sortCountries(const QList<QLocale::Country> &countries) 442 423 { … … 470 451 QLocale::Language language = itLang.next(); 471 452 QList<QLocale::Country> countries; 472 #if QT_VERSION < 0x040300473 countries = countriesForLanguage(language);474 #else475 453 countries = QLocale::countriesForLanguage(language); 476 #endif477 454 if (countries.isEmpty() && language == system.language()) 478 455 countries << system.country(); … … 701 678 */ 702 679 QtIntPropertyManager::QtIntPropertyManager(QObject *parent) 703 : QtAbstractPropertyManager(parent) 704 { 705 d_ptr = new QtIntPropertyManagerPrivate; 680 : QtAbstractPropertyManager(parent), d_ptr(new QtIntPropertyManagerPrivate) 681 { 706 682 d_ptr->q_ptr = this; 707 683 } … … 713 689 { 714 690 clear(); 715 delete d_ptr;716 691 } 717 692 … … 786 761 { 787 762 void (QtIntPropertyManagerPrivate::*setSubPropertyValue)(QtProperty *, int) = 0; 788 setValueInRange<int, QtIntPropertyManagerPrivate, QtIntPropertyManager, int>(this, d_ptr ,763 setValueInRange<int, QtIntPropertyManagerPrivate, QtIntPropertyManager, int>(this, d_ptr.data(), 789 764 &QtIntPropertyManager::propertyChanged, 790 765 &QtIntPropertyManager::valueChanged, … … 803 778 void QtIntPropertyManager::setMinimum(QtProperty *property, int minVal) 804 779 { 805 setMinimumValue<int, QtIntPropertyManagerPrivate, QtIntPropertyManager, int, QtIntPropertyManagerPrivate::Data>(this, d_ptr ,780 setMinimumValue<int, QtIntPropertyManagerPrivate, QtIntPropertyManager, int, QtIntPropertyManagerPrivate::Data>(this, d_ptr.data(), 806 781 &QtIntPropertyManager::propertyChanged, 807 782 &QtIntPropertyManager::valueChanged, … … 821 796 void QtIntPropertyManager::setMaximum(QtProperty *property, int maxVal) 822 797 { 823 setMaximumValue<int, QtIntPropertyManagerPrivate, QtIntPropertyManager, int, QtIntPropertyManagerPrivate::Data>(this, d_ptr ,798 setMaximumValue<int, QtIntPropertyManagerPrivate, QtIntPropertyManager, int, QtIntPropertyManagerPrivate::Data>(this, d_ptr.data(), 824 799 &QtIntPropertyManager::propertyChanged, 825 800 &QtIntPropertyManager::valueChanged, … … 845 820 { 846 821 void (QtIntPropertyManagerPrivate::*setSubPropertyRange)(QtProperty *, int, int, int) = 0; 847 setBorderValues<int, QtIntPropertyManagerPrivate, QtIntPropertyManager, int>(this, d_ptr ,822 setBorderValues<int, QtIntPropertyManagerPrivate, QtIntPropertyManager, int>(this, d_ptr.data(), 848 823 &QtIntPropertyManager::propertyChanged, 849 824 &QtIntPropertyManager::valueChanged, … … 992 967 */ 993 968 QtDoublePropertyManager::QtDoublePropertyManager(QObject *parent) 994 : QtAbstractPropertyManager(parent) 995 { 996 d_ptr = new QtDoublePropertyManagerPrivate; 969 : QtAbstractPropertyManager(parent), d_ptr(new QtDoublePropertyManagerPrivate) 970 { 997 971 d_ptr->q_ptr = this; 998 972 } … … 1004 978 { 1005 979 clear(); 1006 delete d_ptr;1007 980 } 1008 981 … … 1087 1060 { 1088 1061 void (QtDoublePropertyManagerPrivate::*setSubPropertyValue)(QtProperty *, double) = 0; 1089 setValueInRange<double, QtDoublePropertyManagerPrivate, QtDoublePropertyManager, double>(this, d_ptr ,1062 setValueInRange<double, QtDoublePropertyManagerPrivate, QtDoublePropertyManager, double>(this, d_ptr.data(), 1090 1063 &QtDoublePropertyManager::propertyChanged, 1091 1064 &QtDoublePropertyManager::valueChanged, … … 1164 1137 void QtDoublePropertyManager::setMinimum(QtProperty *property, double minVal) 1165 1138 { 1166 setMinimumValue<double, QtDoublePropertyManagerPrivate, QtDoublePropertyManager, double, QtDoublePropertyManagerPrivate::Data>(this, d_ptr ,1139 setMinimumValue<double, QtDoublePropertyManagerPrivate, QtDoublePropertyManager, double, QtDoublePropertyManagerPrivate::Data>(this, d_ptr.data(), 1167 1140 &QtDoublePropertyManager::propertyChanged, 1168 1141 &QtDoublePropertyManager::valueChanged, … … 1182 1155 void QtDoublePropertyManager::setMaximum(QtProperty *property, double maxVal) 1183 1156 { 1184 setMaximumValue<double, QtDoublePropertyManagerPrivate, QtDoublePropertyManager, double, QtDoublePropertyManagerPrivate::Data>(this, d_ptr ,1157 setMaximumValue<double, QtDoublePropertyManagerPrivate, QtDoublePropertyManager, double, QtDoublePropertyManagerPrivate::Data>(this, d_ptr.data(), 1185 1158 &QtDoublePropertyManager::propertyChanged, 1186 1159 &QtDoublePropertyManager::valueChanged, … … 1206 1179 { 1207 1180 void (QtDoublePropertyManagerPrivate::*setSubPropertyRange)(QtProperty *, double, double, double) = 0; 1208 setBorderValues<double, QtDoublePropertyManagerPrivate, QtDoublePropertyManager, double>(this, d_ptr ,1181 setBorderValues<double, QtDoublePropertyManagerPrivate, QtDoublePropertyManager, double>(this, d_ptr.data(), 1209 1182 &QtDoublePropertyManager::propertyChanged, 1210 1183 &QtDoublePropertyManager::valueChanged, … … 1297 1270 */ 1298 1271 QtStringPropertyManager::QtStringPropertyManager(QObject *parent) 1299 : QtAbstractPropertyManager(parent) 1300 { 1301 d_ptr = new QtStringPropertyManagerPrivate; 1272 : QtAbstractPropertyManager(parent), d_ptr(new QtStringPropertyManagerPrivate) 1273 { 1302 1274 d_ptr->q_ptr = this; 1303 1275 } … … 1309 1281 { 1310 1282 clear(); 1311 delete d_ptr;1312 1283 } 1313 1284 … … 1461 1432 */ 1462 1433 QtBoolPropertyManager::QtBoolPropertyManager(QObject *parent) 1463 : QtAbstractPropertyManager(parent) 1464 { 1465 d_ptr = new QtBoolPropertyManagerPrivate; 1434 : QtAbstractPropertyManager(parent), d_ptr(new QtBoolPropertyManagerPrivate) 1435 { 1466 1436 d_ptr->q_ptr = this; 1467 1437 } … … 1473 1443 { 1474 1444 clear(); 1475 delete d_ptr;1476 1445 } 1477 1446 … … 1654 1623 */ 1655 1624 QtDatePropertyManager::QtDatePropertyManager(QObject *parent) 1656 : QtAbstractPropertyManager(parent) 1657 { 1658 d_ptr = new QtDatePropertyManagerPrivate; 1625 : QtAbstractPropertyManager(parent), d_ptr(new QtDatePropertyManagerPrivate) 1626 { 1659 1627 d_ptr->q_ptr = this; 1660 1628 … … 1669 1637 { 1670 1638 clear(); 1671 delete d_ptr;1672 1639 } 1673 1640 … … 1730 1697 { 1731 1698 void (QtDatePropertyManagerPrivate::*setSubPropertyValue)(QtProperty *, const QDate &) = 0; 1732 setValueInRange<const QDate &, QtDatePropertyManagerPrivate, QtDatePropertyManager, const QDate>(this, d_ptr ,1699 setValueInRange<const QDate &, QtDatePropertyManagerPrivate, QtDatePropertyManager, const QDate>(this, d_ptr.data(), 1733 1700 &QtDatePropertyManager::propertyChanged, 1734 1701 &QtDatePropertyManager::valueChanged, … … 1747 1714 void QtDatePropertyManager::setMinimum(QtProperty *property, const QDate &minVal) 1748 1715 { 1749 setMinimumValue<const QDate &, QtDatePropertyManagerPrivate, QtDatePropertyManager, QDate, QtDatePropertyManagerPrivate::Data>(this, d_ptr ,1716 setMinimumValue<const QDate &, QtDatePropertyManagerPrivate, QtDatePropertyManager, QDate, QtDatePropertyManagerPrivate::Data>(this, d_ptr.data(), 1750 1717 &QtDatePropertyManager::propertyChanged, 1751 1718 &QtDatePropertyManager::valueChanged, … … 1765 1732 void QtDatePropertyManager::setMaximum(QtProperty *property, const QDate &maxVal) 1766 1733 { 1767 setMaximumValue<const QDate &, QtDatePropertyManagerPrivate, QtDatePropertyManager, QDate, QtDatePropertyManagerPrivate::Data>(this, d_ptr ,1734 setMaximumValue<const QDate &, QtDatePropertyManagerPrivate, QtDatePropertyManager, QDate, QtDatePropertyManagerPrivate::Data>(this, d_ptr.data(), 1768 1735 &QtDatePropertyManager::propertyChanged, 1769 1736 &QtDatePropertyManager::valueChanged, … … 1790 1757 void (QtDatePropertyManagerPrivate::*setSubPropertyRange)(QtProperty *, const QDate &, 1791 1758 const QDate &, const QDate &) = 0; 1792 setBorderValues<const QDate &, QtDatePropertyManagerPrivate, QtDatePropertyManager, QDate>(this, d_ptr ,1759 setBorderValues<const QDate &, QtDatePropertyManagerPrivate, QtDatePropertyManager, QDate>(this, d_ptr.data(), 1793 1760 &QtDatePropertyManager::propertyChanged, 1794 1761 &QtDatePropertyManager::valueChanged, … … 1859 1826 */ 1860 1827 QtTimePropertyManager::QtTimePropertyManager(QObject *parent) 1861 : QtAbstractPropertyManager(parent) 1862 { 1863 d_ptr = new QtTimePropertyManagerPrivate; 1828 : QtAbstractPropertyManager(parent), d_ptr(new QtTimePropertyManagerPrivate) 1829 { 1864 1830 d_ptr->q_ptr = this; 1865 1831 … … 1874 1840 { 1875 1841 clear(); 1876 delete d_ptr;1877 1842 } 1878 1843 … … 1974 1939 */ 1975 1940 QtDateTimePropertyManager::QtDateTimePropertyManager(QObject *parent) 1976 : QtAbstractPropertyManager(parent) 1977 { 1978 d_ptr = new QtDateTimePropertyManagerPrivate; 1941 : QtAbstractPropertyManager(parent), d_ptr(new QtDateTimePropertyManagerPrivate) 1942 { 1979 1943 d_ptr->q_ptr = this; 1980 1944 … … 1991 1955 { 1992 1956 clear(); 1993 delete d_ptr;1994 1957 } 1995 1958 … … 2092 2055 */ 2093 2056 QtKeySequencePropertyManager::QtKeySequencePropertyManager(QObject *parent) 2094 : QtAbstractPropertyManager(parent) 2095 { 2096 d_ptr = new QtKeySequencePropertyManagerPrivate; 2057 : QtAbstractPropertyManager(parent), d_ptr(new QtKeySequencePropertyManagerPrivate) 2058 { 2097 2059 d_ptr->q_ptr = this; 2098 2060 } … … 2104 2066 { 2105 2067 clear(); 2106 delete d_ptr;2107 2068 } 2108 2069 … … 2203 2164 */ 2204 2165 QtCharPropertyManager::QtCharPropertyManager(QObject *parent) 2205 : QtAbstractPropertyManager(parent) 2206 { 2207 d_ptr = new QtCharPropertyManagerPrivate; 2166 : QtAbstractPropertyManager(parent), d_ptr(new QtCharPropertyManagerPrivate) 2167 { 2208 2168 d_ptr->q_ptr = this; 2209 2169 } … … 2215 2175 { 2216 2176 clear(); 2217 delete d_ptr;2218 2177 } 2219 2178 … … 2371 2330 */ 2372 2331 QtLocalePropertyManager::QtLocalePropertyManager(QObject *parent) 2373 : QtAbstractPropertyManager(parent) 2374 { 2375 d_ptr = new QtLocalePropertyManagerPrivate; 2332 : QtAbstractPropertyManager(parent), d_ptr(new QtLocalePropertyManagerPrivate) 2333 { 2376 2334 d_ptr->q_ptr = this; 2377 2335 2378 2336 d_ptr->m_enumPropertyManager = new QtEnumPropertyManager(this); 2379 connect(d_ptr->m_enumPropertyManager, SIGNAL(valueChanged(QtProperty *,int)),2380 this, SLOT(slotEnumChanged(QtProperty *,int)));2381 2382 connect(d_ptr->m_enumPropertyManager, SIGNAL(propertyDestroyed(QtProperty 2383 this, SLOT(slotPropertyDestroyed(QtProperty 2337 connect(d_ptr->m_enumPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), 2338 this, SLOT(slotEnumChanged(QtProperty*,int))); 2339 2340 connect(d_ptr->m_enumPropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), 2341 this, SLOT(slotPropertyDestroyed(QtProperty*))); 2384 2342 } 2385 2343 … … 2390 2348 { 2391 2349 clear(); 2392 delete d_ptr;2393 2350 } 2394 2351 … … 2610 2567 */ 2611 2568 QtPointPropertyManager::QtPointPropertyManager(QObject *parent) 2612 : QtAbstractPropertyManager(parent) 2613 { 2614 d_ptr = new QtPointPropertyManagerPrivate; 2569 : QtAbstractPropertyManager(parent), d_ptr(new QtPointPropertyManagerPrivate) 2570 { 2615 2571 d_ptr->q_ptr = this; 2616 2572 2617 2573 d_ptr->m_intPropertyManager = new QtIntPropertyManager(this); 2618 connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty *,int)),2619 this, SLOT(slotIntChanged(QtProperty *,int)));2620 connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty 2621 this, SLOT(slotPropertyDestroyed(QtProperty 2574 connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), 2575 this, SLOT(slotIntChanged(QtProperty*,int))); 2576 connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), 2577 this, SLOT(slotPropertyDestroyed(QtProperty*))); 2622 2578 } 2623 2579 … … 2628 2584 { 2629 2585 clear(); 2630 delete d_ptr;2631 2586 } 2632 2587 … … 2842 2797 */ 2843 2798 QtPointFPropertyManager::QtPointFPropertyManager(QObject *parent) 2844 : QtAbstractPropertyManager(parent) 2845 { 2846 d_ptr = new QtPointFPropertyManagerPrivate; 2799 : QtAbstractPropertyManager(parent), d_ptr(new QtPointFPropertyManagerPrivate) 2800 { 2847 2801 d_ptr->q_ptr = this; 2848 2802 2849 2803 d_ptr->m_doublePropertyManager = new QtDoublePropertyManager(this); 2850 connect(d_ptr->m_doublePropertyManager, SIGNAL(valueChanged(QtProperty *,double)),2851 this, SLOT(slotDoubleChanged(QtProperty *,double)));2852 connect(d_ptr->m_doublePropertyManager, SIGNAL(propertyDestroyed(QtProperty 2853 this, SLOT(slotPropertyDestroyed(QtProperty 2804 connect(d_ptr->m_doublePropertyManager, SIGNAL(valueChanged(QtProperty*,double)), 2805 this, SLOT(slotDoubleChanged(QtProperty*,double))); 2806 connect(d_ptr->m_doublePropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), 2807 this, SLOT(slotPropertyDestroyed(QtProperty*))); 2854 2808 } 2855 2809 … … 2860 2814 { 2861 2815 clear(); 2862 delete d_ptr;2863 2816 } 2864 2817 … … 3155 3108 */ 3156 3109 QtSizePropertyManager::QtSizePropertyManager(QObject *parent) 3157 : QtAbstractPropertyManager(parent) 3158 { 3159 d_ptr = new QtSizePropertyManagerPrivate; 3110 : QtAbstractPropertyManager(parent), d_ptr(new QtSizePropertyManagerPrivate) 3111 { 3160 3112 d_ptr->q_ptr = this; 3161 3113 3162 3114 d_ptr->m_intPropertyManager = new QtIntPropertyManager(this); 3163 connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty *,int)),3164 this, SLOT(slotIntChanged(QtProperty *,int)));3165 connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty 3166 this, SLOT(slotPropertyDestroyed(QtProperty 3115 connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), 3116 this, SLOT(slotIntChanged(QtProperty*,int))); 3117 connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), 3118 this, SLOT(slotPropertyDestroyed(QtProperty*))); 3167 3119 } 3168 3120 … … 3173 3125 { 3174 3126 clear(); 3175 delete d_ptr;3176 3127 } 3177 3128 … … 3250 3201 void QtSizePropertyManager::setValue(QtProperty *property, const QSize &val) 3251 3202 { 3252 setValueInRange<const QSize &, QtSizePropertyManagerPrivate, QtSizePropertyManager, const QSize>(this, d_ptr ,3203 setValueInRange<const QSize &, QtSizePropertyManagerPrivate, QtSizePropertyManager, const QSize>(this, d_ptr.data(), 3253 3204 &QtSizePropertyManager::propertyChanged, 3254 3205 &QtSizePropertyManager::valueChanged, … … 3267 3218 void QtSizePropertyManager::setMinimum(QtProperty *property, const QSize &minVal) 3268 3219 { 3269 setBorderValue<const QSize &, QtSizePropertyManagerPrivate, QtSizePropertyManager, QSize, QtSizePropertyManagerPrivate::Data>(this, d_ptr ,3220 setBorderValue<const QSize &, QtSizePropertyManagerPrivate, QtSizePropertyManager, QSize, QtSizePropertyManagerPrivate::Data>(this, d_ptr.data(), 3270 3221 &QtSizePropertyManager::propertyChanged, 3271 3222 &QtSizePropertyManager::valueChanged, … … 3288 3239 void QtSizePropertyManager::setMaximum(QtProperty *property, const QSize &maxVal) 3289 3240 { 3290 setBorderValue<const QSize &, QtSizePropertyManagerPrivate, QtSizePropertyManager, QSize, QtSizePropertyManagerPrivate::Data>(this, d_ptr ,3241 setBorderValue<const QSize &, QtSizePropertyManagerPrivate, QtSizePropertyManager, QSize, QtSizePropertyManagerPrivate::Data>(this, d_ptr.data(), 3291 3242 &QtSizePropertyManager::propertyChanged, 3292 3243 &QtSizePropertyManager::valueChanged, … … 3314 3265 void QtSizePropertyManager::setRange(QtProperty *property, const QSize &minVal, const QSize &maxVal) 3315 3266 { 3316 setBorderValues<const QSize &, QtSizePropertyManagerPrivate, QtSizePropertyManager, QSize>(this, d_ptr ,3267 setBorderValues<const QSize &, QtSizePropertyManagerPrivate, QtSizePropertyManager, QSize>(this, d_ptr.data(), 3317 3268 &QtSizePropertyManager::propertyChanged, 3318 3269 &QtSizePropertyManager::valueChanged, … … 3511 3462 */ 3512 3463 QtSizeFPropertyManager::QtSizeFPropertyManager(QObject *parent) 3513 : QtAbstractPropertyManager(parent) 3514 { 3515 d_ptr = new QtSizeFPropertyManagerPrivate; 3464 : QtAbstractPropertyManager(parent), d_ptr(new QtSizeFPropertyManagerPrivate) 3465 { 3516 3466 d_ptr->q_ptr = this; 3517 3467 3518 3468 d_ptr->m_doublePropertyManager = new QtDoublePropertyManager(this); 3519 connect(d_ptr->m_doublePropertyManager, SIGNAL(valueChanged(QtProperty *,double)),3520 this, SLOT(slotDoubleChanged(QtProperty *,double)));3521 connect(d_ptr->m_doublePropertyManager, SIGNAL(propertyDestroyed(QtProperty 3522 this, SLOT(slotPropertyDestroyed(QtProperty 3469 connect(d_ptr->m_doublePropertyManager, SIGNAL(valueChanged(QtProperty*,double)), 3470 this, SLOT(slotDoubleChanged(QtProperty*,double))); 3471 connect(d_ptr->m_doublePropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), 3472 this, SLOT(slotPropertyDestroyed(QtProperty*))); 3523 3473 } 3524 3474 … … 3529 3479 { 3530 3480 clear(); 3531 delete d_ptr;3532 3481 } 3533 3482 … … 3617 3566 void QtSizeFPropertyManager::setValue(QtProperty *property, const QSizeF &val) 3618 3567 { 3619 setValueInRange<const QSizeF &, QtSizeFPropertyManagerPrivate, QtSizeFPropertyManager, QSizeF>(this, d_ptr ,3568 setValueInRange<const QSizeF &, QtSizeFPropertyManagerPrivate, QtSizeFPropertyManager, QSizeF>(this, d_ptr.data(), 3620 3569 &QtSizeFPropertyManager::propertyChanged, 3621 3570 &QtSizeFPropertyManager::valueChanged, … … 3668 3617 void QtSizeFPropertyManager::setMinimum(QtProperty *property, const QSizeF &minVal) 3669 3618 { 3670 setBorderValue<const QSizeF &, QtSizeFPropertyManagerPrivate, QtSizeFPropertyManager, QSizeF, QtSizeFPropertyManagerPrivate::Data>(this, d_ptr ,3619 setBorderValue<const QSizeF &, QtSizeFPropertyManagerPrivate, QtSizeFPropertyManager, QSizeF, QtSizeFPropertyManagerPrivate::Data>(this, d_ptr.data(), 3671 3620 &QtSizeFPropertyManager::propertyChanged, 3672 3621 &QtSizeFPropertyManager::valueChanged, … … 3689 3638 void QtSizeFPropertyManager::setMaximum(QtProperty *property, const QSizeF &maxVal) 3690 3639 { 3691 setBorderValue<const QSizeF &, QtSizeFPropertyManagerPrivate, QtSizeFPropertyManager, QSizeF, QtSizeFPropertyManagerPrivate::Data>(this, d_ptr ,3640 setBorderValue<const QSizeF &, QtSizeFPropertyManagerPrivate, QtSizeFPropertyManager, QSizeF, QtSizeFPropertyManagerPrivate::Data>(this, d_ptr.data(), 3692 3641 &QtSizeFPropertyManager::propertyChanged, 3693 3642 &QtSizeFPropertyManager::valueChanged, … … 3715 3664 void QtSizeFPropertyManager::setRange(QtProperty *property, const QSizeF &minVal, const QSizeF &maxVal) 3716 3665 { 3717 setBorderValues<const QSizeF &, QtSizeFPropertyManagerPrivate, QtSizeFPropertyManager, QSizeF>(this, d_ptr ,3666 setBorderValues<const QSizeF &, QtSizeFPropertyManagerPrivate, QtSizeFPropertyManager, QSizeF>(this, d_ptr.data(), 3718 3667 &QtSizeFPropertyManager::propertyChanged, 3719 3668 &QtSizeFPropertyManager::valueChanged, … … 3927 3876 */ 3928 3877 QtRectPropertyManager::QtRectPropertyManager(QObject *parent) 3929 : QtAbstractPropertyManager(parent) 3930 { 3931 d_ptr = new QtRectPropertyManagerPrivate; 3878 : QtAbstractPropertyManager(parent), d_ptr(new QtRectPropertyManagerPrivate) 3879 { 3932 3880 d_ptr->q_ptr = this; 3933 3881 3934 3882 d_ptr->m_intPropertyManager = new QtIntPropertyManager(this); 3935 connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty *,int)),3936 this, SLOT(slotIntChanged(QtProperty *,int)));3937 connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty 3938 this, SLOT(slotPropertyDestroyed(QtProperty 3883 connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), 3884 this, SLOT(slotIntChanged(QtProperty*,int))); 3885 connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), 3886 this, SLOT(slotPropertyDestroyed(QtProperty*))); 3939 3887 } 3940 3888 … … 3945 3893 { 3946 3894 clear(); 3947 delete d_ptr;3948 3895 } 3949 3896 … … 4349 4296 */ 4350 4297 QtRectFPropertyManager::QtRectFPropertyManager(QObject *parent) 4351 : QtAbstractPropertyManager(parent) 4352 { 4353 d_ptr = new QtRectFPropertyManagerPrivate; 4298 : QtAbstractPropertyManager(parent), d_ptr(new QtRectFPropertyManagerPrivate) 4299 { 4354 4300 d_ptr->q_ptr = this; 4355 4301 4356 4302 d_ptr->m_doublePropertyManager = new QtDoublePropertyManager(this); 4357 connect(d_ptr->m_doublePropertyManager, SIGNAL(valueChanged(QtProperty *,double)),4358 this, SLOT(slotDoubleChanged(QtProperty *,double)));4359 connect(d_ptr->m_doublePropertyManager, SIGNAL(propertyDestroyed(QtProperty 4360 this, SLOT(slotPropertyDestroyed(QtProperty 4303 connect(d_ptr->m_doublePropertyManager, SIGNAL(valueChanged(QtProperty*,double)), 4304 this, SLOT(slotDoubleChanged(QtProperty*,double))); 4305 connect(d_ptr->m_doublePropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), 4306 this, SLOT(slotPropertyDestroyed(QtProperty*))); 4361 4307 } 4362 4308 … … 4367 4313 { 4368 4314 clear(); 4369 delete d_ptr;4370 4315 } 4371 4316 … … 4734 4679 */ 4735 4680 QtEnumPropertyManager::QtEnumPropertyManager(QObject *parent) 4736 : QtAbstractPropertyManager(parent) 4737 { 4738 d_ptr = new QtEnumPropertyManagerPrivate; 4681 : QtAbstractPropertyManager(parent), d_ptr(new QtEnumPropertyManagerPrivate) 4682 { 4739 4683 d_ptr->q_ptr = this; 4740 4684 } … … 4746 4690 { 4747 4691 clear(); 4748 delete d_ptr;4749 4692 } 4750 4693 … … 5046 4989 */ 5047 4990 QtFlagPropertyManager::QtFlagPropertyManager(QObject *parent) 5048 : QtAbstractPropertyManager(parent) 5049 { 5050 d_ptr = new QtFlagPropertyManagerPrivate; 4991 : QtAbstractPropertyManager(parent), d_ptr(new QtFlagPropertyManagerPrivate) 4992 { 5051 4993 d_ptr->q_ptr = this; 5052 4994 5053 4995 d_ptr->m_boolPropertyManager = new QtBoolPropertyManager(this); 5054 connect(d_ptr->m_boolPropertyManager, SIGNAL(valueChanged(QtProperty *,bool)),5055 this, SLOT(slotBoolChanged(QtProperty *,bool)));5056 connect(d_ptr->m_boolPropertyManager, SIGNAL(propertyDestroyed(QtProperty 5057 this, SLOT(slotPropertyDestroyed(QtProperty 4996 connect(d_ptr->m_boolPropertyManager, SIGNAL(valueChanged(QtProperty*,bool)), 4997 this, SLOT(slotBoolChanged(QtProperty*,bool))); 4998 connect(d_ptr->m_boolPropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), 4999 this, SLOT(slotPropertyDestroyed(QtProperty*))); 5058 5000 } 5059 5001 … … 5064 5006 { 5065 5007 clear(); 5066 delete d_ptr;5067 5008 } 5068 5009 … … 5374 5315 */ 5375 5316 QtSizePolicyPropertyManager::QtSizePolicyPropertyManager(QObject *parent) 5376 : QtAbstractPropertyManager(parent) 5377 { 5378 d_ptr = new QtSizePolicyPropertyManagerPrivate; 5317 : QtAbstractPropertyManager(parent), d_ptr(new QtSizePolicyPropertyManagerPrivate) 5318 { 5379 5319 d_ptr->q_ptr = this; 5380 5320 5381 5321 d_ptr->m_intPropertyManager = new QtIntPropertyManager(this); 5382 connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty *,int)),5383 this, SLOT(slotIntChanged(QtProperty *,int)));5322 connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), 5323 this, SLOT(slotIntChanged(QtProperty*,int))); 5384 5324 d_ptr->m_enumPropertyManager = new QtEnumPropertyManager(this); 5385 connect(d_ptr->m_enumPropertyManager, SIGNAL(valueChanged(QtProperty *,int)),5386 this, SLOT(slotEnumChanged(QtProperty *,int)));5387 5388 connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty 5389 this, SLOT(slotPropertyDestroyed(QtProperty 5390 connect(d_ptr->m_enumPropertyManager, SIGNAL(propertyDestroyed(QtProperty 5391 this, SLOT(slotPropertyDestroyed(QtProperty 5325 connect(d_ptr->m_enumPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), 5326 this, SLOT(slotEnumChanged(QtProperty*,int))); 5327 5328 connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), 5329 this, SLOT(slotPropertyDestroyed(QtProperty*))); 5330 connect(d_ptr->m_enumPropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), 5331 this, SLOT(slotPropertyDestroyed(QtProperty*))); 5392 5332 } 5393 5333 … … 5398 5338 { 5399 5339 clear(); 5400 delete d_ptr;5401 5340 } 5402 5341 … … 5786 5725 */ 5787 5726 QtFontPropertyManager::QtFontPropertyManager(QObject *parent) 5788 : QtAbstractPropertyManager(parent) 5789 { 5790 d_ptr = new QtFontPropertyManagerPrivate; 5727 : QtAbstractPropertyManager(parent), d_ptr(new QtFontPropertyManagerPrivate) 5728 { 5791 5729 d_ptr->q_ptr = this; 5792 #if QT_VERSION >= 0x0405005793 5730 QObject::connect(qApp, SIGNAL(fontDatabaseChanged()), this, SLOT(slotFontDatabaseChanged())); 5794 #endif5795 5731 5796 5732 d_ptr->m_intPropertyManager = new QtIntPropertyManager(this); 5797 connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty *,int)),5798 this, SLOT(slotIntChanged(QtProperty *,int)));5733 connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), 5734 this, SLOT(slotIntChanged(QtProperty*,int))); 5799 5735 d_ptr->m_enumPropertyManager = new QtEnumPropertyManager(this); 5800 connect(d_ptr->m_enumPropertyManager, SIGNAL(valueChanged(QtProperty *,int)),5801 this, SLOT(slotEnumChanged(QtProperty *,int)));5736 connect(d_ptr->m_enumPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), 5737 this, SLOT(slotEnumChanged(QtProperty*,int))); 5802 5738 d_ptr->m_boolPropertyManager = new QtBoolPropertyManager(this); 5803 connect(d_ptr->m_boolPropertyManager, SIGNAL(valueChanged(QtProperty *,bool)),5804 this, SLOT(slotBoolChanged(QtProperty *,bool)));5805 5806 connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty 5807 this, SLOT(slotPropertyDestroyed(QtProperty 5808 connect(d_ptr->m_enumPropertyManager, SIGNAL(propertyDestroyed(QtProperty 5809 this, SLOT(slotPropertyDestroyed(QtProperty 5810 connect(d_ptr->m_boolPropertyManager, SIGNAL(propertyDestroyed(QtProperty 5811 this, SLOT(slotPropertyDestroyed(QtProperty 5739 connect(d_ptr->m_boolPropertyManager, SIGNAL(valueChanged(QtProperty*,bool)), 5740 this, SLOT(slotBoolChanged(QtProperty*,bool))); 5741 5742 connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), 5743 this, SLOT(slotPropertyDestroyed(QtProperty*))); 5744 connect(d_ptr->m_enumPropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), 5745 this, SLOT(slotPropertyDestroyed(QtProperty*))); 5746 connect(d_ptr->m_boolPropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), 5747 this, SLOT(slotPropertyDestroyed(QtProperty*))); 5812 5748 } 5813 5749 … … 5818 5754 { 5819 5755 clear(); 5820 delete d_ptr;5821 5756 } 5822 5757 … … 6166 6101 */ 6167 6102 QtColorPropertyManager::QtColorPropertyManager(QObject *parent) 6168 : QtAbstractPropertyManager(parent) 6169 { 6170 d_ptr = new QtColorPropertyManagerPrivate; 6103 : QtAbstractPropertyManager(parent), d_ptr(new QtColorPropertyManagerPrivate) 6104 { 6171 6105 d_ptr->q_ptr = this; 6172 6106 6173 6107 d_ptr->m_intPropertyManager = new QtIntPropertyManager(this); 6174 connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty *,int)),6175 this, SLOT(slotIntChanged(QtProperty *,int)));6176 6177 connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty 6178 this, SLOT(slotPropertyDestroyed(QtProperty 6108 connect(d_ptr->m_intPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), 6109 this, SLOT(slotIntChanged(QtProperty*,int))); 6110 6111 connect(d_ptr->m_intPropertyManager, SIGNAL(propertyDestroyed(QtProperty*)), 6112 this, SLOT(slotPropertyDestroyed(QtProperty*))); 6179 6113 } 6180 6114 … … 6185 6119 { 6186 6120 clear(); 6187 delete d_ptr;6188 6121 } 6189 6122 … … 6390 6323 */ 6391 6324 QtCursorPropertyManager::QtCursorPropertyManager(QObject *parent) 6392 : QtAbstractPropertyManager(parent) 6393 { 6394 d_ptr = new QtCursorPropertyManagerPrivate; 6325 : QtAbstractPropertyManager(parent), d_ptr(new QtCursorPropertyManagerPrivate) 6326 { 6395 6327 d_ptr->q_ptr = this; 6396 6328 } … … 6402 6334 { 6403 6335 clear(); 6404 delete d_ptr;6405 6336 } 6406 6337 … … 6486 6417 } 6487 6418 6488 #if QT_VERSION >= 0x0404006489 6419 QT_END_NAMESPACE 6490 #endif6491 6420 6492 6421 #include "moc_qtpropertymanager.cpp"
Note:
See TracChangeset
for help on using the changeset viewer.