20#ifndef LIBREPCB_EDITOR_LIBRARYELEMENTCATEGORIESMODEL_H
21#define LIBREPCB_EDITOR_LIBRARYELEMENTCATEGORIESMODEL_H
50 public slint::Model<ui::LibraryElementCategoryData> {
65 QObject* parent =
nullptr) noexcept;
71 void add(
const Uuid& category)
noexcept;
75 std::optional<ui::LibraryElementCategoryData>
row_data(
76 std::size_t i)
const override;
79 const ui::LibraryElementCategoryData& data)
noexcept override;
The Uuid class is a replacement for QUuid to get UUID strings without {} braces.
Definition uuid.h:56
The Workspace class represents a workspace with all its data (library, projects, settings,...
Definition workspace.h:54
The LibraryElementCategoriesModel class.
Definition libraryelementcategoriesmodel.h:50
void add(const Uuid &category) noexcept
Definition libraryelementcategoriesmodel.cpp:68
void set_row_data(std::size_t i, const ui::LibraryElementCategoryData &data) noexcept override
Definition libraryelementcategoriesmodel.cpp:89
Type
Definition libraryelementcategoriesmodel.h:55
std::vector< ui::LibraryElementCategoryData > mItems
Definition libraryelementcategoriesmodel.h:96
const Workspace & mWs
Definition libraryelementcategoriesmodel.h:93
void modified(const QSet< Uuid > &categories)
void refresh() noexcept
Definition libraryelementcategoriesmodel.cpp:104
LibraryElementCategoriesModel & operator=(const LibraryElementCategoriesModel &rhs)=delete
std::size_t row_count() const override
Definition libraryelementcategoriesmodel.cpp:80
void setCategories(const QSet< Uuid > &categories) noexcept
Definition libraryelementcategoriesmodel.cpp:60
LibraryElementCategoriesModel(const LibraryElementCategoriesModel &other)=delete
const QSet< Uuid > & getCategories() const noexcept
Definition libraryelementcategoriesmodel.h:69
std::optional< ui::LibraryElementCategoryData > row_data(std::size_t i) const override
Definition libraryelementcategoriesmodel.cpp:85
QSet< Uuid > mCategories
Definition libraryelementcategoriesmodel.h:95
const Type mType
Definition libraryelementcategoriesmodel.h:94
void loadItems()
Definition libraryelementcategoriesmodel.cpp:139
LibraryElementCategoriesModel()=delete
Definition occmodel.cpp:77