Index: trunk/include/qassistantclient.h
===================================================================
--- trunk/include/qassistantclient.h	(revision 164)
+++ trunk/include/qassistantclient.h	(revision 164)
@@ -0,0 +1,73 @@
+/**********************************************************************
+** Copyright (C) 2002 Trolltech AS.  All rights reserved.
+**
+** This file is part of the QAssistantClient library.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+**   information about Qt Commercial License Agreements.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QASSISTANTCLIENT_H
+#define QASSISTANTCLIENT_H
+
+#include <qobject.h>
+
+class QSocket;
+class QProcess;
+
+class QAssistantClient : public QObject
+{
+    Q_OBJECT
+    Q_PROPERTY( bool open READ isOpen )
+
+public:
+    QAssistantClient( const QString &path, QObject *parent = 0, const char *name = 0 );
+    ~QAssistantClient();
+
+    bool isOpen() const;
+
+    void setArguments( const QStringList &args );
+
+public slots:
+    virtual void openAssistant();
+    virtual void closeAssistant();
+    virtual void showPage( const QString &page );
+
+signals:
+    void assistantOpened();
+    void assistantClosed();
+    void error( const QString &msg );
+
+private slots:
+    void socketConnected();
+    void socketConnectionClosed();
+    void readPort();
+    void socketError( int );
+    void readStdError();
+
+private:
+    QSocket *socket;
+    QProcess *proc;
+    Q_UINT16 port;
+    QString host, assistantCommand, pageBuffer;
+    bool opened;
+};
+
+#endif
Index: trunk/include/qiconview.h
===================================================================
--- trunk/include/qiconview.h	(revision 164)
+++ trunk/include/qiconview.h	(revision 164)
@@ -0,0 +1,511 @@
+/****************************************************************************
+** $Id$
+**
+** Definition of QIconView widget class
+**
+** Created : 990707
+**
+** Copyright (C) 1992-2000 Trolltech AS.  All rights reserved.
+**
+** This file is part of the iconview module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
+** licenses may use this file in accordance with the Qt Commercial License
+** Agreement provided with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+**   information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QICONVIEW_H
+#define QICONVIEW_H
+
+#ifndef QT_H
+#include "qscrollview.h"
+#include "qstring.h"
+#include "qrect.h"
+#include "qpoint.h"
+#include "qsize.h"
+#include "qfont.h" // QString->QFont conversion
+#include "qdragobject.h"
+#include "qbitmap.h"
+#include "qpicture.h"
+#endif // QT_H
+
+#ifndef QT_NO_ICONVIEW
+
+#if !defined( QT_MODULE_ICONVIEW ) || defined( QT_INTERNAL_ICONVIEW )
+#define QM_EXPORT_ICONVIEW
+#else
+#define QM_EXPORT_ICONVIEW Q_EXPORT
+#endif
+
+class QIconView;
+class QPainter;
+class QMimeSource;
+class QMouseEvent;
+class QDragEnterEvent;
+class QDragMoveEvent;
+class QDragLeaveEvent;
+class QKeyEvent;
+class QFocusEvent;
+class QShowEvent;
+class QIconViewItem;
+class QIconViewItemLineEdit;
+class QStringList;
+class QIconDragPrivate;
+
+#ifndef QT_NO_DRAGANDDROP
+
+class QM_EXPORT_ICONVIEW QIconDragItem
+{
+public:
+    QIconDragItem();
+    virtual ~QIconDragItem();
+    virtual QByteArray data() const;
+    virtual void setData( const QByteArray &d );
+    bool operator== ( const QIconDragItem& ) const;
+
+private:
+    QByteArray ba;
+
+};
+
+class QM_EXPORT_ICONVIEW QIconDrag : public QDragObject
+{
+    Q_OBJECT
+public:
+    QIconDrag( QWidget * dragSource, const char* name = 0 );
+    virtual ~QIconDrag();
+
+    void append( const QIconDragItem &item, const QRect &pr, const QRect &tr );
+
+    virtual const char* format( int i ) const;
+    static bool canDecode( QMimeSource* e );
+    virtual QByteArray encodedData( const char* mime ) const;
+
+private:
+    QIconDragPrivate *d;
+    QChar endMark;
+
+    friend class QIconView;
+    friend class QIconViewPrivate;
+#if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator=
+    QIconDrag( const QIconDrag & );
+    QIconDrag &operator=( const QIconDrag & );
+#endif
+};
+
+#endif
+
+class QIconViewToolTip;
+class QIconViewItemPrivate;
+
+class QM_EXPORT_ICONVIEW QIconViewItem : public Qt
+{
+    friend class QIconView;
+    friend class QIconViewToolTip;
+    friend class QIconViewItemLineEdit;
+
+public:
+    QIconViewItem( QIconView *parent );
+    QIconViewItem( QIconView *parent, QIconViewItem *after );
+    QIconViewItem( QIconView *parent, const QString &text );
+    QIconViewItem( QIconView *parent, QIconViewItem *after, const QString &text );
+    QIconViewItem( QIconView *parent, const QString &text, const QPixmap &icon );
+    QIconViewItem( QIconView *parent, QIconViewItem *after, const QString &text, const QPixmap &icon );
+#ifndef QT_NO_PICTURE
+    QIconViewItem( QIconView *parent, const QString &text, const QPicture &picture );
+    QIconViewItem( QIconView *parent, QIconViewItem *after, const QString &text, const QPicture &picture );
+#endif
+    virtual ~QIconViewItem();
+
+    virtual void setRenameEnabled( bool allow );
+    virtual void setDragEnabled( bool allow );
+    virtual void setDropEnabled( bool allow );
+
+    virtual QString text() const;
+    virtual QPixmap *pixmap() const;
+#ifndef QT_NO_PICTURE
+    virtual QPicture *picture() const;
+#endif
+    virtual QString key() const;
+
+    bool renameEnabled() const;
+    bool dragEnabled() const;
+    bool dropEnabled() const;
+
+    QIconView *iconView() const;
+    QIconViewItem *prevItem() const;
+    QIconViewItem *nextItem() const;
+
+    int index() const;
+
+    virtual void setSelected( bool s, bool cb );
+    virtual void setSelected( bool s );
+    virtual void setSelectable( bool s );
+
+    bool isSelected() const;
+    bool isSelectable() const;
+
+    virtual void repaint();
+
+    virtual bool move( int x, int y );
+    virtual void moveBy( int dx, int dy );
+    virtual bool move( const QPoint &pnt );
+    virtual void moveBy( const QPoint &pnt );
+
+    QRect rect() const;
+    int x() const;
+    int y() const;
+    int width() const;
+    int height() const;
+    QSize size() const;
+    QPoint pos() const;
+    QRect textRect( bool relative = TRUE ) const;
+    QRect pixmapRect( bool relative = TRUE ) const;
+    bool contains( const QPoint& pnt ) const;
+    bool intersects( const QRect& r ) const;
+
+    virtual bool acceptDrop( const QMimeSource *mime ) const;
+
+#ifndef QT_NO_TEXTEDIT
+    void rename();
+#endif
+
+    virtual int compare( QIconViewItem *i ) const;
+
+    virtual void setText( const QString &text );
+    virtual void setPixmap( const QPixmap &icon );
+#ifndef QT_NO_PICTURE
+    virtual void setPicture( const QPicture &icon );
+#endif
+    virtual void setText( const QString &text, bool recalc, bool redraw = TRUE );
+    virtual void setPixmap( const QPixmap &icon, bool recalc, bool redraw = TRUE );
+    virtual void setKey( const QString &k );
+
+    virtual int rtti() const;
+    static int RTTI;
+
+protected:
+#ifndef QT_NO_TEXTEDIT
+    virtual void removeRenameBox();
+#endif
+    virtual void calcRect( const QString &text_ = QString::null );
+    virtual void paintItem( QPainter *p, const QColorGroup &cg );
+    virtual void paintFocus( QPainter *p, const QColorGroup &cg );
+#ifndef QT_NO_DRAGANDDROP
+    virtual void dropped( QDropEvent *e, const QValueList<QIconDragItem> &lst );
+#endif
+    virtual void dragEntered();
+    virtual void dragLeft();
+    void setItemRect( const QRect &r );
+    void setTextRect( const QRect &r );
+    void setPixmapRect( const QRect &r );
+    void calcTmpText();
+    QString tempText() const;
+
+private:
+    void init( QIconViewItem *after = 0
+#ifndef QT_NO_PICTURE
+	       , QPicture *pic = 0
+#endif
+	       );
+#ifndef QT_NO_TEXTEDIT
+    void renameItem();
+    void cancelRenameItem();
+#endif
+    void checkRect();
+
+    QIconView *view;
+    QString itemText, itemKey;
+    QString tmpText;
+    QPixmap *itemIcon;
+#ifndef QT_NO_PICTURE
+    QPicture *itemPic;
+#endif
+    QIconViewItem *prev, *next;
+    uint allow_rename : 1;
+    uint allow_drag : 1;
+    uint allow_drop : 1;
+    uint selected : 1;
+    uint selectable : 1;
+    uint dirty : 1;
+    uint wordWrapDirty : 1;
+    QRect itemRect, itemTextRect, itemIconRect;
+#ifndef QT_NO_TEXTEDIT
+    QIconViewItemLineEdit *renameBox;
+#endif
+    QRect oldRect;
+
+    QIconViewItemPrivate *d;
+
+};
+
+class QIconViewPrivate;          /* don't touch */
+
+class QM_EXPORT_ICONVIEW QIconView : public QScrollView
+{
+    friend class QIconViewItem;
+    friend class QIconViewPrivate;
+    friend class QIconViewToolTip;
+
+    Q_OBJECT
+    // #### sorting and sort direction do not work
+    Q_ENUMS( SelectionMode ItemTextPos Arrangement ResizeMode )
+    Q_PROPERTY( bool sorting READ sorting )
+    Q_PROPERTY( bool sortDirection READ sortDirection )
+    Q_PROPERTY( SelectionMode selectionMode READ selectionMode WRITE setSelectionMode )
+    Q_PROPERTY( int gridX READ gridX WRITE setGridX )
+    Q_PROPERTY( int gridY READ gridY WRITE setGridY )
+    Q_PROPERTY( int spacing READ spacing WRITE setSpacing )
+    Q_PROPERTY( ItemTextPos itemTextPos READ itemTextPos WRITE setItemTextPos )
+    Q_PROPERTY( QBrush itemTextBackground READ itemTextBackground WRITE setItemTextBackground )
+    Q_PROPERTY( Arrangement arrangement READ arrangement WRITE setArrangement )
+    Q_PROPERTY( ResizeMode resizeMode READ resizeMode WRITE setResizeMode )
+    Q_PROPERTY( int maxItemWidth READ maxItemWidth WRITE setMaxItemWidth )
+    Q_PROPERTY( int maxItemTextLength READ maxItemTextLength WRITE setMaxItemTextLength )
+    Q_PROPERTY( bool autoArrange READ autoArrange WRITE setAutoArrange )
+    Q_PROPERTY( bool itemsMovable READ itemsMovable WRITE setItemsMovable )
+    Q_PROPERTY( bool wordWrapIconText READ wordWrapIconText WRITE setWordWrapIconText )
+    Q_PROPERTY( bool showToolTips READ showToolTips WRITE setShowToolTips )
+    Q_PROPERTY( uint count READ count )
+
+public:
+    enum SelectionMode {
+	Single = 0,
+	Multi,
+	Extended,
+	NoSelection
+    };
+    enum Arrangement {
+	LeftToRight = 0,
+	TopToBottom
+    };
+    enum ResizeMode {
+	Fixed = 0,
+	Adjust
+    };
+    enum ItemTextPos {
+	Bottom = 0,
+	Right
+    };
+
+    QIconView( QWidget* parent=0, const char* name=0, WFlags f = 0 );
+    virtual ~QIconView();
+
+    virtual void insertItem( QIconViewItem *item, QIconViewItem *after = 0L );
+    virtual void takeItem( QIconViewItem *item );
+
+    int index( const QIconViewItem *item ) const;
+
+    QIconViewItem *firstItem() const;
+    QIconViewItem *lastItem() const;
+    QIconViewItem *currentItem() const;
+    virtual void setCurrentItem( QIconViewItem *item );
+    virtual void setSelected( QIconViewItem *item, bool s, bool cb = FALSE );
+
+    uint count() const;
+
+public:
+    virtual void showEvent( QShowEvent * );
+
+    virtual void setSelectionMode( SelectionMode m );
+    SelectionMode selectionMode() const;
+
+    QIconViewItem *findItem( const QPoint &pos ) const;
+    QIconViewItem *findItem( const QString &text, ComparisonFlags compare = BeginsWith ) const;
+    virtual void selectAll( bool select );
+    virtual void clearSelection();
+    virtual void invertSelection();
+
+    virtual void repaintItem( QIconViewItem *item );
+    void repaintSelectedItems();
+
+    void ensureItemVisible( QIconViewItem *item );
+    QIconViewItem* findFirstVisibleItem( const QRect &r ) const;
+    QIconViewItem* findLastVisibleItem( const QRect &r ) const;
+
+    virtual void clear();
+
+    virtual void setGridX( int rx );
+    virtual void setGridY( int ry );
+    int gridX() const;
+    int gridY() const;
+    virtual void setSpacing( int sp );
+    int spacing() const;
+    virtual void setItemTextPos( ItemTextPos pos );
+    ItemTextPos itemTextPos() const;
+    virtual void setItemTextBackground( const QBrush &b );
+    QBrush itemTextBackground() const;
+    virtual void setArrangement( Arrangement am );
+    Arrangement arrangement() const;
+    virtual void setResizeMode( ResizeMode am );
+    ResizeMode resizeMode() const;
+    virtual void setMaxItemWidth( int w );
+    int maxItemWidth() const;
+    virtual void setMaxItemTextLength( int w );
+    int maxItemTextLength() const;
+    virtual void setAutoArrange( bool b );
+    bool autoArrange() const;
+    virtual void setShowToolTips( bool b );
+    bool showToolTips() const;
+
+    void setSorting( bool sort, bool ascending = TRUE );
+    bool sorting() const;
+    bool sortDirection() const;
+
+    virtual void setItemsMovable( bool b );
+    bool itemsMovable() const;
+    virtual void setWordWrapIconText( bool b );
+    bool wordWrapIconText() const;
+
+    bool eventFilter( QObject * o, QEvent * );
+
+    QSize minimumSizeHint() const;
+    QSize sizeHint() const;
+
+    virtual void sort( bool ascending = TRUE );
+
+    virtual void setFont( const QFont & );
+    virtual void setPalette( const QPalette & );
+
+    bool isRenaming() const;
+
+public slots:
+    virtual void arrangeItemsInGrid( const QSize &grid, bool update = TRUE );
+    virtual void arrangeItemsInGrid( bool update = TRUE );
+    virtual void setContentsPos( int x, int y );
+    virtual void updateContents();
+
+signals:
+    void selectionChanged();
+    void selectionChanged( QIconViewItem *item );
+    void currentChanged( QIconViewItem *item );
+    void clicked( QIconViewItem * );
+    void clicked( QIconViewItem *, const QPoint & );
+    void pressed( QIconViewItem * );
+    void pressed( QIconViewItem *, const QPoint & );
+
+    void doubleClicked( QIconViewItem *item );
+    void returnPressed( QIconViewItem *item );
+    void rightButtonClicked( QIconViewItem* item, const QPoint& pos );
+    void rightButtonPressed( QIconViewItem* item, const QPoint& pos );
+    void mouseButtonPressed( int button, QIconViewItem* item, const QPoint& pos );
+    void mouseButtonClicked( int button, QIconViewItem* item, const QPoint& pos );
+    void contextMenuRequested( QIconViewItem* item, const QPoint &pos );
+
+#ifndef QT_NO_DRAGANDDROP
+    void dropped( QDropEvent *e, const QValueList<QIconDragItem> &lst );
+#endif
+    void moved();
+    void onItem( QIconViewItem *item );
+    void onViewport();
+    void itemRenamed( QIconViewItem *item, const QString & );
+    void itemRenamed( QIconViewItem *item );
+
+protected slots:
+    virtual void doAutoScroll();
+    virtual void adjustItems();
+    virtual void slotUpdate();
+
+private slots:
+    void movedContents( int dx, int dy );
+
+protected:
+    void drawContents( QPainter *p, int cx, int cy, int cw, int ch );
+    void contentsMousePressEvent( QMouseEvent *e );
+    void contentsMouseReleaseEvent( QMouseEvent *e );
+    void contentsMouseMoveEvent( QMouseEvent *e );
+    void contentsMouseDoubleClickEvent( QMouseEvent *e );
+    void contentsContextMenuEvent( QContextMenuEvent *e );
+
+#ifndef QT_NO_DRAGANDDROP
+    void contentsDragEnterEvent( QDragEnterEvent *e );
+    void contentsDragMoveEvent( QDragMoveEvent *e );
+    void contentsDragLeaveEvent( QDragLeaveEvent *e );
+    void contentsDropEvent( QDropEvent *e );
+#endif
+
+    void resizeEvent( QResizeEvent* e );
+    void keyPressEvent( QKeyEvent *e );
+    void focusInEvent( QFocusEvent *e );
+    void focusOutEvent( QFocusEvent *e );
+    void enterEvent( QEvent *e );
+
+    virtual void drawRubber( QPainter *p );
+#ifndef QT_NO_DRAGANDDROP
+    virtual QDragObject *dragObject();
+    virtual void startDrag();
+#endif
+    virtual void insertInGrid( QIconViewItem *item );
+    virtual void drawBackground( QPainter *p, const QRect &r );
+
+    void emitSelectionChanged( QIconViewItem * i = 0 );
+    void emitRenamed( QIconViewItem *item );
+
+    QIconViewItem *makeRowLayout( QIconViewItem *begin, int &y, bool &changed );
+
+    void styleChange( QStyle& );
+    void windowActivationChange( bool );
+
+private:
+    void contentsMousePressEventEx( QMouseEvent *e );
+    virtual void drawDragShapes( const QPoint &pnt );
+#ifndef QT_NO_DRAGANDDROP
+    virtual void initDragEnter( QDropEvent *e );
+#endif
+    void drawContents( QPainter* );
+    QIconViewItem* findItemByName( QIconViewItem *start );
+    void handleItemChange( QIconViewItem *old, bool shift,
+			   bool control, bool homeend = FALSE);
+
+    int calcGridNum( int w, int x ) const;
+    QIconViewItem *rowBegin( QIconViewItem *item ) const;
+    void updateItemContainer( QIconViewItem *item );
+    void appendItemContainer();
+    void rebuildContainers();
+    enum Direction {
+	DirUp = 0,
+	DirDown,
+	DirLeft,
+	DirRight
+    };
+    QIconViewItem* findItem( Direction dir,
+			     const QPoint &relativeTo,
+			     const QRect &searchRect ) const;
+    bool neighbourItem( Direction dir,
+			const QPoint &relativeTo,
+			const QIconViewItem *item ) const;
+    QBitmap mask( QPixmap *pix ) const;
+
+    QIconViewPrivate *d;
+
+private:	// Disabled copy constructor and operator=
+#if defined(Q_DISABLE_COPY)
+    QIconView( const QIconView & );
+    QIconView& operator=( const QIconView & );
+#endif
+};
+
+#endif // QT_NO_ICONVIEW
+
+#endif // QICONVIEW_H
Index: trunk/include/qt.h
===================================================================
--- trunk/include/qt.h	(revision 164)
+++ trunk/include/qt.h	(revision 164)
@@ -0,0 +1,371 @@
+/****************************************************************************
+**
+** Qt GUI Toolkit
+**
+** This header file efficiently includes all Qt GUI Toolkit functionality.
+**
+** Generated : Mon Oct 13 13:07:29 CEST 2003
+
+**
+** Copyright (C) 1995-2000 Trolltech AS.  All rights reserved.
+**
+** This file is part of the Qt GUI Toolkit.
+**
+*****************************************************************************/
+
+#ifndef QT_H
+#define QT_H
+#include "qglobal.h"
+#include "qfeatures.h"
+#include "qshared.h"
+#include "qptrcollection.h"
+#include "qglist.h"
+#include "qobjectdefs.h"
+#include "qnamespace.h"
+#include "qgarray.h"
+#include "qmemarray.h"
+#include "qcstring.h"
+#include "qstring.h"
+#include "qptrlist.h"
+#include "qiodevice.h"
+#include "qkeysequence.h"
+#include "qwindowdefs.h"
+#include "qgdict.h"
+#include "qfont.h"
+#include "qdatastream.h"
+#include "qpair.h"
+#include "qpoint.h"
+#include <stdio.h>
+#include "qtextstream.h"
+#include "qfontinfo.h"
+#include "qsizepolicy.h"
+#include "qtl.h"
+#include "qsize.h"
+#include "qrect.h"
+#include "qbitarray.h"
+#include "qregion.h"
+#include "qsql.h"
+#include "qstrlist.h"
+#include "qvaluelist.h"
+#include "qmap.h"
+#include "qdatetime.h"
+#include "qmime.h"
+#include "qasciidict.h"
+#include "qpaintdevice.h"
+#include "qfontmetrics.h"
+#include "qdict.h"
+#include "qevent.h"
+#include "qhostaddress.h"
+#include "qstringlist.h"
+#include "qcolor.h"
+#include <qdom.h>
+#include "qobject.h"
+#include <qdrawutil.h>
+#include "qbrush.h"
+#include "qpalette.h"
+#include "qwidget.h"
+#include "qjpunicode.h"
+#include "qtextcodec.h"
+#include "qstyle.h"
+#include "qframe.h"
+#include "qfile.h"
+#include "qfileinfo.h"
+#include "qurlinfo.h"
+#include "qwidgetlist.h"
+#include <qcombobox.h>
+#include "qgroupbox.h"
+#include "qdialog.h"
+#include <qdataview.h>
+#include "qdockwindow.h"
+#include "qcommonstyle.h"
+#include "qnetworkprotocol.h"
+#include <qeuckrcodec.h>
+#include <qgb18030codec.h>
+#include "qgcache.h"
+#include "qpixmap.h"
+#include <qgif.h>
+#include <qglcolormap.h>
+#include <qcache.h>
+#include <qdropsite.h>
+#include "qgplugin.h"
+#include <qgrid.h>
+#include "qrangecontrol.h"
+#include "qbuttongroup.h"
+#include <qdatetimeedit.h>
+#include "qgvector.h"
+#include "qhbox.h"
+#include <qhbuttongroup.h>
+#include "qiconset.h"
+#include <qhgroupbox.h>
+#include "qsocketnotifier.h"
+#include <qeventloop.h>
+#include <qhttp.h>
+#include <qaction.h>
+#include "qbuffer.h"
+#include "qimage.h"
+#include <qimageformatplugin.h>
+#include "qlineedit.h"
+#include <qintcache.h>
+#include "qintdict.h"
+#include "qmotifstyle.h"
+#include "qpicture.h"
+#include <qjiscodec.h>
+#include <qeucjpcodec.h>
+#include <qkeycode.h>
+#include <qaccel.h>
+#include "qlabel.h"
+#include "qlayout.h"
+#include <qlcdnumber.h>
+#include <qlibrary.h>
+#include <qinputdialog.h>
+#include "qscrollbar.h"
+#include "qscrollview.h"
+#include "qdir.h"
+#include "qwindowsstyle.h"
+#include "qconnection.h"
+#include "qbitmap.h"
+#include "qvariant.h"
+#include "qsignal.h"
+#include <qmessagebox.h>
+#include "qmetaobject.h"
+#include "qheader.h"
+#include <qmotifplusstyle.h>
+#include <qcdestyle.h>
+#include <qmovie.h>
+#include "qptrvector.h"
+#include "qmutex.h"
+#include "qbutton.h"
+#include <qnetwork.h>
+#include <qftp.h>
+#include "qguardedptr.h"
+#include <qobjectcleanuphandler.h>
+#include "qsqlfield.h"
+#include <qobjectdict.h>
+#include <qobjectlist.h>
+#include <qcolordialog.h>
+#include <qpaintdevicemetrics.h>
+#include "qpointarray.h"
+#include "qmenudata.h"
+#include <qlistview.h>
+#include "qpen.h"
+#include "qdragobject.h"
+#include <qiconview.h>
+#include <qpixmapcache.h>
+#include <qplatinumstyle.h>
+#include <qpngio.h>
+#include <qcursor.h>
+#include <qerrormessage.h>
+#include <qpolygonscanner.h>
+#include "qpopupmenu.h"
+#include <qprintdialog.h>
+#include <qprinter.h>
+#include <qprocess.h>
+#include "qprogressbar.h"
+#include "qsemimodal.h"
+#include <qasciicache.h>
+#include "qptrdict.h"
+#include <qcleanuphandler.h>
+#include <qptrqueue.h>
+#include <qptrstack.h>
+#include "qstylesheet.h"
+#include <qpushbutton.h>
+#include <qradiobutton.h>
+#include <qdial.h>
+#include <qdockarea.h>
+#include "qregexp.h"
+#include <qclipboard.h>
+#include <qrtlcodec.h>
+#include <qlistbox.h>
+#include <qgridview.h>
+#include "qsemaphore.h"
+#include <qprogressdialog.h>
+#include "qsocketdevice.h"
+#include <qsessionmanager.h>
+#include <qsettings.h>
+#include <qsgistyle.h>
+#include <qfontdialog.h>
+#include "qtimer.h"
+#include <qsignalmapper.h>
+#include <qsignalslotimp.h>
+#include <qsimplerichtext.h>
+#include "qwmatrix.h"
+#include <qsizegrip.h>
+#include <qabstractlayout.h>
+#include <qsjiscodec.h>
+#include <qslider.h>
+#include <qsocket.h>
+#include <qserversocket.h>
+#include <qdns.h>
+#include <qsortedlist.h>
+#include <qsound.h>
+#include <qspinbox.h>
+#include <qsplashscreen.h>
+#include <qsplitter.h>
+#include "qsqlerror.h"
+#include "qeditorfactory.h"
+#include "qsqlquery.h"
+#include "qsqlrecord.h"
+#include <qsqldriverplugin.h>
+#include "qsqlindex.h"
+#include "qsqlcursor.h"
+#include <qsqldriver.h>
+#include <qsqlform.h>
+#include "qtable.h"
+#include <qsqlpropertymap.h>
+#include <qsqldatabase.h>
+#include <qdatabrowser.h>
+#include <qsqlresult.h>
+#include <qsqlselectcursor.h>
+#include <qstatusbar.h>
+#include <qmenubar.h>
+#include <qcanvas.h>
+#include "qtranslator.h"
+#include <qstrvec.h>
+#include <qinterlacestyle.h>
+#include <qstylefactory.h>
+#include <qstyleplugin.h>
+#include "qtextedit.h"
+#include <qsyntaxhighlighter.h>
+#include <qtabbar.h>
+#include <qtabdialog.h>
+#include "qsqleditorfactory.h"
+#include <qtabwidget.h>
+#include <qtextbrowser.h>
+#include <qbig5codec.h>
+#include <qtextcodecfactory.h>
+#include <qtextcodecplugin.h>
+#include <qmultilineedit.h>
+#include "qtoolbar.h"
+#include <qtextview.h>
+#include "qwaitcondition.h"
+#include <qasyncio.h>
+#include <qfontdatabase.h>
+#include <qmainwindow.h>
+#include <qtoolbox.h>
+#include <qtoolbutton.h>
+#include <qtooltip.h>
+#include "qdesktopwidget.h"
+#include <qtsciicodec.h>
+#include "qurl.h"
+#include "qurloperator.h"
+#include <qfiledialog.h>
+#include <qutfcodec.h>
+#include <quuid.h>
+#include <qvalidator.h>
+#include <qasyncimageio.h>
+#include <qvaluestack.h>
+#include <qvaluevector.h>
+#include <qdatatable.h>
+#include <qvbox.h>
+#include <qvbuttongroup.h>
+#include <qvfbhdr.h>
+#include <qvgroupbox.h>
+#include <qthread.h>
+#include <qwhatsthis.h>
+#include <qapplication.h>
+#include <qwidgetintdict.h>
+#include <qfocusdata.h>
+#include <qwidgetplugin.h>
+#include <qwidgetstack.h>
+#include <qcheckbox.h>
+#include <qcompactstyle.h>
+#include <qwizard.h>
+#include <qpainter.h>
+#include <qworkspace.h>
+#include <qlocalfs.h>
+#include <qxml.h>
+
+#if defined( QT_MOC_CPP ) || defined( QT_H_CPP ) || defined( Q_OS_MACX )
+#include <private/qcom_p.h>
+#include <private/qucom_p.h>
+#include "private/qgfxdriverinterface_p.h"
+#include "private/qcom_p.h"
+#include "private/qimageformatinterface_p.h"
+#include "private/qisciicodec_p.h"
+#include "private/qkbddriverinterface_p.h"
+#include "private/qlayoutengine_p.h"
+#include "private/qcomlibrary_p.h"
+#include "private/qmousedriverinterface_p.h"
+#include "private/qeffects_p.h"
+#include "private/qgpluginmanager_p.h"
+#include "private/qinternal_p.h"
+#include "private/qsqldriverinterface_p.h"
+#include "private/qsqlmanager_p.h"
+#include "private/qlock_p.h"
+#include "private/qcomponentfactory_p.h"
+#include "private/qstyleinterface_p.h"
+#include "private/qrichtext_p.h"
+#include "private/qsvgdevice_p.h"
+#include "private/qfontcodecs_p.h"
+#include "private/qtextcodecinterface_p.h"
+#include "private/qpsprinter_p.h"
+#include "private/qtitlebar_p.h"
+#include "private/qucom_p.h"
+#include "private/qucomextra_p.h"
+#include "private/qpluginmanager_p.h"
+#include "private/qdir_p.h"
+#include "private/qsettings_p.h"
+#include "private/qsqlextension_p.h"
+#include "private/qdialogbuttons_p.h"
+#include "private/qwidgetinterface_p.h"
+#include "private/qwidgetresizehandler_p.h"
+#include "private/qlibrary_p.h"
+#endif // Private headers
+
+
+#ifdef Q_WS_MAC
+#include <qaquastyle.h>
+#include <qmacstyle_mac.h>
+#endif // Q_WS_MAC
+
+#ifdef Q_WS_WIN
+#include <qwindowsxpstyle.h>
+#endif
+
+#ifdef Q_WS_QWS
+#include <private/qtextengine_p.h>
+#include "qfontmanager_qws.h"
+#include <qfontfactorybdf_qws.h>
+#include <qgfxvoodoodefs_qws.h>
+#include <qgfxmatroxdefs_qws.h>
+#include <qgfxdriverplugin_qws.h>
+#include <qkbddriverfactory_qws.h>
+#include <qkbddriverplugin_qws.h>
+#include <qmousedriverfactory_qws.h>
+#include <qmousedriverplugin_qws.h>
+#include <qcopchannel_qws.h>
+#include <qdirectpainter_qws.h>
+#include "qmemorymanager_qws.h"
+#include <qmouse_qws.h>
+#include <qfontfactoryttf_qws.h>
+#ifndef Q_OS_MAC
+# include <qsoundqss_qws.h>
+#endif
+#include "qgfx_qws.h"
+#include <qgfxdriverfactory_qws.h>
+#include "qwsdisplay_qws.h"
+#include "qwssocket_qws.h"
+#include "qwsdecoration_qws.h"
+#include "qwsutils_qws.h"
+#include <qwscursor_qws.h>
+#include "qwsmanager_qws.h"
+#include "qwsdefaultdecoration_qws.h"
+#include <qgfxraster_qws.h>
+#include "qwscommand_qws.h"
+#include <qwshydrodecoration_qws.h>
+#include <qwskde2decoration_qws.h>
+#include <qwskdedecoration_qws.h>
+#include <qwsbeosdecoration_qws.h>
+#include "qwsproperty_qws.h"
+#include <qwsregionmanager_qws.h>
+#include "qwsevent_qws.h"
+#include <qwindowsystem_qws.h>
+#include <qwswindowsdecoration_qws.h>
+#endif // Q_WS_QWS
+
+
+#ifdef Q_WS_WCE
+#include <qpocketpcstyle_wce.h>
+#endif // Q_WS_WCE
+
+#endif // QT_H
Index: trunk/include/qtable.h
===================================================================
--- trunk/include/qtable.h	(revision 164)
+++ trunk/include/qtable.h	(revision 164)
@@ -0,0 +1,560 @@
+/****************************************************************************
+**
+** Definition of QTable widget class
+**
+** Created : 000607
+**
+** Copyright (C) 1992-2002 Trolltech AS.  All rights reserved.
+**
+** This file is part of the table module of the Qt GUI Toolkit.
+**
+** This file may be distributed under the terms of the Q Public License
+** as defined by Trolltech AS of Norway and appearing in the file
+** LICENSE.QPL included in the packaging of this file.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** Licensees holding valid Qt Enterprise Edition licenses may use this
+** file in accordance with the Qt Commercial License Agreement provided
+** with the Software.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
+**   information about Qt Commercial License Agreements.
+** See http://www.trolltech.com/qpl/ for QPL licensing information.
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QTABLE_H
+#define QTABLE_H
+
+#ifndef QT_H
+#include "qscrollview.h"
+#include "qpixmap.h"
+#include "qptrvector.h"
+#include "qheader.h"
+#include "qmemarray.h"
+#include "qptrlist.h"
+#include "qguardedptr.h"
+#include "qshared.h"
+#include "qintdict.h"
+#include "qstringlist.h"
+#endif // QT_H
+
+
+#ifndef QT_NO_TABLE
+
+#if !defined( QT_MODULE_TABLE ) || defined( QT_LICENSE_PROFESSIONAL ) || defined( QT_INTERNAL_TABLE )
+#define QM_EXPORT_TABLE
+#ifndef QM_TEMPLATE_EXTERN_TABLE
+#   define QM_TEMPLATE_EXTERN_TABLE
+#endif
+#else
+#define QM_EXPORT_TABLE Q_EXPORT
+#define QM_TEMPLATE_EXTERN_TABLE Q_TEMPLATE_EXTERN
+#endif
+
+class QTableHeader;
+class QValidator;
+class QTable;
+class QPaintEvent;
+class QTimer;
+class QResizeEvent;
+class QComboBox;
+class QCheckBox;
+class QDragObject;
+
+struct QTablePrivate;
+struct QTableHeaderPrivate;
+
+
+class QM_EXPORT_TABLE QTableSelection
+{
+public:
+    QTableSelection();
+    QTableSelection( int start_row, int start_col, int end_row, int end_col );
+    void init( int row, int col );
+    void expandTo( int row, int col );
+    bool operator==( const QTableSelection &s ) const;
+    bool operator!=( const QTableSelection &s ) const { return !(operator==(s)); }
+
+    int topRow() const { return tRow; }
+    int bottomRow() const { return bRow; }
+    int leftCol() const { return lCol; }
+    int rightCol() const { return rCol; }
+    int anchorRow() const { return aRow; }
+    int anchorCol() const { return aCol; }
+    int numRows() const;
+    int numCols() const;
+
+    bool isActive() const { return active; }
+    bool isEmpty() const { return numRows() == 0; }
+
+private:
+    uint active : 1;
+    uint inited : 1;
+    int tRow, lCol, bRow, rCol;
+    int aRow, aCol;
+};
+
+#define Q_DEFINED_QTABLE_SELECTION
+#include "qwinexport.h"
+
+class QM_EXPORT_TABLE QTableItem : public Qt
+{
+    friend class QTable;
+
+public:
+    enum EditType { Never, OnTyping, WhenCurrent, Always };
+
+    QTableItem( QTable *table, EditType et );
+    QTableItem( QTable *table, EditType et, const QString &text );
+    QTableItem( QTable *table, EditType et, const QString &text,
+                const QPixmap &p );
+    virtual ~QTableItem();
+
+    virtual QPixmap pixmap() const;
+    virtual QString text() const;
+    virtual void setPixmap( const QPixmap &p );
+    virtual void setText( const QString &t );
+    QTable *table() const { return t; }
+
+    virtual int alignment() const;
+    virtual void setWordWrap( bool b );
+    bool wordWrap() const;
+
+    EditType editType() const;
+    virtual QWidget *createEditor() const;
+    virtual void setContentFromEditor( QWidget *w );
+    virtual void setReplaceable( bool );
+    bool isReplaceable() const;
+
+    virtual QString key() const;
+    virtual QSize sizeHint() const;
+
+    virtual void setSpan( int rs, int cs );
+    int rowSpan() const;
+    int colSpan() const;
+
+    virtual void setRow( int r );
+    virtual void setCol( int c );
+    int row() const;
+    int col() const;
+
+    virtual void paint( QPainter *p, const QColorGroup &cg,
+                        const QRect &cr, bool selected );
+
+    void updateEditor( int oldRow, int oldCol );
+
+    virtual void setEnabled( bool b );
+    bool isEnabled() const;
+
+    virtual int rtti() const;
+    static int RTTI;
+
+private:
+    QString txt;
+    QPixmap pix;
+    QTable *t;
+    EditType edType;
+    uint wordwrap : 1;
+    uint tcha : 1;
+    uint enabled : 1;
+    int rw, cl;
+    int rowspan, colspan;
+#if (QT_VERSION >= 0x040000)
+#error "Add a setAlignment() function in 4.0 (but no d pointer)"
+#endif
+};
+
+#define Q_DEFINED_QTABLE_ITEM
+#include "qwinexport.h"
+
+class QM_EXPORT_TABLE QComboTableItem : public QTableItem
+{
+public:
+    QComboTableItem( QTable *table, const QStringList &list, bool editable = FALSE );
+    ~QComboTableItem();
+    virtual QWidget *createEditor() const;
+    virtual void setContentFromEditor( QWidget *w );
+    virtual void paint( QPainter *p, const QColorGroup &cg,
+                        const QRect &cr, bool selected );
+    virtual void setCurrentItem( int i );
+    virtual void setCurrentItem( const QString &i );
+    int currentItem() const;
+    QString currentText() const;
+    int count() const;
+#if !defined(Q_NO_USING_KEYWORD)
+    using QTableItem::text;
+#endif
+    QString text( int i ) const;
+    virtual void setEditable( bool b );
+    bool isEditable() const;
+    virtual void setStringList( const QStringList &l );
+
+    int rtti() const;
+    static int RTTI;
+
+    QSize sizeHint() const;
+
+private:
+    QComboBox *cb;
+    QStringList entries;
+    int current;
+    bool edit;
+    static QComboBox *fakeCombo;
+    static QWidget *fakeComboWidget;
+    static int fakeRef;
+
+};
+
+class QM_EXPORT_TABLE QCheckTableItem : public QTableItem
+{
+public:
+    QCheckTableItem( QTable *table, const QString &txt );
+    void setText( const QString &t );
+    virtual QWidget *createEditor() const;
+    virtual void setContentFromEditor( QWidget *w );
+    virtual void paint( QPainter *p, const QColorGroup &cg,
+                        const QRect &cr, bool selected );
+    virtual void setChecked( bool b );
+    bool isChecked() const;
+
+    int rtti() const;
+    static int RTTI;
+
+    QSize sizeHint() const;
+
+private:
+    QCheckBox *cb;
+    bool checked;
+
+};
+
+class QM_EXPORT_TABLE QTable : public QScrollView
+{
+    Q_OBJECT
+    Q_ENUMS( SelectionMode FocusStyle )
+    Q_PROPERTY( int numRows READ numRows WRITE setNumRows )
+    Q_PROPERTY( int numCols READ numCols WRITE setNumCols )
+    Q_PROPERTY( bool showGrid READ showGrid WRITE setShowGrid )
+    Q_PROPERTY( bool rowMovingEnabled READ rowMovingEnabled WRITE setRowMovingEnabled )
+    Q_PROPERTY( bool columnMovingEnabled READ columnMovingEnabled WRITE setColumnMovingEnabled )
+    Q_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly )
+    Q_PROPERTY( bool sorting READ sorting WRITE setSorting )
+    Q_PROPERTY( SelectionMode selectionMode READ selectionMode WRITE setSelectionMode )
+    Q_PROPERTY( FocusStyle focusStyle READ focusStyle WRITE setFocusStyle )
+    Q_PROPERTY( int numSelections READ numSelections )
+
+    friend class QTableHeader;
+    friend class QComboTableItem;
+    friend class QCheckTableItem;
+    friend class QTableItem;
+
+public:
+    QTable( QWidget* parent=0, const char* name=0 );
+    QTable( int numRows, int numCols,
+            QWidget* parent=0, const char* name=0 );
+    ~QTable();
+
+    QHeader *horizontalHeader() const;
+    QHeader *verticalHeader() const;
+
+    enum SelectionMode { Single, Multi, SingleRow, MultiRow, NoSelection };
+    virtual void setSelectionMode( SelectionMode mode );
+    SelectionMode selectionMode() const;
+
+    virtual void setItem( int row, int col, QTableItem *item );
+    virtual void setText( int row, int col, const QString &text );
+    virtual void setPixmap( int row, int col, const QPixmap &pix );
+    virtual QTableItem *item( int row, int col ) const;
+    virtual QString text( int row, int col ) const;
+    virtual QPixmap pixmap( int row, int col ) const;
+    virtual void clearCell( int row, int col );
+
+    virtual QRect cellGeometry( int row, int col ) const;
+    virtual int columnWidth( int col ) const;
+    virtual int rowHeight( int row ) const;
+    virtual int columnPos( int col ) const;
+    virtual int rowPos( int row ) const;
+    virtual int columnAt( int x ) const;
+    virtual int rowAt( int y ) const;
+
+    virtual int numRows() const;
+    virtual int numCols() const;
+
+    void updateCell( int row, int col );
+
+    bool eventFilter( QObject * o, QEvent * );
+
+    int currentRow() const { return curRow; }
+    int currentColumn() const { return curCol; }
+    void ensureCellVisible( int row, int col );
+
+    bool isSelected( int row, int col ) const;
+    bool isRowSelected( int row, bool full = FALSE ) const;
+    bool isColumnSelected( int col, bool full = FALSE ) const;
+    int numSelections() const;
+    QTableSelection selection( int num ) const;
+    virtual int addSelection( const QTableSelection &s );
+    virtual void removeSelection( const QTableSelection &s );
+    virtual void removeSelection( int num );
+    virtual int currentSelection() const;
+
+    void selectCells( int start_row, int start_col, int end_row, int end_col );
+    void selectRow( int row );
+    void selectColumn( int col );
+
+    bool showGrid() const;
+
+    bool columnMovingEnabled() const;
+    bool rowMovingEnabled() const;
+
+    virtual void sortColumn( int col, bool ascending = TRUE,
+                             bool wholeRows = FALSE );
+    bool sorting() const;
+
+    virtual void takeItem( QTableItem *i );
+
+    virtual void setCellWidget( int row, int col, QWidget *e );
+    virtual QWidget *cellWidget( int row, int col ) const;
+    virtual void clearCellWidget( int row, int col );
+
+    virtual QRect cellRect( int row, int col ) const;
+
+    virtual void paintCell( QPainter *p, int row, int col,
+                            const QRect &cr, bool selected );
+    virtual void paintCell( QPainter *p, int row, int col,
+                            const QRect &cr, bool selected, const QColorGroup &cg );
+    virtual void paintFocus( QPainter *p, const QRect &r );
+    QSize sizeHint() const;
+
+    bool isReadOnly() const;
+    bool isRowReadOnly( int row ) const;
+    bool isColumnReadOnly( int col ) const;
+
+    void setEnabled( bool b );
+
+    void repaintSelections();
+
+    enum FocusStyle { FollowStyle, SpreadSheet };
+    virtual void setFocusStyle( FocusStyle fs );
+    FocusStyle focusStyle() const;
+
+    void updateHeaderStates();
+
+public slots:
+    virtual void setNumRows( int r );
+    virtual void setNumCols( int r );
+    virtual void setShowGrid( bool b );
+    virtual void hideRow( int row );
+    virtual void hideColumn( int col );
+    virtual void showRow( int row );
+    virtual void showColumn( int col );
+    bool isRowHidden( int row ) const;
+    bool isColumnHidden( int col ) const;
+
+    virtual void setColumnWidth( int col, int w );
+    virtual void setRowHeight( int row, int h );
+
+    virtual void adjustColumn( int col );
+    virtual void adjustRow( int row );
+
+    virtual void setColumnStretchable( int col, bool stretch );
+    virtual void setRowStretchable( int row, bool stretch );
+    bool isColumnStretchable( int col ) const;
+    bool isRowStretchable( int row ) const;
+    virtual void setSorting( bool b );
+    virtual void swapRows( int row1, int row2, bool swapHeader = FALSE );
+    virtual void swapColumns( int col1, int col2, bool swapHeader = FALSE );
+    virtual void swapCells( int row1, int col1, int row2, int col2 );
+
+    virtual void setLeftMargin( int m );
+    virtual void setTopMargin( int m );
+    virtual void setCurrentCell( int row, int col );
+    void clearSelection( bool repaint = TRUE );
+    virtual void setColumnMovingEnabled( bool b );
+    virtual void setRowMovingEnabled( bool b );
+
+    virtual void setReadOnly( bool b );
+    virtual void setRowReadOnly( int row, bool ro );
+    virtual void setColumnReadOnly( int col, bool ro );
+
+    virtual void setDragEnabled( bool b );
+    bool dragEnabled() const;
+
+    virtual void insertRows( int row, int count = 1 );
+    virtual void insertColumns( int col, int count = 1 );
+    virtual void removeRow( int row );
+    virtual void removeRows( const QMemArray<int> &rows );
+    virtual void removeColumn( int col );
+    virtual void removeColumns( const QMemArray<int> &cols );
+
+    virtual void editCell( int row, int col, bool replace = FALSE );
+
+    void setRowLabels( const QStringList &labels );
+    void setColumnLabels( const QStringList &labels );
+
+protected:
+    enum EditMode { NotEditing, Editing, Replacing };
+    void drawContents( QPainter *p, int cx, int cy, int cw, int ch );
+    void contentsMousePressEvent( QMouseEvent* );
+    void contentsMouseMoveEvent( QMouseEvent* );
+    void contentsMouseDoubleClickEvent( QMouseEvent* );
+    void contentsMouseReleaseEvent( QMouseEvent* );
+    void contentsContextMenuEvent( QContextMenuEvent * e );
+    void keyPressEvent( QKeyEvent* );
+    void focusInEvent( QFocusEvent* );
+    void focusOutEvent( QFocusEvent* );
+    void viewportResizeEvent( QResizeEvent * );
+    void showEvent( QShowEvent *e );
+    void paintEvent( QPaintEvent *e );
+    void setEditMode( EditMode mode, int row, int col );
+#ifndef QT_NO_DRAGANDDROP
+    virtual void contentsDragEnterEvent( QDragEnterEvent *e );
+    virtual void contentsDragMoveEvent( QDragMoveEvent *e );
+    virtual void contentsDragLeaveEvent( QDragLeaveEvent *e );
+    virtual void contentsDropEvent( QDropEvent *e );
+    virtual QDragObject *dragObject();
+    virtual void startDrag();
+#endif
+
+    virtual void paintEmptyArea( QPainter *p, int cx, int cy, int cw, int ch );
+    virtual void activateNextCell();
+    virtual QWidget *createEditor( int row, int col, bool initFromCell ) const;
+    virtual void setCellContentFromEditor( int row, int col );
+    virtual QWidget *beginEdit( int row, int col, bool replace );
+    virtual void endEdit( int row, int col, bool accept, bool replace );
+
+    virtual void resizeData( int len );
+    virtual void insertWidget( int row, int col, QWidget *w );
+    int indexOf( int row, int col ) const;
+
+    void windowActivationChange( bool );
+    bool isEditing() const;
+    EditMode editMode() const;
+    int currEditRow() const;
+    int currEditCol() const;
+
+protected slots:
+    virtual void columnWidthChanged( int col );
+    virtual void rowHeightChanged( int row );
+    virtual void columnIndexChanged( int section, int fromIndex, int toIndex );
+    virtual void rowIndexChanged( int section, int fromIndex, int toIndex );
+    virtual void columnClicked( int col );
+
+signals:
+    void currentChanged( int row, int col );
+    void clicked( int row, int col, int button, const QPoint &mousePos );
+    void doubleClicked( int row, int col, int button, const QPoint &mousePos );
+    void pressed( int row, int col, int button, const QPoint &mousePos );
+    void selectionChanged();
+    void valueChanged( int row, int col );
+    void contextMenuRequested( int row, int col, const QPoint &pos );
+#ifndef QT_NO_DRAGANDDROP
+    void dropped( QDropEvent *e );
+#endif
+
+private slots:
+    void doAutoScroll();
+    void doValueChanged();
+    void updateGeometriesSlot();
+
+private:
+    void contentsMousePressEventEx( QMouseEvent* );
+    void drawContents( QPainter* );
+    void updateGeometries();
+    void repaintSelections( QTableSelection *oldSelection,
+                            QTableSelection *newSelection,
+                            bool updateVertical = TRUE,
+                            bool updateHorizontal = TRUE );
+    QRect rangeGeometry( int topRow, int leftCol,
+                         int bottomRow, int rightCol, bool &optimize );
+    void fixRow( int &row, int y );
+    void fixCol( int &col, int x );
+
+    void init( int numRows, int numCols );
+    QSize tableSize() const;
+    void repaintCell( int row, int col );
+    void contentsToViewport2( int x, int y, int& vx, int& vy );
+    QPoint contentsToViewport2( const QPoint &p );
+    void viewportToContents2( int vx, int vy, int& x, int& y );
+    QPoint viewportToContents2( const QPoint &p );
+
+    void updateRowWidgets( int row );
+    void updateColWidgets( int col );
+    bool isSelected( int row, int col, bool includeCurrent ) const;
+    void setCurrentCell( int row, int col, bool updateSelections, bool ensureVisible = FALSE );
+    void fixCell( int &row, int &col, int key );
+    void delayedUpdateGeometries();
+    struct TableWidget
+    {
+	TableWidget( QWidget *w, int r, int c ) : wid( w ), row( r ), col ( c ) {}
+	QWidget *wid;
+	int row, col;
+    };
+    void saveContents( QPtrVector<QTableItem> &tmp,
+		       QPtrVector<TableWidget> &tmp2 );
+    void updateHeaderAndResizeContents( QTableHeader *header,
+					int num, int colRow,
+					int width, bool &updateBefore );
+    void restoreContents( QPtrVector<QTableItem> &tmp,
+			  QPtrVector<TableWidget> &tmp2 );
+    void finishContentsResze( bool updateBefore );
+
+private:
+    QPtrVector<QTableItem> contents;
+    QPtrVector<QWidget> widgets;
+    int curRow;
+    int curCol;
+    QTableHeader *leftHeader, *topHeader;
+    EditMode edMode;
+    int editCol, editRow;
+    QPtrList<QTableSelection> selections;
+    QTableSelection *currentSel;
+    QTimer *autoScrollTimer;
+    int lastSortCol;
+    bool sGrid : 1;
+    bool mRows : 1;
+    bool mCols : 1;
+    bool asc : 1;
+    bool doSort : 1;
+    bool unused : 1;
+    bool readOnly : 1;
+    bool shouldClearSelection : 1;
+    bool dEnabled : 1;
+    bool context_menu : 1;
+    bool drawActiveSelection : 1;
+    bool was_visible : 1;
+    SelectionMode selMode;
+    int pressedRow, pressedCol;
+    QTablePrivate *d;
+    QIntDict<int> roRows;
+    QIntDict<int> roCols;
+    int startDragRow;
+    int startDragCol;
+    QPoint dragStartPos;
+    int oldCurrentRow, oldCurrentCol;
+    QWidget *unused_topLeftCorner; //### remove in 4.0
+    FocusStyle focusStl;
+    QSize unused_cachedSizeHint; // ### remove in 4.0
+
+#if defined(Q_DISABLE_COPY)
+    QTable( const QTable & );
+    QTable &operator=( const QTable & );
+#endif
+};
+
+#define Q_DEFINED_QTABLE
+#include "qwinexport.h"
+#endif // QT_NO_TABLE
+#endif // TABLE_H
