guitar_prometheus::ProfileEditorPanel
guitar_prometheus::ProfileEditorPanel
Modal profile editor. More…
#include <ProfileEditorPanel.h>
Inherits from juce::Component, juce::ListBoxModel, juce::Button::Listener
Public Classes
| Name | |
|---|---|
| struct | OverrideMode Identifies a part the panel is scoped to as an override editor (Phase 10 F10.2). |
Public Functions
| Name | |
|---|---|
| ProfileEditorPanel(AppController & controller, std::optional< juce::Uuid > selectProfileId =std::nullopt) | |
| ProfileEditorPanel(AppController & controller, OverrideMode mode) Override-mode constructor: the editor edits the project’s per-part override for mode.scorePartId. | |
| ~ProfileEditorPanel() override | |
| void | resized() override |
| void | paint(juce::Graphics & g) override |
| int | getNumRows() override |
| void | paintListBoxItem(int rowNumber, juce::Graphics & g, int width, int height, bool rowIsSelected) override |
| void | selectedRowsChanged(int lastRowSelected) override |
| void | buttonClicked(juce::Button * button) override |
| bool | hasUnsavedChanges() const Override-mode only: returns true if the user has edited form-state since the editor opened (or the last Save). |
| void | saveAndClose() Override-mode only: runs the same Save path the Save button uses, then asks the parent DialogWindow to exit. |
Detailed Description
class guitar_prometheus::ProfileEditorPanel;Modal profile editor.
Lists profiles loaded from the AppController’s ProfileStore on the left; on the right, an editor form with one section per editable dimension (identity, technique keyswitches, articulation keyswitches, articulation mods, dynamic velocities, drum map). Edits go through the pure applyProfileEdits function and persist via ProfileStore::save.
Public Functions Documentation
function ProfileEditorPanel
explicit ProfileEditorPanel( AppController & controller, std::optional< juce::Uuid > selectProfileId =std::nullopt)Parameters:
- controller The shared
[AppController](/api-reference/classes/classguitar__prometheus_1_1appcontroller/)whoseProfileStorethis editor mutates. - selectProfileId If set, the editor opens with that profile pre-selected (used by the “New Profile…” flow so the freshly-minted profile is immediately editable).
function ProfileEditorPanel
ProfileEditorPanel( AppController & controller, OverrideMode mode)Override-mode constructor: the editor edits the project’s per-part override for mode.scorePartId.
The profile list is hidden and Save commits via AppController::setProfileOverrideForPart.
function ~ProfileEditorPanel
~ProfileEditorPanel() overridefunction resized
void resized() overridefunction paint
void paint( juce::Graphics & g) overridefunction getNumRows
int getNumRows() overridefunction paintListBoxItem
void paintListBoxItem( int rowNumber, juce::Graphics & g, int width, int height, bool rowIsSelected) overridefunction selectedRowsChanged
void selectedRowsChanged( int lastRowSelected) overridefunction buttonClicked
void buttonClicked( juce::Button * button) overridefunction hasUnsavedChanges
bool hasUnsavedChanges() constOverride-mode only: returns true if the user has edited form-state since the editor opened (or the last Save).
The wrapping dialog uses this to decide whether to show a Save / Discard / Cancel prompt on close. Octave-shift changes are committed immediately and don’t set this flag.
function saveAndClose
void saveAndClose()Override-mode only: runs the same Save path the Save button uses, then asks the parent DialogWindow to exit.
Called from the unsaved-changes prompt’s “Save” branch.
Updated on 2026-05-29 at 07:39:52 +0000