Logo Search packages:      
Sourcecode: koffice version File versions

void QtTableView::setHorScrollBar ( bool  on,
bool  update = TRUE 
) [private, virtual]

Enables or disables the horizontal scroll bar, as required by setAutoUpdate() and the table flags.

Definition at line 1499 of file qttableview.cpp.

References autoUpdate(), coverCornerSquare(), horizontalScrollBar(), repaint(), testTableFlags(), and updateScrollBars().

Referenced by clearTableFlags(), and setTableFlags().

{
    if ( on ) {
      tFlags |= Tbl_hScrollBar;
      horizontalScrollBar(); // created
      if ( update )
          updateScrollBars( horMask | verMask );
      else
          sbDirty = sbDirty | (horMask | verMask);
      if ( testTableFlags( Tbl_vScrollBar ) )
          coverCornerSquare( TRUE );
      if ( autoUpdate() )
          sbDirty = sbDirty | horMask;
    } else {
      tFlags &= ~Tbl_hScrollBar;
      if ( !hScrollBar )
          return;
      coverCornerSquare( FALSE );
      bool hideScrollBar = autoUpdate() && hScrollBar->isVisible();
      if ( hideScrollBar )
          hScrollBar->hide();
      if ( update )
          updateScrollBars( verMask );
      else
          sbDirty = sbDirty | verMask;
      if ( hideScrollBar && isVisible() )
          repaint( hScrollBar->x(), hScrollBar->y(),
                 width() - hScrollBar->x(), hScrollBar->height() );
    }
    if ( update )
      updateFrameSize();
}


Generated by  Doxygen 1.6.0   Back to index