47 EXPECT_EQ(items.size(), 0);
60 EXPECT_EQ(items.size(), 0);
78 EXPECT_EQ(items.size(), 3);
79 EXPECT_EQ(strategy.horizontalHeaderLabels(), QStringList() <<
"a"
84 auto view_x = items.at(0).get();
87 auto view_y = items.at(1).get();
90 auto view_z = items.at(2).get();
104 QStringList expected = QStringList() <<
"X"
121 EXPECT_EQ(items.size(), 0);
125 EXPECT_EQ(items.size(), 0);
145 EXPECT_EQ(items.size(), 0);
148 items = strategy.constructRow(parent);
149 EXPECT_EQ(items.size(), 1);
161 EXPECT_EQ(items.size(), 0);
Constructs row of QStandardItem's for given SessionItem.
QStringList horizontalHeaderLabels() const override
std::vector< std::unique_ptr< ViewItem > > constructRow(SessionItem *item) override
Item to carry concrete editable entity (e.g.
The main object representing an editable/displayable/serializable entity.
SessionItem * getItem(const std::string &tag, int row=0) const
Returns item at given row of given tag.
void registerTag(const TagInfo &tagInfo, bool set_as_default=false)
Registers tag to hold items under given name.
bool setData(const T &value, int role=ItemDataRole::DATA, bool direct=false)
Sets data for a given role.
T property(const std::string &tag) const
Returns data stored in property item.
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.
static const std::string P_X
static const std::string P_Z
static const std::string P_Y
~PropertiesRowStrategyTest()
const model_type PropertyType
materialitems.h Collection of materials to populate MaterialModel.
TEST_F(PropertiesRowStrategyTest, initialState)