|
wiRedPanda
Logic Circuit Simulator
|
Widget for inspecting and editing the properties of selected circuit elements. More...
#include <ElementEditor.h>
Public Member Functions | |
| void | audioBox () |
| Opens the audio file selector for the selected element(s). | |
| void | changeTriggerAction () |
| Opens a dialog to change the trigger key for the selected element(s). | |
| void | contextMenu (QPoint screenPos, QGraphicsItem *itemAtMouse) |
| Shows the element context menu at screenPos for the item under itemAtMouse. | |
| void | editSubcircuitRequested (const QString &blobName, int icElementId) |
| Emitted when the user requests editing an embedded IC sub-circuit. | |
| ElementEditor (QWidget *parent=nullptr) | |
| Constructs the element editor with optional parent. | |
| void | embedSubcircuitRequested () |
| Emitted when the user requests embedding a file-backed IC. | |
| void | extractToFileRequested () |
| Emitted when the user requests extracting an embedded IC to file. | |
| void | fillColorComboBox () |
| Repopulates the color combo box with available color options. | |
| void | openSubcircuitFileRequested (const QString &filePath) |
| Emitted when the user requests editing a file-backed IC's sub-circuit file. | |
| void | renameAction () |
| Opens an inline editor to rename the selected element(s). | |
| void | retranslateUi () |
| Re-applies translatable strings to all editor widgets. | |
| void | sendCommand (QUndoCommand *cmd) |
| Emitted when a property change should be pushed onto the undo stack. | |
| void | setScene (Scene *scene) |
| Associates the editor with scene to read/write selected elements. | |
| void | truthTable () |
| Opens the truth table editor for the selected element(s). | |
| void | update () |
| Refreshes the editor UI to reflect the current selection. | |
| void | updateElementAppearance () |
| Applies the chosen appearance to the selected element(s). | |
| void | updateTheme () |
| Applies the current theme colors to the editor widgets. | |
| ~ElementEditor () override | |
Friends | |
| class | ElementTabNavigator |
Widget for inspecting and editing the properties of selected circuit elements.
The ElementEditor dynamically shows controls appropriate for the current selection: label, color, frequency, input/output count, appearance, trigger, audio, and truth-table. When multiple elements are selected it coalesces values, showing placeholder text when values differ. Property changes are pushed as QUndoCommands.
Definition at line 34 of file ElementEditor.h.
|
explicit |
Constructs the element editor with optional parent.
Definition at line 39 of file ElementEditor.cpp.
References audioBox(), ElementTabNavigator, fillColorComboBox(), truthTable(), and updateElementAppearance().
Referenced by extractToFileRequested().
|
override |
Definition at line 100 of file ElementEditor.cpp.
| void ElementEditor::audioBox | ( | ) |
Opens the audio file selector for the selected element(s).
Definition at line 944 of file ElementEditor.cpp.
References FileDialogProvider::getOpenFileName(), FileDialogs::provider(), and sentryBreadcrumb().
Referenced by ElementEditor().
| void ElementEditor::changeTriggerAction | ( | ) |
Opens a dialog to change the trigger key for the selected element(s).
Definition at line 167 of file ElementEditor.cpp.
| void ElementEditor::contextMenu | ( | QPoint | screenPos, |
| QGraphicsItem * | itemAtMouse ) |
Shows the element context menu at screenPos for the item under itemAtMouse.
Definition at line 135 of file ElementEditor.cpp.
References ElementContextMenu::exec().
Referenced by setScene().
| void ElementEditor::editSubcircuitRequested | ( | const QString & | blobName, |
| int | icElementId ) |
Emitted when the user requests editing an embedded IC sub-circuit.
| void ElementEditor::embedSubcircuitRequested | ( | ) |
Emitted when the user requests embedding a file-backed IC.
| void ElementEditor::extractToFileRequested | ( | ) |
Emitted when the user requests extracting an embedded IC to file.
References ElementEditor().
| void ElementEditor::fillColorComboBox | ( | ) |
Repopulates the color combo box with available color options.
Definition at line 281 of file ElementEditor.cpp.
Referenced by ElementEditor(), and retranslateUi().
| void ElementEditor::openSubcircuitFileRequested | ( | const QString & | filePath | ) |
Emitted when the user requests editing a file-backed IC's sub-circuit file.
| void ElementEditor::renameAction | ( | ) |
Opens an inline editor to rename the selected element(s).
Definition at line 161 of file ElementEditor.cpp.
| void ElementEditor::retranslateUi | ( | ) |
Re-applies translatable strings to all editor widgets.
Definition at line 296 of file ElementEditor.cpp.
References fillColorComboBox().
| void ElementEditor::sendCommand | ( | QUndoCommand * | cmd | ) |
Emitted when a property change should be pushed onto the undo stack.
| cmd | The undo command encapsulating the change. |
Referenced by setScene().
| void ElementEditor::setScene | ( | Scene * | scene | ) |
Associates the editor with scene to read/write selected elements.
Definition at line 260 of file ElementEditor.cpp.
References contextMenu(), Scene::contextMenuPos(), Scene::receiveCommand(), sendCommand(), truthTable(), and Scene::truthTableElementChanged().
| void ElementEditor::truthTable | ( | ) |
Opens the truth table editor for the selected element(s).
Definition at line 837 of file ElementEditor.cpp.
References sentryBreadcrumb().
Referenced by ElementEditor(), and setScene().
| void ElementEditor::update | ( | ) |
Refreshes the editor UI to reflect the current selection.
Definition at line 976 of file ElementEditor.cpp.
| void ElementEditor::updateElementAppearance | ( | ) |
Applies the chosen appearance to the selected element(s).
Definition at line 207 of file ElementEditor.cpp.
References FileDialogProvider::getOpenFileName(), InMemorySnapshot, FileDialogs::provider(), qCDebug, sentryBreadcrumb(), and Serialization::writePandaHeader().
Referenced by ElementEditor().
| void ElementEditor::updateTheme | ( | ) |
Applies the current theme colors to the editor widgets.
Definition at line 983 of file ElementEditor.cpp.
References ThemeManager::effectiveTheme(), and Light.
|
friend |
Definition at line 101 of file ElementEditor.h.
References ElementTabNavigator.
Referenced by ElementEditor(), and ElementTabNavigator.