15 #ifndef BORNAGAIN_MVVM_VIEWMODEL_MVVM_VIEWMODEL_VIEWITEM_H
16 #define BORNAGAIN_MVVM_VIEWMODEL_MVVM_VIEWMODEL_VIEWITEM_H
19 #include "mvvm/viewmodel_export.h"
35 int columnCount()
const;
37 void appendRow(std::vector<std::unique_ptr<ViewItem>> items);
39 void insertRow(
int row, std::vector<std::unique_ptr<ViewItem>> items);
47 ViewItem* child(
int row,
int column)
const;
51 int item_role()
const;
57 virtual QVariant data(
int qt_role)
const;
59 virtual bool setData(
const QVariant& value,
int qt_role);
61 virtual Qt::ItemFlags flags()
const;
63 std::vector<ViewItem*> children()
const;
71 std::unique_ptr<ViewItemImpl>
p_impl;
The main object representing an editable/displayable/serializable entity.
Represents the view of SessionItem's data in a single cell of ViewModel.
std::unique_ptr< ViewItemImpl > p_impl
void removeRow(QGridLayout *layout, int row, bool deleteWidgets=true)
Removes row from grid layout (important: doesn't change row count).
materialitems.h Collection of materials to populate MaterialModel.