Corrected some warnings
--HG-- branch : feature
This commit is contained in:
parent
83ec6e219a
commit
caa13f06ac
|
@ -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
|
||||
|
@ -161,6 +162,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();
|
||||
|
@ -175,6 +178,7 @@ void VTextGraphicsItem::mousePressEvent(QGraphicsSceneMouseEvent *pME)
|
|||
setZValue(3);
|
||||
UpdateBox();
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VTextGraphicsItem::mouseMoveEvent(QGraphicsSceneMouseEvent* pME)
|
||||
|
@ -195,6 +199,8 @@ void VTextGraphicsItem::mouseMoveEvent(QGraphicsSceneMouseEvent* pME)
|
|||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VTextGraphicsItem::mouseReleaseEvent(QGraphicsSceneMouseEvent* pME)
|
||||
{
|
||||
if ((pME->buttons() & Qt::LeftButton) > 0)
|
||||
{
|
||||
if (m_eMode == mMove)
|
||||
{
|
||||
|
@ -208,6 +214,7 @@ void VTextGraphicsItem::mouseReleaseEvent(QGraphicsSceneMouseEvent* pME)
|
|||
}
|
||||
m_eMode = mActivated;
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VTextGraphicsItem::UpdateBox()
|
||||
|
|
Loading…
Reference in New Issue
Block a user