| 1716 | */ |
| 1717 | |
| 1718 | bool QtTableView::rowYPos( int row, int *yPos ) const |
| 1719 | { |
| 1720 | int y; |
| 1721 | if ( row >= yCellOffs ) { |
| 1722 | if ( cellH ) { |
| 1723 | int lastVisible = lastRowVisible(); |
| 1724 | if ( row > lastVisible || lastVisible == -1 ) |
| 1725 | return FALSE; |
| 1726 | y = (row - yCellOffs)*cellH + minViewY() - yCellDelta; |
| 1727 | } else { |
| 1728 | //##arnt3 |
| 1729 | y = minViewY() - yCellDelta; // y of leftmost cell in view |
| 1730 | int r = yCellOffs; |
| 1731 | QtTableView *tw = (QtTableView *)this; |
| 1732 | int maxY = maxViewY(); |
| 1733 | while ( r < row && y <= maxY ) |
| 1734 | y += tw->cellHeight( r++ ); |
| 1735 | if ( y > maxY ) |
| 1736 | return FALSE; |
| 1737 | |
| 1738 | } |
| 1739 | } else { |
| 1740 | return FALSE; |
| 1741 | } |
| 1742 | if ( yPos ) |
| 1743 | *yPos = y; |
| 1744 | return TRUE; |
| 1745 | } |
| 1746 | |
| 1747 | |
| 1748 | /*! |
nothing calls this directly
no test coverage detected