1
/* smplayer, GUI front-end for mplayer.
2
Copyright (C) 2006-2013 Ricardo Villalba <rvm@users.sourceforge.net>
3
umplayer, Copyright (C) 2010 Ori Rejwan
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.
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.
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
28
void MyIcon::setPixmap(QPixmap pix, Mode mode, State state )
33
if(state == Off) normalPixOff = pix;
34
else normalPixOn = pix; break;
36
if(state == Off) mouseOverPixOff = pix;
37
else mouseOverPixOn = pix; break;
39
if(state == Off) mouseDownPixOff = pix;
40
else mouseDownPixOn = pix; break;
42
if(state == Off) disabledPixOff = pix;
43
else disabledPixOn = pix;break;
47
QSize MyIcon::size(Mode mode, State state)
49
return pixmap(mode, state).size();
52
QPixmap MyIcon::pixmap(Mode mode, State state) const
54
QPixmap p = actualPixmap(mode, state);
57
if(state == Off) return normalPixOff;
58
else return normalPixOn;
63
QPixmap MyIcon::actualPixmap(Mode mode, State state ) const
68
if(state == Off) return normalPixOff;
69
else return normalPixOn;
71
if(state == Off) return mouseOverPixOff;
72
else return mouseOverPixOn;
74
if(state == Off) return mouseDownPixOff;
75
else return mouseDownPixOn;
77
if(state == Off) return disabledPixOff;
78
else return disabledPixOn;