@ -88,7 +88,7 @@ void QCornerSquare::paintEvent( TQPaintEvent * )
used by functions such as setXOffset ( ) or maxYOffset ( ) .
used by functions such as setXOffset ( ) or maxYOffset ( ) .
\ i The \ e widget coordinates . ( 0 , 0 ) is the top - left corner of the widget ,
\ i The \ e widget coordinates . ( 0 , 0 ) is the top - left corner of the widget ,
\ e including the frame . They are used by functions such as tq repaint( ) .
\ e including the frame . They are used by functions such as repaint( ) .
\ i The \ e view coordinates . ( 0 , 0 ) is the top - left corner of the view , \ e
\ i The \ e view coordinates . ( 0 , 0 ) is the top - left corner of the view , \ e
excluding the frame . This is the least - used coordinate system ; it is used by
excluding the frame . This is the least - used coordinate system ; it is used by
@ -135,7 +135,7 @@ void QCornerSquare::paintEvent( TQPaintEvent * )
The \ link setCellHeight ( ) cell height \ endlink and \ link setCellWidth ( )
The \ link setCellHeight ( ) cell height \ endlink and \ link setCellWidth ( )
cell width \ endlink are set to 0.
cell width \ endlink are set to 0.
Frame line tq shapes ( TQFrame : : HLink and TQFrame : : VLine ) are disallowed ;
Frame line shapes ( TQFrame : : HLink and TQFrame : : VLine ) are disallowed ;
see TQFrame : : setFrameStyle ( ) .
see TQFrame : : setFrameStyle ( ) .
Note that the \ a f argument is \ e not \ link setTableFlags ( ) table
Note that the \ a f argument is \ e not \ link setTableFlags ( ) table
@ -207,7 +207,7 @@ void QtTableView::show()
/*!
/*!
\ overload void QtTableView : : tq repaint( bool erase )
\ overload void QtTableView : : repaint( bool erase )
Repaints the entire view .
Repaints the entire view .
*/
*/
@ -221,16 +221,16 @@ void QtTableView::show()
If \ a w is negative , it is replaced with < code > width ( ) - x < / code > .
If \ a w is negative , it is replaced with < code > width ( ) - x < / code > .
If \ a h is negative , it is replaced with < code > height ( ) - y < / code > .
If \ a h is negative , it is replaced with < code > height ( ) - y < / code > .
Doing a tq repaint( ) usually is faster than doing an update ( ) , but
Doing a repaint( ) usually is faster than doing an update ( ) , but
calling update ( ) many times in a row will generate a single paint
calling update ( ) many times in a row will generate a single paint
event .
event .
At present , QtTableView is the only widget that reimplements \ link
At present , QtTableView is the only widget that reimplements \ link
TQWidget : : tq repaint( ) tq repaint( ) \ endlink . It does this because by
TQWidget : : repaint( ) repaint( ) \ endlink . It does this because by
clearing and then repainting one cell at at time , it can make the
clearing and then repainting one cell at at time , it can make the
screen flicker less than it would otherwise . */
screen flicker less than it would otherwise . */
void QtTableView : : tq repaint( int x , int y , int w , int h , bool erase )
void QtTableView : : repaint( int x , int y , int w , int h , bool erase )
{
{
if ( ! isVisible ( ) | | testWState ( WState_BlockUpdates ) )
if ( ! isVisible ( ) | | testWState ( WState_BlockUpdates ) )
return ;
return ;
@ -249,7 +249,7 @@ void QtTableView::tqrepaint( int x, int y, int w, int h, bool erase )
}
}
/*!
/*!
\ overload void QtTableView : : tq repaint( const TQRect & r , bool erase )
\ overload void QtTableView : : repaint( const TQRect & r , bool erase )
Replaints rectangle \ a r . If \ a erase is TRUE draws the background
Replaints rectangle \ a r . If \ a erase is TRUE draws the background
using the palette ' s background .
using the palette ' s background .
*/
*/
@ -288,7 +288,7 @@ void QtTableView::setNumRows( int rows )
nRows = rows ;
nRows = rows ;
if ( autoUpdate ( ) & & isVisible ( ) & &
if ( autoUpdate ( ) & & isVisible ( ) & &
( oldLastVisible ! = lastRowVisible ( ) | | oldTopCell ! = topCell ( ) ) )
( oldLastVisible ! = lastRowVisible ( ) | | oldTopCell ! = topCell ( ) ) )
tq repaint( oldTopCell ! = topCell ( ) ) ;
repaint( oldTopCell ! = topCell ( ) ) ;
} else {
} else {
// Be more careful - if destructing, bad things might happen.
// Be more careful - if destructing, bad things might happen.
nRows = rows ;
nRows = rows ;
@ -328,7 +328,7 @@ void QtTableView::setNumCols( int cols )
if ( autoUpdate ( ) & & isVisible ( ) ) {
if ( autoUpdate ( ) & & isVisible ( ) ) {
int maxCol = lastColVisible ( ) ;
int maxCol = lastColVisible ( ) ;
if ( maxCol > = oldCols | | maxCol > = nCols )
if ( maxCol > = oldCols | | maxCol > = nCols )
tq repaint( ) ;
repaint( ) ;
}
}
updateScrollBars ( horRange ) ;
updateScrollBars ( horRange ) ;
updateFrameSize ( ) ;
updateFrameSize ( ) ;
@ -591,7 +591,7 @@ void QtTableView::setCellWidth( int cellWidth )
updateScrollBars ( horSteps | horRange ) ;
updateScrollBars ( horSteps | horRange ) ;
if ( autoUpdate ( ) & & isVisible ( ) )
if ( autoUpdate ( ) & & isVisible ( ) )
tq repaint( ) ;
repaint( ) ;
}
}
@ -643,7 +643,7 @@ void QtTableView::setCellHeight( int cellHeight )
# endif
# endif
cellH = ( short ) cellHeight ;
cellH = ( short ) cellHeight ;
if ( autoUpdate ( ) & & isVisible ( ) )
if ( autoUpdate ( ) & & isVisible ( ) )
tq repaint( ) ;
repaint( ) ;
updateScrollBars ( verSteps | verRange ) ;
updateScrollBars ( verSteps | verRange ) ;
}
}
@ -817,7 +817,7 @@ void QtTableView::setTableFlags( uint f )
( f & Tbl_snapToVGrid ) ! = 0 & & yCellDelta ! = 0 ) {
( f & Tbl_snapToVGrid ) ! = 0 & & yCellDelta ! = 0 ) {
snapToGrid ( ( f & Tbl_snapToHGrid ) ! = 0 , // do snapping
snapToGrid ( ( f & Tbl_snapToHGrid ) ! = 0 , // do snapping
( f & Tbl_snapToVGrid ) ! = 0 ) ;
( f & Tbl_snapToVGrid ) ! = 0 ) ;
repaintMask | = Tbl_snapToGrid ; // tq repaint table
repaintMask | = Tbl_snapToGrid ; // repaint table
}
}
}
}
@ -825,7 +825,7 @@ void QtTableView::setTableFlags( uint f )
setAutoUpdate ( TRUE ) ;
setAutoUpdate ( TRUE ) ;
updateScrollBars ( ) ;
updateScrollBars ( ) ;
if ( isVisible ( ) & & ( f & repaintMask ) )
if ( isVisible ( ) & & ( f & repaintMask ) )
tq repaint( ) ;
repaint( ) ;
}
}
}
}
@ -881,7 +881,7 @@ void QtTableView::clearTableFlags( uint f )
( f & Tbl_smoothVScrolling ) ! = 0 & & yCellDelta ! = 0 ) {
( f & Tbl_smoothVScrolling ) ! = 0 & & yCellDelta ! = 0 ) {
snapToGrid ( ( f & Tbl_smoothHScrolling ) ! = 0 , // do snapping
snapToGrid ( ( f & Tbl_smoothHScrolling ) ! = 0 , // do snapping
( f & Tbl_smoothVScrolling ) ! = 0 ) ;
( f & Tbl_smoothVScrolling ) ! = 0 ) ;
repaintMask | = Tbl_smoothScrolling ; // tq repaint table
repaintMask | = Tbl_smoothScrolling ; // repaint table
}
}
}
}
if ( f & Tbl_snapToHGrid ) {
if ( f & Tbl_snapToHGrid ) {
@ -894,7 +894,7 @@ void QtTableView::clearTableFlags( uint f )
setAutoUpdate ( TRUE ) ;
setAutoUpdate ( TRUE ) ;
updateScrollBars ( ) ; // returns immediately if nothing to do
updateScrollBars ( ) ; // returns immediately if nothing to do
if ( isVisible ( ) & & ( f & repaintMask ) )
if ( isVisible ( ) & & ( f & repaintMask ) )
tq repaint( ) ;
repaint( ) ;
}
}
}
}
@ -916,20 +916,20 @@ void QtTableView::clearTableFlags( uint f )
automatically whenever it has changed in some way ( for example , when a
automatically whenever it has changed in some way ( for example , when a
\ link setTableFlags ( ) flag \ endlink is changed ) .
\ link setTableFlags ( ) flag \ endlink is changed ) .
If \ a enable is FALSE , the view does NOT tq repaint itself or update
If \ a enable is FALSE , the view does NOT repaint itself or update
its internal state variables when it is changed . This can be
its internal state variables when it is changed . This can be
useful to avoid flicker during large changes and is singularly
useful to avoid flicker during large changes and is singularly
useless otherwise . Disable auto - update , do the changes , re - enable
useless otherwise . Disable auto - update , do the changes , re - enable
auto - update and call tq repaint( ) .
auto - update and call repaint( ) .
\ warning Do not leave the view in this state for a long time
\ warning Do not leave the view in this state for a long time
( i . e . , between events ) . If , for example , the user interacts with the
( i . e . , between events ) . If , for example , the user interacts with the
view when auto - update is off , strange things can happen .
view when auto - update is off , strange things can happen .
Setting auto - update to TRUE does not tq repaint the view ; you must call
Setting auto - update to TRUE does not repaint the view ; you must call
tq repaint( ) to do this .
repaint( ) to do this .
\ sa autoUpdate ( ) , tq repaint( )
\ sa autoUpdate ( ) , repaint( )
*/
*/
void QtTableView : : setAutoUpdate ( bool enable )
void QtTableView : : setAutoUpdate ( bool enable )
@ -963,7 +963,7 @@ void QtTableView::updateCell( int row, int col, bool erase )
TQRect uR = TQRect ( xPos , yPos ,
TQRect uR = TQRect ( xPos , yPos ,
cellW ? cellW : cellWidth ( col ) ,
cellW ? cellW : cellWidth ( col ) ,
cellH ? cellH : cellHeight ( row ) ) ;
cellH ? cellH : cellHeight ( row ) ) ;
tq repaint( uR . intersect ( viewRect ( ) ) , erase ) ;
repaint( uR . intersect ( viewRect ( ) ) , erase ) ;
}
}
@ -1379,7 +1379,7 @@ void QtTableView::paintEvent( TQPaintEvent *e )
// Note that this needs to be done regardless whether we do
// Note that this needs to be done regardless whether we do
// eraseInPaint or not. Reason: a subclass may implement
// eraseInPaint or not. Reason: a subclass may implement
// flicker-freeness and encourage the use of tq repaint(FALSE).
// flicker-freeness and encourage the use of repaint(FALSE).
// The subclass, however, cannot draw all pixels, just those
// The subclass, however, cannot draw all pixels, just those
// inside the cells. So QtTableView is reponsible for all pixels
// inside the cells. So QtTableView is reponsible for all pixels
// outside the cells.
// outside the cells.
@ -1426,7 +1426,7 @@ void QtTableView::resizeEvent( TQResizeEvent * )
void QtTableView : : updateView ( )
void QtTableView : : updateView ( )
{
{
tq repaint( viewRect ( ) ) ;
repaint( viewRect ( ) ) ;
}
}
/*!
/*!
@ -1522,7 +1522,7 @@ void QtTableView::setHorScrollBar( bool on, bool update )
else
else
sbDirty = sbDirty | verMask ;
sbDirty = sbDirty | verMask ;
if ( hideScrollBar & & isVisible ( ) )
if ( hideScrollBar & & isVisible ( ) )
tq repaint( hScrollBar - > x ( ) , hScrollBar - > y ( ) ,
repaint( hScrollBar - > x ( ) , hScrollBar - > y ( ) ,
width ( ) - hScrollBar - > x ( ) , hScrollBar - > height ( ) ) ;
width ( ) - hScrollBar - > x ( ) , hScrollBar - > height ( ) ) ;
}
}
if ( update )
if ( update )
@ -1561,7 +1561,7 @@ void QtTableView::setVerScrollBar( bool on, bool update )
else
else
sbDirty = sbDirty | horMask ;
sbDirty = sbDirty | horMask ;
if ( hideScrollBar & & isVisible ( ) )
if ( hideScrollBar & & isVisible ( ) )
tq repaint( vScrollBar - > x ( ) , vScrollBar - > y ( ) ,
repaint( vScrollBar - > x ( ) , vScrollBar - > y ( ) ,
vScrollBar - > width ( ) , height ( ) - vScrollBar - > y ( ) ) ;
vScrollBar - > width ( ) , height ( ) - vScrollBar - > y ( ) ) ;
}
}
if ( update )
if ( update )
@ -2006,7 +2006,7 @@ void QtTableView::updateScrollBars( uint f )
if ( sbDirty & horValue )
if ( sbDirty & horValue )
hScrollBar - > setValue ( xOffs ) ;
hScrollBar - > setValue ( xOffs ) ;
// show scrollbar only when it has a sane tq geometry
// show scrollbar only when it has a sane geometry
if ( ! hScrollBar - > isVisible ( ) )
if ( ! hScrollBar - > isVisible ( ) )
hScrollBar - > show ( ) ;
hScrollBar - > show ( ) ;
}
}
@ -2030,7 +2030,7 @@ void QtTableView::updateScrollBars( uint f )
if ( sbDirty & verValue )
if ( sbDirty & verValue )
vScrollBar - > setValue ( yOffs ) ;
vScrollBar - > setValue ( yOffs ) ;
// show scrollbar only when it has a sane tq geometry
// show scrollbar only when it has a sane geometry
if ( ! vScrollBar - > isVisible ( ) )
if ( ! vScrollBar - > isVisible ( ) )
vScrollBar - > show ( ) ;
vScrollBar - > show ( ) ;
}
}
@ -2253,7 +2253,7 @@ void QtTableView::showOrHideScrollBars()
Call this function when the table view ' s total size is changed ;
Call this function when the table view ' s total size is changed ;
typically because the result of cellHeight ( ) or cellWidth ( ) have changed .
typically because the result of cellHeight ( ) or cellWidth ( ) have changed .
This function does not tq repaint the widget .
This function does not repaint the widget .
*/
*/
void QtTableView : : updateTableSize ( )
void QtTableView : : updateTableSize ( )