source: smplayer/trunk/src/skingui/myicon.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 MYICON_H
21#define MYICON_H
22
23#include <QObject>
24#include <QPixmap>
25
26class MyIcon
27{
28public:
29 enum Mode
30 {
31 Normal,
32 MouseOver,
33 MouseDown,
34 Disabled
35 };
36
37 enum State
38 {
39 Off,
40 On
41 };
42
43 explicit MyIcon();
44 QSize size(Mode mode, State state = Off );
45 void setPixmap(QPixmap pix, Mode mode, State state = Off);
46 QPixmap pixmap(Mode mode, State state =Off) const;
47
48private:
49 QPixmap normalPixOff;
50 QPixmap mouseOverPixOff;
51 QPixmap mouseDownPixOff;
52 QPixmap disabledPixOff;
53 QPixmap normalPixOn;
54 QPixmap mouseOverPixOn;
55 QPixmap mouseDownPixOn;
56 QPixmap disabledPixOn;
57 QPixmap actualPixmap(Mode mode, State state =Off) const;
58
59signals:
60
61public slots:
62
63};
64
65#endif // MYICON_H
Note: See TracBrowser for help on using the repository browser.