Loading...
Searching...
No Matches
score::PanelDelegate Class Referenceabstract

The PanelDelegate class. More...

Inheritance diagram for score::PanelDelegate:
Explorer::PanelDelegate InspectorPanel::PanelDelegate JS::PanelDelegate Library::ProcessPanel Library::ProjectPanel Library::UserPanel Mixer::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
 
virtual QWidget * widget ()=0
 widget The widget of the panel.
 
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
 

Protected Member Functions

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

Member Function Documentation

◆ defaultPanelStatus()

virtual const PanelStatus & score::PanelDelegate::defaultPanelStatus ( ) const
pure virtual

defaultPanelStatus Metadata of the panel.

Implemented in score::HelperPanelDelegate.

◆ document()

MaybeDocument score::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 score::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 score::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 score::MessagesPanelDelegate, score::HelperPanelDelegate, Explorer::PanelDelegate, and Mixer::PanelDelegate.


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