Logo Search packages:      
Sourcecode: koffice version File versions

void QtTableView::repaint ( int  x,
int  y,
int  w,
int  h,
bool  erase = TRUE 

Repaints the table view directly by calling paintEvent() directly unless updates are disabled.

Erases the view area (x,y,w,h) if erase is TRUE. Parameters (x,y) are in widget coordinates.

If w is negative, it is replaced with width() - x. If h is negative, it is replaced with height() - y.

Doing a repaint() usually is faster than doing an update(), but calling update() many times in a row will generate a single paint event.

At present, QtTableView is the only widget that reimplements repaint(). It does this because by clearing and then repainting one cell at at time, it can make the screen flicker less than it would otherwise.

Definition at line 233 of file qttableview.cpp.

References paintEvent().

    if ( !isVisible() || testWState(WState_BlockUpdates) )
    if ( w < 0 )
      w = width()  - x;
    if ( h < 0 )
      h = height() - y;
    QRect r( x, y, w, h );
    if ( r.isEmpty() )
      return; // nothing to do
    QPaintEvent e( r );
    if ( erase && backgroundMode() != NoBackground )
      eraseInPaint = TRUE;                // erase when painting
    paintEvent( &e );
    eraseInPaint = FALSE;

Generated by  Doxygen 1.6.0   Back to index