20#ifndef LIBREPCB_EDITOR_DEVICETAB_H
21#define LIBREPCB_EDITOR_DEVICETAB_H
26#include "../libraryeditortab.h"
46class AttributeListModel;
47class CategoryTreeModel;
48class ComponentSignalNameListModel;
49class DevicePinoutBuilder;
50class DevicePinoutListModel;
51class FootprintGraphicsItem;
54class LibraryElementCategoriesModel;
56class SymbolGraphicsItem;
79 Mode mode, QObject* parent =
nullptr) noexcept;
84 ui::TabData
getUiData() const noexcept override;
87 void trigger(ui::TabAction a) noexcept override;
89 int scene) noexcept override;
99 bool checkOnly) override;
100 template <typename MessageType>
103 template <typename MessageType>
106 bool approved) noexcept override;
114 bool save() noexcept;
The Component class represents a "generic" device in the library.
Definition component.h:73
The Device class represents an instance of a component (a "real" component)
Definition device.h:55
This class represents absolute, well-formatted paths to files or directories.
Definition filepath.h:127
The Image class.
Definition image.h:49
The Package class represents a package of a component (including footprint and 3D model)
Definition package.h:59
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 Symbol class represents the part of a component which is added to schematics.
Definition symbol.h:56
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 AttributeListModel class.
Definition attributelistmodel.h:49
The CategoryTreeModel class.
Definition categorytreemodel.h:50
The ComponentSignalNameListModel class.
Definition componentsignalnamelistmodel.h:50
The DevicePinoutBuilder class.
Definition devicepinoutbuilder.h:49
The DevicePinoutListModel class.
Definition devicepinoutlistmodel.h:51
The DeviceTab class.
Definition devicetab.h:65
slint::Image renderScene(float width, float height, int scene) noexcept override
Definition devicetab.cpp:492
DeviceTab(const DeviceTab &other)=delete
slint::SharedString mVersionError
Definition devicetab.h:144
std::shared_ptr< LibraryElementCategoriesModel > mCategories
Definition devicetab.h:147
bool requestClose() noexcept override
Request to close the tab.
Definition devicetab.cpp:509
std::optional< std::pair< RuleCheckMessageList, QSet< SExpression > > > runChecksImpl() override
Definition devicetab.cpp:537
slint::SharedString mDatasheetUrlError
Definition devicetab.h:150
bool save() noexcept
Definition devicetab.cpp:789
std::unique_ptr< FootprintGraphicsItem > mFootprintGraphicsItem
Definition devicetab.h:169
std::shared_ptr< ComponentSignalNameListModel > mSignalNames
Definition devicetab.h:125
void selectComponent() noexcept
Definition devicetab.cpp:826
slint::SharedString mName
Definition devicetab.h:137
void setDerivedUiData(const ui::DeviceTabData &data) noexcept
Definition devicetab.cpp:313
QString mComponentDescription
Definition devicetab.h:164
QList< std::shared_ptr< SymbolGraphicsItem > > mSymbolGraphicsItems
Definition devicetab.h:166
ui::DeviceTabData getDerivedUiData() const noexcept
Definition devicetab.cpp:238
slint::SharedString mDescription
Definition devicetab.h:140
Mode
Definition devicetab.h:73
std::shared_ptr< const Component > mComponent
Definition devicetab.h:163
slint::SharedString mVersion
Definition devicetab.h:143
bool mWizardMode
Definition devicetab.h:130
bool mDeprecated
Definition devicetab.h:146
const bool mIsNewElement
Definition devicetab.h:122
std::shared_ptr< const Package > mPackage
Definition devicetab.h:167
Uuid mOriginalComponentUuid
Definition devicetab.h:158
void messageApprovalChanged(const SExpression &approval, bool approved) noexcept override
Definition devicetab.cpp:569
void selectPackage() noexcept
Definition devicetab.cpp:862
bool autoFixImpl(const std::shared_ptr< const RuleCheckMessage > &msg, bool checkOnly) override
Definition devicetab.cpp:546
bool mPackageSelected
Definition devicetab.h:133
std::shared_ptr< DevicePinoutListModel > mPinout
Definition devicetab.h:152
DevicePadSignalMap mOriginalPadSignalMap
Definition devicetab.h:160
FilePath getDirectoryPath() const noexcept override
Definition devicetab.cpp:212
bool autoFixHelper(const std::shared_ptr< const RuleCheckMessage > &msg, bool checkOnly)
Definition devicetab.cpp:555
slint::SharedString mDatasheetUrl
Definition devicetab.h:149
std::shared_ptr< AttributeListModel > mAttributes
Definition devicetab.h:151
std::unique_ptr< GraphicsScene > mPackageScene
Definition devicetab.h:127
Version mVersionParsed
Definition devicetab.h:145
std::unique_ptr< DevicePinoutBuilder > mPinoutBuilder
Definition devicetab.h:124
void commitUiData() noexcept
Definition devicetab.cpp:739
bool autoFix(const MessageType &msg)
std::shared_ptr< slint::SortModel< ui::DevicePinoutData > > mPinoutSorted
Definition devicetab.h:153
slint::SharedString mNameError
Definition devicetab.h:138
std::unique_ptr< GraphicsScene > mComponentScene
Definition devicetab.h:126
slint::SharedString mKeywords
Definition devicetab.h:141
Signal< DeviceTab > onDerivedUiDataChanged
Definition devicetab.h:70
std::unique_ptr< Device > mDevice
Definition devicetab.h:120
void trigger(ui::TabAction a) noexcept override
Definition devicetab.cpp:347
std::shared_ptr< CategoryTreeModel > mCategoriesTree
Definition devicetab.h:148
QCollator mCollator
Definition devicetab.h:123
bool mComponentSelected
Definition devicetab.h:132
void notifyDerivedUiDataChanged() noexcept override
Definition devicetab.cpp:579
bool mChooseCategory
Definition devicetab.h:134
ElementName mNameParsed
Definition devicetab.h:139
std::shared_ptr< PartListModel > mParts
Definition devicetab.h:154
Uuid mOriginalPackageUuid
Definition devicetab.h:159
slint::SharedString mAuthor
Definition devicetab.h:142
QList< std::shared_ptr< const Symbol > > mSymbols
Definition devicetab.h:165
bool isWritable() const noexcept
Definition devicetab.cpp:617
const Mode mMode
Definition devicetab.h:121
ui::TabData getUiData() const noexcept override
Definition devicetab.cpp:216
QString mPackageDescription
Definition devicetab.h:168
int mCurrentPageIndex
Definition devicetab.h:131
void refreshDependentElements() noexcept
Definition devicetab.cpp:666
void refreshUiData() noexcept
Definition devicetab.cpp:625
bool mIsInterfaceBroken
Broken interface detection.
Definition devicetab.h:157
The GraphicsScene class.
Definition graphicsscene.h:64
The LibraryEditor class.
Definition libraryeditor.h:56
Specialized base class for all library editor tabs.
Definition libraryeditortab.h:55
The LibraryElementCategoriesModel class.
Definition libraryelementcategoriesmodel.h:50
The PartListModel class.
Definition partlistmodel.h:49
The SymbolGraphicsItem class.
Definition symbolgraphicsitem.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