20 #include <QJsonObject>
48 EXPECT_EQ(group->currentIndex(), groupCopy->currentIndex());
49 EXPECT_EQ(group->currentItem()->modelType(), groupCopy->currentItem()->modelType());
63 group->children().at(1)->setProperty(SphereItem::P_RADIUS, 43.0);
64 group->children().at(2)->setProperty(AnysoPyramidItem::P_LENGTH, 44.0);
71 EXPECT_EQ(groupCopy->currentIndex(), group->currentIndex());
72 EXPECT_EQ(groupCopy->currentItem()->modelType(), group->currentItem()->modelType());
74 EXPECT_EQ(groupCopy->children().at(1)->property<
double>(SphereItem::P_RADIUS), 43.0);
75 EXPECT_EQ(groupCopy->children().at(2)->property<
double>(AnysoPyramidItem::P_LENGTH), 44.0);
static const QString P_RADIUS
void setCurrentType(const std::string &model_type)
Sets item corresponding to given model type.
int childrenCount() const
Returns total number of children in all tags.
SessionItem * rootItem() const
Returns root item of the model.
T * insertItem(SessionItem *parent=nullptr, const TagRow &tagrow={})
Inserts item into given parent under given tagrow.
Testing serialization of ToyItems using json converters.
~ToyItemsSerializationTest()
Represents an anysotropical pyramid.
Represents a cylindrical shape.
Represents a layer, with thickness and color, and possibly populated with particles.
Represents multilayer with collection of layers.
Represents a particle, with a position, and a selection of possible shapes.
Represents a group item holding a collection of shapes.
std::unique_ptr< T > CreateCopy(const T &model)
Creates full deep copy of given model. All item's ID will be generated.
materialitems.h Collection of materials to populate MaterialModel.
const ModelView::model_type AnysoPyramidItemType
Collection of toy items and models for testing purposes.
TEST_F(ToyItemsSerializationTest, defaultShapeGroupItemInModel)
Checking ShapeGroupItem in a model.