// This is the SIP interface definition for TQTableView.
//
// Copyright (c) 2007
// 	Riverbank Computing Limited <info@riverbankcomputing.co.uk>
// 
// This file is part of PyTQt.
// 
// This copy of PyTQt is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2, or (at your option) any later
// version.
// 
// PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
// details.
// 
// You should have received a copy of the GNU General Public License along with
// PyTQt; see the file LICENSE.  If not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.


%ExportedDoc
<Sect2><Title>TQTableView (TQt 1.x, TQt 2.x)</Title>
<FuncSynopsis>
        <FuncDef>bool <Function>colXPos</Function></FuncDef>
        <ParamDef>int <Parameter>col</Parameter></ParamDef>
        <ParamDef>int *<Parameter>xPos</Parameter></ParamDef>
</FuncSynopsis>
<Para>
This takes the <Literal>col</Literal> parameter and returns a tuple containing
the <Literal>bool</Literal> result and <Literal>xPos</Literal>.
</Para>

<FuncSynopsis>
        <FuncDef>bool <Function>rowYPos</Function></FuncDef>
        <ParamDef>int <Parameter>row</Parameter></ParamDef>
        <ParamDef>int *<Parameter>yPos</Parameter></ParamDef>
</FuncSynopsis>
<Para>
This takes the <Literal>row</Literal> parameter and returns a tuple containing
the <Literal>bool</Literal> result and <Literal>yPos</Literal>.
</Para>
</Sect2>
%End


%If (TQt_TABLEVIEW)
%If (- TQt_3_0_0)

%ModuleHeaderCode
#include <tqtableview.h>
%End

const uint Tbl_vScrollBar;
const uint Tbl_hScrollBar;
const uint Tbl_autoVScrollBar;
const uint Tbl_autoHScrollBar;
const uint Tbl_autoScrollBars;

const uint Tbl_clipCellPainting;
const uint Tbl_cutCellsV;
const uint Tbl_cutCellsH;
const uint Tbl_cutCells;

const uint Tbl_scrollLastHCell;
const uint Tbl_scrollLastVCell;
const uint Tbl_scrollLastCell;

const uint Tbl_smoothHScrolling;
const uint Tbl_smoothVScrolling;
const uint Tbl_smoothScrolling;

const uint Tbl_snapToHGrid;
const uint Tbl_snapToVGrid;
const uint Tbl_snapToGrid;


class TQTableView : TQFrame
{
%TypeHeaderCode
#include <tqtableview.h>
%End

public:
%If (- TQt_2_00)
	void setBackgroundColor(const TQColor &);
	void setPalette(const TQPalette &);
%End
%If (TQt_2_00 -)
	virtual void setBackgroundColor(const TQColor &);
	virtual void setPalette(const TQPalette &);
%End
	void show();
	void repaint(bool = 1);
	void repaint(int,int,int,int,bool = 1);
	void repaint(const TQRect &,bool = 1);

protected:
	TQTableView(TQWidget * /TransferThis/ = 0,const char * = 0,WFlags = 0);
	~TQTableView();

	int numRows() const;
	int numCols() const;
	int topCell() const;
	int leftCell() const;
	int xOffset() const;
	int yOffset() const;
	virtual int cellWidth(int);
	virtual int cellHeight(int);
	int cellWidth() const;
	int cellHeight() const;
	virtual int totalWidth();
	virtual int totalHeight();
	uint tableFlags() const;
	bool testTableFlags(uint) const;
	void clearTableFlags(uint = ~0);
	bool autoUpdate() const;
	void updateCell(int,int,bool = 1);
	TQRect cellUpdateRect() const;
	TQRect viewRect() const;
	int lastRowVisible() const;
	int lastColVisible() const;
	bool rowIsVisible(int) const;
	bool colIsVisible(int) const;
	const TQScrollBar *verticalScrollBar() const;
	const TQScrollBar *horizontalScrollBar() const;
	virtual void paintCell(TQPainter *,int,int) = 0;
	virtual void setupPainter(TQPainter *);
	void paintEvent(TQPaintEvent *);
	void resizeEvent(TQResizeEvent *);
	int findRow(int) const;
	int findCol(int) const;
	bool rowYPos(int,int *) const;
	bool colXPos(int,int *) const;
	int maxXOffset();
	int maxYOffset();
	int maxColOffset();
	int maxRowOffset();
	int minViewX() const;
	int minViewY() const;
	int maxViewX() const;
	int maxViewY() const;
	int viewWidth() const;
	int viewHeight() const;
	void scroll(int,int);
	void updateScrollBars();
	void updateTableSize();

%If (- TQt_2_00)
	void setNumRows(int);
	void setNumCols(int);
	void setTopCell(int);
	void setLeftCell(int);
	void setTopLeftCell(int,int);
	void setXOffset(int);
	void setYOffset(int);
	void setOffset(int,int,bool = 1);
	void setCellWidth(int);
	void setCellHeight(int);
	void setTableFlags(uint);
	void setAutoUpdate(bool);
%End

%If (TQt_2_00 -)
	virtual void setNumRows(int);
	virtual void setNumCols(int);
	virtual void setTopCell(int);
	virtual void setLeftCell(int);
	virtual void setTopLeftCell(int,int);
	virtual void setXOffset(int);
	virtual void setYOffset(int);
	virtual void setOffset(int,int,bool = 1);
	virtual void setCellWidth(int);
	virtual void setCellHeight(int);
	virtual void setTableFlags(uint);
	virtual void setAutoUpdate(bool);
%End

private:
	TQTableView(const TQTableView &);
};

%End
%End
