summaryrefslogtreecommitdiffstats
path: root/noatun/modules/kjofol-skin/kjbackground.cpp
blob: 1c99b6ff8cc19310f733b4d9f7a20e32abb7ab4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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)
{
	TQImage ibackground;

	mBackground = parent->pixmap(parser()["backgroundimage"][1]);
	ibackground = parent->image(parser()["backgroundimage"][1]);

	parent->setMask( getMask(ibackground) );
	parent->setFixedSize ( TQSize(mBackground.width(), mBackground.height()) );

	setRect(0,0,parent->width(),parent->height());
}

void KJBackground::paint(TQPainter *painter, const TQRect &rect)
{
	bitBlt(painter->device(), rect.topLeft(), &mBackground, rect, Qt::CopyROP);
}