Sayonara Player
GUI_PlaylistPreferences.h
1 #ifndef GUI_PLAYLISTPREFERENCES_H
2 #define GUI_PLAYLISTPREFERENCES_H
3 
4 
5 #include "Interfaces/PreferenceDialog/PreferenceWidgetInterface.h"
6 #include "GUI/Preferences/PlaylistPreferences/ui_GUI_PlaylistPreferences.h"
7 
8 
12 {
13  Q_OBJECT
14 
15  friend class PreferenceWidgetInterface;
16  friend class PreferenceInterface<SayonaraWidget>;
17 
18 public:
19  explicit GUI_PlaylistPreferences(QWidget *parent = 0);
21 
22  void commit() override;
23  void revert() override;
24 
25 private:
26  void init_ui() override;
27  QString get_action_name() const override;
28 
29 private slots:
30  void language_changed() override;
31 
32 };
33 
34 #endif // GUI_PLAYLISTPREFERENCES_H
void commit() override
This method is called, when OK or apply is pressed. So all settings should be written there...
void revert() override
This method is called, when cancel is clicked. So the gui should be re-initialized when this method i...
virtual void init_ui()=0
call setup_parent(this) here. initialize compoenents and connections here. After calling setup_parent...
void language_changed()
automatically called when language has changed. When overriding this method. Overriding this method s...
Definition: PreferenceInterface.h:116
Definition: GUI_PlaylistPreferences.h:9
Template class for implementing preference dialogs and preference widgets.
Definition: PreferenceInterface.h:70
Definition: ui_GUI_PlaylistPreferences.h:227
virtual QString get_action_name() const =0
has to be implemented and should return the translated action text
Abstract Interface you should use when creating a preferences item.
Definition: PreferenceWidgetInterface.h:41