diff options
Diffstat (limited to 'noatun/modules/kjofol-skin/kjbackground.cpp')
-rw-r--r-- | noatun/modules/kjofol-skin/kjbackground.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/noatun/modules/kjofol-skin/kjbackground.cpp b/noatun/modules/kjofol-skin/kjbackground.cpp new file mode 100644 index 00000000..83c19ace --- /dev/null +++ b/noatun/modules/kjofol-skin/kjbackground.cpp @@ -0,0 +1,29 @@ +/*************************************************************************** + kjbackground.cpp + -------------------------------------- + Just draws the main-pixmap of a KJöfol-Skin + -------------------------------------- + Maintainer: Stefan Gehn <sgehn@gmx.net> + + ***************************************************************************/ + +#include "kjbackground.h" + +KJBackground::KJBackground(KJLoader *parent) + : KJWidget(parent) +{ + QImage ibackground; + + mBackground = parent->pixmap(parser()["backgroundimage"][1]); + ibackground = parent->image(parser()["backgroundimage"][1]); + + parent->setMask( getMask(ibackground) ); + parent->setFixedSize ( QSize(mBackground.width(), mBackground.height()) ); + + setRect(0,0,parent->width(),parent->height()); +} + +void KJBackground::paint(QPainter *painter, const QRect &rect) +{ + bitBlt(painter->device(), rect.topLeft(), &mBackground, rect, Qt::CopyROP); +} |