Sayonara Player
Loading...
Searching...
No Matches
GUI_Spectrum Class Reference
Inheritance diagram for GUI_Spectrum:
VisualPlugin Engine::SpectrumDataReceiver PlayerPlugin::Base Gui::Widget Gui::WidgetTemplate< QWidget > Gui::WidgetTemplateParent

Signals

void sigActionTriggered (bool checked)
 signal is emitted when the plugin action is triggered
also emitted for when closeEvent is fired
 
void sigReload (PlayerPlugin::Base *plugin)
 emitted when reloading is requested, after firing this signal the plugin will be painted new. Useful, if the size has changed
 
void sigOpened ()
 
void sigShown ()
 
void sigClosed ()
 

Public Member Functions

 GUI_Spectrum (SpectrumDataProvider *dataProvider, PlayManager *playManager, QWidget *parent=nullptr)
 
QString name () const override
 must be overwritten
 
QString displayName () const override
 must be overwritten
 
bool isActive () const override
 
void setSpectrum (const std::vector< float > &spectrum) override
 
bool hasTitle () const override
 indicates if title bar is shown or not
 
virtual QAction * pluginAction () const final
 needed by the player ui, final
 
virtual bool hasLoadingBar () const
 indicates if the widget has a loading bar. If yes, there will be reserved some extra space at the bottom of the widget
 
Dialog * boxIntoDialog ()
 

Protected Slots

void doFadeoutStep () override
 

Protected Member Functions

void initUi () override
 GUI will be initialized on first show up. Please use this to make Sayonara starting fast.
 
void retranslate () override
 
QWidget * widget () override
 
bool hasSmallButtons () const override
 
void finalizeInitialization () override
 
void paint () override
 
ColorStyle extractStyle (const RawColorStyle &rawColorStyle) const override
 
bool applyStyle (const ColorStyle &colorStyle) override
 
int loadStyleIndex () const override
 
void saveStyleIndex (int index) const override
 
bool isFadeoutCompleted () const override
 
void notifyDataProvider (bool isActive) override
 
bool isProcessing () const
 
const ColorStylecurrentStyle () const
 
void paintEvent (QPaintEvent *e) override
 
void showEvent (QShowEvent *e) override
 
void closeEvent (QCloseEvent *e) override
 
void resizeEvent (QResizeEvent *e) override
 
void mousePressEvent (QMouseEvent *e) override
 
void enterEvent (QEvent *e) override
 
void leaveEvent (QEvent *e) override
 
virtual bool isUiInitialized () const
 Check if ui already was initialized.
 
virtual void assignUiVariables ()
 
template<typename T, typename UiClass>
void setupParent (T *widget, UiClass **ui)
 
virtual void skinChanged ()
 

Protected Attributes

Dialog * mBoxedDialog = nullptr
 

Member Function Documentation

◆ applyStyle()

bool GUI_Spectrum::applyStyle ( const ColorStyle & colorStyle)
overrideprotectedvirtual

Implements VisualPlugin.

◆ closeEvent()

void VisualPlugin::closeEvent ( QCloseEvent * e)
overrideprotectedvirtualinherited

Reimplemented from PlayerPlugin::Base.

◆ displayName()

QString GUI_Spectrum::displayName ( ) const
nodiscardoverridevirtual

must be overwritten

Returns
the translated name of the plugin

Implements PlayerPlugin::Base.

◆ extractStyle()

ColorStyle GUI_Spectrum::extractStyle ( const RawColorStyle & rawColorStyle) const
nodiscardoverrideprotectedvirtual

Implements VisualPlugin.

◆ finalizeInitialization()

void GUI_Spectrum::finalizeInitialization ( )
overrideprotectedvirtual

Reimplemented from PlayerPlugin::Base.

◆ hasLoadingBar()

virtual bool PlayerPlugin::Base::hasLoadingBar ( ) const
virtualinherited

indicates if the widget has a loading bar. If yes, there will be reserved some extra space at the bottom of the widget

Returns

Reimplemented in Gui::AbstractStationPlugin.

◆ hasSmallButtons()

bool GUI_Spectrum::hasSmallButtons ( ) const
nodiscardoverrideprotectedvirtual

Implements VisualPlugin.

◆ hasTitle()

bool VisualPlugin::hasTitle ( ) const
nodiscardoverridevirtualinherited

indicates if title bar is shown or not

Reimplemented from PlayerPlugin::Base.

◆ initUi()

void GUI_Spectrum::initUi ( )
overrideprotectedvirtual

GUI will be initialized on first show up. Please use this to make Sayonara starting fast.

Implements PlayerPlugin::Base.

◆ isActive()

bool GUI_Spectrum::isActive ( ) const
nodiscardoverridevirtual

◆ isFadeoutCompleted()

bool GUI_Spectrum::isFadeoutCompleted ( ) const
nodiscardoverrideprotectedvirtual

Implements VisualPlugin.

◆ isUiInitialized()

virtual bool PlayerPlugin::Base::isUiInitialized ( ) const
protectedvirtualinherited

Check if ui already was initialized.

Returns

Reimplemented in GUI_SpectrogramPainter.

◆ loadStyleIndex()

int GUI_Spectrum::loadStyleIndex ( ) const
nodiscardoverrideprotectedvirtual

Implements VisualPlugin.

◆ name()

QString GUI_Spectrum::name ( ) const
nodiscardoverridevirtual

must be overwritten

Returns
the NOT translated name of the plugin

Implements PlayerPlugin::Base.

◆ notifyDataProvider()

void GUI_Spectrum::notifyDataProvider ( bool isActive)
overrideprotectedvirtual

Implements VisualPlugin.

◆ paint()

void GUI_Spectrum::paint ( )
overrideprotectedvirtual

Implements VisualPlugin.

◆ pluginAction()

virtual QAction * PlayerPlugin::Base::pluginAction ( ) const
finalvirtualinherited

needed by the player ui, final

Returns
action of plugin

◆ retranslate()

void GUI_Spectrum::retranslate ( )
overrideprotectedvirtual

Implements PlayerPlugin::Base.

◆ saveStyleIndex()

void GUI_Spectrum::saveStyleIndex ( int index) const
overrideprotectedvirtual

Implements VisualPlugin.

◆ setSpectrum()

void GUI_Spectrum::setSpectrum ( const std::vector< float > & spectrum)
overridevirtual

◆ showEvent()

void VisualPlugin::showEvent ( QShowEvent * e)
overrideprotectedvirtualinherited

Reimplemented from PlayerPlugin::Base.

◆ sigActionTriggered

void PlayerPlugin::Base::sigActionTriggered ( bool checked)
signalinherited

signal is emitted when the plugin action is triggered
also emitted for when closeEvent is fired

Parameters
pluginthis pointer to current plugin
checkedindicates whether checked or unchecked

◆ widget()

QWidget * GUI_Spectrum::widget ( )
nodiscardoverrideprotectedvirtual

Implements VisualPlugin.