score::PanelDelegate Class Referenceabstract
The PanelDelegate class. More...
Inheritance diagram for score::PanelDelegate:
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::GUIApplicationContext & | context () 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 PanelStatus & | defaultPanelStatus () 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()
|
protectedvirtual |
on_modelChanged This function is called when the visible document changes.
- Parameters
-
oldm The previous (actual) document or nothing if there was none. newm The new document (or nothing if the user closed everything).
◆ setNewSelection()
|
virtual |
setNewSelection This function will be called if the selected objects change in score
- Parameters
-
s The new selection.
◆ 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:
- PanelDelegate.hpp
- PanelDelegate.cpp