Logo Search packages:      
Sourcecode: kdbg version File versions

QPoint KTreeView::cellCoords ( int  row,
const QPoint &  widgetCoord 
) [virtual]

Computes coordinates relative to the specified row from the given coordinates. If the row is invalid, the input coordinates are returned unchanged.

Parameters:
widget specifies widget coordinates (e.g. from a mouse event)
Returns:
coordinates relative to the specified cell

Definition at line 657 of file ktreeview.cpp.

Referenced by mouseDoubleClickEvent(), mouseMoveEvent(), mousePressEvent(), and mouseReleaseEvent().

{
    int cellX = 0, cellY = 0;
    colXPos(0, &cellX);
    rowYPos(row, &cellY);
    return QPoint(widgetCoord.x() - cellX, widgetCoord.y() - cellY);
}


Generated by  Doxygen 1.6.0   Back to index