9# pragma warning(disable: 4786
)
37 Q_DECLARE_PUBLIC(QtAbstractPropertyManager)
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
101
102
103
104
105
106
107
108
109
117
118
119
120
121
122
123
124
127 for (QtProperty *property : std::as_const(d_ptr->m_parentItems))
128 property->d_ptr->m_manager->d_ptr->propertyRemoved(
this, property);
130 d_ptr->m_manager->d_ptr->propertyDestroyed(
this);
132 for (QtProperty *property : std::as_const(d_ptr->m_subItems))
133 property->d_ptr->m_parentItems.remove(
this);
135 for (QtProperty *property : std::as_const(d_ptr->m_parentItems))
136 property->d_ptr->m_subItems.removeAll(
this);
140
141
142
143
144
145
146
149 return d_ptr->m_subItems;
153
154
157 return d_ptr->m_manager;
161
162
163
166
167
168
169
170
171
172
175 return d_ptr->m_valueToolTip;
179
180
181
182
183
184
185
188 return d_ptr->m_descriptionToolTip;
192
193
194
195
198 return d_ptr->m_statusTip;
202
203
204
205
208 return d_ptr->m_whatsThis;
212
213
214
215
218 return d_ptr->m_name;
222
223
224
225
228 return d_ptr->m_enabled;
232
233
234
235
238 return d_ptr->m_modified;
242
243
244
245
248 return d_ptr->m_manager->hasValue(
this);
252
253
254
255
256
257
258
261 return d_ptr->m_manager->valueIcon(
this);
265
266
267
268
269
270
271
274 return d_ptr->m_manager->valueText(
this);
278
279
280
281
282
285 if (d_ptr->m_valueToolTip == text)
288 d_ptr->m_valueToolTip = text;
293
294
295
296
297
300 if (d_ptr->m_descriptionToolTip == text)
303 d_ptr->m_descriptionToolTip = text;
308
309
310
311
314 if (d_ptr->m_statusTip == text)
317 d_ptr->m_statusTip = text;
322
323
324
325
328 if (d_ptr->m_whatsThis == text)
331 d_ptr->m_whatsThis = text;
336
337
338
339
340
341
344 if (d_ptr->m_name == text)
347 d_ptr->m_name = text;
352
353
354
355
358 if (d_ptr->m_enabled == enable)
361 d_ptr->m_enabled = enable;
366
367
368
369
372 if (d_ptr->m_modified == modified)
375 d_ptr->m_modified = modified;
380
381
382
383
384
385
386
390 if (d_ptr->m_subItems.size() > 0)
391 after = d_ptr->m_subItems.last();
396
397
398
399
400
401
402
403
404
405
406
407
414 if (property ==
this)
418 auto pendingList = property->subProperties();
419 QHash<QtProperty *,
bool> visited;
420 while (!pendingList.isEmpty()) {
424 pendingList.removeFirst();
425 if (visited.contains(i))
428 pendingList += i->subProperties();
431 pendingList = subProperties();
435 while (pos < pendingList.size()) {
439 if (i == afterProperty) {
441 properAfterProperty = afterProperty;
446 d_ptr->m_subItems.insert(newPos, property);
447 property->d_ptr->m_parentItems.insert(
this);
449 d_ptr->m_manager->d_ptr->propertyInserted(property,
this, properAfterProperty);
453
454
455
456
457
463 d_ptr->m_manager->d_ptr->propertyRemoved(property,
this);
465 auto pendingList = subProperties();
467 while (pos < pendingList.size()) {
468 if (pendingList.at(pos) == property) {
469 d_ptr->m_subItems.removeAt(pos);
470 property->d_ptr->m_parentItems.remove(
this);
479
480
483 d_ptr->m_manager->d_ptr->propertyChanged(
this);
490 if (m_properties.contains(property)) {
491 emit q_ptr->propertyDestroyed(property);
492 q_ptr->uninitializeProperty(property);
493 m_properties.remove(property);
499 emit q_ptr->propertyChanged(property);
505 emit q_ptr->propertyRemoved(property, parentProperty);
511 emit q_ptr->propertyInserted(property, parentProperty, afterProperty);
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
586
587
588
589
590
591
592
593
594
595
598
599
600
601
602
603
604
605
606
607
608
611
612
613
614
615
616
617
618
619
620
623
624
625
626
627
628
631
632
634 : QObject(parent), d_ptr(
new QtAbstractPropertyManagerPrivate)
641
642
643
650
651
652
653
656 while (!d_ptr->m_properties.isEmpty())
657 delete *d_ptr->m_properties.cbegin();
661
662
663
664
667 return d_ptr->m_properties;
671
672
673
674
675
676
684
685
686
687
688
689
690
691
699
700
701
702
703
704
705
706
714
715
716
717
718
719
720
725 property->setPropertyName(name);
726 d_ptr->m_properties.insert(property);
733
734
735
736
737
738
739
740
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
766
767
768
769
770
771
772
773
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
826
827
828
829
830
831
832
833
834
835
836
837
840
841
842
843
846
847
848
849
850
851
852
853
854
857
858
859
860
861
862
863
864
865
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
935
936
937
938
939
940
943
944
945
946
947
950
951
952
953
954
955
956
957
958
959
960
963
964
965
966
967
968
969
970
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1022
1023
1024
1025
1026
1027
1028
1029
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1045
1046
1047
1048
1072 if (m_children.contains(index))
1074 int idx = m_children.indexOf(after) + 1;
1075 m_children.insert(idx, index);
1080 m_children.removeAll(index);
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1108
1109
1110
1111
1112
1113
1117 return d_ptr->m_property;
1121
1122
1123
1124
1125
1129 return d_ptr->m_parent;
1133
1134
1135
1136
1137
1138
1139
1140
1144 return d_ptr->m_children;
1148
1149
1153 return d_ptr->m_browser;
1157 : d_ptr(
new QtBrowserItemPrivate(browser, property, parent))
1159 d_ptr->q_ptr =
this;
1169using Map1 = QHash<QtAbstractPropertyBrowser *,
1170 QHash<QtAbstractPropertyManager *, QtAbstractEditorFactoryBase *>>;
1171using Map2 = QHash<QtAbstractPropertyManager *,
1172 QHash<QtAbstractEditorFactoryBase *, QList<QtAbstractPropertyBrowser *>>>;
1174Q_GLOBAL_STATIC(Map1, m_viewToManagerToFactory)
1175Q_GLOBAL_STATIC(Map2, m_managerToFactoryToViews)
1177class QtAbstractPropertyBrowserPrivate
1179 QtAbstractPropertyBrowser *q_ptr;
1180 Q_DECLARE_PUBLIC(QtAbstractPropertyBrowser)
1182 QtAbstractPropertyBrowserPrivate();
1184 void insertSubTree(QtProperty *property,
1185 QtProperty *parentProperty);
1186 void removeSubTree(QtProperty *property,
1187 QtProperty *parentProperty);
1188 void createBrowserIndexes(QtProperty *property, QtProperty *parentProperty, QtProperty *afterProperty);
1189 void removeBrowserIndexes(QtProperty *property, QtProperty *parentProperty);
1190 QtBrowserItem *createBrowserIndex(QtProperty *property, QtBrowserItem *parentIndex, QtBrowserItem *afterIndex);
1191 void removeBrowserIndex(QtBrowserItem *index);
1192 void clearIndex(QtBrowserItem *index);
1194 void slotPropertyInserted(QtProperty *property,
1195 QtProperty *parentProperty, QtProperty *afterProperty);
1196 void slotPropertyRemoved(QtProperty *property, QtProperty *parentProperty);
1197 void slotPropertyDestroyed(QtProperty *property);
1198 void slotPropertyDataChanged(QtProperty *property);
1200 QList<QtProperty *> m_subItems;
1201 QHash<QtAbstractPropertyManager *, QList<QtProperty *> > m_managerToProperties;
1202 QHash<QtProperty *, QList<QtProperty *> > m_propertyToParents;
1204 QHash<QtProperty *, QtBrowserItem *> m_topLevelPropertyToIndex;
1205 QList<QtBrowserItem *> m_topLevelIndexes;
1206 QHash<QtProperty *, QList<QtBrowserItem *> > m_propertyToIndexes;
1208 QtBrowserItem *m_currentItem;
1211QtAbstractPropertyBrowserPrivate::QtAbstractPropertyBrowserPrivate() :
1216void QtAbstractPropertyBrowserPrivate::insertSubTree(QtProperty *property,
1217 QtProperty *parentProperty)
1219 if (m_propertyToParents.contains(property)) {
1223 m_propertyToParents[property].append(parentProperty);
1228 QtAbstractPropertyManager *manager = property->propertyManager();
1229 if (m_managerToProperties[manager].isEmpty()) {
1231 q_ptr->connect(manager, &QtAbstractPropertyManager::propertyInserted,
1232 q_ptr, [
this](QtProperty *property, QtProperty *parent, QtProperty *after)
1233 { slotPropertyInserted(property, parent, after); });
1234 q_ptr->connect(manager, &QtAbstractPropertyManager::propertyRemoved,
1235 q_ptr, [
this](QtProperty *property, QtProperty *parent)
1236 { slotPropertyRemoved(property, parent); });
1237 q_ptr->connect(manager, &QtAbstractPropertyManager::propertyDestroyed,
1238 q_ptr, [
this](QtProperty *property) { slotPropertyDestroyed(property); });
1239 q_ptr->connect(manager, &QtAbstractPropertyManager::propertyChanged,
1240 q_ptr, [
this](QtProperty *property) { slotPropertyDataChanged(property); });
1242 m_managerToProperties[manager].append(property);
1243 m_propertyToParents[property].append(parentProperty);
1245 const auto subList = property->subProperties();
1246 for (QtProperty *subProperty : subList)
1247 insertSubTree(subProperty, property);
1250void QtAbstractPropertyBrowserPrivate::removeSubTree(QtProperty *property,
1251 QtProperty *parentProperty)
1253 if (!m_propertyToParents.contains(property)) {
1258 m_propertyToParents[property].removeAll(parentProperty);
1259 if (!m_propertyToParents[property].isEmpty())
1262 m_propertyToParents.remove(property);
1263 QtAbstractPropertyManager *manager = property->propertyManager();
1264 m_managerToProperties[manager].removeAll(property);
1265 if (m_managerToProperties[manager].isEmpty()) {
1267 q_ptr->disconnect(manager, &QtAbstractPropertyManager::propertyInserted, q_ptr,
nullptr);
1268 q_ptr->disconnect(manager, &QtAbstractPropertyManager::propertyRemoved, q_ptr,
nullptr);
1269 q_ptr->disconnect(manager, &QtAbstractPropertyManager::propertyDestroyed, q_ptr,
nullptr);
1270 q_ptr->disconnect(manager, &QtAbstractPropertyManager::propertyChanged, q_ptr,
nullptr);
1272 m_managerToProperties.remove(manager);
1275 const auto subList = property->subProperties();
1276 for (QtProperty *subProperty : subList)
1277 removeSubTree(subProperty, property);
1280void QtAbstractPropertyBrowserPrivate::createBrowserIndexes(QtProperty *property, QtProperty *parentProperty, QtProperty *afterProperty)
1282 QHash<QtBrowserItem *, QtBrowserItem *> parentToAfter;
1283 if (afterProperty) {
1284 const auto it = m_propertyToIndexes.constFind(afterProperty);
1285 if (it == m_propertyToIndexes.constEnd())
1288 for (QtBrowserItem *idx : it.value()) {
1289 QtBrowserItem *parentIdx = idx->parent();
1290 if ((parentProperty && parentIdx && parentIdx->property() == parentProperty) || (!parentProperty && !parentIdx))
1291 parentToAfter[idx->parent()] = idx;
1293 }
else if (parentProperty) {
1294 const auto it = m_propertyToIndexes.find(parentProperty);
1295 if (it == m_propertyToIndexes.constEnd())
1298 for (QtBrowserItem *idx : it.value())
1299 parentToAfter[idx] =
nullptr;
1301 parentToAfter[
nullptr] =
nullptr;
1304 for (
auto it = parentToAfter.cbegin(), pcend = parentToAfter.cend(); it != pcend; ++it)
1305 createBrowserIndex(property, it.key(), it.value());
1308QtBrowserItem *QtAbstractPropertyBrowserPrivate::createBrowserIndex(QtProperty *property,
1309 QtBrowserItem *parentIndex, QtBrowserItem *afterIndex)
1311 auto *newIndex =
new QtBrowserItem(q_ptr, property, parentIndex);
1313 parentIndex->d_ptr->addChild(newIndex, afterIndex);
1315 m_topLevelPropertyToIndex[property] = newIndex;
1316 m_topLevelIndexes.insert(m_topLevelIndexes.indexOf(afterIndex) + 1, newIndex);
1318 m_propertyToIndexes[property].append(newIndex);
1320 q_ptr->itemInserted(newIndex, afterIndex);
1322 const auto subItems = property->subProperties();
1323 QtBrowserItem *afterChild =
nullptr;
1324 for (QtProperty *child : subItems)
1325 afterChild = createBrowserIndex(child, newIndex, afterChild);
1329void QtAbstractPropertyBrowserPrivate::removeBrowserIndexes(QtProperty *property, QtProperty *parentProperty)
1331 QList<QtBrowserItem *> toRemove;
1332 const auto it = m_propertyToIndexes.constFind(property);
1333 if (it == m_propertyToIndexes.constEnd())
1336 for (QtBrowserItem *idx : it.value()) {
1337 QtBrowserItem *parentIdx = idx->parent();
1338 if ((parentProperty && parentIdx && parentIdx->property() == parentProperty) || (!parentProperty && !parentIdx))
1339 toRemove.append(idx);
1342 for (QtBrowserItem *index : std::as_const(toRemove))
1343 removeBrowserIndex(index);
1346void QtAbstractPropertyBrowserPrivate::removeBrowserIndex(QtBrowserItem *index)
1348 const auto children = index->children();
1349 for (
int i = children.size(); i > 0; i--) {
1350 removeBrowserIndex(children.at(i - 1));
1353 q_ptr->itemRemoved(index);
1355 if (index->parent()) {
1356 index->parent()->d_ptr->removeChild(index);
1358 m_topLevelPropertyToIndex.remove(index->property());
1359 m_topLevelIndexes.removeAll(index);
1362 QtProperty *property = index->property();
1364 m_propertyToIndexes[property].removeAll(index);
1365 if (m_propertyToIndexes[property].isEmpty())
1366 m_propertyToIndexes.remove(property);
1371void QtAbstractPropertyBrowserPrivate::clearIndex(QtBrowserItem *index)
1373 const auto children = index->children();
1374 for (QtBrowserItem *item : children)
1379void QtAbstractPropertyBrowserPrivate::slotPropertyInserted(QtProperty *property,
1380 QtProperty *parentProperty, QtProperty *afterProperty)
1382 if (!m_propertyToParents.contains(parentProperty))
1384 createBrowserIndexes(property, parentProperty, afterProperty);
1385 insertSubTree(property, parentProperty);
1389void QtAbstractPropertyBrowserPrivate::slotPropertyRemoved(QtProperty *property,
1390 QtProperty *parentProperty)
1392 if (!m_propertyToParents.contains(parentProperty))
1394 removeSubTree(property, parentProperty);
1396 removeBrowserIndexes(property, parentProperty);
1399void QtAbstractPropertyBrowserPrivate::slotPropertyDestroyed(QtProperty *property)
1401 if (!m_subItems.contains(property))
1403 q_ptr->removeProperty(property);
1406void QtAbstractPropertyBrowserPrivate::slotPropertyDataChanged(QtProperty *property)
1408 if (!m_propertyToParents.contains(property))
1411 const auto it = m_propertyToIndexes.constFind(property);
1412 if (it == m_propertyToIndexes.constEnd())
1415 const auto indexes = it.value();
1416 for (QtBrowserItem *idx : indexes)
1417 q_ptr->itemChanged(idx);
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1593
1594
1596 : QWidget(parent), d_ptr(
new QtAbstractPropertyBrowserPrivate)
1598 d_ptr->q_ptr =
this;
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1616 const auto indexes = topLevelItems();
1617 for (QtBrowserItem *item : indexes)
1618 d_ptr->clearIndex(item);
1622
1623
1624
1625
1626
1627
1628
1631 return d_ptr->m_subItems;
1635
1636
1637
1638
1639
1640
1641
1645 return d_ptr->m_propertyToIndexes.value(property);
1649
1650
1651
1652
1653
1654
1655
1659 return d_ptr->m_topLevelPropertyToIndex.value(property);
1663
1664
1665
1666
1670 return d_ptr->m_topLevelIndexes;
1674
1675
1676
1677
1678
1681 const auto subList = properties();
1682 for (
auto rit = subList.crbegin(), rend = subList.crend(); rit != rend; ++rit)
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1701 if (d_ptr->m_subItems.size() > 0)
1702 afterProperty = d_ptr->m_subItems.last();
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1729 auto pendingList = properties();
1732 while (pos < pendingList.size()) {
1734 if (prop == property)
1736 if (prop == afterProperty) {
1741 d_ptr->createBrowserIndexes(property, 0, afterProperty);
1744 d_ptr->insertSubTree(property, 0);
1746 d_ptr->m_subItems.insert(newPos, property);
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1767 auto pendingList = properties();
1769 while (pos < pendingList.size()) {
1770 if (pendingList.at(pos) == property) {
1771 d_ptr->m_subItems.removeAt(pos);
1772 d_ptr->removeSubTree(property, 0);
1775 d_ptr->removeBrowserIndexes(property, 0);
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1810 if (m_viewToManagerToFactory()->contains(
this) &&
1811 (*m_viewToManagerToFactory())[
this].contains(manager)) {
1812 factory = (*m_viewToManagerToFactory())[
this][manager];
1817 QWidget *w = factory->createEditor(property, parent);
1823 w->setFocusPolicy(Qt::WheelFocus);
1830 bool connectNeeded =
false;
1831 if (!m_managerToFactoryToViews()->contains(abstractManager) ||
1832 !(*m_managerToFactoryToViews())[abstractManager].contains(abstractFactory)) {
1833 connectNeeded =
true;
1834 }
else if ((*m_managerToFactoryToViews())[abstractManager][abstractFactory]
1836 return connectNeeded;
1839 if (m_viewToManagerToFactory()->contains(
this) &&
1840 (*m_viewToManagerToFactory())[
this].contains(abstractManager)) {
1844 (*m_managerToFactoryToViews())[abstractManager][abstractFactory].append(
this);
1845 (*m_viewToManagerToFactory())[
this][abstractManager] = abstractFactory;
1847 return connectNeeded;
1851
1852
1853
1854
1855
1856
1859 if (!m_viewToManagerToFactory()->contains(
this) ||
1860 !(*m_viewToManagerToFactory())[
this].contains(manager)) {
1865 (*m_viewToManagerToFactory())[
this][manager];
1866 (*m_viewToManagerToFactory())[
this].remove(manager);
1867 if ((*m_viewToManagerToFactory())[
this].isEmpty()) {
1868 (*m_viewToManagerToFactory()).remove(
this);
1871 (*m_managerToFactoryToViews())[manager][abstractFactory].removeAll(
this);
1872 if ((*m_managerToFactoryToViews())[manager][abstractFactory].isEmpty()) {
1873 (*m_managerToFactoryToViews())[manager].remove(abstractFactory);
1875 if ((*m_managerToFactoryToViews())[manager].isEmpty()) {
1876 (*m_managerToFactoryToViews()).remove(manager);
1882
1883
1884
1885
1888 return d_ptr->m_currentItem;
1892
1893
1894
1895
1899 d_ptr->m_currentItem = item;
1900 if (oldItem != item)
1901 emit currentItemChanged(item);
1906#include "moc_qtpropertybrowser_p.cpp"
The QtAbstractEditorFactoryBase provides an interface for editor factories.
virtual void breakConnection(QtAbstractPropertyManager *manager)=0
QtAbstractPropertyBrowser provides a base class for implementing property browsers.
QtBrowserItem * currentItem() const
Returns the current item in the property browser.
QList< QtBrowserItem * > items(QtProperty *property) const
Returns the property browser's list of all items associated with the given property.
QList< QtBrowserItem * > topLevelItems() const
Returns the list of top-level items.
QList< QtProperty * > properties() const
Returns the property browser's list of top level properties.
QtBrowserItem * topLevelItem(QtProperty *property) const
Returns the top-level items associated with the given property.
void removeProperty(QtProperty *property)
Removes the specified property (and its subproperties) from the property browser's list of top level ...
void unsetFactoryForManager(QtAbstractPropertyManager *manager)
Removes the association between the given manager and the factory bound to it, automatically calling ...
QtBrowserItem * insertProperty(QtProperty *property, QtProperty *afterProperty)
Inserts the given property (and its subproperties) after the specified afterProperty in the browser's...
void setCurrentItem(QtBrowserItem *)
Sets the current item in the property browser to item.
~QtAbstractPropertyBrowser()
Destroys the property browser, and destroys all the items that were created by this property browser.
void clear()
Removes all the properties from the editor, but does not delete them since they can still be used in ...
void propertyChanged(QtProperty *property) const
void propertyInserted(QtProperty *property, QtProperty *parentProperty, QtProperty *afterProperty) const
void propertyRemoved(QtProperty *property, QtProperty *parentProperty) const
QSet< QtProperty * > m_properties
The QtAbstractPropertyManager provides an interface for property managers.
virtual void initializeProperty(QtProperty *property)=0
This function is called whenever a new valid property pointer has been created, passing the pointer a...
virtual QIcon valueIcon(const QtProperty *property) const
Returns an icon representing the current state of the given property.
QSet< QtProperty * > properties() const
Returns the set of properties created by this manager.
~QtAbstractPropertyManager()
Destroys the manager.
virtual bool hasValue(const QtProperty *property) const
Returns whether the given property has a value.
virtual QtProperty * createProperty()
Creates a property.
void clear() const
Destroys all the properties that this manager has created.
virtual QString valueText(const QtProperty *property) const
Returns a string representing the current state of the given property.
virtual void uninitializeProperty(QtProperty *property)
This function is called just before the specified property is destroyed.
QtBrowserItemPrivate(QtAbstractPropertyBrowser *browser, QtProperty *property, QtBrowserItem *parent)
QtAbstractPropertyBrowser *const m_browser
void addChild(QtBrowserItem *index, QtBrowserItem *after)
void removeChild(QtBrowserItem *index)
QList< QtBrowserItem * > m_children
The QtBrowserItem class represents a property in a property browser instance.
QtProperty * property() const
Returns the property which is accosiated with this item.
QtAbstractPropertyBrowser * browser() const
Returns the property browser which owns this item.
QList< QtBrowserItem * > children() const
Returns the children items of this item.
QtBrowserItem * parent() const
Returns the parent item of this item.
QtPropertyPrivate(QtAbstractPropertyManager *manager)
QSet< QtProperty * > m_parentItems
QString m_descriptionToolTip
QtAbstractPropertyManager *const m_manager
QList< QtProperty * > m_subItems
The QtProperty class encapsulates an instance of a property.
void setModified(bool modified)
Sets the property's modified state according to the passed modified value.
void addSubProperty(QtProperty *property)
Appends the given property to this property's subproperties.
QString propertyName() const
Returns the property's name.
bool isEnabled() const
Returns whether the property is enabled.
void setEnabled(bool enable)
Enables or disables the property according to the passed enable value.
bool hasValue() const
Returns whether the property has a value.
void insertSubProperty(QtProperty *property, QtProperty *afterProperty)
Inserts the given property after the specified precedingProperty into this property's list of subprop...
QList< QtProperty * > subProperties() const
Returns the set of subproperties.
QString whatsThis() const
Returns the property's "What's This" help text.
void removeSubProperty(QtProperty *property)
Removes the given property from the list of subproperties without deleting it.
QString statusTip() const
Returns the property's status tip.
QIcon valueIcon() const
Returns an icon representing the current state of this property.
bool isModified() const
Returns whether the property is modified.
virtual ~QtProperty()
Destroys this property.
QString valueText() const
Returns a string representing the current state of this property.
QString valueToolTip() const
Returns the property value's tool tip.
QtProperty(QtAbstractPropertyManager *manager)
Creates a property with the given manager.
QString descriptionToolTip() const
Returns the property description's tool tip.
QtAbstractPropertyManager * propertyManager() const
Returns a pointer to the manager that owns this property.
Combined button and popup list for selecting options.