/***************************************************************************
 *                                                                         *
 *   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 STATSFRAME_H
#define STATSFRAME_H

#include <qwidget.h>
#include <q3memarray.h>

class QLabel;
class QGridLayout;

/**
  *@author Henning Burchardt
  */
class StatsFrame : public QWidget
{
public: 
	StatsFrame( QWidget *parent );
	~StatsFrame();

	void initFromConfig();
	void updateView( const Q3MemArray<double> &, const Q3MemArray<double> & );

private:
	void createGUI();

	QPoint m_lastPos;
	
	QLabel *m_currentInBytesValue;
	QLabel *m_currentInBytesUnit;
	QLabel *m_maximumInBytesValue;
	QLabel *m_maximumInBytesUnit;
	QLabel *m_overallInBytesValue;
	QLabel *m_overallInBytesUnit;
	QLabel *m_currentInPacketsValue;
	QLabel *m_currentInPacketsUnit;
	QLabel *m_maximumInPacketsValue;
	QLabel *m_maximumInPacketsUnit;
	QLabel *m_overallInPacketsValue;
	QLabel *m_overallInPacketsUnit;
	QLabel *m_currentOutBytesValue;
	QLabel *m_currentOutBytesUnit;
	QLabel *m_maximumOutBytesValue;
	QLabel *m_maximumOutBytesUnit;
	QLabel *m_overallOutBytesValue;
	QLabel *m_overallOutBytesUnit;
	QLabel *m_currentOutPacketsValue;
	QLabel *m_currentOutPacketsUnit;
	QLabel *m_maximumOutPacketsValue;
	QLabel *m_maximumOutPacketsUnit;
	QLabel *m_overallOutPacketsValue;
	QLabel *m_overallOutPacketsUnit;
	QLabel *m_inLabel;
	QLabel *m_outLabel;
	QGridLayout *m_currentLayout;
	QGridLayout *m_maximumLayout;
	QGridLayout *m_overallLayout;
	QLabel *m_currentHeader;
	QLabel *m_maximumHeader;
	QLabel *m_overallHeader;
	QGridLayout *m_mainLayout;
};

#endif
