Q3CanvasItemList l = m_pCanvas->collisions(item);
selCanItem = l;
for (Q3CanvasItemList::Iterator it= selCanItem.begin(); it!= selCanItem.end(); ++it)
{
if ( (*it)->rtti() == 7 )
{
for(i=0;i<42;i++)
{
if((i<GlobalOutYLineList.size()) && ((*it)->collidesWith(GlobalOutYLineList.at(i))))
{
QMessageBox::information(this, tr
("CGUITileType"),tr
("GlobalOutYLineList Line %1 Mouse Event Handled ").
arg(i
));
m_pCLineGlobalOutY
[i
]->setPen
(QPen(Qt
::red));
startPoint = m_pCLineGlobalOutY[i]->startPoint();
endPoint = m_pCLineGlobalOutY[i]->endPoint();
m_pCLineGlobalOutY[i]->setPoints(startPoint.x(),startPoint.y(),endPoint.x(),endPoint.y());
m_pCLineGlobalOutY[i]->show();
break;
}
else if((i<V1_DirectInputLineList.size())&& ((*it)->collidesWith(V1_DirectInputLineList.at(i))))
{
QMessageBox::information(this, tr
("CGUITileType"),tr
("V1_DirectInputLineList Line %1 Mouse Event Handled ").
arg(i
));
m_pV1_CLineDirectInput
[i
]->setPen
(QPen(Qt
::red));
startPoint = m_pV1_CLineDirectInput[i]->startPoint();
endPoint = m_pV1_CLineDirectInput[i]->endPoint();
m_pV1_CLineDirectInput[i]->setPoints(startPoint.x(),startPoint.y(),endPoint.x(),endPoint.y());
m_pV1_CLineDirectInput[i]->show();
break;
}
Q3CanvasItemList l = m_pCanvas->collisions(item);
selCanItem = l;
for (Q3CanvasItemList::Iterator it= selCanItem.begin(); it!= selCanItem.end(); ++it)
{
if ( (*it)->rtti() == 7 )
{
for(i=0;i<42;i++)
{
if((i<GlobalOutYLineList.size()) && ((*it)->collidesWith(GlobalOutYLineList.at(i))))
{
QMessageBox::information(this, tr("CGUITileType"),tr("GlobalOutYLineList Line %1 Mouse Event Handled ").arg(i));
m_pCLineGlobalOutY[i]->setPen(QPen(Qt::red));
startPoint = m_pCLineGlobalOutY[i]->startPoint();
endPoint = m_pCLineGlobalOutY[i]->endPoint();
m_pCLineGlobalOutY[i]->setPoints(startPoint.x(),startPoint.y(),endPoint.x(),endPoint.y());
m_pCLineGlobalOutY[i]->show();
break;
}
else if((i<V1_DirectInputLineList.size())&& ((*it)->collidesWith(V1_DirectInputLineList.at(i))))
{
QMessageBox::information(this, tr("CGUITileType"),tr("V1_DirectInputLineList Line %1 Mouse Event Handled ").arg(i));
m_pV1_CLineDirectInput[i]->setPen(QPen(Qt::red));
startPoint = m_pV1_CLineDirectInput[i]->startPoint();
endPoint = m_pV1_CLineDirectInput[i]->endPoint();
m_pV1_CLineDirectInput[i]->setPoints(startPoint.x(),startPoint.y(),endPoint.x(),endPoint.y());
m_pV1_CLineDirectInput[i]->show();
break;
}
To copy to clipboard, switch view to plain text mode
Bookmarks