14#include <QTableWidget>
77 void contextMenu(QPoint screenPos, QGraphicsItem *itemAtMouse);
109 void applyCapabilitiesToUi();
113 void defaultAppearance();
115 void rebuildAppearanceStateTiles(const QList<std::pair<
int, QString>> &states);
117 void inputIndexChanged(const
int index);
119 void inputLocked(const
bool value);
121 void outputIndexChanged(const
int index);
123 void outputValueChanged(const QString &value);
125 void selectionChanged();
129 void setTruthTableProposition(const
int row, const
int column);
131 void triggerChanged(const QString &cmd);
133 void blobNameEditingFinished();
138 QDialog *m_tableBox =
nullptr;
139 QTableWidget *m_table =
nullptr;
140 Scene *m_scene =
nullptr;
146 QString m_appearanceName;
147 bool m_isDefaultAppearance = true;
148 bool m_isUpdatingAppearance = false;
151 QString m_manyAudios = tr(
"<Many sounds>");
152 QString m_manyColors = tr(
"<Many colors>");
153 QString m_manyDelay = tr(
"<Many values>");
154 QString m_manyFreq = tr(
"<Many values>");
155 QString m_manyIS = tr(
"<Many values>");
156 QString m_manyLabels = tr(
"<Many labels>");
157 QString m_manyOS = tr(
"<Many values>");
158 QString m_manyOV = tr(
"<Many values>");
159 QString m_manyTriggers = tr(
"<Many triggers>");
160 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).
friend class TestElementEditor
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.