/***************************************************************************
 * qcanvasTextcm.cpp: implementation of QCanvasTextCm 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.
 ***************************************************************************/

#include "qcanvastextcm.h"

#include "track/cm.h"
#include "track/qpointcm.h"

QCanvasTextCm::QCanvasTextCm(QGraphicsItem* parent)
: QGraphicsSimpleTextItem(parent)
{
}

QCanvasTextCm::QCanvasTextCm(const QString& text, const QFont& font, QGraphicsItem* parent)
: QGraphicsSimpleTextItem(text, parent)
{
	setFont(font);
}

QCanvasTextCm::QCanvasTextCm(const QString& text, const QFont& font)
: QGraphicsSimpleTextItem(text)
{
	setFont(font);
}

QCanvasTextCm::QCanvasTextCm(const QString& text)
: QGraphicsSimpleTextItem(text)
{
}

QCanvasTextCm::~QCanvasTextCm()
{

}

/*void QCanvasTextCm::setX(const Cm& x)
{
	QGraphicsTextItem::setX(x.valueOfPixel());
}

void QCanvasTextCm::setY(const Cm& y)
{
	QGraphicsTextItem::setY(y.valueOfPixel());
}

void QCanvasTextCm::move(const Cm& x, const Cm& y)
{
	QGraphicsTextItem::move(x.valueOfPixel(), y.valueOfPixel());
}*/

void QCanvasTextCm::setPosFromPoint(const QPointCm& point)
{
	setPosFromCoord(point.x(), point.y());
}

void QCanvasTextCm::setPosFromCoord(const Cm& x, const Cm& y)
{
	setPos(x.valueOfPixel(), y.valueOfPixel());
}

void QCanvasTextCm::moveBy(const Cm& x, const Cm& y)
{
	QGraphicsSimpleTextItem::moveBy(x.valueOfPixel(), y.valueOfPixel());
}
