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

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

/**
	@author Thach Nguyen <thach.nguyen@rmit.edu.au>
*/
class KBibGroupView : public KListView
{
Q_OBJECT
public:
    KBibGroupView(QWidget *parent = 0, const char *name = 0);

    ~KBibGroupView();
	void addBibEntryTable(BibentryTable *table) { m_list = table; update(); }
	void createGroupView();
	void update();
	void addEntry(BibEntry *entry);
	void addPreview(KBibPreview *preview) { p_preview = preview; }
	void addListView(KBibListView *view) { m_view = view; }
	void clearGroupView(void);
	BibentryTable * getBibEntryTable()  { return m_list; }
//	void addGroup(entryGroup *group);
	
private slots:
		void slotItemSelect(QListViewItem *);	
		void slotSelectionChanged(QListViewItem *);	
private:
	BibentryTable * m_list;	
	KBibListView * m_view;
	KBibPreview * p_preview;		

	KBibGroupViewItem *groupAll;
	QPtrList<KBibGroupViewGroup> groupList;

};

#endif
