54 EXPECT_EQ(viewModel.rowCount(), 0);
55 EXPECT_EQ(viewModel.columnCount(), 0);
71 viewModel.setRootSessionItem(parent);
74 EXPECT_EQ(viewModel.rowCount(), 1);
75 EXPECT_EQ(viewModel.columnCount(), 2);
87 EXPECT_EQ(viewModel.rowCount(), 0);
88 EXPECT_EQ(viewModel.columnCount(), 0);
91 viewModel.setRootSessionItem(parent);
92 EXPECT_EQ(viewModel.rowCount(), 3);
93 EXPECT_EQ(viewModel.columnCount(), 2);
105 viewmodel.setRootSessionItem(layer);
108 EXPECT_EQ(viewmodel.rowCount(), 2);
109 EXPECT_EQ(viewmodel.columnCount(), 2);
114 EXPECT_EQ(viewmodel.rowCount(), 0);
115 EXPECT_EQ(viewmodel.columnCount(), 0);
Item to carry concrete editable entity (e.g.
View model to show content of SessionModel in Qt widgets.
The main object representing an editable/displayable/serializable entity.
void registerTag(const TagInfo &tagInfo, bool set_as_default=false)
Registers tag to hold items under given name.
Main class to hold hierarchy of SessionItem objects.
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.
void removeItem(SessionItem *parent, const TagRow &tagrow)
Removes given row from parent.
static TagInfo universalTag(std::string name, std::vector< std::string > modelTypes={})
Constructs universal tag intended for unlimited amount of various items.
static TagInfo propertyTag(std::string name, std::string model_type)
Constructs tag intended for single property.
Vector item with three x,y,z property items.
int rowCount(const QModelIndex &parent=QModelIndex()) const override
int columnCount(const QModelIndex &parent=QModelIndex()) const override
SessionItem * sessionItemFromIndex(const QModelIndex &index) const
Tests for PropertyViewModel class.
Represents a layer, with thickness and color, and possibly populated with particles.
Represents multilayer with collection of layers.
const model_type PropertyType
materialitems.h Collection of materials to populate MaterialModel.
TEST_F(PropertyViewModelTest, initialState)