Sayonara Player
Signals | Public Member Functions | Public Slots | Protected Member Functions | Protected Slots | Protected Attributes | List of all members
EnginePlugin Class Referenceabstract

Signals

void sig_action_triggered (PlayerPluginInterface *plugin, bool checked)
 signal is emitted when the plugin action is triggered
also emitted for when closeEvent is fired More...
 
void sig_reload (PlayerPluginInterface *)
 emitted when reloading is requested, after firing this signal the plugin will be painted new. Useful, if the size has changed
 

Public Member Functions

 EnginePlugin (QWidget *parent=nullptr)
 
virtual bool is_title_shown () const override
 
virtual QSize get_size () const final
 needed by the player ui, final More...
 
virtual QAction * get_action () const final
 needed by the player ui, final More...
 
virtual bool is_closed () const final
 needed by the player ui, final More...
 
virtual QString get_name () const =0
 must be overwritten More...
 
virtual QString get_display_name () const =0
 must be overwritten More...
 
virtual void show ()
 show Plugin
 
QString get_shortcut_text (const QString &shortcut_identifier) const override
 get translated text of shortcut (overridden) More...
 
SayonaraDialogbox_into_dialog ()
 
bool is_dark () const
 Returns, if the current skin is dark. More...
 

Public Slots

virtual void sl_update_style ()=0
 
virtual void update ()
 
virtual void init_ui () override
 

Protected Member Functions

void init_buttons (bool small)
 
virtual void closeEvent (QCloseEvent *e) override
 
virtual void resizeEvent (QResizeEvent *e) override
 
virtual void mousePressEvent (QMouseEvent *e) override
 
virtual void enterEvent (QEvent *e) override
 
virtual void leaveEvent (QEvent *e) override
 
virtual void language_changed () override=0
 language_changed Has to be implemented and is called when language has changed
 
bool is_ui_initialized () const
 Check if ui already was initialized. More...
 
void set_ui_initialized ()
 mark ui as initialized
 
template<typename T >
void setup_parent (T *widget)
 
QString elide_text (const QString &text, QWidget *widget, int max_lines)
 

Protected Slots

virtual void config_clicked ()
 
virtual void next_clicked ()
 
virtual void prev_clicked ()
 
virtual void timed_out ()=0
 
virtual void played () override
 
virtual void paused () override
 
virtual void stopped () override
 
virtual void playstate_changed (PlayManager::PlayState state)
 Playstate has changed, this does nothing in default implementation. More...
 
virtual void skin_changed ()
 

Protected Attributes

QPushButton * _btn_config =nullptr
 
QPushButton * _btn_prev =nullptr
 
QPushButton * _btn_next =nullptr
 
QPushButton * _btn_close =nullptr
 
EngineHandler_engine =nullptr
 
GUI_StyleSettings_ui_style_settings =nullptr
 
EngineColorStyleChooser_ecsc =nullptr
 
ColorStyle _cur_style
 
int _cur_style_idx
 
QTimer * _timer =nullptr
 
int _timer_stopped
 
PlayManager_play_manager =nullptr
 _play_manager Notifies about playstate
 
QAction * _pp_action =nullptr
 _pp_action already allocated, displays name of the plugin by calling get_name()
 
SayonaraDialog_boxed_dialog =nullptr
 
Settings_settings =nullptr
 

Member Function Documentation

§ get_action()

virtual QAction* PlayerPluginInterface::get_action ( ) const
finalvirtualinherited

needed by the player ui, final

Returns
action of plugin

§ get_display_name()

virtual QString PlayerPluginInterface::get_display_name ( ) const
pure virtualinherited

must be overwritten

Returns
the translated name of the plugin

Implemented in GUI_PlaylistChooser, GUI_Equalizer, GUI_Podcasts, GUI_Stream, GUI_AudioConverter, GUI_Bookmarks, GUI_Spectrum, GUI_Broadcast, GUI_LevelPainter, GUI_Crossfader, and GUI_Speed.

§ get_name()

virtual QString PlayerPluginInterface::get_name ( ) const
pure virtualinherited

must be overwritten

Returns
the NOT translated name of the plugin

Implemented in GUI_PlaylistChooser, GUI_Equalizer, GUI_Podcasts, GUI_Stream, GUI_AudioConverter, GUI_Bookmarks, GUI_Spectrum, GUI_Broadcast, GUI_LevelPainter, GUI_Crossfader, and GUI_Speed.

§ get_shortcut_text()

QString PlayerPluginInterface::get_shortcut_text ( const QString &  shortcut_identifier) const
overridevirtualinherited

get translated text of shortcut (overridden)

Parameters
shortcut_identifiershortcut id
Returns
translated shortcut text

Implements ShortcutWidget.

§ get_size()

virtual QSize PlayerPluginInterface::get_size ( ) const
finalvirtualinherited

needed by the player ui, final

Returns
miminum size of plugin

§ is_closed()

virtual bool PlayerPluginInterface::is_closed ( ) const
finalvirtualinherited

needed by the player ui, final

Returns
visibility of plugin

§ is_dark()

bool SayonaraWidgetTemplate< QWidget >::is_dark ( ) const
inlineinherited

Returns, if the current skin is dark.

Returns
true, if dark. false else

§ is_ui_initialized()

bool PlayerPluginInterface::is_ui_initialized ( ) const
protectedinherited

Check if ui already was initialized.

Returns

§ playstate_changed

virtual void PlayerPluginInterface::playstate_changed ( PlayManager::PlayState  state)
protectedvirtualslotinherited

Playstate has changed, this does nothing in default implementation.

Parameters
thenew State

§ sig_action_triggered

void PlayerPluginInterface::sig_action_triggered ( PlayerPluginInterface plugin,
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
Inheritance diagram for EnginePlugin:
PlayerPluginInterface SayonaraWidget ShortcutWidget SayonaraWidgetTemplate< QWidget > SayonaraClass GUI_LevelPainter GUI_Spectrum