Skip to content

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
structOverrideMode
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
voidresized() override
voidpaint(juce::Graphics & g) override
intgetNumRows() override
voidpaintListBoxItem(int rowNumber, juce::Graphics & g, int width, int height, bool rowIsSelected) override
voidselectedRowsChanged(int lastRowSelected) override
voidbuttonClicked(juce::Button * button) override
boolhasUnsavedChanges() const
Override-mode only: returns true if the user has edited form-state since the editor opened (or the last Save).
voidsaveAndClose()
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/) whose ProfileStore this 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() override

function resized

void resized() override

function paint

void paint(
juce::Graphics & g
) override

function getNumRows

int getNumRows() override

function paintListBoxItem

void paintListBoxItem(
int rowNumber,
juce::Graphics & g,
int width,
int height,
bool rowIsSelected
) override

function selectedRowsChanged

void selectedRowsChanged(
int lastRowSelected
) override

function buttonClicked

void buttonClicked(
juce::Button * button
) override

function hasUnsavedChanges

bool hasUnsavedChanges() const

Override-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