20#ifndef LIBREPCB_EDITOR_COMPONENTGATELISTMODEL_H
21#define LIBREPCB_EDITOR_COMPONENTGATELISTMODEL_H
42class ComponentGateEditor;
43class ComponentSignalNameListModel;
44class GraphicsLayerList;
46class LibraryElementCache;
48class UndoCommandGroup;
60 public slint::Model<ui::ComponentGateData> {
70 QObject* parent =
nullptr) noexcept;
78 UndoStack* stack, const
bool* wizardMode) noexcept;
84 std::optional<ui::ComponentGateData>
row_data(
std::
size_t i) const override;
86 const ui::ComponentGateData& data) noexcept override;
93 ui::ComponentGateAction a) noexcept;
The Component class represents a "generic" device in the library.
Definition component.h:73
The ComponentSymbolVariantItem class represents one symbol of a component symbol variant.
Definition componentsymbolvariantitem.h:54
The Image class.
Definition image.h:49
The Workspace class represents a workspace with all its data (library, projects, settings,...
Definition workspace.h:54
The ComponentGateEditor class.
Definition componentgateeditor.h:58
The ComponentGateListModel class.
Definition componentgatelistmodel.h:60
void gateUiDataChanged() noexcept
Definition componentgatelistmodel.cpp:291
void listEdited(const ComponentSymbolVariantItemList &list, int index, const std::shared_ptr< const ComponentSymbolVariantItem > &item, ComponentSymbolVariantItemList::Event event) noexcept
Definition componentgatelistmodel.cpp:255
ComponentSymbolVariantItemList * mList
Definition componentgatelistmodel.h:108
std::unique_ptr< UndoCommandGroup > createSuffixUpdateCmd()
Definition componentgatelistmodel.cpp:325
const GraphicsLayerList & mLayers
Definition componentgatelistmodel.h:103
slint::Image renderScene(int gate, float width, float height) noexcept
Definition componentgatelistmodel.cpp:115
void trigger(int index, std::shared_ptr< ComponentSymbolVariantItem > obj, ui::ComponentGateAction a) noexcept
Definition componentgatelistmodel.cpp:218
QPointer< Component > mComponent
Definition componentgatelistmodel.h:105
void add()
Definition componentgatelistmodel.cpp:133
const Workspace & mWorkspace
Definition componentgatelistmodel.h:102
void set_row_data(std::size_t i, const ui::ComponentGateData &data) noexcept override
Definition componentgatelistmodel.cpp:196
void setReferences(ComponentSymbolVariantItemList *list, QPointer< Component > component, QPointer< GraphicsScene > componentScene, const std::shared_ptr< ComponentSignalNameListModel > &sigs, UndoStack *stack, const bool *wizardMode) noexcept
Definition componentgatelistmodel.cpp:75
const LibraryElementCache & mCache
Definition componentgatelistmodel.h:104
ComponentSymbolVariantItemList::OnEditedSlot mOnEditedSlot
Definition componentgatelistmodel.h:115
std::size_t row_count() const override
Definition componentgatelistmodel.cpp:183
ComponentGateListModel()=delete
QPointer< GraphicsScene > mComponentScene
Definition componentgatelistmodel.h:106
std::optional< ui::ComponentGateData > row_data(std::size_t i) const override
Definition componentgatelistmodel.cpp:187
const bool * mWizardMode
Definition componentgatelistmodel.h:110
QPointer< UndoStack > mUndoStack
Definition componentgatelistmodel.h:109
QList< std::shared_ptr< ComponentGateEditor > > mItems
Definition componentgatelistmodel.h:112
std::shared_ptr< ComponentSignalNameListModel > mSignals
Definition componentgatelistmodel.h:107
void execCmd(UndoCommand *cmd, bool updateSuffixes)
Definition componentgatelistmodel.cpp:299
ComponentGateListModel(const ComponentGateListModel &other)=delete
The ComponentSignalNameListModel class.
Definition componentsignalnamelistmodel.h:50
The GraphicsLayerList class.
Definition graphicslayerlist.h:48
The GraphicsScene class.
Definition graphicsscene.h:64
Cache for fast access to library elements.
Definition libraryelementcache.h:56
The UndoCommandGroup class makes it possible to pack multiple undo commands together (it acts as a pa...
Definition undocommandgroup.h:44
The UndoCommand class represents a command which you can undo/redo.
Definition undocommand.h:46
The UndoStack class holds UndoCommand objects and provides undo/redo commands.
Definition undostack.h:106
Definition occmodel.cpp:77