/***************************************************************************
                          kbeartransferview.h  -  description
                             -------------------
    begin                : lör maj 05 2002
    copyright            : (C) 2003 by Björn Sahlström
    email                : kbjorn@users.sourceforge.net
 ***************************************************************************/

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

//////////////////////////////////////////////////////
// Qt specific includes
#include <qwidget.h>
//////////////////////////////////////////////////////
// KDE specific includes
#include <klistview.h>
//////////////////////////////////////////////////////
// Application specific includes
#include "kbeartabview.h"
#include "siteinfo.h"
#include "transfer.h"

class KConfig;

namespace KBear {
	class TransferGroup;
	class TransferViewPage;

	/**
	*@author Björn Sahlström
	*/

	class KBearTransferView : public KBearTabView  {
		Q_OBJECT
	public:
		/** No descriptions */
		KBearTransferView( KConfig* config );
		/** No descriptions */
		~KBearTransferView();
	signals:
		void contextMenu( KListView*, QListViewItem*, const QPoint& );
	public slots: // Public slots
		/** No descriptions */
		void slotStart();
		/** No descriptions */
		void slotStop();
		/** No descriptions */
		void slotPause();
		/** No descriptions */
		void slotContinue();
		/** No descriptions */
		void slotCollapse();
		/** No descriptions */
		void slotExpand();
		/** No descriptions */
		void slotAddPage( const SiteInfo& info );
		/** No descriptions */
		void slotRemovePage( int );
		/** No descriptions */
		void slotAddTransferGroup( int, TransferGroup* );
	private slots:
		void slotRemovePage( TransferViewPage* );
	private:
		void setCommand( Transfer::Command, unsigned int );
		int findTabByCaption( const QString& n );
	private:
		KConfig* m_config;
	};
};
#endif
