/***************************************************************************
 *                                                                         *
 *   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 DCFILETRANSFERINFO_H
#define DCFILETRANSFERINFO_H

#include <QWidget>
#include <QTimer>
#include <QMdiSubWindow>

#include <dclib/core/cstring.h>

#include "DCDialogFileTransferInfo.h"

class DCFileChunkObject;

class DCFileTransferInfo : public QWidget, private Ui::DCDialogFileTransferInfo {
    Q_OBJECT

public:
    /** construtor */
    DCFileTransferInfo(CString filename, QWidget * parent);
    /** destructor */
    virtual ~DCFileTransferInfo();

    /** */
    void SetContainer(QMdiSubWindow *wnd);
    /** */
    QMdiSubWindow *GetContainer();
private:
    /** */
    void InitDocument();

    /** */
    QTimer m_Timer;
    /** */
    CString m_sFileName;
    /** */
    QMdiSubWindow *container;
protected:

    virtual void closeEvent(QCloseEvent *e);
private slots:
    /** */
    void timerDone();
signals:
    void onDie(QWidget*);
};

#endif
