score::PanelDelegate Class Referenceabstract

The PanelDelegate class. More...

Inheritance diagram for score::PanelDelegate:
Explorer::PanelDelegate InspectorPanel::PanelDelegate Library::ProcessPanel Library::ProjectPanel Library::UserPanel Mixer::PanelDelegate PanelDelegate Scenario::ObjectPanelDelegate score::HelperPanelDelegate score::MessagesPanelDelegate score::UndoPanelDelegate

Detailed Description

The PanelDelegate class.

Base class for the panels on the sides of score. A panel is something that may outlive a document. When the document changes, all the panels are updated with the new visible document.

See also
PanelStatus

Public Member Functions

 PanelDelegate (const score::GUIApplicationContext &ctx)
 
const score::GUIApplicationContextcontext () const
 
void setModel (const score::DocumentContext &model)
 
void setModel (std::nullopt_t n)
 
MaybeDocument document () const
 document The std::optional current document More...
 
virtual QWidget * widget ()=0
 widget The widget of the panel. More...
 
virtual const PanelStatusdefaultPanelStatus () const =0
 defaultPanelStatus Metadata of the panel.
 
virtual void setNewSelection (const Selection &s)
 setNewSelection This function will be called if the selected objects change in score More...
 

Protected Member Functions

virtual void on_modelChanged (MaybeDocument oldm, MaybeDocument newm)
 on_modelChanged This function is called when the visible document changes. More...
 

Member Function Documentation

◆ document()

MaybeDocument PanelDelegate::document ( ) const

document The std::optional current document

Returns
The document if there is a current document in score, else nothing.

◆ on_modelChanged()

void PanelDelegate::on_modelChanged ( MaybeDocument  oldm,
MaybeDocument  newm 
)
protectedvirtual

on_modelChanged This function is called when the visible document changes.

Parameters
oldmThe previous (actual) document or nothing if there was none.
newmThe new document (or nothing if the user closed everything).

◆ setNewSelection()

void PanelDelegate::setNewSelection ( const Selection s)
virtual

setNewSelection This function will be called if the selected objects change in score

Parameters
sThe new selection.

◆ widget()

virtual QWidget* score::PanelDelegate::widget ( )
pure virtual

widget The widget of the panel.

Note
The View class takes ownership of it.

Implemented in Mixer::PanelDelegate, Explorer::PanelDelegate, score::HelperPanelDelegate, and score::MessagesPanelDelegate.


The documentation for this class was generated from the following files: