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);
Group item holds collection of predefined items.
View model to show content of SessionModel in Qt widgets.
Item to carry concrete editable entity (e.g.
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
void setRootSessionItem(SessionItem *item)
SessionItem * sessionItemFromIndex(const QModelIndex &index) const
Tests for PropertyFlatViewModel class.
~PropertyFlatViewModelTest()
Represents a particle, with a position, and a selection of possible shapes.
static const std::string P_SHAPES
const model_type PropertyType
materialitems.h Collection of materials to populate MaterialModel.
const ModelView::model_type SphereItemType
const ModelView::model_type CylinderItemType
TEST_F(PropertyFlatViewModelTest, initialState)