
#ifndef QCATAGORYLIST_20061222_H_
#define QCATAGORYLIST_20061222_H_

#include <QTreeWidget>
#include <QItemDelegate>
#include <QMap>
#include <QString>
class QTreeWidgetItem;

class QCatagoryList : public QTreeWidget {
	Q_OBJECT
public:
	QCatagoryList(QWidget *parent = 0);
	virtual ~QCatagoryList();
	
private slots:
    void handleMousePress(QTreeWidgetItem *item);
	
public:
	QTreeWidgetItem *addCatagory(const QString &name);
	QTreeWidgetItem *addItem(QTreeWidgetItem *catagory, const QString &value);
};


class SheetDelegate: public QItemDelegate {
public:
    SheetDelegate(QTreeView *view, QWidget *parent);

    virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
    virtual QSize sizeHint(const QStyleOptionViewItem &opt, const QModelIndex &index) const;

private:
    QTreeView *m_view;
};

#endif

