20#ifndef LIBREPCB_EDITOR_COMPONENTCATEGORYTAB_H
21#define LIBREPCB_EDITOR_COMPONENTCATEGORYTAB_H
26#include "../libraryeditortab.h"
39class ComponentCategory;
43class CategoryTreeModel;
66 std::unique_ptr<ComponentCategory> cat,
67 Mode mode, QObject* parent =
nullptr) noexcept;
72 ui::TabData
getUiData() const noexcept override;
75 void trigger(ui::TabAction a) noexcept override;
85 bool checkOnly) override;
86 template <typename MessageType>
89 template <typename MessageType>
92 bool approved) noexcept override;
120 std::shared_ptr<slint::VectorModel<slint::SharedString>>
mParents;
The ComponentCategory class.
Definition componentcategory.h:44
This class represents absolute, well-formatted paths to files or directories.
Definition filepath.h:127
The RuleCheckMessage class.
Definition rulecheckmessage.h:45
The SExpression class.
Definition sexpression.h:69
The Signal class is used to emit signals on non-QObject derived classes.
Definition signalslot.h:65
The Uuid class is a replacement for QUuid to get UUID strings without {} braces.
Definition uuid.h:56
The Version class represents a version number in the format "1.42.7".
Definition version.h:58
The CategoryTreeModel class.
Definition categorytreemodel.h:50
The ComponentCategoryTab class.
Definition componentcategorytab.h:52
slint::SharedString mVersionError
Definition componentcategorytab.h:116
bool requestClose() noexcept override
Request to close the tab.
Definition componentcategorytab.cpp:232
std::optional< std::pair< RuleCheckMessageList, QSet< SExpression > > > runChecksImpl() override
Definition componentcategorytab.cpp:260
bool save() noexcept
Definition componentcategorytab.cpp:384
std::shared_ptr< slint::VectorModel< slint::SharedString > > mParents
Definition componentcategorytab.h:120
slint::SharedString mName
Definition componentcategorytab.h:109
std::shared_ptr< CategoryTreeModel > mParentsModel
Definition componentcategorytab.h:121
Signal< ComponentCategoryTab > onDerivedUiDataChanged
Definition componentcategorytab.h:57
void setDerivedUiData(const ui::CategoryTabData &data) noexcept
Definition componentcategorytab.cpp:162
slint::SharedString mDescription
Definition componentcategorytab.h:112
Mode
Definition componentcategorytab.h:60
std::unique_ptr< ComponentCategory > mCategory
Definition componentcategorytab.h:103
slint::SharedString mVersion
Definition componentcategorytab.h:115
bool mDeprecated
Definition componentcategorytab.h:118
ComponentCategoryTab()=delete
void messageApprovalChanged(const SExpression &approval, bool approved) noexcept override
Definition componentcategorytab.cpp:287
bool autoFixImpl(const std::shared_ptr< const RuleCheckMessage > &msg, bool checkOnly) override
Definition componentcategorytab.cpp:265
FilePath getDirectoryPath() const noexcept override
Definition componentcategorytab.cpp:108
bool autoFixHelper(const std::shared_ptr< const RuleCheckMessage > &msg, bool checkOnly)
Definition componentcategorytab.cpp:273
Version mVersionParsed
Definition componentcategorytab.h:117
void commitUiData() noexcept
Definition componentcategorytab.cpp:358
bool autoFix(const MessageType &msg)
slint::SharedString mNameError
Definition componentcategorytab.h:110
slint::SharedString mKeywords
Definition componentcategorytab.h:113
bool mChooseParent
Definition componentcategorytab.h:106
void trigger(ui::TabAction a) noexcept override
Definition componentcategorytab.cpp:189
void notifyDerivedUiDataChanged() noexcept override
Definition componentcategorytab.cpp:297
ElementName mNameParsed
Definition componentcategorytab.h:111
std::optional< Uuid > mParent
Definition componentcategorytab.h:119
slint::SharedString mAuthor
Definition componentcategorytab.h:114
bool isWritable() const noexcept
Definition componentcategorytab.cpp:324
ui::TabData getUiData() const noexcept override
Definition componentcategorytab.cpp:112
ui::CategoryTabData getDerivedUiData() const noexcept
Definition componentcategorytab.cpp:134
void refreshUiData() noexcept
Definition componentcategorytab.cpp:328
ComponentCategoryTab(const ComponentCategoryTab &other)=delete
The LibraryEditor class.
Definition libraryeditor.h:56
Specialized base class for all library editor tabs.
Definition libraryeditortab.h:55
Definition occmodel.cpp:77
QVector< std::shared_ptr< const RuleCheckMessage > > RuleCheckMessageList
Definition rulecheckmessage.h:104
type_safe::constrained_type< QString, ElementNameConstraint, ElementNameVerifier > ElementName
Definition elementname.h:84