| 272 | */ |
| 273 | |
| 274 | void QtTableView::setNumRows( int rows ) |
| 275 | { |
| 276 | if ( rows < 0 ) { |
| 277 | #if defined(QT_CHECK_RANGE) |
| 278 | qWarning( "QtTableView::setNumRows: (%s) Negative argument %d.", |
| 279 | name( "unnamed" ), rows ); |
| 280 | #endif |
| 281 | return; |
| 282 | } |
| 283 | if ( nRows == rows ) |
| 284 | return; |
| 285 | |
| 286 | if ( autoUpdate() && isVisible() ) { |
| 287 | int oldLastVisible = lastRowVisible(); |
| 288 | int oldTopCell = topCell(); |
| 289 | nRows = rows; |
| 290 | if ( autoUpdate() && isVisible() && |
| 291 | ( oldLastVisible != lastRowVisible() || oldTopCell != topCell() ) ) |
| 292 | repaint( oldTopCell != topCell() ); |
| 293 | } else { |
| 294 | // Be more careful - if destructing, bad things might happen. |
| 295 | nRows = rows; |
| 296 | } |
| 297 | updateScrollBars( verRange ); |
| 298 | updateFrameSize(); |
| 299 | } |
| 300 | |
| 301 | /*! |
| 302 | \fn int QtTableView::numCols() const |
nothing calls this directly
no outgoing calls
no test coverage detected