/***************************************************************************
                          wizpage1.cpp  -  description
                             -------------------
    begin                : Sat May 6 2000
    copyright            : (C) 2000 by Frank von Daak
    email                : frank.fun@kpage.de
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/
/***************************************************************************
                          wizpage1.cpp  -  description
                             -------------------
    begin                : Mon Feb 7 2000
    copyright            : (C) 2000 by Frank von Daak
    email                : frank.fun@skydsl.de
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#include "wizpage1.h"

WizPage1::WizPage1(QWidget *parent, const char *name )
		: QFrame(parent,name)
{
	QLabel *stLab = new QLabel(i18n("Welcome to the KWebGet-Wizard !"), this);
	stLab->setGeometry(5,5,435,20);
	stLab->setAlignment(AlignCenter);
	stLab->setFont(QFont("helvetica",14, QFont::Bold));

	QLabel *welMsg = new QLabel(i18n("The KWebGet-Wizard helps you to easy create an Off-Line-Browsing Project.\n"
					"You are now asked some questions about the Project.\n"),this);
	welMsg->setGeometry(5,35,435,40);
	welMsg->setFont(QFont("helvetica",10));
	welMsg->setAlignment(AlignCenter);

	QLabel *pnameLab = new QLabel(i18n("What would you like to name this project ?"), this);
	pnameLab->setGeometry(5,80,250,15);

	pnameLine = new QLineEdit(this);
	pnameLine->setGeometry(5,100,200,20);
	
	QLabel *pfolderLab = new QLabel(i18n("Where would you like to store the downloaded files :"), this);
	pfolderLab->setGeometry(5,125,300,15);

	pfolderLine = new QLineEdit(this);
	pfolderLine->setGeometry(5,145,350,20);	

	getFolderBut = new MyPushButton("",this);
	getFolderBut->setPixmap(BarIcon("fileopen"));
	getFolderBut->setGeometry(360,145,22,22);
	connect(getFolderBut, SIGNAL(clicked()), this, SLOT(getProjFolder()));
}

WizPage1::~WizPage1()
{
}

void WizPage1::getProjFolder()
{
	QString home ( QDir::homeDirPath());
	projFolder = dD->getExistingDirectory(home, this, 0);
	if ( !projFolder.isEmpty() ) {
		pfolderLine->setText((const char*)projFolder);
	}
}