20#ifndef LIBREPCB_EDITOR_PACKAGECATEGORYTAB_H
21#define LIBREPCB_EDITOR_PACKAGECATEGORYTAB_H
26#include "../libraryeditortab.h"
43class CategoryTreeModel;
66 std::unique_ptr<PackageCategory> cat,
Mode mode,
67 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;
117 std::shared_ptr<slint::VectorModel<slint::SharedString>>
mParents;
This class represents absolute, well-formatted paths to files or directories.
Definition filepath.h:127
The PackageCategory class.
Definition packagecategory.h:44
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 LibraryEditor class.
Definition libraryeditor.h:57
Specialized base class for all library editor tabs.
Definition libraryeditortab.h:54
The PackageCategoryTab class.
Definition packagecategorytab.h:52
std::unique_ptr< PackageCategory > mCategory
Definition packagecategorytab.h:103
void autoFix(const MessageType &msg)
slint::SharedString mVersionError
Definition packagecategorytab.h:113
bool requestClose() noexcept override
Request to close the tab.
Definition packagecategorytab.cpp:229
std::optional< std::pair< RuleCheckMessageList, QSet< SExpression > > > runChecksImpl() override
Definition packagecategorytab.cpp:257
bool save() noexcept
Definition packagecategorytab.cpp:370
std::shared_ptr< slint::VectorModel< slint::SharedString > > mParents
Definition packagecategorytab.h:117
slint::SharedString mName
Definition packagecategorytab.h:106
std::shared_ptr< CategoryTreeModel > mParentsModel
Definition packagecategorytab.h:118
void setDerivedUiData(const ui::CategoryTabData &data) noexcept
Definition packagecategorytab.cpp:160
slint::SharedString mDescription
Definition packagecategorytab.h:109
Mode
Definition packagecategorytab.h:60
slint::SharedString mVersion
Definition packagecategorytab.h:112
bool mDeprecated
Definition packagecategorytab.h:115
void messageApprovalChanged(const SExpression &approval, bool approved) noexcept override
Definition packagecategorytab.cpp:281
bool autoFixImpl(const std::shared_ptr< const RuleCheckMessage > &msg, bool checkOnly) override
Definition packagecategorytab.cpp:262
PackageCategoryTab(const PackageCategoryTab &other)=delete
FilePath getDirectoryPath() const noexcept override
Definition packagecategorytab.cpp:107
bool autoFixHelper(const std::shared_ptr< const RuleCheckMessage > &msg, bool checkOnly)
Definition packagecategorytab.cpp:270
Version mVersionParsed
Definition packagecategorytab.h:114
void commitUiData() noexcept
Definition packagecategorytab.cpp:350
slint::SharedString mNameError
Definition packagecategorytab.h:107
slint::SharedString mKeywords
Definition packagecategorytab.h:110
Signal< PackageCategoryTab > onDerivedUiDataChanged
Definition packagecategorytab.h:57
void trigger(ui::TabAction a) noexcept override
Definition packagecategorytab.cpp:186
void notifyDerivedUiDataChanged() noexcept override
Definition packagecategorytab.cpp:291
ElementName mNameParsed
Definition packagecategorytab.h:108
std::optional< Uuid > mParent
Definition packagecategorytab.h:116
slint::SharedString mAuthor
Definition packagecategorytab.h:111
bool isWritable() const noexcept
Definition packagecategorytab.cpp:316
ui::TabData getUiData() const noexcept override
Definition packagecategorytab.cpp:111
ui::CategoryTabData getDerivedUiData() const noexcept
Definition packagecategorytab.cpp:133
void refreshUiData() noexcept
Definition packagecategorytab.cpp:320
PackageCategoryTab()=delete
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