source: smplayer/trunk/src/skingui/mybutton.h@ 188

Last change on this file since 188 was 188, checked in by Silvan Scherrer, 8 years ago

SMPlayer: update trunk to version 17.1.0

File size: 1.6 KB
Line 
1/* smplayer, GUI front-end for mplayer.
2 Copyright (C) 2006-2017 Ricardo Villalba <rvm@users.sourceforge.net>
3 umplayer, Copyright (C) 2010 Ori Rejwan
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18*/
19
20#ifndef MYBUTTON_H
21#define MYBUTTON_H
22
23#include <QAbstractButton>
24#include "myicon.h"
25
26class MyAction;
27class MyButton : public QAbstractButton
28{
29Q_OBJECT
30public:
31 explicit MyButton(QWidget *parent = 0);
32 void setState(bool on) {state = on; }
33 void setMyIcon(MyIcon p_icon) { icon = p_icon; }
34 MyIcon myIcon() { return icon;}
35 void setAction(MyAction* pAction);
36 bool eventFilter(QObject *watched, QEvent *event);
37
38private:
39 MyIcon icon;
40 bool mouseHover;
41 bool state;
42 MyAction* action;
43
44protected:
45 virtual void paintEvent(QPaintEvent *e);
46 void enterEvent(QEvent *);
47 void leaveEvent(QEvent *);
48
49
50signals:
51
52public slots:
53 void toggleImage();
54
55};
56
57#endif // MYBUTTON_H
Note: See TracBrowser for help on using the repository browser.