//
// C++ Interface: kbibgroupview
//
// Description: 
//
//
// Author: Thach Nguyen <thach.nguyen@rmit.edu.au>, (C) 2006
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef KBIBGROUPVIEWGROUP_H
#define KBIBGROUPVIEWGROUP_H

#include <kpopupmenu.h>
#include <klistview.h>
#include <qdict.h>
#include <qstring.h>
#include "kbibgroupviewitem.h"
#include "bibentrytable.h"
#include "kbibpreview.h"
#include "kbiblistview.h"

/**
	@author Thach Nguyen <thach.nguyen@rmit.edu.au>
*/
class KBibGroupViewGroup : public KListViewItem
{
//Q_OBJECT
public:
    KBibGroupViewGroup(KListView *parent = 0, QString key="Author");

    ~KBibGroupViewGroup();
	void createGroup(BibentryTable *m_list);
	void addEntry(BibEntry *entry);
	QString currentGroupBy() {return groupBy; }
	void clearGroupView(void) {m_groupDict.clear(); }
	BibentryTable * getBibEntryTable()  { return m_list; }
//	void addGroup(entryGroup *group);
	
private:
	BibentryTable * m_list;	
	QDict<KBibGroupViewItem> m_groupDict;
	QString groupBy;
	KPopupMenu* popupMenu;
	KPopupMenu* m_itemMenu;
};

#endif
