49 EXPECT_EQ(viewModel.rowCount(), 0);
50 EXPECT_EQ(viewModel.columnCount(), 0);
68 EXPECT_EQ(viewModel.rowCount(), 1);
69 EXPECT_EQ(viewModel.columnCount(), 1);
71 viewModel.setRootSessionItem(parent);
72 EXPECT_EQ(viewModel.rowCount(), 0);
73 EXPECT_EQ(viewModel.columnCount(), 0);
85 EXPECT_EQ(viewModel.rowCount(), 1);
86 EXPECT_EQ(viewModel.columnCount(), 3);
89 viewModel.setRootSessionItem(parent);
90 EXPECT_EQ(viewModel.rowCount(), 0);
91 EXPECT_EQ(viewModel.columnCount(), 0);
107 EXPECT_EQ(viewModel.rowCount(), 0);
108 EXPECT_EQ(viewModel.columnCount(), 0);
121 viewModel.setRootSessionItem(multilayer);
123 EXPECT_EQ(viewModel.rowCount(), 2);
124 EXPECT_EQ(viewModel.columnCount(), 2);
128 EXPECT_EQ(viewModel.rowCount(), 3);
129 EXPECT_EQ(viewModel.columnCount(), 2);
132 viewModel.setRootSessionItem(model.
rootItem());
133 EXPECT_EQ(viewModel.rowCount(), 0);
134 EXPECT_EQ(viewModel.columnCount(), 0);
Item to carry concrete editable entity (e.g.
View model to show content of SessionModel in Qt widgets: all item properties as a table row.
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.
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
~PropertyTableViewModelTest()
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(PropertyTableViewModelTest, initialState)