Corrected some warnings

--HG--
branch : feature
This commit is contained in:
BojanKverh 2016-06-29 23:39:52 +02:00
parent 83ec6e219a
commit caa13f06ac

View File

@ -67,6 +67,7 @@ void VTextGraphicsItem::SetFont(const QFont& fnt)
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VTextGraphicsItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) void VTextGraphicsItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{ {
Q_UNUSED(widget);
painter->fillRect(option->rect, QColor(251, 251, 175)); painter->fillRect(option->rect, QColor(251, 251, 175));
// draw text lines // draw text lines
@ -161,6 +162,8 @@ QRectF VTextGraphicsItem::boundingRect() const
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VTextGraphicsItem::mousePressEvent(QGraphicsSceneMouseEvent *pME) void VTextGraphicsItem::mousePressEvent(QGraphicsSceneMouseEvent *pME)
{
if ((pME->buttons() & Qt::LeftButton) > 0)
{ {
m_ptStart = pME->pos(); m_ptStart = pME->pos();
m_szStart = m_rectBoundingBox.size(); m_szStart = m_rectBoundingBox.size();
@ -175,6 +178,7 @@ void VTextGraphicsItem::mousePressEvent(QGraphicsSceneMouseEvent *pME)
setZValue(3); setZValue(3);
UpdateBox(); UpdateBox();
} }
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VTextGraphicsItem::mouseMoveEvent(QGraphicsSceneMouseEvent* pME) void VTextGraphicsItem::mouseMoveEvent(QGraphicsSceneMouseEvent* pME)
@ -195,6 +199,8 @@ void VTextGraphicsItem::mouseMoveEvent(QGraphicsSceneMouseEvent* pME)
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VTextGraphicsItem::mouseReleaseEvent(QGraphicsSceneMouseEvent* pME) void VTextGraphicsItem::mouseReleaseEvent(QGraphicsSceneMouseEvent* pME)
{
if ((pME->buttons() & Qt::LeftButton) > 0)
{ {
if (m_eMode == mMove) if (m_eMode == mMove)
{ {
@ -208,6 +214,7 @@ void VTextGraphicsItem::mouseReleaseEvent(QGraphicsSceneMouseEvent* pME)
} }
m_eMode = mActivated; m_eMode = mActivated;
} }
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
void VTextGraphicsItem::UpdateBox() void VTextGraphicsItem::UpdateBox()