/***************************************************************************
                          kbibpreview.h  -  description
                             -------------------
    begin                : Fri Jan 30 2004
    copyright            : (C) 2004 by Thach Nguyen
    email                : thach.nguyen@rmit.edu.au
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef KBIBPREVIEW_H
#define KBIBPREVIEW_H

#include <qwidget.h>
#include <qtextview.h>
#include <qtextbrowser.h>
#include <qstring.h>
#include <kpopupmenu.h>
#include "bibentry.h"
//#include "entrydef.h"

/**
  *@author Thach Nguyen
  */

class KBibPreview : public QTextBrowser
{
    Q_OBJECT
public:
    KBibPreview(QWidget *parent=0);
    ~KBibPreview();
    void setBibEntry(BibEntry * item);
    void updatePreview();
protected:
    void contentsContextMenuEvent( QContextMenuEvent *e );
private: // Private attributes
    BibEntry *  bibItem;
    KPopupMenu* popupMenu;
public slots: // Public slots
    void slotLinkClicked(const QString & link);
    void slotCopyAll();
    void slotCopySelected();
	void slotCopyAvailableChange(bool);

};

#endif
