MCPcopy Create free account
hub / github.com/NetHack/NetHack / rowYPos

Method rowYPos

outdated/win/Qt3/qt3tableview.cpp:1718–1745  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1716*/
1717
1718bool 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/*!

Callers

nothing calls this directly

Calls 1

cellHeightMethod · 0.60

Tested by

no test coverage detected