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)
|
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
|
||||||
|
@ -162,6 +163,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();
|
||||||
if (m_rectResize.contains(m_ptStart) == true)
|
if (m_rectResize.contains(m_ptStart) == true)
|
||||||
|
@ -174,6 +177,7 @@ void VTextGraphicsItem::mousePressEvent(QGraphicsSceneMouseEvent *pME)
|
||||||
}
|
}
|
||||||
setZValue(3);
|
setZValue(3);
|
||||||
UpdateBox();
|
UpdateBox();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -196,6 +200,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)
|
||||||
{
|
{
|
||||||
emit SignalMoved(pos());
|
emit SignalMoved(pos());
|
||||||
|
@ -207,6 +213,7 @@ void VTextGraphicsItem::mouseReleaseEvent(QGraphicsSceneMouseEvent* pME)
|
||||||
Update();
|
Update();
|
||||||
}
|
}
|
||||||
m_eMode = mActivated;
|
m_eMode = mActivated;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue
Block a user