/****************************************************************************
** ui.h extension file, included from the uic-generated form implementation.
**
** If you want to add, delete, or rename functions or slots, use
** Qt Designer to update this file, preserving your code.
**
** You should not define a constructor or destructor in this file.
** Instead, write your code in functions called init() and destroy().
** These will automatically be called by the form's constructor and
** destructor.
**
**   Created : 
**        by : Varol Okan 
** Copyright : (c) Varol Okan
** License   : GPL v 2.0
**
*****************************************************************************/
#include <qlabel.h>
#include <qpixmap.h>
#include <qprogressbar.h>

#include "global.h"

void uiDialogRenderPreview::setProgressData (QPixmap *pPixmap, long iCurrentFrameNumber, long iTotalFramesToRender)
{
	bool bPNG = Global::bPNGRender;
	QString qsFileName;
	int iProgress = (int)((float)iCurrentFrameNumber /(float) iTotalFramesToRender * 1000.0);
	m_pProgress->setProgress (iProgress);
	m_pLabelPreview->setPaletteBackgroundPixmap (*pPixmap);
//	m_pLabelPreview->setPixmap (*pPixmap);
	qsFileName.sprintf ("<p align=\"center\">rendered_%08ld.%s</p>", iCurrentFrameNumber, bPNG ? "png" : "jpg" );
	m_pLabelFileName->setText (qsFileName);
}

