#ifndef SUMMARYWIDGET_H
#define SUMMARYWIDGET_H


#include <string>
#include <vector>
using namespace std;

#include <QMouseEvent>
#include <QWheelEvent>
#include <qtableview.h>
#include <QStandardItemModel>
#include <QModelIndex>
#include <qpushbutton.h>
#include <qpainter.h>
#include <qpaintengine.h>
#include <qline.h>

struct Record
{
	string propertyName;
	string propertyValue;

	Record( string propertyName, string propertyValue );
};

/**
	Ultimate table, which can display statistics and other informations
*/
class SummaryWidget : public QTableView
{
	Q_OBJECT

public:
	SummaryWidget( QWidget *parent = 0 );
	virtual void paintEvent(QPaintEvent * QtEvent); 

public slots:
	void pushRecord( const Record& record );
	void pushRecords( const vector<Record>& records );
	void clearRecords( void );
	

private:
	static const int PROPERTY_COLUMN;	//column 0 represents property
	static const int VALUE_COLUMN;		//column 1 represents property value
	static const char PROPERTY_STR[];
	static const char VALUE_STR[];
	static const int COLUMN_0_WIDTH;
	void pushHeader(void);

	QStandardItemModel model;
	vector<QStandardItem*> itemPtrContainer;
	unsigned int rowCount;

signals:
};


#endif