/***************************************************************************
                          dcgeturl.h  -  description
                             -------------------
    begin                : Thu Oct 4 2001
    copyright            : (C) 2001 by Mathias Küster
    email                : mathen@users.berlios.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.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef DCGETURL_H
#define DCGETURL_H

/**
  *@author Mathias Küster
  */

#include <DCDialogGetURL.h>

class CByteArray;
class QUrlOperator;
class QNetworkOperation;

class DCGetURL : public DCDialogGetURL  {
Q_OBJECT

public:
	/** construtor */
	DCGetURL( QString sURL );
	/** destructor */
	virtual ~DCGetURL();

	/** */
	void InitDocument();
	/** */
	void GetData( CByteArray * data );
	/** */
	virtual void show();
private:
	/** */
	QUrlOperator * m_pOp;
	/** */
	CByteArray * m_baData;
	/** */
	bool m_bRun;

private slots:
	/** */
	void slotData( const QByteArray & data, QNetworkOperation * op );
	/** */
	void slotDataTransferProgress( int bytesDone, int bytesTotal, QNetworkOperation * op );
	/** */
	void slotFinished( QNetworkOperation * op );

};

#endif
