Changeset 561 for trunk/tools/shared/qtpropertybrowser
- Timestamp:
- Feb 11, 2010, 11:19:06 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 17 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/qtbuttonpropertybrowser.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 ** … … 49 49 #include <QtGui/QStyle> 50 50 51 #if QT_VERSION >= 0x04040052 51 QT_BEGIN_NAMESPACE 53 #endif54 52 55 53 class QtButtonPropertyBrowserPrivate … … 550 548 */ 551 549 QtButtonPropertyBrowser::QtButtonPropertyBrowser(QWidget *parent) 552 : QtAbstractPropertyBrowser(parent) 553 { 554 d_ptr = new QtButtonPropertyBrowserPrivate; 550 : QtAbstractPropertyBrowser(parent), d_ptr(new QtButtonPropertyBrowserPrivate) 551 { 555 552 d_ptr->q_ptr = this; 556 553 … … 573 570 for (QMap<QtButtonPropertyBrowserPrivate::WidgetItem *, QtBrowserItem *>::ConstIterator it = d_ptr->m_itemToIndex.constBegin(); it != icend; ++it) 574 571 delete it.key(); 575 delete d_ptr;576 572 } 577 573 … … 627 623 } 628 624 629 #if QT_VERSION >= 0x040400630 625 QT_END_NAMESPACE 631 #endif632 626 633 627 #include "moc_qtbuttonpropertybrowser.cpp" -
trunk/tools/shared/qtpropertybrowser/qtbuttonpropertybrowser.h
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 ** … … 45 45 #include "qtpropertybrowser.h" 46 46 47 #if QT_VERSION >= 0x04040048 47 QT_BEGIN_NAMESPACE 49 #endif50 48 51 49 class QtButtonPropertyBrowserPrivate; … … 74 72 private: 75 73 76 Q tButtonPropertyBrowserPrivate *d_ptr;74 QScopedPointer<QtButtonPropertyBrowserPrivate> d_ptr; 77 75 Q_DECLARE_PRIVATE(QtButtonPropertyBrowser) 78 76 Q_DISABLE_COPY(QtButtonPropertyBrowser) … … 83 81 }; 84 82 85 #if QT_VERSION >= 0x04040086 83 QT_END_NAMESPACE 87 #endif88 84 89 85 #endif -
trunk/tools/shared/qtpropertybrowser/qteditorfactory.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 ** … … 63 63 #endif 64 64 65 #if QT_VERSION >= 0x04040066 65 QT_BEGIN_NAMESPACE 67 #endif68 66 69 67 // Set a hard coded left margin to account for the indentation … … 230 228 */ 231 229 QtSpinBoxFactory::QtSpinBoxFactory(QObject *parent) 232 : QtAbstractEditorFactory<QtIntPropertyManager>(parent) 233 { 234 d_ptr = new QtSpinBoxFactoryPrivate(); 230 : QtAbstractEditorFactory<QtIntPropertyManager>(parent), d_ptr(new QtSpinBoxFactoryPrivate()) 231 { 235 232 d_ptr->q_ptr = this; 236 233 … … 243 240 { 244 241 qDeleteAll(d_ptr->m_editorToProperty.keys()); 245 delete d_ptr;246 242 } 247 243 … … 253 249 void QtSpinBoxFactory::connectPropertyManager(QtIntPropertyManager *manager) 254 250 { 255 connect(manager, SIGNAL(valueChanged(QtProperty *,int)),256 this, SLOT(slotPropertyChanged(QtProperty *,int)));257 connect(manager, SIGNAL(rangeChanged(QtProperty *, int,int)),258 this, SLOT(slotRangeChanged(QtProperty *, int,int)));259 connect(manager, SIGNAL(singleStepChanged(QtProperty *,int)),260 this, SLOT(slotSingleStepChanged(QtProperty *,int)));251 connect(manager, SIGNAL(valueChanged(QtProperty*,int)), 252 this, SLOT(slotPropertyChanged(QtProperty*,int))); 253 connect(manager, SIGNAL(rangeChanged(QtProperty*,int,int)), 254 this, SLOT(slotRangeChanged(QtProperty*,int,int))); 255 connect(manager, SIGNAL(singleStepChanged(QtProperty*,int)), 256 this, SLOT(slotSingleStepChanged(QtProperty*,int))); 261 257 } 262 258 … … 276 272 277 273 connect(editor, SIGNAL(valueChanged(int)), this, SLOT(slotSetValue(int))); 278 connect(editor, SIGNAL(destroyed(QObject 279 this, SLOT(slotEditorDestroyed(QObject 274 connect(editor, SIGNAL(destroyed(QObject*)), 275 this, SLOT(slotEditorDestroyed(QObject*))); 280 276 return editor; 281 277 } … … 288 284 void QtSpinBoxFactory::disconnectPropertyManager(QtIntPropertyManager *manager) 289 285 { 290 disconnect(manager, SIGNAL(valueChanged(QtProperty *,int)),291 this, SLOT(slotPropertyChanged(QtProperty *,int)));292 disconnect(manager, SIGNAL(rangeChanged(QtProperty *, int,int)),293 this, SLOT(slotRangeChanged(QtProperty *, int,int)));294 disconnect(manager, SIGNAL(singleStepChanged(QtProperty *,int)),295 this, SLOT(slotSingleStepChanged(QtProperty *,int)));286 disconnect(manager, SIGNAL(valueChanged(QtProperty*,int)), 287 this, SLOT(slotPropertyChanged(QtProperty*,int))); 288 disconnect(manager, SIGNAL(rangeChanged(QtProperty*,int,int)), 289 this, SLOT(slotRangeChanged(QtProperty*,int,int))); 290 disconnect(manager, SIGNAL(singleStepChanged(QtProperty*,int)), 291 this, SLOT(slotSingleStepChanged(QtProperty*,int))); 296 292 } 297 293 … … 386 382 */ 387 383 QtSliderFactory::QtSliderFactory(QObject *parent) 388 : QtAbstractEditorFactory<QtIntPropertyManager>(parent) 389 { 390 d_ptr = new QtSliderFactoryPrivate(); 384 : QtAbstractEditorFactory<QtIntPropertyManager>(parent), d_ptr(new QtSliderFactoryPrivate()) 385 { 391 386 d_ptr->q_ptr = this; 392 387 … … 399 394 { 400 395 qDeleteAll(d_ptr->m_editorToProperty.keys()); 401 delete d_ptr;402 396 } 403 397 … … 409 403 void QtSliderFactory::connectPropertyManager(QtIntPropertyManager *manager) 410 404 { 411 connect(manager, SIGNAL(valueChanged(QtProperty *,int)),412 this, SLOT(slotPropertyChanged(QtProperty *,int)));413 connect(manager, SIGNAL(rangeChanged(QtProperty *, int,int)),414 this, SLOT(slotRangeChanged(QtProperty *, int,int)));415 connect(manager, SIGNAL(singleStepChanged(QtProperty *,int)),416 this, SLOT(slotSingleStepChanged(QtProperty *,int)));405 connect(manager, SIGNAL(valueChanged(QtProperty*,int)), 406 this, SLOT(slotPropertyChanged(QtProperty*,int))); 407 connect(manager, SIGNAL(rangeChanged(QtProperty*,int,int)), 408 this, SLOT(slotRangeChanged(QtProperty*,int,int))); 409 connect(manager, SIGNAL(singleStepChanged(QtProperty*,int)), 410 this, SLOT(slotSingleStepChanged(QtProperty*,int))); 417 411 } 418 412 … … 432 426 433 427 connect(editor, SIGNAL(valueChanged(int)), this, SLOT(slotSetValue(int))); 434 connect(editor, SIGNAL(destroyed(QObject 435 this, SLOT(slotEditorDestroyed(QObject 428 connect(editor, SIGNAL(destroyed(QObject*)), 429 this, SLOT(slotEditorDestroyed(QObject*))); 436 430 return editor; 437 431 } … … 444 438 void QtSliderFactory::disconnectPropertyManager(QtIntPropertyManager *manager) 445 439 { 446 disconnect(manager, SIGNAL(valueChanged(QtProperty *,int)),447 this, SLOT(slotPropertyChanged(QtProperty *,int)));448 disconnect(manager, SIGNAL(rangeChanged(QtProperty *, int,int)),449 this, SLOT(slotRangeChanged(QtProperty *, int,int)));450 disconnect(manager, SIGNAL(singleStepChanged(QtProperty *,int)),451 this, SLOT(slotSingleStepChanged(QtProperty *,int)));440 disconnect(manager, SIGNAL(valueChanged(QtProperty*,int)), 441 this, SLOT(slotPropertyChanged(QtProperty*,int))); 442 disconnect(manager, SIGNAL(rangeChanged(QtProperty*,int,int)), 443 this, SLOT(slotRangeChanged(QtProperty*,int,int))); 444 disconnect(manager, SIGNAL(singleStepChanged(QtProperty*,int)), 445 this, SLOT(slotSingleStepChanged(QtProperty*,int))); 452 446 } 453 447 … … 542 536 */ 543 537 QtScrollBarFactory::QtScrollBarFactory(QObject *parent) 544 : QtAbstractEditorFactory<QtIntPropertyManager>(parent) 545 { 546 d_ptr = new QtScrollBarFactoryPrivate(); 538 : QtAbstractEditorFactory<QtIntPropertyManager>(parent), d_ptr(new QtScrollBarFactoryPrivate()) 539 { 547 540 d_ptr->q_ptr = this; 548 541 … … 555 548 { 556 549 qDeleteAll(d_ptr->m_editorToProperty.keys()); 557 delete d_ptr;558 550 } 559 551 … … 565 557 void QtScrollBarFactory::connectPropertyManager(QtIntPropertyManager *manager) 566 558 { 567 connect(manager, SIGNAL(valueChanged(QtProperty *,int)),568 this, SLOT(slotPropertyChanged(QtProperty *,int)));569 connect(manager, SIGNAL(rangeChanged(QtProperty *, int,int)),570 this, SLOT(slotRangeChanged(QtProperty *, int,int)));571 connect(manager, SIGNAL(singleStepChanged(QtProperty *,int)),572 this, SLOT(slotSingleStepChanged(QtProperty *,int)));559 connect(manager, SIGNAL(valueChanged(QtProperty*,int)), 560 this, SLOT(slotPropertyChanged(QtProperty*,int))); 561 connect(manager, SIGNAL(rangeChanged(QtProperty*,int,int)), 562 this, SLOT(slotRangeChanged(QtProperty*,int,int))); 563 connect(manager, SIGNAL(singleStepChanged(QtProperty*,int)), 564 this, SLOT(slotSingleStepChanged(QtProperty*,int))); 573 565 } 574 566 … … 587 579 editor->setValue(manager->value(property)); 588 580 connect(editor, SIGNAL(valueChanged(int)), this, SLOT(slotSetValue(int))); 589 connect(editor, SIGNAL(destroyed(QObject 590 this, SLOT(slotEditorDestroyed(QObject 581 connect(editor, SIGNAL(destroyed(QObject*)), 582 this, SLOT(slotEditorDestroyed(QObject*))); 591 583 return editor; 592 584 } … … 599 591 void QtScrollBarFactory::disconnectPropertyManager(QtIntPropertyManager *manager) 600 592 { 601 disconnect(manager, SIGNAL(valueChanged(QtProperty *,int)),602 this, SLOT(slotPropertyChanged(QtProperty *,int)));603 disconnect(manager, SIGNAL(rangeChanged(QtProperty *, int,int)),604 this, SLOT(slotRangeChanged(QtProperty *, int,int)));605 disconnect(manager, SIGNAL(singleStepChanged(QtProperty *,int)),606 this, SLOT(slotSingleStepChanged(QtProperty *,int)));593 disconnect(manager, SIGNAL(valueChanged(QtProperty*,int)), 594 this, SLOT(slotPropertyChanged(QtProperty*,int))); 595 disconnect(manager, SIGNAL(rangeChanged(QtProperty*,int,int)), 596 this, SLOT(slotRangeChanged(QtProperty*,int,int))); 597 disconnect(manager, SIGNAL(singleStepChanged(QtProperty*,int)), 598 this, SLOT(slotSingleStepChanged(QtProperty*,int))); 607 599 } 608 600 … … 664 656 */ 665 657 QtCheckBoxFactory::QtCheckBoxFactory(QObject *parent) 666 : QtAbstractEditorFactory<QtBoolPropertyManager>(parent) 667 { 668 d_ptr = new QtCheckBoxFactoryPrivate(); 658 : QtAbstractEditorFactory<QtBoolPropertyManager>(parent), d_ptr(new QtCheckBoxFactoryPrivate()) 659 { 669 660 d_ptr->q_ptr = this; 670 661 … … 677 668 { 678 669 qDeleteAll(d_ptr->m_editorToProperty.keys()); 679 delete d_ptr;680 670 } 681 671 … … 687 677 void QtCheckBoxFactory::connectPropertyManager(QtBoolPropertyManager *manager) 688 678 { 689 connect(manager, SIGNAL(valueChanged(QtProperty *,bool)),690 this, SLOT(slotPropertyChanged(QtProperty *,bool)));679 connect(manager, SIGNAL(valueChanged(QtProperty*,bool)), 680 this, SLOT(slotPropertyChanged(QtProperty*,bool))); 691 681 } 692 682 … … 703 693 704 694 connect(editor, SIGNAL(toggled(bool)), this, SLOT(slotSetValue(bool))); 705 connect(editor, SIGNAL(destroyed(QObject 706 this, SLOT(slotEditorDestroyed(QObject 695 connect(editor, SIGNAL(destroyed(QObject*)), 696 this, SLOT(slotEditorDestroyed(QObject*))); 707 697 return editor; 708 698 } … … 715 705 void QtCheckBoxFactory::disconnectPropertyManager(QtBoolPropertyManager *manager) 716 706 { 717 disconnect(manager, SIGNAL(valueChanged(QtProperty *,bool)),718 this, SLOT(slotPropertyChanged(QtProperty *,bool)));707 disconnect(manager, SIGNAL(valueChanged(QtProperty*,bool)), 708 this, SLOT(slotPropertyChanged(QtProperty*,bool))); 719 709 } 720 710 … … 839 829 */ 840 830 QtDoubleSpinBoxFactory::QtDoubleSpinBoxFactory(QObject *parent) 841 : QtAbstractEditorFactory<QtDoublePropertyManager>(parent) 842 { 843 d_ptr = new QtDoubleSpinBoxFactoryPrivate(); 831 : QtAbstractEditorFactory<QtDoublePropertyManager>(parent), d_ptr(new QtDoubleSpinBoxFactoryPrivate()) 832 { 844 833 d_ptr->q_ptr = this; 845 834 … … 852 841 { 853 842 qDeleteAll(d_ptr->m_editorToProperty.keys()); 854 delete d_ptr;855 843 } 856 844 … … 862 850 void QtDoubleSpinBoxFactory::connectPropertyManager(QtDoublePropertyManager *manager) 863 851 { 864 connect(manager, SIGNAL(valueChanged(QtProperty *,double)),865 this, SLOT(slotPropertyChanged(QtProperty *,double)));866 connect(manager, SIGNAL(rangeChanged(QtProperty *, double,double)),867 this, SLOT(slotRangeChanged(QtProperty *, double,double)));868 connect(manager, SIGNAL(singleStepChanged(QtProperty *,double)),869 this, SLOT(slotSingleStepChanged(QtProperty *,double)));870 connect(manager, SIGNAL(decimalsChanged(QtProperty *,int)),871 this, SLOT(slotDecimalsChanged(QtProperty *,int)));852 connect(manager, SIGNAL(valueChanged(QtProperty*,double)), 853 this, SLOT(slotPropertyChanged(QtProperty*,double))); 854 connect(manager, SIGNAL(rangeChanged(QtProperty*,double,double)), 855 this, SLOT(slotRangeChanged(QtProperty*,double,double))); 856 connect(manager, SIGNAL(singleStepChanged(QtProperty*,double)), 857 this, SLOT(slotSingleStepChanged(QtProperty*,double))); 858 connect(manager, SIGNAL(decimalsChanged(QtProperty*,int)), 859 this, SLOT(slotDecimalsChanged(QtProperty*,int))); 872 860 } 873 861 … … 888 876 889 877 connect(editor, SIGNAL(valueChanged(double)), this, SLOT(slotSetValue(double))); 890 connect(editor, SIGNAL(destroyed(QObject 891 this, SLOT(slotEditorDestroyed(QObject 878 connect(editor, SIGNAL(destroyed(QObject*)), 879 this, SLOT(slotEditorDestroyed(QObject*))); 892 880 return editor; 893 881 } … … 900 888 void QtDoubleSpinBoxFactory::disconnectPropertyManager(QtDoublePropertyManager *manager) 901 889 { 902 disconnect(manager, SIGNAL(valueChanged(QtProperty *,double)),903 this, SLOT(slotPropertyChanged(QtProperty *,double)));904 disconnect(manager, SIGNAL(rangeChanged(QtProperty *, double,double)),905 this, SLOT(slotRangeChanged(QtProperty *, double,double)));906 disconnect(manager, SIGNAL(singleStepChanged(QtProperty *,double)),907 this, SLOT(slotSingleStepChanged(QtProperty *,double)));908 disconnect(manager, SIGNAL(decimalsChanged(QtProperty *,int)),909 this, SLOT(slotDecimalsChanged(QtProperty *,int)));890 disconnect(manager, SIGNAL(valueChanged(QtProperty*,double)), 891 this, SLOT(slotPropertyChanged(QtProperty*,double))); 892 disconnect(manager, SIGNAL(rangeChanged(QtProperty*,double,double)), 893 this, SLOT(slotRangeChanged(QtProperty*,double,double))); 894 disconnect(manager, SIGNAL(singleStepChanged(QtProperty*,double)), 895 this, SLOT(slotSingleStepChanged(QtProperty*,double))); 896 disconnect(manager, SIGNAL(decimalsChanged(QtProperty*,int)), 897 this, SLOT(slotDecimalsChanged(QtProperty*,int))); 910 898 } 911 899 … … 994 982 */ 995 983 QtLineEditFactory::QtLineEditFactory(QObject *parent) 996 : QtAbstractEditorFactory<QtStringPropertyManager>(parent) 997 { 998 d_ptr = new QtLineEditFactoryPrivate(); 984 : QtAbstractEditorFactory<QtStringPropertyManager>(parent), d_ptr(new QtLineEditFactoryPrivate()) 985 { 999 986 d_ptr->q_ptr = this; 1000 987 … … 1007 994 { 1008 995 qDeleteAll(d_ptr->m_editorToProperty.keys()); 1009 delete d_ptr;1010 996 } 1011 997 … … 1017 1003 void QtLineEditFactory::connectPropertyManager(QtStringPropertyManager *manager) 1018 1004 { 1019 connect(manager, SIGNAL(valueChanged(QtProperty *, const QString &)),1020 this, SLOT(slotPropertyChanged(QtProperty *, const QString &)));1021 connect(manager, SIGNAL(regExpChanged(QtProperty *, const QRegExp &)),1022 this, SLOT(slotRegExpChanged(QtProperty *, const QRegExp &)));1005 connect(manager, SIGNAL(valueChanged(QtProperty*,QString)), 1006 this, SLOT(slotPropertyChanged(QtProperty*,QString))); 1007 connect(manager, SIGNAL(regExpChanged(QtProperty*,QRegExp)), 1008 this, SLOT(slotRegExpChanged(QtProperty*,QRegExp))); 1023 1009 } 1024 1010 … … 1040 1026 editor->setText(manager->value(property)); 1041 1027 1042 connect(editor, SIGNAL(textEdited( const QString &)),1043 this, SLOT(slotSetValue( const QString &)));1044 connect(editor, SIGNAL(destroyed(QObject 1045 this, SLOT(slotEditorDestroyed(QObject 1028 connect(editor, SIGNAL(textEdited(QString)), 1029 this, SLOT(slotSetValue(QString))); 1030 connect(editor, SIGNAL(destroyed(QObject*)), 1031 this, SLOT(slotEditorDestroyed(QObject*))); 1046 1032 return editor; 1047 1033 } … … 1054 1040 void QtLineEditFactory::disconnectPropertyManager(QtStringPropertyManager *manager) 1055 1041 { 1056 disconnect(manager, SIGNAL(valueChanged(QtProperty *, const QString &)),1057 this, SLOT(slotPropertyChanged(QtProperty *, const QString &)));1058 disconnect(manager, SIGNAL(regExpChanged(QtProperty *, const QRegExp &)),1059 this, SLOT(slotRegExpChanged(QtProperty *, const QRegExp &)));1042 disconnect(manager, SIGNAL(valueChanged(QtProperty*,QString)), 1043 this, SLOT(slotPropertyChanged(QtProperty*,QString))); 1044 disconnect(manager, SIGNAL(regExpChanged(QtProperty*,QRegExp)), 1045 this, SLOT(slotRegExpChanged(QtProperty*,QRegExp))); 1060 1046 } 1061 1047 … … 1137 1123 */ 1138 1124 QtDateEditFactory::QtDateEditFactory(QObject *parent) 1139 : QtAbstractEditorFactory<QtDatePropertyManager>(parent) 1140 { 1141 d_ptr = new QtDateEditFactoryPrivate(); 1125 : QtAbstractEditorFactory<QtDatePropertyManager>(parent), d_ptr(new QtDateEditFactoryPrivate()) 1126 { 1142 1127 d_ptr->q_ptr = this; 1143 1128 … … 1150 1135 { 1151 1136 qDeleteAll(d_ptr->m_editorToProperty.keys()); 1152 delete d_ptr;1153 1137 } 1154 1138 … … 1160 1144 void QtDateEditFactory::connectPropertyManager(QtDatePropertyManager *manager) 1161 1145 { 1162 connect(manager, SIGNAL(valueChanged(QtProperty *, const QDate &)),1163 this, SLOT(slotPropertyChanged(QtProperty *, const QDate &)));1164 connect(manager, SIGNAL(rangeChanged(QtProperty *, const QDate &, const QDate &)),1165 this, SLOT(slotRangeChanged(QtProperty *, const QDate &, const QDate &)));1146 connect(manager, SIGNAL(valueChanged(QtProperty*,QDate)), 1147 this, SLOT(slotPropertyChanged(QtProperty*,QDate))); 1148 connect(manager, SIGNAL(rangeChanged(QtProperty*,QDate,QDate)), 1149 this, SLOT(slotRangeChanged(QtProperty*,QDate,QDate))); 1166 1150 } 1167 1151 … … 1179 1163 editor->setDate(manager->value(property)); 1180 1164 1181 connect(editor, SIGNAL(dateChanged( const QDate &)),1182 this, SLOT(slotSetValue( const QDate &)));1183 connect(editor, SIGNAL(destroyed(QObject 1184 this, SLOT(slotEditorDestroyed(QObject 1165 connect(editor, SIGNAL(dateChanged(QDate)), 1166 this, SLOT(slotSetValue(QDate))); 1167 connect(editor, SIGNAL(destroyed(QObject*)), 1168 this, SLOT(slotEditorDestroyed(QObject*))); 1185 1169 return editor; 1186 1170 } … … 1193 1177 void QtDateEditFactory::disconnectPropertyManager(QtDatePropertyManager *manager) 1194 1178 { 1195 disconnect(manager, SIGNAL(valueChanged(QtProperty *, const QDate &)),1196 this, SLOT(slotPropertyChanged(QtProperty *, const QDate &)));1197 disconnect(manager, SIGNAL(rangeChanged(QtProperty *, const QDate &, const QDate &)),1198 this, SLOT(slotRangeChanged(QtProperty *, const QDate &, const QDate &)));1179 disconnect(manager, SIGNAL(valueChanged(QtProperty*,QDate)), 1180 this, SLOT(slotPropertyChanged(QtProperty*,QDate))); 1181 disconnect(manager, SIGNAL(rangeChanged(QtProperty*,QDate,QDate)), 1182 this, SLOT(slotRangeChanged(QtProperty*,QDate,QDate))); 1199 1183 } 1200 1184 … … 1255 1239 */ 1256 1240 QtTimeEditFactory::QtTimeEditFactory(QObject *parent) 1257 : QtAbstractEditorFactory<QtTimePropertyManager>(parent) 1258 { 1259 d_ptr = new QtTimeEditFactoryPrivate(); 1241 : QtAbstractEditorFactory<QtTimePropertyManager>(parent), d_ptr(new QtTimeEditFactoryPrivate()) 1242 { 1260 1243 d_ptr->q_ptr = this; 1261 1244 … … 1268 1251 { 1269 1252 qDeleteAll(d_ptr->m_editorToProperty.keys()); 1270 delete d_ptr;1271 1253 } 1272 1254 … … 1278 1260 void QtTimeEditFactory::connectPropertyManager(QtTimePropertyManager *manager) 1279 1261 { 1280 connect(manager, SIGNAL(valueChanged(QtProperty *, const QTime &)),1281 this, SLOT(slotPropertyChanged(QtProperty *, const QTime &)));1262 connect(manager, SIGNAL(valueChanged(QtProperty*,QTime)), 1263 this, SLOT(slotPropertyChanged(QtProperty*,QTime))); 1282 1264 } 1283 1265 … … 1293 1275 editor->setTime(manager->value(property)); 1294 1276 1295 connect(editor, SIGNAL(timeChanged( const QTime &)),1296 this, SLOT(slotSetValue( const QTime &)));1297 connect(editor, SIGNAL(destroyed(QObject 1298 this, SLOT(slotEditorDestroyed(QObject 1277 connect(editor, SIGNAL(timeChanged(QTime)), 1278 this, SLOT(slotSetValue(QTime))); 1279 connect(editor, SIGNAL(destroyed(QObject*)), 1280 this, SLOT(slotEditorDestroyed(QObject*))); 1299 1281 return editor; 1300 1282 } … … 1307 1289 void QtTimeEditFactory::disconnectPropertyManager(QtTimePropertyManager *manager) 1308 1290 { 1309 disconnect(manager, SIGNAL(valueChanged(QtProperty *, const QTime &)),1310 this, SLOT(slotPropertyChanged(QtProperty *, const QTime &)));1291 disconnect(manager, SIGNAL(valueChanged(QtProperty*,QTime)), 1292 this, SLOT(slotPropertyChanged(QtProperty*,QTime))); 1311 1293 } 1312 1294 … … 1370 1352 */ 1371 1353 QtDateTimeEditFactory::QtDateTimeEditFactory(QObject *parent) 1372 : QtAbstractEditorFactory<QtDateTimePropertyManager>(parent) 1373 { 1374 d_ptr = new QtDateTimeEditFactoryPrivate(); 1354 : QtAbstractEditorFactory<QtDateTimePropertyManager>(parent), d_ptr(new QtDateTimeEditFactoryPrivate()) 1355 { 1375 1356 d_ptr->q_ptr = this; 1376 1357 … … 1383 1364 { 1384 1365 qDeleteAll(d_ptr->m_editorToProperty.keys()); 1385 delete d_ptr;1386 1366 } 1387 1367 … … 1393 1373 void QtDateTimeEditFactory::connectPropertyManager(QtDateTimePropertyManager *manager) 1394 1374 { 1395 connect(manager, SIGNAL(valueChanged(QtProperty *, const QDateTime &)),1396 this, SLOT(slotPropertyChanged(QtProperty *, const QDateTime &)));1375 connect(manager, SIGNAL(valueChanged(QtProperty*,QDateTime)), 1376 this, SLOT(slotPropertyChanged(QtProperty*,QDateTime))); 1397 1377 } 1398 1378 … … 1408 1388 editor->setDateTime(manager->value(property)); 1409 1389 1410 connect(editor, SIGNAL(dateTimeChanged( const QDateTime &)),1411 this, SLOT(slotSetValue( const QDateTime &)));1412 connect(editor, SIGNAL(destroyed(QObject 1413 this, SLOT(slotEditorDestroyed(QObject 1390 connect(editor, SIGNAL(dateTimeChanged(QDateTime)), 1391 this, SLOT(slotSetValue(QDateTime))); 1392 connect(editor, SIGNAL(destroyed(QObject*)), 1393 this, SLOT(slotEditorDestroyed(QObject*))); 1414 1394 return editor; 1415 1395 } … … 1422 1402 void QtDateTimeEditFactory::disconnectPropertyManager(QtDateTimePropertyManager *manager) 1423 1403 { 1424 disconnect(manager, SIGNAL(valueChanged(QtProperty *, const QDateTime &)),1425 this, SLOT(slotPropertyChanged(QtProperty *, const QDateTime &)));1404 disconnect(manager, SIGNAL(valueChanged(QtProperty*,QDateTime)), 1405 this, SLOT(slotPropertyChanged(QtProperty*,QDateTime))); 1426 1406 } 1427 1407 … … 1484 1464 */ 1485 1465 QtKeySequenceEditorFactory::QtKeySequenceEditorFactory(QObject *parent) 1486 : QtAbstractEditorFactory<QtKeySequencePropertyManager>(parent) 1487 { 1488 d_ptr = new QtKeySequenceEditorFactoryPrivate(); 1466 : QtAbstractEditorFactory<QtKeySequencePropertyManager>(parent), d_ptr(new QtKeySequenceEditorFactoryPrivate()) 1467 { 1489 1468 d_ptr->q_ptr = this; 1490 1469 … … 1497 1476 { 1498 1477 qDeleteAll(d_ptr->m_editorToProperty.keys()); 1499 delete d_ptr;1500 1478 } 1501 1479 … … 1507 1485 void QtKeySequenceEditorFactory::connectPropertyManager(QtKeySequencePropertyManager *manager) 1508 1486 { 1509 connect(manager, SIGNAL(valueChanged(QtProperty *, const QKeySequence &)),1510 this, SLOT(slotPropertyChanged(QtProperty *, const QKeySequence &)));1487 connect(manager, SIGNAL(valueChanged(QtProperty*,QKeySequence)), 1488 this, SLOT(slotPropertyChanged(QtProperty*,QKeySequence))); 1511 1489 } 1512 1490 … … 1522 1500 editor->setKeySequence(manager->value(property)); 1523 1501 1524 connect(editor, SIGNAL(keySequenceChanged( const QKeySequence &)),1525 this, SLOT(slotSetValue( const QKeySequence &)));1526 connect(editor, SIGNAL(destroyed(QObject 1527 this, SLOT(slotEditorDestroyed(QObject 1502 connect(editor, SIGNAL(keySequenceChanged(QKeySequence)), 1503 this, SLOT(slotSetValue(QKeySequence))); 1504 connect(editor, SIGNAL(destroyed(QObject*)), 1505 this, SLOT(slotEditorDestroyed(QObject*))); 1528 1506 return editor; 1529 1507 } … … 1536 1514 void QtKeySequenceEditorFactory::disconnectPropertyManager(QtKeySequencePropertyManager *manager) 1537 1515 { 1538 disconnect(manager, SIGNAL(valueChanged(QtProperty *, const QKeySequence &)),1539 this, SLOT(slotPropertyChanged(QtProperty *, const QKeySequence &)));1516 disconnect(manager, SIGNAL(valueChanged(QtProperty*,QKeySequence)), 1517 this, SLOT(slotPropertyChanged(QtProperty*,QKeySequence))); 1540 1518 } 1541 1519 … … 1768 1746 */ 1769 1747 QtCharEditorFactory::QtCharEditorFactory(QObject *parent) 1770 : QtAbstractEditorFactory<QtCharPropertyManager>(parent) 1771 { 1772 d_ptr = new QtCharEditorFactoryPrivate(); 1748 : QtAbstractEditorFactory<QtCharPropertyManager>(parent), d_ptr(new QtCharEditorFactoryPrivate()) 1749 { 1773 1750 d_ptr->q_ptr = this; 1774 1751 … … 1781 1758 { 1782 1759 qDeleteAll(d_ptr->m_editorToProperty.keys()); 1783 delete d_ptr;1784 1760 } 1785 1761 … … 1791 1767 void QtCharEditorFactory::connectPropertyManager(QtCharPropertyManager *manager) 1792 1768 { 1793 connect(manager, SIGNAL(valueChanged(QtProperty *, const QChar &)),1794 this, SLOT(slotPropertyChanged(QtProperty *, const QChar &)));1769 connect(manager, SIGNAL(valueChanged(QtProperty*,QChar)), 1770 this, SLOT(slotPropertyChanged(QtProperty*,QChar))); 1795 1771 } 1796 1772 … … 1806 1782 editor->setValue(manager->value(property)); 1807 1783 1808 connect(editor, SIGNAL(valueChanged( const QChar &)),1809 this, SLOT(slotSetValue( const QChar &)));1810 connect(editor, SIGNAL(destroyed(QObject 1811 this, SLOT(slotEditorDestroyed(QObject 1784 connect(editor, SIGNAL(valueChanged(QChar)), 1785 this, SLOT(slotSetValue(QChar))); 1786 connect(editor, SIGNAL(destroyed(QObject*)), 1787 this, SLOT(slotEditorDestroyed(QObject*))); 1812 1788 return editor; 1813 1789 } … … 1820 1796 void QtCharEditorFactory::disconnectPropertyManager(QtCharPropertyManager *manager) 1821 1797 { 1822 disconnect(manager, SIGNAL(valueChanged(QtProperty *, const QChar &)),1823 this, SLOT(slotPropertyChanged(QtProperty *, const QChar &)));1798 disconnect(manager, SIGNAL(valueChanged(QtProperty*,QChar)), 1799 this, SLOT(slotPropertyChanged(QtProperty*,QChar))); 1824 1800 } 1825 1801 … … 1932 1908 */ 1933 1909 QtEnumEditorFactory::QtEnumEditorFactory(QObject *parent) 1934 : QtAbstractEditorFactory<QtEnumPropertyManager>(parent) 1935 { 1936 d_ptr = new QtEnumEditorFactoryPrivate(); 1910 : QtAbstractEditorFactory<QtEnumPropertyManager>(parent), d_ptr(new QtEnumEditorFactoryPrivate()) 1911 { 1937 1912 d_ptr->q_ptr = this; 1938 1913 … … 1945 1920 { 1946 1921 qDeleteAll(d_ptr->m_editorToProperty.keys()); 1947 delete d_ptr;1948 1922 } 1949 1923 … … 1955 1929 void QtEnumEditorFactory::connectPropertyManager(QtEnumPropertyManager *manager) 1956 1930 { 1957 connect(manager, SIGNAL(valueChanged(QtProperty *,int)),1958 this, SLOT(slotPropertyChanged(QtProperty *,int)));1959 connect(manager, SIGNAL(enumNamesChanged(QtProperty *, const QStringList &)),1960 this, SLOT(slotEnumNamesChanged(QtProperty *, const QStringList &)));1931 connect(manager, SIGNAL(valueChanged(QtProperty*,int)), 1932 this, SLOT(slotPropertyChanged(QtProperty*,int))); 1933 connect(manager, SIGNAL(enumNamesChanged(QtProperty*,QStringList)), 1934 this, SLOT(slotEnumNamesChanged(QtProperty*,QStringList))); 1961 1935 } 1962 1936 … … 1981 1955 1982 1956 connect(editor, SIGNAL(currentIndexChanged(int)), this, SLOT(slotSetValue(int))); 1983 connect(editor, SIGNAL(destroyed(QObject 1984 this, SLOT(slotEditorDestroyed(QObject 1957 connect(editor, SIGNAL(destroyed(QObject*)), 1958 this, SLOT(slotEditorDestroyed(QObject*))); 1985 1959 return editor; 1986 1960 } … … 1993 1967 void QtEnumEditorFactory::disconnectPropertyManager(QtEnumPropertyManager *manager) 1994 1968 { 1995 disconnect(manager, SIGNAL(valueChanged(QtProperty *,int)),1996 this, SLOT(slotPropertyChanged(QtProperty *,int)));1997 disconnect(manager, SIGNAL(enumNamesChanged(QtProperty *, const QStringList &)),1998 this, SLOT(slotEnumNamesChanged(QtProperty *, const QStringList &)));1969 disconnect(manager, SIGNAL(valueChanged(QtProperty*,int)), 1970 this, SLOT(slotPropertyChanged(QtProperty*,int))); 1971 disconnect(manager, SIGNAL(enumNamesChanged(QtProperty*,QStringList)), 1972 this, SLOT(slotEnumNamesChanged(QtProperty*,QStringList))); 1999 1973 } 2000 1974 … … 2097 2071 */ 2098 2072 QtCursorEditorFactory::QtCursorEditorFactory(QObject *parent) 2099 : QtAbstractEditorFactory<QtCursorPropertyManager>(parent) 2100 { 2101 d_ptr = new QtCursorEditorFactoryPrivate(); 2073 : QtAbstractEditorFactory<QtCursorPropertyManager>(parent), d_ptr(new QtCursorEditorFactoryPrivate()) 2074 { 2102 2075 d_ptr->q_ptr = this; 2103 2076 2104 2077 d_ptr->m_enumEditorFactory = new QtEnumEditorFactory(this); 2105 2078 d_ptr->m_enumPropertyManager = new QtEnumPropertyManager(this); 2106 connect(d_ptr->m_enumPropertyManager, SIGNAL(valueChanged(QtProperty *,int)),2107 this, SLOT(slotEnumChanged(QtProperty *,int)));2079 connect(d_ptr->m_enumPropertyManager, SIGNAL(valueChanged(QtProperty*,int)), 2080 this, SLOT(slotEnumChanged(QtProperty*,int))); 2108 2081 d_ptr->m_enumEditorFactory->addPropertyManager(d_ptr->m_enumPropertyManager); 2109 2082 } … … 2114 2087 QtCursorEditorFactory::~QtCursorEditorFactory() 2115 2088 { 2116 delete d_ptr;2117 2089 } 2118 2090 … … 2124 2096 void QtCursorEditorFactory::connectPropertyManager(QtCursorPropertyManager *manager) 2125 2097 { 2126 connect(manager, SIGNAL(valueChanged(QtProperty *, const QCursor &)),2127 this, SLOT(slotPropertyChanged(QtProperty *, const QCursor &)));2098 connect(manager, SIGNAL(valueChanged(QtProperty*,QCursor)), 2099 this, SLOT(slotPropertyChanged(QtProperty*,QCursor))); 2128 2100 } 2129 2101 … … 2153 2125 d_ptr->m_enumToEditors[enumProp].append(editor); 2154 2126 d_ptr->m_editorToEnum[editor] = enumProp; 2155 connect(editor, SIGNAL(destroyed(QObject 2156 this, SLOT(slotEditorDestroyed(QObject 2127 connect(editor, SIGNAL(destroyed(QObject*)), 2128 this, SLOT(slotEditorDestroyed(QObject*))); 2157 2129 return editor; 2158 2130 } … … 2165 2137 void QtCursorEditorFactory::disconnectPropertyManager(QtCursorPropertyManager *manager) 2166 2138 { 2167 disconnect(manager, SIGNAL(valueChanged(QtProperty *, const QCursor &)),2168 this, SLOT(slotPropertyChanged(QtProperty *, const QCursor &)));2139 disconnect(manager, SIGNAL(valueChanged(QtProperty*,QCursor)), 2140 this, SLOT(slotPropertyChanged(QtProperty*,QCursor))); 2169 2141 } 2170 2142 … … 2231 2203 void QtColorEditWidget::buttonClicked() 2232 2204 { 2233 bool ok = false; 2234 QRgb oldRgba = m_color.rgba(); 2235 QRgb newRgba = QColorDialog::getRgba(oldRgba, &ok, this); 2236 if (ok && newRgba != oldRgba) { 2237 setValue(QColor::fromRgba(newRgba)); 2205 const QColor newColor = QColorDialog::getColor(m_color, this, QString(), QColorDialog::ShowAlphaChannel); 2206 if (newColor.isValid() && newColor != m_color) { 2207 setValue(newColor); 2238 2208 emit valueChanged(m_color); 2239 2209 } … … 2331 2301 { 2332 2302 qDeleteAll(d_ptr->m_editorToProperty.keys()); 2333 delete d_ptr;2334 2303 } 2335 2304 … … 2356 2325 editor->setValue(manager->value(property)); 2357 2326 connect(editor, SIGNAL(valueChanged(QColor)), this, SLOT(slotSetValue(QColor))); 2358 connect(editor, SIGNAL(destroyed(QObject *)), this, SLOT(slotEditorDestroyed(QObject*)));2327 connect(editor, SIGNAL(destroyed(QObject*)), this, SLOT(slotEditorDestroyed(QObject*))); 2359 2328 return editor; 2360 2329 } … … 2545 2514 { 2546 2515 qDeleteAll(d_ptr->m_editorToProperty.keys()); 2547 delete d_ptr;2548 2516 } 2549 2517 … … 2570 2538 editor->setValue(manager->value(property)); 2571 2539 connect(editor, SIGNAL(valueChanged(QFont)), this, SLOT(slotSetValue(QFont))); 2572 connect(editor, SIGNAL(destroyed(QObject *)), this, SLOT(slotEditorDestroyed(QObject*)));2540 connect(editor, SIGNAL(destroyed(QObject*)), this, SLOT(slotEditorDestroyed(QObject*))); 2573 2541 return editor; 2574 2542 } … … 2584 2552 } 2585 2553 2586 #if QT_VERSION >= 0x0404002587 2554 QT_END_NAMESPACE 2588 #endif2589 2555 2590 2556 #include "moc_qteditorfactory.cpp" -
trunk/tools/shared/qtpropertybrowser/qteditorfactory.h
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 ** … … 45 45 #include "qtpropertymanager.h" 46 46 47 #if QT_VERSION >= 0x04040048 47 QT_BEGIN_NAMESPACE 49 #endif50 48 51 49 class QtSpinBoxFactoryPrivate; … … 63 61 void disconnectPropertyManager(QtIntPropertyManager *manager); 64 62 private: 65 Q tSpinBoxFactoryPrivate *d_ptr;63 QScopedPointer<QtSpinBoxFactoryPrivate> d_ptr; 66 64 Q_DECLARE_PRIVATE(QtSpinBoxFactory) 67 65 Q_DISABLE_COPY(QtSpinBoxFactory) … … 87 85 void disconnectPropertyManager(QtIntPropertyManager *manager); 88 86 private: 89 Q tSliderFactoryPrivate *d_ptr;87 QScopedPointer<QtSliderFactoryPrivate> d_ptr; 90 88 Q_DECLARE_PRIVATE(QtSliderFactory) 91 89 Q_DISABLE_COPY(QtSliderFactory) … … 111 109 void disconnectPropertyManager(QtIntPropertyManager *manager); 112 110 private: 113 Q tScrollBarFactoryPrivate *d_ptr;111 QScopedPointer<QtScrollBarFactoryPrivate> d_ptr; 114 112 Q_DECLARE_PRIVATE(QtScrollBarFactory) 115 113 Q_DISABLE_COPY(QtScrollBarFactory) … … 135 133 void disconnectPropertyManager(QtBoolPropertyManager *manager); 136 134 private: 137 Q tCheckBoxFactoryPrivate *d_ptr;135 QScopedPointer<QtCheckBoxFactoryPrivate> d_ptr; 138 136 Q_DECLARE_PRIVATE(QtCheckBoxFactory) 139 137 Q_DISABLE_COPY(QtCheckBoxFactory) … … 157 155 void disconnectPropertyManager(QtDoublePropertyManager *manager); 158 156 private: 159 Q tDoubleSpinBoxFactoryPrivate *d_ptr;157 QScopedPointer<QtDoubleSpinBoxFactoryPrivate> d_ptr; 160 158 Q_DECLARE_PRIVATE(QtDoubleSpinBoxFactory) 161 159 Q_DISABLE_COPY(QtDoubleSpinBoxFactory) … … 182 180 void disconnectPropertyManager(QtStringPropertyManager *manager); 183 181 private: 184 Q tLineEditFactoryPrivate *d_ptr;182 QScopedPointer<QtLineEditFactoryPrivate> d_ptr; 185 183 Q_DECLARE_PRIVATE(QtLineEditFactory) 186 184 Q_DISABLE_COPY(QtLineEditFactory) … … 205 203 void disconnectPropertyManager(QtDatePropertyManager *manager); 206 204 private: 207 Q tDateEditFactoryPrivate *d_ptr;205 QScopedPointer<QtDateEditFactoryPrivate> d_ptr; 208 206 Q_DECLARE_PRIVATE(QtDateEditFactory) 209 207 Q_DISABLE_COPY(QtDateEditFactory) … … 229 227 void disconnectPropertyManager(QtTimePropertyManager *manager); 230 228 private: 231 Q tTimeEditFactoryPrivate *d_ptr;229 QScopedPointer<QtTimeEditFactoryPrivate> d_ptr; 232 230 Q_DECLARE_PRIVATE(QtTimeEditFactory) 233 231 Q_DISABLE_COPY(QtTimeEditFactory) … … 251 249 void disconnectPropertyManager(QtDateTimePropertyManager *manager); 252 250 private: 253 Q tDateTimeEditFactoryPrivate *d_ptr;251 QScopedPointer<QtDateTimeEditFactoryPrivate> d_ptr; 254 252 Q_DECLARE_PRIVATE(QtDateTimeEditFactory) 255 253 Q_DISABLE_COPY(QtDateTimeEditFactory) … … 273 271 void disconnectPropertyManager(QtKeySequencePropertyManager *manager); 274 272 private: 275 Q tKeySequenceEditorFactoryPrivate *d_ptr;273 QScopedPointer<QtKeySequenceEditorFactoryPrivate> d_ptr; 276 274 Q_DECLARE_PRIVATE(QtKeySequenceEditorFactory) 277 275 Q_DISABLE_COPY(QtKeySequenceEditorFactory) … … 295 293 void disconnectPropertyManager(QtCharPropertyManager *manager); 296 294 private: 297 Q tCharEditorFactoryPrivate *d_ptr;295 QScopedPointer<QtCharEditorFactoryPrivate> d_ptr; 298 296 Q_DECLARE_PRIVATE(QtCharEditorFactory) 299 297 Q_DISABLE_COPY(QtCharEditorFactory) … … 317 315 void disconnectPropertyManager(QtEnumPropertyManager *manager); 318 316 private: 319 Q tEnumEditorFactoryPrivate *d_ptr;317 QScopedPointer<QtEnumEditorFactoryPrivate> d_ptr; 320 318 Q_DECLARE_PRIVATE(QtEnumEditorFactory) 321 319 Q_DISABLE_COPY(QtEnumEditorFactory) … … 343 341 void disconnectPropertyManager(QtCursorPropertyManager *manager); 344 342 private: 345 Q tCursorEditorFactoryPrivate *d_ptr;343 QScopedPointer<QtCursorEditorFactoryPrivate> d_ptr; 346 344 Q_DECLARE_PRIVATE(QtCursorEditorFactory) 347 345 Q_DISABLE_COPY(QtCursorEditorFactory) … … 365 363 void disconnectPropertyManager(QtColorPropertyManager *manager); 366 364 private: 367 Q tColorEditorFactoryPrivate *d_ptr;365 QScopedPointer<QtColorEditorFactoryPrivate> d_ptr; 368 366 Q_DECLARE_PRIVATE(QtColorEditorFactory) 369 367 Q_DISABLE_COPY(QtColorEditorFactory) … … 387 385 void disconnectPropertyManager(QtFontPropertyManager *manager); 388 386 private: 389 Q tFontEditorFactoryPrivate *d_ptr;387 QScopedPointer<QtFontEditorFactoryPrivate> d_ptr; 390 388 Q_DECLARE_PRIVATE(QtFontEditorFactory) 391 389 Q_DISABLE_COPY(QtFontEditorFactory) … … 395 393 }; 396 394 397 #if QT_VERSION >= 0x040400398 395 QT_END_NAMESPACE 396 399 397 #endif 400 401 #endif -
trunk/tools/shared/qtpropertybrowser/qtgroupboxpropertybrowser.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 ** … … 48 48 #include <QtCore/QMap> 49 49 50 #if QT_VERSION >= 0x04040051 50 QT_BEGIN_NAMESPACE 52 #endif53 51 54 52 class QtGroupBoxPropertyBrowserPrivate … … 479 477 */ 480 478 QtGroupBoxPropertyBrowser::QtGroupBoxPropertyBrowser(QWidget *parent) 481 : QtAbstractPropertyBrowser(parent) 482 { 483 d_ptr = new QtGroupBoxPropertyBrowserPrivate; 479 : QtAbstractPropertyBrowser(parent), d_ptr(new QtGroupBoxPropertyBrowserPrivate) 480 { 484 481 d_ptr->q_ptr = this; 485 482 … … 502 499 for (QMap<QtGroupBoxPropertyBrowserPrivate::WidgetItem *, QtBrowserItem *>::ConstIterator it = d_ptr->m_itemToIndex.constBegin(); it != icend; ++it) 503 500 delete it.key(); 504 delete d_ptr;505 501 } 506 502 … … 529 525 } 530 526 531 #if QT_VERSION >= 0x040400532 527 QT_END_NAMESPACE 533 #endif534 528 535 529 #include "moc_qtgroupboxpropertybrowser.cpp" -
trunk/tools/shared/qtpropertybrowser/qtgroupboxpropertybrowser.h
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 ** … … 45 45 #include "qtpropertybrowser.h" 46 46 47 #if QT_VERSION >= 0x04040048 47 QT_BEGIN_NAMESPACE 49 #endif50 48 51 49 class QtGroupBoxPropertyBrowserPrivate; … … 66 64 private: 67 65 68 Q tGroupBoxPropertyBrowserPrivate *d_ptr;66 QScopedPointer<QtGroupBoxPropertyBrowserPrivate> d_ptr; 69 67 Q_DECLARE_PRIVATE(QtGroupBoxPropertyBrowser) 70 68 Q_DISABLE_COPY(QtGroupBoxPropertyBrowser) … … 74 72 }; 75 73 76 #if QT_VERSION >= 0x04040077 74 QT_END_NAMESPACE 78 #endif79 75 80 76 #endif -
trunk/tools/shared/qtpropertybrowser/qtpropertybrowser.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 ** … … 49 49 #endif 50 50 51 #if QT_VERSION >= 0x04040052 51 QT_BEGIN_NAMESPACE 53 #endif54 52 55 53 class QtPropertyPrivate … … 145 143 */ 146 144 QtProperty::QtProperty(QtAbstractPropertyManager *manager) 147 { 148 d_ptr = new QtPropertyPrivate(manager); 145 : d_ptr(new QtPropertyPrivate(manager)) 146 { 149 147 d_ptr->q_ptr = this; 150 148 } … … 180 178 property->d_ptr->m_subItems.removeAll(this); 181 179 } 182 delete d_ptr;183 180 } 184 181 … … 641 638 */ 642 639 QtAbstractPropertyManager::QtAbstractPropertyManager(QObject *parent) 643 : QObject(parent) 644 { 645 d_ptr = new QtAbstractPropertyManagerPrivate; 640 : QObject(parent), d_ptr(new QtAbstractPropertyManagerPrivate) 641 { 646 642 d_ptr->q_ptr = this; 647 643 … … 655 651 { 656 652 clear(); 657 delete d_ptr;658 653 } 659 654 … … 1170 1165 1171 1166 QtBrowserItem::QtBrowserItem(QtAbstractPropertyBrowser *browser, QtProperty *property, QtBrowserItem *parent) 1172 { 1173 d_ptr = new QtBrowserItemPrivate(browser, property, parent); 1167 : d_ptr(new QtBrowserItemPrivate(browser, property, parent)) 1168 { 1174 1169 d_ptr->q_ptr = this; 1175 1170 } … … 1177 1172 QtBrowserItem::~QtBrowserItem() 1178 1173 { 1179 delete d_ptr;1180 1174 } 1181 1175 … … 1250 1244 q_ptr->connect(manager, SIGNAL(propertyRemoved(QtProperty *, 1251 1245 QtProperty *)), 1252 q_ptr, SLOT(slotPropertyRemoved(QtProperty *, QtProperty*)));1253 q_ptr->connect(manager, SIGNAL(propertyDestroyed(QtProperty 1254 q_ptr, SLOT(slotPropertyDestroyed(QtProperty 1255 q_ptr->connect(manager, SIGNAL(propertyChanged(QtProperty 1256 q_ptr, SLOT(slotPropertyDataChanged(QtProperty 1246 q_ptr, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); 1247 q_ptr->connect(manager, SIGNAL(propertyDestroyed(QtProperty*)), 1248 q_ptr, SLOT(slotPropertyDestroyed(QtProperty*))); 1249 q_ptr->connect(manager, SIGNAL(propertyChanged(QtProperty*)), 1250 q_ptr, SLOT(slotPropertyDataChanged(QtProperty*))); 1257 1251 } 1258 1252 m_managerToProperties[manager].append(property); … … 1290 1284 q_ptr->disconnect(manager, SIGNAL(propertyRemoved(QtProperty *, 1291 1285 QtProperty *)), 1292 q_ptr, SLOT(slotPropertyRemoved(QtProperty *, QtProperty*)));1293 q_ptr->disconnect(manager, SIGNAL(propertyDestroyed(QtProperty 1294 q_ptr, SLOT(slotPropertyDestroyed(QtProperty 1295 q_ptr->disconnect(manager, SIGNAL(propertyChanged(QtProperty 1296 q_ptr, SLOT(slotPropertyDataChanged(QtProperty 1286 q_ptr, SLOT(slotPropertyRemoved(QtProperty*,QtProperty*))); 1287 q_ptr->disconnect(manager, SIGNAL(propertyDestroyed(QtProperty*)), 1288 q_ptr, SLOT(slotPropertyDestroyed(QtProperty*))); 1289 q_ptr->disconnect(manager, SIGNAL(propertyChanged(QtProperty*)), 1290 q_ptr, SLOT(slotPropertyDataChanged(QtProperty*))); 1297 1291 1298 1292 m_managerToProperties.remove(manager); … … 1649 1643 */ 1650 1644 QtAbstractPropertyBrowser::QtAbstractPropertyBrowser(QWidget *parent) 1651 : QWidget(parent) 1652 { 1653 d_ptr = new QtAbstractPropertyBrowserPrivate; 1645 : QWidget(parent), d_ptr(new QtAbstractPropertyBrowserPrivate) 1646 { 1654 1647 d_ptr->q_ptr = this; 1655 1648 … … 1674 1667 while (itItem.hasNext()) 1675 1668 d_ptr->clearIndex(itItem.next()); 1676 delete d_ptr;1677 1669 } 1678 1670 … … 1959 1951 } 1960 1952 1961 #if QT_VERSION >= 0x0404001962 1953 QT_END_NAMESPACE 1963 #endif1964 1954 1965 1955 #include "moc_qtpropertybrowser.cpp" -
trunk/tools/shared/qtpropertybrowser/qtpropertybrowser.h
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 ** … … 46 46 #include <QtCore/QSet> 47 47 48 #if QT_VERSION >= 0x04040049 48 QT_BEGIN_NAMESPACE 50 #endif51 52 53 49 54 50 class QtAbstractPropertyManager; … … 90 86 private: 91 87 friend class QtAbstractPropertyManager; 92 Q tPropertyPrivate *d_ptr;88 QScopedPointer<QtPropertyPrivate> d_ptr; 93 89 }; 94 90 … … 123 119 private: 124 120 friend class QtProperty; 125 Q tAbstractPropertyManagerPrivate *d_ptr;121 QScopedPointer<QtAbstractPropertyManagerPrivate> d_ptr; 126 122 Q_DECLARE_PRIVATE(QtAbstractPropertyManager) 127 123 Q_DISABLE_COPY(QtAbstractPropertyManager) … … 240 236 explicit QtBrowserItem(QtAbstractPropertyBrowser *browser, QtProperty *property, QtBrowserItem *parent); 241 237 ~QtBrowserItem(); 242 Q tBrowserItemPrivate *d_ptr;238 QScopedPointer<QtBrowserItemPrivate> d_ptr; 243 239 friend class QtAbstractPropertyBrowserPrivate; 244 240 }; … … 297 293 QtAbstractEditorFactoryBase *abstractFactory); 298 294 299 Q tAbstractPropertyBrowserPrivate *d_ptr;295 QScopedPointer<QtAbstractPropertyBrowserPrivate> d_ptr; 300 296 Q_DECLARE_PRIVATE(QtAbstractPropertyBrowser) 301 297 Q_DISABLE_COPY(QtAbstractPropertyBrowser) … … 309 305 }; 310 306 311 #if QT_VERSION >= 0x040400312 307 QT_END_NAMESPACE 313 #endif314 308 315 309 #endif // QTPROPERTYBROWSER_H -
trunk/tools/shared/qtpropertybrowser/qtpropertybrowserutils.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 ** … … 49 49 #include <QtGui/QMenu> 50 50 51 #if QT_VERSION >= 0x04040052 51 QT_BEGIN_NAMESPACE 53 #endif54 52 55 53 QtCursorDatabase::QtCursorDatabase() … … 427 425 } 428 426 429 430 431 432 #if QT_VERSION >= 0x040400433 427 QT_END_NAMESPACE 434 #endif -
trunk/tools/shared/qtpropertybrowser/qtpropertybrowserutils_p.h
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 ** … … 59 59 #include <QtCore/QStringList> 60 60 61 #if QT_VERSION >= 0x04040062 61 QT_BEGIN_NAMESPACE 63 #endif64 62 65 63 class QMouseEvent; … … 155 153 }; 156 154 157 #if QT_VERSION >= 0x040400158 155 QT_END_NAMESPACE 159 #endif160 156 161 157 #endif -
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" -
trunk/tools/shared/qtpropertybrowser/qtpropertymanager.h
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 ** … … 45 45 #include "qtpropertybrowser.h" 46 46 47 #if QT_VERSION >= 0x04040048 47 QT_BEGIN_NAMESPACE 49 #endif50 48 51 49 class QDate; … … 97 95 virtual void uninitializeProperty(QtProperty *property); 98 96 private: 99 Q tIntPropertyManagerPrivate *d_ptr;97 QScopedPointer<QtIntPropertyManagerPrivate> d_ptr; 100 98 Q_DECLARE_PRIVATE(QtIntPropertyManager) 101 99 Q_DISABLE_COPY(QtIntPropertyManager) … … 123 121 virtual void uninitializeProperty(QtProperty *property); 124 122 private: 125 Q tBoolPropertyManagerPrivate *d_ptr;123 QScopedPointer<QtBoolPropertyManagerPrivate> d_ptr; 126 124 Q_DECLARE_PRIVATE(QtBoolPropertyManager) 127 125 Q_DISABLE_COPY(QtBoolPropertyManager) … … 160 158 virtual void uninitializeProperty(QtProperty *property); 161 159 private: 162 Q tDoublePropertyManagerPrivate *d_ptr;160 QScopedPointer<QtDoublePropertyManagerPrivate> d_ptr; 163 161 Q_DECLARE_PRIVATE(QtDoublePropertyManager) 164 162 Q_DISABLE_COPY(QtDoublePropertyManager) … … 188 186 virtual void uninitializeProperty(QtProperty *property); 189 187 private: 190 Q tStringPropertyManagerPrivate *d_ptr;188 QScopedPointer<QtStringPropertyManagerPrivate> d_ptr; 191 189 Q_DECLARE_PRIVATE(QtStringPropertyManager) 192 190 Q_DISABLE_COPY(QtStringPropertyManager) … … 219 217 virtual void uninitializeProperty(QtProperty *property); 220 218 private: 221 Q tDatePropertyManagerPrivate *d_ptr;219 QScopedPointer<QtDatePropertyManagerPrivate> d_ptr; 222 220 Q_DECLARE_PRIVATE(QtDatePropertyManager) 223 221 Q_DISABLE_COPY(QtDatePropertyManager) … … 244 242 virtual void uninitializeProperty(QtProperty *property); 245 243 private: 246 Q tTimePropertyManagerPrivate *d_ptr;244 QScopedPointer<QtTimePropertyManagerPrivate> d_ptr; 247 245 Q_DECLARE_PRIVATE(QtTimePropertyManager) 248 246 Q_DISABLE_COPY(QtTimePropertyManager) … … 269 267 virtual void uninitializeProperty(QtProperty *property); 270 268 private: 271 Q tDateTimePropertyManagerPrivate *d_ptr;269 QScopedPointer<QtDateTimePropertyManagerPrivate> d_ptr; 272 270 Q_DECLARE_PRIVATE(QtDateTimePropertyManager) 273 271 Q_DISABLE_COPY(QtDateTimePropertyManager) … … 294 292 virtual void uninitializeProperty(QtProperty *property); 295 293 private: 296 Q tKeySequencePropertyManagerPrivate *d_ptr;294 QScopedPointer<QtKeySequencePropertyManagerPrivate> d_ptr; 297 295 Q_DECLARE_PRIVATE(QtKeySequencePropertyManager) 298 296 Q_DISABLE_COPY(QtKeySequencePropertyManager) … … 319 317 virtual void uninitializeProperty(QtProperty *property); 320 318 private: 321 Q tCharPropertyManagerPrivate *d_ptr;319 QScopedPointer<QtCharPropertyManagerPrivate> d_ptr; 322 320 Q_DECLARE_PRIVATE(QtCharPropertyManager) 323 321 Q_DISABLE_COPY(QtCharPropertyManager) … … 347 345 virtual void uninitializeProperty(QtProperty *property); 348 346 private: 349 Q tLocalePropertyManagerPrivate *d_ptr;347 QScopedPointer<QtLocalePropertyManagerPrivate> d_ptr; 350 348 Q_DECLARE_PRIVATE(QtLocalePropertyManager) 351 349 Q_DISABLE_COPY(QtLocalePropertyManager) … … 376 374 virtual void uninitializeProperty(QtProperty *property); 377 375 private: 378 Q tPointPropertyManagerPrivate *d_ptr;376 QScopedPointer<QtPointPropertyManagerPrivate> d_ptr; 379 377 Q_DECLARE_PRIVATE(QtPointPropertyManager) 380 378 Q_DISABLE_COPY(QtPointPropertyManager) … … 408 406 virtual void uninitializeProperty(QtProperty *property); 409 407 private: 410 Q tPointFPropertyManagerPrivate *d_ptr;408 QScopedPointer<QtPointFPropertyManagerPrivate> d_ptr; 411 409 Q_DECLARE_PRIVATE(QtPointFPropertyManager) 412 410 Q_DISABLE_COPY(QtPointFPropertyManager) … … 443 441 virtual void uninitializeProperty(QtProperty *property); 444 442 private: 445 Q tSizePropertyManagerPrivate *d_ptr;443 QScopedPointer<QtSizePropertyManagerPrivate> d_ptr; 446 444 Q_DECLARE_PRIVATE(QtSizePropertyManager) 447 445 Q_DISABLE_COPY(QtSizePropertyManager) … … 481 479 virtual void uninitializeProperty(QtProperty *property); 482 480 private: 483 Q tSizeFPropertyManagerPrivate *d_ptr;481 QScopedPointer<QtSizeFPropertyManagerPrivate> d_ptr; 484 482 Q_DECLARE_PRIVATE(QtSizeFPropertyManager) 485 483 Q_DISABLE_COPY(QtSizeFPropertyManager) … … 513 511 virtual void uninitializeProperty(QtProperty *property); 514 512 private: 515 Q tRectPropertyManagerPrivate *d_ptr;513 QScopedPointer<QtRectPropertyManagerPrivate> d_ptr; 516 514 Q_DECLARE_PRIVATE(QtRectPropertyManager) 517 515 Q_DISABLE_COPY(QtRectPropertyManager) … … 548 546 virtual void uninitializeProperty(QtProperty *property); 549 547 private: 550 Q tRectFPropertyManagerPrivate *d_ptr;548 QScopedPointer<QtRectFPropertyManagerPrivate> d_ptr; 551 549 Q_DECLARE_PRIVATE(QtRectFPropertyManager) 552 550 Q_DISABLE_COPY(QtRectFPropertyManager) … … 582 580 virtual void uninitializeProperty(QtProperty *property); 583 581 private: 584 Q tEnumPropertyManagerPrivate *d_ptr;582 QScopedPointer<QtEnumPropertyManagerPrivate> d_ptr; 585 583 Q_DECLARE_PRIVATE(QtEnumPropertyManager) 586 584 Q_DISABLE_COPY(QtEnumPropertyManager) … … 612 610 virtual void uninitializeProperty(QtProperty *property); 613 611 private: 614 Q tFlagPropertyManagerPrivate *d_ptr;612 QScopedPointer<QtFlagPropertyManagerPrivate> d_ptr; 615 613 Q_DECLARE_PRIVATE(QtFlagPropertyManager) 616 614 Q_DISABLE_COPY(QtFlagPropertyManager) … … 642 640 virtual void uninitializeProperty(QtProperty *property); 643 641 private: 644 Q tSizePolicyPropertyManagerPrivate *d_ptr;642 QScopedPointer<QtSizePolicyPropertyManagerPrivate> d_ptr; 645 643 Q_DECLARE_PRIVATE(QtSizePolicyPropertyManager) 646 644 Q_DISABLE_COPY(QtSizePolicyPropertyManager) … … 675 673 virtual void uninitializeProperty(QtProperty *property); 676 674 private: 677 Q tFontPropertyManagerPrivate *d_ptr;675 QScopedPointer<QtFontPropertyManagerPrivate> d_ptr; 678 676 Q_DECLARE_PRIVATE(QtFontPropertyManager) 679 677 Q_DISABLE_COPY(QtFontPropertyManager) … … 709 707 virtual void uninitializeProperty(QtProperty *property); 710 708 private: 711 Q tColorPropertyManagerPrivate *d_ptr;709 QScopedPointer<QtColorPropertyManagerPrivate> d_ptr; 712 710 Q_DECLARE_PRIVATE(QtColorPropertyManager) 713 711 Q_DISABLE_COPY(QtColorPropertyManager) … … 739 737 virtual void uninitializeProperty(QtProperty *property); 740 738 private: 741 Q tCursorPropertyManagerPrivate *d_ptr;739 QScopedPointer<QtCursorPropertyManagerPrivate> d_ptr; 742 740 Q_DECLARE_PRIVATE(QtCursorPropertyManager) 743 741 Q_DISABLE_COPY(QtCursorPropertyManager) 744 742 }; 745 743 746 #if QT_VERSION >= 0x040400747 744 QT_END_NAMESPACE 745 748 746 #endif 749 750 #endif -
trunk/tools/shared/qtpropertybrowser/qttreepropertybrowser.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 ** … … 53 53 #include <QtGui/QPalette> 54 54 55 #if QT_VERSION >= 0x04040056 55 QT_BEGIN_NAMESPACE 57 #endif58 56 59 57 class QtPropertyEditorView; … … 313 311 editor->setAutoFillBackground(true); 314 312 editor->installEventFilter(const_cast<QtPropertyEditorDelegate *>(this)); 315 connect(editor, SIGNAL(destroyed(QObject *)), this, SLOT(slotEditorDestroyed(QObject*)));313 connect(editor, SIGNAL(destroyed(QObject*)), this, SLOT(slotEditorDestroyed(QObject*))); 316 314 m_propertyToEditor[property] = editor; 317 315 m_editorToProperty[editor] = property; … … 455 453 m_expandIcon = drawIndicatorIcon(q_ptr->palette(), q_ptr->style()); 456 454 457 QObject::connect(m_treeWidget, SIGNAL(collapsed( const QModelIndex &)), q_ptr, SLOT(slotCollapsed(const QModelIndex &)));458 QObject::connect(m_treeWidget, SIGNAL(expanded( const QModelIndex &)), q_ptr, SLOT(slotExpanded(const QModelIndex &)));455 QObject::connect(m_treeWidget, SIGNAL(collapsed(QModelIndex)), q_ptr, SLOT(slotCollapsed(QModelIndex))); 456 QObject::connect(m_treeWidget, SIGNAL(expanded(QModelIndex)), q_ptr, SLOT(slotExpanded(QModelIndex))); 459 457 QObject::connect(m_treeWidget, SIGNAL(currentItemChanged(QTreeWidgetItem*,QTreeWidgetItem*)), q_ptr, SLOT(slotCurrentTreeItemChanged(QTreeWidgetItem*,QTreeWidgetItem*))); 460 458 } … … 729 727 */ 730 728 QtTreePropertyBrowser::QtTreePropertyBrowser(QWidget *parent) 731 : QtAbstractPropertyBrowser(parent) 732 { 733 d_ptr = new QtTreePropertyBrowserPrivate; 729 : QtAbstractPropertyBrowser(parent), d_ptr(new QtTreePropertyBrowserPrivate) 730 { 734 731 d_ptr->q_ptr = this; 735 732 … … 750 747 QtTreePropertyBrowser::~QtTreePropertyBrowser() 751 748 { 752 delete d_ptr;753 749 } 754 750 … … 1041 1037 } 1042 1038 1043 #if QT_VERSION >= 0x0404001044 1039 QT_END_NAMESPACE 1045 #endif1046 1040 1047 1041 #include "moc_qttreepropertybrowser.cpp" -
trunk/tools/shared/qtpropertybrowser/qttreepropertybrowser.h
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 ** … … 45 45 #include "qtpropertybrowser.h" 46 46 47 #if QT_VERSION >= 0x04040048 47 QT_BEGIN_NAMESPACE 49 #endif50 48 51 49 class QTreeWidgetItem; … … 121 119 private: 122 120 123 Q tTreePropertyBrowserPrivate *d_ptr;121 QScopedPointer<QtTreePropertyBrowserPrivate> d_ptr; 124 122 Q_DECLARE_PRIVATE(QtTreePropertyBrowser) 125 123 Q_DISABLE_COPY(QtTreePropertyBrowser) … … 132 130 }; 133 131 134 #if QT_VERSION >= 0x040400135 132 QT_END_NAMESPACE 136 #endif137 133 138 134 #endif -
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" -
trunk/tools/shared/qtpropertybrowser/qtvariantproperty.h
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 ** … … 47 47 #include <QtGui/QIcon> 48 48 49 #if QT_VERSION >= 0x04040050 49 QT_BEGIN_NAMESPACE 51 #endif52 50 53 51 typedef QMap<int, QIcon> QtIconMap; … … 70 68 private: 71 69 friend class QtVariantPropertyManager; 72 class QtVariantPropertyPrivate *d_ptr;70 QScopedPointer<class QtVariantPropertyPrivate> d_ptr; 73 71 }; 74 72 … … 114 112 virtual QtProperty *createProperty(); 115 113 private: 116 class QtVariantPropertyManagerPrivate *d_ptr;114 QScopedPointer<class QtVariantPropertyManagerPrivate> d_ptr; 117 115 Q_PRIVATE_SLOT(d_func(), void slotValueChanged(QtProperty *, int)) 118 116 Q_PRIVATE_SLOT(d_func(), void slotRangeChanged(QtProperty *, int, int)) … … 168 166 void disconnectPropertyManager(QtVariantPropertyManager *manager); 169 167 private: 170 class QtVariantEditorFactoryPrivate *d_ptr;168 QScopedPointer<class QtVariantEditorFactoryPrivate> d_ptr; 171 169 Q_DECLARE_PRIVATE(QtVariantEditorFactory) 172 170 Q_DISABLE_COPY(QtVariantEditorFactory) 173 171 }; 174 172 175 #if QT_VERSION >= 0x040400176 173 QT_END_NAMESPACE 177 #endif178 174 179 175 Q_DECLARE_METATYPE(QIcon)
Note:
See TracChangeset
for help on using the changeset viewer.