/*
 *  Copyright (C) 2007-2008 CMM Sigma Andrzej Chmielowiec <cmmsigma@cmmsigma.eu>
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License version 3
 *  as published by the Free Software Foundation.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 */

#ifndef FILE_FOLDER_WIDGET_H
#define FILE_FOLDER_WIDGET_H

#include <QtGui>

struct CRD_UT10XX_t;

class FileFolderWidget: public QWidget
{
	Q_OBJECT;
	
public:
	FileFolderWidget(QWidget *parent = 0);
	
	void insertFileWidgetItem(QTreeWidgetItem *item);
	void removeFileWidgetItem(QTreeWidgetItem *item);
	
	void sortFilesByName();
	
public slots:
	void setInfo(CRD_UT10XX_t *ut);
	void enable();
	void disable();
	
private slots:
	void addFileSlot();
	void deleteFileSlot();
	void saveFileSlot();
	
signals:
	void addFileSig(QString &srcFileName, QString &dstFileName);
	void deleteFileSig(QString &fileName);
	void saveFileSig(QString &srcFileName, QString &dstFileName);
	
private:
	QLabel *mFileSystemInfo;
	QTreeWidget *mFileTree;
	QPushButton *mAddFile;
	QPushButton *mDelFile;
	QPushButton *mSaveFile;
};

#endif
