14#include <QTableWidget>
77 void contextMenu(QPoint screenPos, QGraphicsItem *itemAtMouse);
108 void applyCapabilitiesToUi();
112 void defaultAppearance();
114 void rebuildAppearanceStateTiles(const QList<std::pair<
int, QString>> &states);
116 void inputIndexChanged(const
int index);
118 void inputLocked(const
bool value);
120 void outputIndexChanged(const
int index);
122 void outputValueChanged(const QString &value);
124 void selectionChanged();
128 void setTruthTableProposition(const
int row, const
int column);
130 void triggerChanged(const QString &cmd);
132 void blobNameEditingFinished();
137 QDialog *m_tableBox =
nullptr;
138 QTableWidget *m_table =
nullptr;
139 Scene *m_scene =
nullptr;
145 QString m_appearanceName;
146 bool m_isDefaultAppearance = true;
147 bool m_isUpdatingAppearance = false;
150 QString m_manyAudios = tr(
"<Many sounds>");
151 QString m_manyColors = tr(
"<Many colors>");
152 QString m_manyDelay = tr(
"<Many values>");
153 QString m_manyFreq = tr(
"<Many values>");
154 QString m_manyIS = tr(
"<Many values>");
155 QString m_manyLabels = tr(
"<Many labels>");
156 QString m_manyOS = tr(
"<Many values>");
157 QString m_manyOV = tr(
"<Many values>");
158 QString m_manyTriggers = tr(
"<Many triggers>");
159 QString m_manyWirelessModes = tr(
"<Many modes>");
ElementEditorUi: hand-written UI class for the ElementEditor widget.
PropertyDescriptor struct for describing editable element properties.
Main circuit editing scene with undo/redo and user interaction.
SelectionCapabilities struct and computeCapabilities() free function.
void openSubcircuitFileRequested(const QString &filePath)
Emitted when the user requests editing a file-backed IC's sub-circuit file.
void setScene(Scene *scene)
Associates the editor with scene to read/write selected elements.
void audioBox()
Opens the audio file selector for the selected element(s).
void update()
Refreshes the editor UI to reflect the current selection.
void sendCommand(QUndoCommand *cmd)
Emitted when a property change should be pushed onto the undo stack.
~ElementEditor() override
void fillColorComboBox()
Repopulates the color combo box with available color options.
void contextMenu(QPoint screenPos, QGraphicsItem *itemAtMouse)
Shows the element context menu at screenPos for the item under itemAtMouse.
void updateElementAppearance()
Applies the chosen appearance to the selected element(s).
void editSubcircuitRequested(const QString &blobName, int icElementId)
Emitted when the user requests editing an embedded IC sub-circuit.
void truthTable()
Opens the truth table editor for the selected element(s).
void renameAction()
Opens an inline editor to rename the selected element(s).
ElementEditor(QWidget *parent=nullptr)
Constructs the element editor with optional parent.
void updateTheme()
Applies the current theme colors to the editor widgets.
friend class ElementTabNavigator
void extractToFileRequested()
Emitted when the user requests extracting an embedded IC to file.
void changeTriggerAction()
Opens a dialog to change the trigger key for the selected element(s).
void embedSubcircuitRequested()
Emitted when the user requests embedding a file-backed IC.
void retranslateUi()
Re-applies translatable strings to all editor widgets.
Event filter that cycles scene element selection on Tab / Shift+Tab.
Abstract base class for all graphical circuit elements in wiRedPanda.
Main circuit editing scene.
Describes one editable property that a GraphicElement exposes in the ElementEditor.
Computed capabilities and consensus state of the current element selection.