/* ============================================================
 * File  : fixback.cpp
 * Author: Stephane Gibault
 * Date  : Sun Feb 4 2007
 * Description :
 *
 * 
 *  (C) 2007 by Stephane Gibault
 *
 * This program is free software; you can redistribute it
 * and/or modify it under the terms of the GNU General
 * Public License as published by the Free Software Foundation;
 * either version 2, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * ============================================================ */
#include <QtGui>
#include "fixback.h"

fixback::fixback ( QWidget * parent )
    : QFrame(parent)
{
	// *** CREATION DU FOND ***
	fond_application.load(":/Interface/Interface/fd_transparent.png");
	fond_application.fill(QColor(0,0,0,0));
	QLinearGradient GradientF(0.0,0.0,0.0,fond_application.height());
	GradientF.setColorAt(0.7, QColor(151,141,134));
	GradientF.setColorAt(0.0, QColor(171,164,154));
	QPainter p;
	p.begin(&fond_application);
	p.setPen(Qt::NoPen);
	p.setBrush(GradientF);
	p.drawRect(0,0,fond_application.width(),fond_application.height());
	p.end();
}

void fixback::paintEvent(QPaintEvent *)
{
	QPainter p;
	p.begin(this);
	p.drawTiledPixmap(0,this->height()-fond_application.height(),this->width(),fond_application.height(),fond_application,0,0);
	p.end();
}

