/***************************************************************************
 * unit.h: implementation of Unit class
 *
 * This file is part of KTabEdit, a KDE tabulature editor
 *
 * copyright (C) 2003-2007 the KTabEdit development team <mrgwen@gmail.com>
 ***************************************************************************/

/***************************************************************************
 * 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.
 *
 * See the file COPYING for more information.
 ***************************************************************************/

#ifndef UNIT_H
#define UNIT_H

#include <QtCore/QtGlobal>
#include "util/assert.h"

class Unit {
public:
	Unit(uint dpi) : mDpi(dpi) { POSTCONDITION( mDpi != 0 ); };
	
	~Unit() {};
	
	uint dpi() const { return mDpi; };
	double inchesForACm() const { return sInches; };
	
private:
	uint mDpi;
	static const double sInches;
};

/*
class Unit {
public:
	Unit(uint dpi) throw(std::exception) : mDpi(dpi) { POSTCONDITION( mDpi != 0 ); };
	
	virtual ~Unit() {};
	
	virtual uint dpi() const { return mDpi; };
	virtual double inchesForACm() const { return sInches; };
	
private:
	uint mDpi;
	static const double sInches;
};*/

#endif
