/**********************************************************************
-** $Id: qttableview.C,v 1.2 2001/12/05 08:04:18 larsbj Exp $
+** $Id: qttableview.C,v 1.4 2002/11/04 00:15:54 larsbj Exp $
**
** Implementation of QtTableView class
**
**
**********************************************************************/
+#include <config.h>
+
#include "qttableview.h"
#ifndef QT_NO_QTTABLEVIEW
#include "qscrollbar.h"
#endif
#ifndef Q_ASSERT
#define Q_ASSERT ASSERT
-#endif
+#endif
enum ScrollBarDirtyFlags {
verGeometry = 0x01,
Q_CHECK_PTR( cornerSquare );
cornerSquare->setGeometry( maxViewX() + frameWidth() + 1,
maxViewY() + frameWidth() + 1,
- VSBEXT,
- HSBEXT);
+ VSBEXT,
+ HSBEXT);
}
if ( autoUpdate() && cornerSquare ) {
if ( enable )
if ( !contentsRect().contains( updateR, TRUE ) ) {// update frame ?
drawFrame( &paint );
- if ( updateR.left() < frameWidth() ) //###
+ if ( updateR.left() < frameWidth() ) //###
updateR.setLeft( frameWidth() );
if ( updateR.top() < frameWidth() )
updateR.setTop( frameWidth() );
#ifndef QT_NO_CURSOR
sb->setCursor( arrowCursor );
#endif
- sb->resize( sb->sizeHint() ); // height is irrelevant
+ sb->resize( sb->sizeHint() ); // height is irrelevant
Q_CHECK_PTR(sb);
sb->setTracking( FALSE );
sb->setFocusPolicy( NoFocus );
int QtTableView::maxViewX() const
{
return width() - 1 - frameWidth()
- - (tFlags & Tbl_vScrollBar ? VSBEXT
- : 0);
+ - (tFlags & Tbl_vScrollBar ? VSBEXT
+ : 0);
}
int QtTableView::maxViewY() const
{
return height() - 1 - frameWidth()
- - (tFlags & Tbl_hScrollBar ? HSBEXT
- : 0);
+ - (tFlags & Tbl_hScrollBar ? HSBEXT
+ : 0);
}
if ( testTableFlags(Tbl_hScrollBar) && (sbDirty & horMask) != 0 ) {
if ( sbDirty & horGeometry )
hScrollBar->setGeometry( 0,height() - HSBEXT,
- viewWidth() + frameWidth()*2,
- HSBEXT);
+ viewWidth() + frameWidth()*2,
+ HSBEXT);
if ( sbDirty & horSteps ) {
if ( cellW )
if ( testTableFlags(Tbl_vScrollBar) && (sbDirty & verMask) != 0 ) {
if ( sbDirty & verGeometry )
vScrollBar->setGeometry( width() - VSBEXT, 0,
- VSBEXT,
- viewHeight() + frameWidth()*2 );
+ VSBEXT,
+ viewHeight() + frameWidth()*2 );
if ( sbDirty & verSteps ) {
if ( cellH )
void QtTableView::updateFrameSize()
{
int rw = width() - ( testTableFlags(Tbl_vScrollBar) ?
- VSBEXT : 0 );
+ VSBEXT : 0 );
int rh = height() - ( testTableFlags(Tbl_hScrollBar) ?
- HSBEXT : 0 );
+ HSBEXT : 0 );
if ( rw < 0 )
rw = 0;
if ( rh < 0 )
rh = 0;
if ( autoUpdate() ) {
- int fh = frameRect().height();
+ int fh = frameRect().height();
int fw = frameRect().width();
setFrameRect( QRect(0,0,rw,rh) );