/***************************************************************************
 * qrectcm.h: implementation of QRectCm 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 QRECTCM_H
#define QRECTCM_H

#include <QRect>

#include "cm.h"

class QPointCm;
class QSizeCm;

class QRectCm {
public:
	QRectCm();
	QRectCm(const QPointCm& topLeft, const QPointCm& bottomRight);
	QRectCm(const QPointCm& topLeft, const QSizeCm& size);
	QRectCm(const Cm& left, const Cm& top, const Cm& width, const Cm& height);
	virtual ~QRectCm();
	
	virtual QRect toRect() const;
	
	virtual void setRect(const Cm& x, const Cm& y, const Cm& width, const Cm& height);
	
	virtual void setLeft(const Cm& pos);
	virtual Cm left() const;
	virtual void setTop(const Cm& pos);
	virtual Cm top() const;
	virtual void setRight(const Cm& pos);
	virtual Cm right() const;
	virtual void setBottom(const Cm& pos);
	virtual Cm bottom() const;
	
	virtual void setX(const Cm& x);
	virtual Cm x() const;
	virtual void setY(const Cm& y);
	virtual Cm y() const;
	
	virtual void setWidth(const Cm& w);
	virtual Cm width() const;
	
	virtual void setHeight(const Cm& h);
	virtual Cm height() const;
	
private:
	Cm mLeft;
	Cm mTop;
	Cm mWidth;
	Cm mHeight;
};

#endif
