rePropertyWidget::rePropertyWidget( QWidget* parent /*= 0*/ ): QWidget(parent) { _contextModel = 0; ui.setupUi(this); propertyModel = new rePropertyModel(); ui.tree->setModel(propertyModel); connect(propertyModel, SIGNAL(objectsAboutToBeChanged(reObjectList&)), SLOT(objectsAboutToBeChanged(reObjectList&))); connect(propertyModel, SIGNAL(objectsChanged()), SLOT(objectsChanged())); QItemEditorFactory* factory = new reDefaultItemEditorFactory(); QItemEditorFactory::setDefaultFactory(factory); ui.tree->setAlternatingRowColors(true); ui.tree->setItemDelegate(new rePropertyItemDelegate()); }
int Tiled::Internal::MapScene::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QGraphicsScene::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: setGridVisible((*reinterpret_cast< bool(*)>(_a[1]))); break; case 1: refreshScene(); break; case 2: repaintRegion((*reinterpret_cast< const QRegion(*)>(_a[1]))); break; case 3: currentLayerIndexChanged(); break; case 4: mapChanged(); break; case 5: tilesetChanged((*reinterpret_cast< Tileset*(*)>(_a[1]))); break; case 6: layerAdded((*reinterpret_cast< int(*)>(_a[1]))); break; case 7: layerRemoved((*reinterpret_cast< int(*)>(_a[1]))); break; case 8: layerChanged((*reinterpret_cast< int(*)>(_a[1]))); break; case 9: objectsAdded((*reinterpret_cast< const QList<MapObject*>(*)>(_a[1]))); break; case 10: objectsRemoved((*reinterpret_cast< const QList<MapObject*>(*)>(_a[1]))); break; case 11: objectsChanged((*reinterpret_cast< const QList<MapObject*>(*)>(_a[1]))); break; case 12: updateSelectedObjectItems(); break; default: ; } _id -= 13; } return _id; }
/** * When an object group has changed it may mean its color or drawing order * changed, which affects all its objects. */ void MapItem::objectGroupChanged(ObjectGroup *objectGroup) { objectsChanged(objectGroup->objects()); objectsIndexChanged(objectGroup, 0, objectGroup->objectCount() - 1); }