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

#include "bibentrydeftable.h"

#include <qwidget.h>
#include <qlabel.h>
namespace GUI {

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

    ~FieldWidget();
	
	virtual void setText(QString ) = 0;
	virtual void setMacro(bool) = 0;
	virtual QString getText() = 0;
	virtual bool getMacro(void) = 0;
	virtual void setAutoCompletion(QStringList) = 0;
	QString fieldName() { return m_name; }
	int labelWidth() {return m_label->sizeHint().width(); } 
	void setLabelWidth(int w);
signals:
  virtual void modified();
  
protected:
	RefField* m_field;
	QString m_name;
	QLabel* m_label;	
};

}

#endif
