Sayonara Player
PluginCloseButton.h
1 /* PluginCloseButton.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 /* PluginCloseButton.h */
24 
25 #ifndef PLUGINCLOSEBUTTON_H
26 #define PLUGINCLOSEBUTTON_H
27 
28 #include <QPushButton>
29 #include <QShowEvent>
30 #include <QFocusEvent>
31 #include <QMouseEvent>
32 #include <QMenu>
33 #include "Helper/Settings/SayonaraClass.h"
34 
42  public QPushButton,
43  protected SayonaraClass
44 {
45 
46  Q_OBJECT
47 
48 signals:
49  void sig_triggered(QPoint);
50 
51 protected:
52  virtual void mouseReleaseEvent(QMouseEvent *e) override;
53  virtual void enterEvent(QEvent* e) override;
54  virtual void leaveEvent(QEvent* e) override;
55 
59  void set_std_icon();
60 
61 public:
62  PluginCloseButton(QWidget* parent=nullptr);
63  virtual ~PluginCloseButton();
64 
65 protected slots:
66  void _sl_skin_changed();
67 };
68 
69 #endif // PLUGINCLOSEBUTTON_H
The SayonaraClass class provides access to Settings and notifications.
Definition: SayonaraClass.h:31
void set_std_icon()
sets the icon depending on the skin
The MenuButton class. A button that sends a signal when clicked. This Class is meant for inheritance...
Definition: PluginCloseButton.h:41