//
// C++ Interface: LoginRegisterWidget
//
// Description: 
//
//
// Author: Muylkens Toon <toon.muylkens@student.kuleuven.be>, (C) 2007
//
// Copyright: See COPYING file that comes with this distribution
//
//
/**
 * \class LoginRegisterWidget
 *
 * \brief Provide an example
 *
 * This class is a QWidget which ask the user for a password and username.
 * Also it is possible to create a username.
 * \note Nothing to note
 *
 * \author Toon Muylkens
 *
 * \date 2007/02/13
 *
 * Contact: toon.muylkens@student.kuleuven.be
 *
 */

#ifndef LOGINREGISTERWIDGET_H
#define LOGINREGISTERWIDGET_H


#include "ui_LoginRegisterWidget.h"
#include <QtGui/QMessageBox>
#include <QtCore/QSettings>
#include <QtCore/QCryptographicHash>
#include <QTextStream>
#include "qxtxmlrpcclient.h"


class LoginRegisterWidget : public QWidget
 {
     Q_OBJECT

 public:
     	LoginRegisterWidget(QWidget *parent = 0);
	void setprogressBarMax(int i);
	void setprogressBarMin(int i);
 private:
     	Ui::LoginRegisterWidget ui;
//	QxtXmlRpcClient *myClient;
	void setLoginInformation();
private slots:
	void registerUser();
	void fault(int callId, int faultCode, QString faultString);
	void parseError(int callId, QString errorMsg);
	void networkError(int callId, QString errorMsg);
	void finished(int callId, QVariant retValue);
	void sendUploadSignal();
	void hideSomethingWrongMessage();
	void closeWidget();
public slots:
	void increaseProgressBar();
	void showSomethingWrongMessage();
signals:	
	void uploadPlots(QString username, QString password);
};


#endif // LOGINREGISTERWIDGET_H
