| 1756 | */ |
| 1757 | |
| 1758 | bool QtTableView::colXPos( int col, int *xPos ) const |
| 1759 | { |
| 1760 | int x; |
| 1761 | if ( col >= xCellOffs ) { |
| 1762 | if ( cellW ) { |
| 1763 | int lastVisible = lastColVisible(); |
| 1764 | if ( col > lastVisible || lastVisible == -1 ) |
| 1765 | return FALSE; |
| 1766 | x = (col - xCellOffs)*cellW + minViewX() - xCellDelta; |
| 1767 | } else { |
| 1768 | //##arnt3 |
| 1769 | x = minViewX() - xCellDelta; // x of uppermost cell in view |
| 1770 | int c = xCellOffs; |
| 1771 | QtTableView *tw = (QtTableView *)this; |
| 1772 | int maxX = maxViewX(); |
| 1773 | while ( c < col && x <= maxX ) |
| 1774 | x += tw->cellWidth( c++ ); |
| 1775 | if ( x > maxX ) |
| 1776 | return FALSE; |
| 1777 | } |
| 1778 | } else { |
| 1779 | return FALSE; |
| 1780 | } |
| 1781 | if ( xPos ) |
| 1782 | *xPos = x; |
| 1783 | return TRUE; |
| 1784 | } |
| 1785 | |
| 1786 | |
| 1787 | /*! |