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)
{
Q_UNUSED(widget);
painter->fillRect(option->rect, QColor(251, 251, 175));
// draw text lines
@ -162,6 +163,8 @@ QRectF VTextGraphicsItem::boundingRect() const
//---------------------------------------------------------------------------------------------------------------------
void VTextGraphicsItem::mousePressEvent(QGraphicsSceneMouseEvent *pME)
{
if ((pME->buttons() & Qt::LeftButton) > 0)
{
m_ptStart = pME->pos();
m_szStart = m_rectBoundingBox.size();
if (m_rectResize.contains(m_ptStart) == true)
@ -174,6 +177,7 @@ void VTextGraphicsItem::mousePressEvent(QGraphicsSceneMouseEvent *pME)
}
setZValue(3);
UpdateBox();
}
}
//---------------------------------------------------------------------------------------------------------------------
@ -196,6 +200,8 @@ void VTextGraphicsItem::mouseMoveEvent(QGraphicsSceneMouseEvent* pME)
//---------------------------------------------------------------------------------------------------------------------
void VTextGraphicsItem::mouseReleaseEvent(QGraphicsSceneMouseEvent* pME)
{
if ((pME->buttons() & Qt::LeftButton) > 0)
{
if (m_eMode == mMove)
{
emit SignalMoved(pos());
@ -207,6 +213,7 @@ void VTextGraphicsItem::mouseReleaseEvent(QGraphicsSceneMouseEvent* pME)
Update();
}
m_eMode = mActivated;
}
}
//---------------------------------------------------------------------------------------------------------------------