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

#include "ui_prefsdialog.h"
#include "resources.h"

#include <Qt3Support/Q3MemArray>
#include <qvector.h>

class PrefsDialogImpl : public QDialog, public Ui_PrefsDialog  {
	Q_OBJECT
public:
	PrefsDialogImpl( QWidget* );
	~PrefsDialogImpl();
	
	void setRefreshTimeChoices( Q3MemArray< int > choices);
	void setSmoothFactorChoices( Q3MemArray< int > );
	void setDeviceChoices( QVector< QString > );
	void setScalingChoices( Q3MemArray< long > );
	
	void setRefreshTimeRange( int min, int max );
	void setSmoothFactorRange( int min, int max );
	void setScalingRange( long min, long max );
	
	// General tab
    void setRefreshTime( int );
	void setSmoothFactor( int );
	void setUnit( Common::Unit );
	void setIncomingColor( const QColor& );
	void setOutgoingColor( const QColor& );
	// Diagram tab
	void setDevice( const QString& );
	void setScaling( long );
	void setScalingMode( Common::ScalingMode );
	void setGraphPosition( Common::GraphPosition );
	void setGraphStyle( Common::GraphStyle );
	void setShowGrid( bool );
	// Main frame tab
	void setMainFrameBgColor( const QColor& );
	void setMainFrameGridColor( const QColor& );
	void setMainFrameShowTooltips( bool );
	void setMainFrameShowStatsBar( bool );
	void setMainFrameTransparent( bool );
	void setMainFrameShowDecorations( bool );
	// Other frames tab
	void setDockFrameBgColor( const QColor& );
	void setDockFrameGridColor( const QColor& );
	void setDockFrameShowText( bool );
	void setDockFrameTextSize( int );
	void setStatsFrameBgColor( const QColor& );
// 	void setPopupFrameBgColor( const QColor& );
// 	void setPopupFrameFgColor( const QColor& );
	
	int getRefreshTime();
	int getSmoothFactor();
	Common::Unit getUnit();
	QColor getIncomingColor();
	QColor getOutgoingColor();
	QString getDevice();
	long getScaling();
	Common::ScalingMode getScalingMode();
	Common::GraphPosition getGraphPosition();
	Common::GraphStyle getGraphStyle();
	bool getShowGrid();
	QColor getMainFrameBgColor();
	QColor getMainFrameGridColor();
    bool getMainFrameShowTooltips();
	bool getMainFrameShowStatsBar();
	bool getMainFrameTransparent();
	bool getMainFrameShowDecorations();
	QColor getDockFrameBgColor();
	QColor getDockFrameGridColor();
	bool getDockFrameShowText();
	int getDockFrameTextSize();
	QColor getStatsFrameBgColor();
// 	QColor getPopupFrameBgColor();
// 	QColor getPopupFrameFgColor();

private:
	int m_minRefreshTime, m_maxRefreshTime;
	int m_minSmoothFactor, m_maxSmoothFactor;
	long m_minScaling, m_maxScaling;
	
protected slots:
	void slotCheck();
};

#endif
