KNewStuff
Go to the documentation of this file.
21 #include <QtGui/QPainter>
22 #include <QtGui/QPixmap>
30 setFrameStyle(QFrame::Sunken | QFrame::Panel);
42 void QStarFrame::drawstars()
47 QPixmap star(starpath);
48 QPixmap graystar(graystarpath);
50 int wpixels = (int)(width() * (float)m_rating / 100.0);
55 for (
int i = 0; i < wpixels; i += star.width()) {
57 if (w > star.width()) w = star.width();
58 p.drawPixmap(i, 0, star, 0, 0, w, -1);
60 p.drawPixmap(wpixels, 0, graystar, w, 0, graystar.width() - w, -1);
61 wpixels += graystar.width() - w;
62 for (
int i = wpixels; i < width(); i += graystar.width()) {
64 if (w > graystar.width()) w = graystar.width();
65 p.drawPixmap(i, 0, graystar, 0, 0, w, -1);
77 #include "qstarframe.moc"
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Tue Jul 23 2013 20:41:04 by
doxygen 1.8.1.1 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.