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

#include "TreeItem.h"

struct CRD_UT10XX_t;

class STokenFileItem: public TreeItem
{
	Q_OBJECT;
	
public:
	STokenFileItem(int fileId, CRD_UT10XX_t *ut = 0, TreeItem *parent = 0);
	~STokenFileItem();
	virtual void displayContextMenu(const QModelIndex &index);
	
	int id();
	QTreeWidgetItem *treeWidgetItem();
	
public slots:
	void refresh();
	void saveTokenFile();
	
private slots:
	
signals:
	
private:
	QByteArray readFileContents();
	
private:
	CRD_UT10XX_t *mUt;
	int mId;
	
	QTreeWidgetItem *mTreeWidgetItem;
	
	QWidget *mMainWidget;
};

#endif
