Sayonara Player
EnginePlugin.h
1 /* EnginePlugin.h */
2 
3 /* Copyright (C) 2011-2016 Lucio Carreras
4  *
5  * This file is part of sayonara player
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11 
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16 
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 
22 
23 #ifndef ENGINEPLUGIN_H
24 #define ENGINEPLUGIN_H
25 
26 #include "GUI_StyleSettings.h"
27 
28 #include "Interfaces/PlayerPlugin/PlayerPlugin.h"
29 
30 #include "EngineColorStyleChooser.h"
31 
32 #include <QAction>
33 #include <QColor>
34 #include <QTimer>
35 #include <QPushButton>
36 #include <QMouseEvent>
37 #include <QResizeEvent>
38 #include <QPaintEvent>
39 #include <QShowEvent>
40 
41 class EngineHandler;
42 class GUI_PlayerPlugin;
44 
45  Q_OBJECT
46 
47 protected:
48 
49  QPushButton* _btn_config=nullptr;
50  QPushButton* _btn_prev=nullptr;
51  QPushButton* _btn_next=nullptr;
52  QPushButton* _btn_close=nullptr;
53 
54  EngineHandler* _engine=nullptr;
55  GUI_StyleSettings* _ui_style_settings=nullptr;
56  EngineColorStyleChooser* _ecsc=nullptr;
57  ColorStyle _cur_style;
58  int _cur_style_idx;
59 
60  QTimer* _timer=nullptr;
61  int _timer_stopped;
62 
63  void init_buttons(bool small);
64 
65  //virtual void showEvent(QShowEvent* e) override;
66  virtual void closeEvent(QCloseEvent* e) override;
67  virtual void resizeEvent(QResizeEvent* e) override;
68  virtual void mousePressEvent(QMouseEvent* e) override;
69  virtual void enterEvent(QEvent* e) override;
70  virtual void leaveEvent(QEvent* e) override;
71 
72 
73 protected slots:
74 
75  virtual void config_clicked();
76  virtual void next_clicked();
77  virtual void prev_clicked();
78 
79  virtual void timed_out()=0;
80 
81  virtual void played() override;
82  virtual void paused() override;
83  virtual void stopped() override;
84 
85 
86 public slots:
87  virtual void sl_update_style()=0;
88  virtual void update();
89  virtual void init_ui() override;
90 
91 
92 public:
93  EnginePlugin(QWidget* parent=nullptr);
94  virtual ~EnginePlugin();
95 
96  virtual bool is_title_shown() const override;
97 
98 };
99 
100 
101 #endif // ENGINEPLUGIN_H
102 
103 
Definition: EngineColorStyleChooser.h:34
Definition: EngineHandler.h:36
Definition: StyleTypes.h:36
Definition: GUI_StyleSettings.h:36
Definition: EnginePlugin.h:43
Interface for PlayerPlugin classes. get_name() and language_changed() must be overwritten.
Definition: PlayerPlugin.h:49
Definition: GUI_PlayerPlugin.h:35